Skip to content

Commit

Permalink
Merge branch 'main' into update-husky
Browse files Browse the repository at this point in the history
  • Loading branch information
rmccar authored Jul 28, 2023
2 parents 1b6c1c1 + d2ce3aa commit 7d26e1d
Show file tree
Hide file tree
Showing 17 changed files with 127 additions and 130 deletions.
2 changes: 1 addition & 1 deletion __snapshots__/layout/_template.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ exports[`base page template matches the full configuration snapshot 1`] = `
<button type=\\"button\\" class=\\"ons-btn ons-u-d-no ons-js-sub-navigation-button ons-btn--mobile ons-btn--dropdown\\" aria-label=\\"Toggle section navigation\\" aria-controls=\\"sub-nav\\" aria-expanded=\\"false\\">
<button type=\\"button\\" class=\\"ons-btn ons-u-d-no ons-js-sub-navigation-button ons-btn--mobile ons-btn--dropdown\\" aria-label=\\"Toggle Design system menu\\" aria-controls=\\"sub-nav\\" aria-expanded=\\"false\\">
<span class=\\"ons-btn__inner\\"><span class=\\"ons-btn__text\\">Design system</span>
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,5 @@
},
"resolutions": {
"minimist": "^1.2.5"
},
"dependencies": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"text": 'Topic'
}
},
"description": '<p>Figures on <em class="ons-highlight">crime</em> levels and trends for England and Wales based primarily on two sets of statistics: the <em class="ons-highlight">Crime</em> Survey for England and Wales (CSEW) and police recorded crime data.</p>
"description": '<p>Figures on <strong class="ons-highlight">crime</strong> levels and trends for England and Wales based primarily on two sets of statistics: the <strong class="ons-highlight">Crime</strong> Survey for England and Wales (CSEW) and police recorded crime data.</p>
<p>View all <a href="#0">datasets</a> or <a href="#0">publications</a> related to <a href="#0">Crime and justice</a></p>'
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"text": 'Topic'
}
},
"description": '<p>Figures on <em class="ons-highlight">crime</em> levels and trends for England and Wales based primarily on two sets of statistics: the <em class="ons-highlight">Crime</em> Survey for England and Wales (CSEW) and police recorded <em class="ons-highlight">crime</em> data.</p>
"description": '<p>Figures on <strong class="ons-highlight">crime</strong> levels and trends for England and Wales based primarily on two sets of statistics: the <strong class="ons-highlight">Crime</strong> Survey for England and Wales (CSEW) and police recorded <strong class="ons-highlight">crime</strong> data.</p>
<p>View all <a href="#0">datasets</a> or <a href="#0">publications</a> related to <a href="#0">Crime and justice</a></p>'
},
{
Expand All @@ -29,7 +29,7 @@
"short": '18 February 2021'
}
},
"description": '<p>Domestic abuse and sexual assault outcomes for disabled people in England and Wales aged 16 to 59 years, with analysis by age, sex, impairment type, impairment severity, country and region using the <em class="ons-highlight">Crime</em> Survey for England and Wales (CSEW) data.</p>'
"description": '<p>Domestic abuse and sexual assault outcomes for disabled people in England and Wales aged 16 to 59 years, with analysis by age, sex, impairment type, impairment severity, country and region using the <strong class="ons-highlight">Crime</strong> Survey for England and Wales (CSEW) data.</p>'
},
{
"url": '#0',
Expand All @@ -45,7 +45,7 @@
"short": '2 December 2019'
}
},
"description": '<p>An overview of published data on disability and <em class="ons-highlight">crime</em> in the UK and analysis of the experience of domestic abuse and sexual assault for disabled adults aged 16 to 59 years in England and Wales. Analysis by age, sex and impairment type.</p>'
"description": '<p>An overview of published data on disability and <strong class="ons-highlight">crime</strong> in the UK and analysis of the experience of domestic abuse and sexual assault for disabled adults aged 16 to 59 years in England and Wales. Analysis by age, sex and impairment type.</p>'
},
{
"url": '#0',
Expand Down
2 changes: 1 addition & 1 deletion src/components/fieldset/_fieldset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
margin: 0;
padding: 0 0 1.5rem;

em,
strong,
.ons-highlight {
@extend .ons-highlight;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
],
"toggleNavigationButton": {
"text": 'Menu',
"ariaLabel": 'Toggle main menu'
"ariaLabel": 'Toggle menu'
},
"subNavigation": {
"id": 'sub-nav',
Expand Down
2 changes: 1 addition & 1 deletion src/components/navigation/_macro.njk
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"type": "button",
"variants": ["mobile", "dropdown"],
"attributes": {
"aria-label": "Toggle section navigation",
"aria-label": "Toggle " + params.navigation.currentPageTitle + " menu" if params.navigation.currentPageTitle else "Toggle section menu",
"aria-controls": params.navigation.subNavigation.id,
"aria-expanded": "false"
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/navigation/_macro.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const PARAMS = {
id: 'main-nav',
ariaLabel: 'Main menu',
currentPath: ['#1', '/sub-item-1', '/sub-item-2/child-item-1'],
currentPageTitle: 'Main nav item 2',
currentPageTitle: 'main nav item 2',
itemsList: [
{
title: 'Main nav item 1',
Expand Down Expand Up @@ -210,12 +210,12 @@ describe('macro: navigation', () => {
faker.renderComponent('navigation', { navigation: PARAMS });

expect(buttonSpy.occurrences).toContainEqual({
text: 'Main nav item 2',
text: 'main nav item 2',
classes: 'ons-u-d-no ons-js-sub-navigation-button',
variants: ['mobile', 'dropdown'],
type: 'button',
attributes: {
'aria-label': 'Toggle section navigation',
'aria-label': 'Toggle main nav item 2 menu',
'aria-controls': 'sub-nav',
'aria-expanded': 'false',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ layout: ~
{% block main %}
{% call onsQuestion({
"title": "<mark class=\"ons-instruction\">Interviewer note:</mark>Who to interview",
"instruction": "<p>Only interview a person who was usually living at the property on <em>Sunday 21 March 2021</em>.</p><p>If none of those house members are available, you must save and sign out and return to the address to interview one of them at a later date.</p>",
"instruction": "<p>Only interview a person who was usually living at the property on <strong>Sunday 21 March 2021</strong>.</p><p>If none of those house members are available, you must save and sign out and return to the address to interview one of them at a later date.</p>",
"submitButton": {
"variants": "timer",
"text": "Continue"
Expand Down
20 changes: 9 additions & 11 deletions src/components/relationships/_macro.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import axe from '../../tests/helpers/axe';
import { renderComponent, templateFaker } from '../../tests/helpers/rendering';

const EXAMPLE_RELATIONSHIPS = {
playback: "Amanda Bloggs is Joe Bloggs' <em>…</em>",
playback: "Amanda Bloggs is Joe Bloggs' <strong>…</strong>",
name: 'relationship',
dontWrap: true,
legendIsQuestionTitle: true,
Expand All @@ -18,8 +18,8 @@ const EXAMPLE_RELATIONSHIPS = {
text: 'Grandparent',
},
attributes: {
'data-title': 'Thinking of Joe Bloggs, Amanda Bloggs is their <em>grandparents</em>',
'data-playback': "Amanda Bloggs is Joe Bloggs' <em>grandparents</em>",
'data-title': 'Thinking of Joe Bloggs, Amanda Bloggs is their <strong>grandparents</strong>',
'data-playback': "Amanda Bloggs is Joe Bloggs' <strong>grandparents</strong>",
},
},
{
Expand All @@ -29,8 +29,8 @@ const EXAMPLE_RELATIONSHIPS = {
text: 'Other relation',
},
attributes: {
'data-title': 'Thinking of Joe Bloggs, Amanda Bloggs is their <em>other relation</em>',
'data-playback': "Amanda Bloggs is Joe Bloggs' <em>other relation</em>",
'data-title': 'Thinking of Joe Bloggs, Amanda Bloggs is their <strong>other relation</strong>',
'data-playback': "Amanda Bloggs is Joe Bloggs' <strong>other relation</strong>",
},
},
{
Expand All @@ -41,8 +41,8 @@ const EXAMPLE_RELATIONSHIPS = {
description: 'Including foster child',
},
attributes: {
'data-title': 'Thinking of Joe Bloggs, Amanda Bloggs is <em>unrelated</em> to Joe Bloggs',
'data-playback': 'Amanda Bloggs is <em>unrelated</em> to Joe Bloggs',
'data-title': 'Thinking of Joe Bloggs, Amanda Bloggs is <strong>unrelated</strong> to Joe Bloggs',
'data-playback': 'Amanda Bloggs is <strong>unrelated</strong> to Joe Bloggs',
},
},
],
Expand Down Expand Up @@ -82,10 +82,8 @@ describe('macro: relationships', () => {
it('has the provided `playback` text', () => {
const $ = cheerio.load(renderComponent('relationships', EXAMPLE_RELATIONSHIPS));

const playbackContent = $('.ons-relationships__playback')
.html()
.trim();
expect(playbackContent).toBe("Amanda Bloggs is Joe Bloggs' <em>…</em>");
const playbackContent = $('.ons-relationships__playback').html().trim();
expect(playbackContent).toBe("Amanda Bloggs is Joe Bloggs' <strong>…</strong>");
});

it('has playback paragraph hidden initially', async () => {
Expand Down
56 changes: 28 additions & 28 deletions src/components/relationships/example-relationships-error.njk
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ layout: ~
}}
{% endcall %}
{% call onsQuestion({
"title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>…</em>",
"title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>…</strong>",
"description": "<p>Complete the sentence by selecting the appropriate relationship</p>",
"readDescriptionFirst": true,
"legendIsQuestionTitle": true,
"legendTitleClasses": "ons-js-relationships-legend",
"submitButton": true
}) %}
{{ onsRelationships({
"playback": "Amanda Bloggs is Joe Bloggs' <em>…</em>",
"playback": "Amanda Bloggs is Joe Bloggs' <strong>…</strong>",
"name": "relationship",
"dontWrap": true,
"error": {
Expand All @@ -68,8 +68,8 @@ layout: ~
"text": "Husband or wife"
},
"attributes": {
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>husband or wife</em>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>husband or wife</em>"
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>husband or wife</strong>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>husband or wife</strong>"
}
},
{
Expand All @@ -79,8 +79,8 @@ layout: ~
"text": "Legally registered civil partner"
},
"attributes": {
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>legally registered civil partner</em>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>legally registered civil partner</em>"
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>legally registered civil partner</strong>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>legally registered civil partner</strong>"
}
},
{
Expand All @@ -90,8 +90,8 @@ layout: ~
"text": "Partner"
},
"attributes": {
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>partner</em>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>partner</em>"
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>partner</strong>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>partner</strong>"
}
},
{
Expand All @@ -101,8 +101,8 @@ layout: ~
"text": "Son or daughter"
},
"attributes": {
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>son or daughter</em>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>son or daughter</em>"
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>son or daughter</strong>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>son or daughter</strong>"
}
},
{
Expand All @@ -112,8 +112,8 @@ layout: ~
"text": "Stepchild"
},
"attributes": {
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>stepchild</em>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>stepchild</em>"
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>stepchild</strong>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>stepchild</strong>"
}
},
{
Expand All @@ -123,8 +123,8 @@ layout: ~
"text": "Brother or sister"
},
"attributes": {
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>brother or sister</em>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>brother or sister</em>"
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>brother or sister</strong>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>brother or sister</strong>"
}
},
{
Expand All @@ -134,8 +134,8 @@ layout: ~
"text": "Stepbrother or stepsister"
},
"attributes": {
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>stepbrother or sister</em>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>stepbrother or sister</em>"
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>stepbrother or sister</strong>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>stepbrother or sister</strong>"
}
},
{
Expand All @@ -145,8 +145,8 @@ layout: ~
"text": "Mother or father"
},
"attributes": {
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>mother or father</em>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>mother or father</em>"
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>mother or father</strong>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>mother or father</strong>"
}
},
{
Expand All @@ -156,8 +156,8 @@ layout: ~
"text": "Stepmother or stepfather"
},
"attributes": {
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>stepmother or stepfather</em>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>stepmother or stepfather</em>"
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>stepmother or stepfather</strong>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>stepmother or stepfather</strong>"
}
},
{
Expand All @@ -167,8 +167,8 @@ layout: ~
"text": "Grandchild"
},
"attributes": {
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>grandchild</em>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>grandchild</em>"
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>grandchild</strong>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>grandchild</strong>"
}
},
{
Expand All @@ -178,8 +178,8 @@ layout: ~
"text": "Grandparent"
},
"attributes": {
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>grandparents</em>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>grandparents</em>"
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>grandparents</strong>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>grandparents</strong>"
}
},
{
Expand All @@ -189,8 +189,8 @@ layout: ~
"text": "Other relation"
},
"attributes": {
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>other relation</em>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <em>other relation</em>"
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>other relation</strong>",
"data-playback": "Amanda Bloggs is Joe Bloggs' <strong>other relation</strong>"
}
},
{
Expand All @@ -201,8 +201,8 @@ layout: ~
"description": "Including foster child"
},
"attributes": {
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is <em>unrelated</em> to Joe Bloggs",
"data-playback": "Amanda Bloggs is <em>unrelated</em> to Joe Bloggs"
"data-title": "Thinking of Joe Bloggs, Amanda Bloggs is <strong>unrelated</strong> to Joe Bloggs",
"data-playback": "Amanda Bloggs is <strong>unrelated</strong> to Joe Bloggs"
}
}
]
Expand Down
Loading

0 comments on commit 7d26e1d

Please sign in to comment.