@ons/design-system 65.0.0 → 65.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/components/access-code/access-code.scss +3 -3
  2. package/components/address-input/autosuggest.address.error.js +1 -1
  3. package/components/address-input/autosuggest.address.js +2 -2
  4. package/components/address-input/autosuggest.address.spec.js +5 -5
  5. package/components/autosuggest/_autosuggest.scss +9 -9
  6. package/components/autosuggest/_macro.njk +30 -31
  7. package/components/autosuggest/_macro.spec.js +18 -18
  8. package/components/autosuggest/autosuggest.spec.js +31 -31
  9. package/components/autosuggest/autosuggest.ui.js +8 -9
  10. package/components/button/_button.scss +11 -14
  11. package/components/card/_card.scss +14 -0
  12. package/components/card/_macro.njk +7 -8
  13. package/components/checkboxes/_checkbox.scss +1 -4
  14. package/components/checkboxes/example-checkboxes-with-revealed-checkboxes-expanded.njk +88 -0
  15. package/components/checkboxes/example-checkboxes-with-revealed-radios-expanded.njk +70 -0
  16. package/components/checkboxes/example-checkboxes-with-revealed-select-expanded.njk +72 -0
  17. package/components/checkboxes/example-checkboxes-with-revealed-text-input-expanded.njk +60 -0
  18. package/components/content-pagination/_content-pagination.scss +1 -1
  19. package/components/document-list/_macro.njk +5 -7
  20. package/components/document-list/_macro.spec.js +2 -2
  21. package/components/document-list/example-document-list-search-result-featured.njk +1 -1
  22. package/components/document-list/example-document-list-search-results.njk +3 -3
  23. package/components/download-resources/_download-resources.scss +3 -5
  24. package/components/external-link/example-external-link.njk +1 -1
  25. package/components/fieldset/_fieldset.scss +1 -1
  26. package/components/header/_macro.njk +4 -4
  27. package/components/header/example-header-external-with-navigation.njk +5 -5
  28. package/components/header/example-header-external-with-service-links.njk +3 -3
  29. package/components/header/example-header-external-with-sub-navigation.njk +10 -10
  30. package/components/header/example-header-internal.njk +2 -2
  31. package/components/header/example-header-neutral-for-multicoloured-logo.njk +6 -6
  32. package/components/helpers/_grid.scss +6 -0
  33. package/components/helpers/grid.njk +19 -0
  34. package/components/input/_input-type.scss +2 -8
  35. package/components/input/_input.scss +4 -3
  36. package/components/list/_list.scss +5 -2
  37. package/components/list/_macro.njk +22 -10
  38. package/components/list/_macro.spec.js +42 -0
  39. package/components/modal/_modal.scss +3 -6
  40. package/components/navigation/_macro.njk +6 -6
  41. package/components/navigation/_macro.spec.js +4 -4
  42. package/components/navigation/navigation.js +6 -2
  43. package/components/pagination/_macro.njk +17 -2
  44. package/components/pagination/_pagination.scss +14 -0
  45. package/components/phase-banner/example-phase-banner-alpha.njk +13 -2
  46. package/components/phase-banner/example-phase-banner-beta.njk +13 -2
  47. package/components/question/example-question-interviewer-note.njk +1 -1
  48. package/components/radios/example-radios-with-clear-button-expanded.njk +98 -0
  49. package/components/radios/example-radios-with-revealed-checkboxes-expanded.njk +70 -0
  50. package/components/radios/example-radios-with-revealed-radios-expanded.njk +69 -0
  51. package/components/radios/example-radios-with-revealed-select-expanded.njk +70 -0
  52. package/components/radios/example-radios-with-revealed-text-input-expanded.njk +81 -0
  53. package/components/relationships/_macro.spec.js +9 -11
  54. package/components/relationships/example-relationships-error.njk +28 -28
  55. package/components/relationships/example-relationships-you.njk +29 -29
  56. package/components/relationships/example-relationships.njk +28 -28
  57. package/components/relationships/relationships.spec.js +13 -13
  58. package/components/reply/_macro.njk +5 -2
  59. package/components/reply/_macro.spec.js +7 -1
  60. package/components/section-navigation/_macro.njk +2 -1
  61. package/components/section-navigation/_macro.spec.js +2 -13
  62. package/components/table/_table.scss +7 -3
  63. package/components/tabs/_macro.njk +5 -5
  64. package/components/tabs/_macro.spec.js +1 -1
  65. package/components/tabs/example-tabs-details.njk +3 -0
  66. package/components/tabs/example-tabs.njk +0 -1
  67. package/components/textarea/example-textarea-error.njk +4 -4
  68. package/css/main.css +3 -3
  69. package/css/print.css +1 -1
  70. package/js/cookies-settings.js +1 -1
  71. package/package.json +27 -30
  72. package/scripts/main.es5.js +1 -1
  73. package/scripts/main.js +1 -1
  74. package/scss/base/_global.scss +3 -2
  75. package/scss/main.scss +1 -0
  76. package/scss/overrides/hcm.scss +14 -14
  77. package/scss/print.scss +1 -1
@@ -23,7 +23,7 @@ layout: ~
23
23
 
24
24
  {% block main %}
25
25
  {% call onsQuestion({
26
- "title": "Joe Bloggs is your <em>…</em>",
26
+ "title": "Joe Bloggs is your <strong>…</strong>",
27
27
  "description": "<p>Complete the sentence by selecting the appropriate relationship</p>",
28
28
  "readDescriptionFirst": true,
29
29
  "legendIsQuestionTitle": true,
@@ -31,9 +31,9 @@ layout: ~
31
31
  "submitButton": true
32
32
  }) %}
33
33
  {{ onsRelationships({
34
- "legend": "Joe Bloggs is your <em>…</em>",
34
+ "legend": "Joe Bloggs is your <strong>…</strong>",
35
35
  "legendClasses": "ons-u-vh",
36
- "playback": "Joe Bloggs is your <em>…</em>",
36
+ "playback": "Joe Bloggs is your <strong>…</strong>",
37
37
  "name": "relationship",
38
38
  "dontWrap": true,
39
39
  "radios": [
@@ -44,8 +44,8 @@ layout: ~
44
44
  "text": "Husband or wife"
45
45
  },
46
46
  "attributes": {
47
- "data-title": "Joe Bloggs is your <em>husband or wife</em>",
48
- "data-playback": "Joe Bloggs is your <em>husband or wife</em>"
47
+ "data-title": "Joe Bloggs is your <strong>husband or wife</strong>",
48
+ "data-playback": "Joe Bloggs is your <strong>husband or wife</strong>"
49
49
  }
50
50
  },
51
51
  {
@@ -55,8 +55,8 @@ layout: ~
55
55
  "text": "Legally registered civil partner"
56
56
  },
57
57
  "attributes": {
58
- "data-title": "Joe Bloggs is your <em>legally registered civil partner</em>",
59
- "data-playback": "Joe Bloggs is your <em>legally registered civil partner</em>"
58
+ "data-title": "Joe Bloggs is your <strong>legally registered civil partner</strong>",
59
+ "data-playback": "Joe Bloggs is your <strong>legally registered civil partner</strong>"
60
60
  }
61
61
  },
62
62
  {
@@ -66,8 +66,8 @@ layout: ~
66
66
  "text": "Partner"
67
67
  },
68
68
  "attributes": {
69
- "data-title": "Joe Bloggs is your <em>partner</em>",
70
- "data-playback": "Joe Bloggs is your <em>partner</em>"
69
+ "data-title": "Joe Bloggs is your <strong>partner</strong>",
70
+ "data-playback": "Joe Bloggs is your <strong>partner</strong>"
71
71
  }
72
72
  },
73
73
  {
@@ -77,8 +77,8 @@ layout: ~
77
77
  "text": "Son or daughter"
78
78
  },
79
79
  "attributes": {
80
- "data-title": "Joe Bloggs is your <em>son or daughter</em>",
81
- "data-playback": "Joe Bloggs is your <em>son or daughter</em>"
80
+ "data-title": "Joe Bloggs is your <strong>son or daughter</strong>",
81
+ "data-playback": "Joe Bloggs is your <strong>son or daughter</strong>"
82
82
  }
83
83
  },
84
84
  {
@@ -88,8 +88,8 @@ layout: ~
88
88
  "text": "Stepchild"
89
89
  },
90
90
  "attributes": {
91
- "data-title": "Joe Bloggs is your <em>stepchild</em>",
92
- "data-playback": "Joe Bloggs is your <em>stepchild</em>"
91
+ "data-title": "Joe Bloggs is your <strong>stepchild</strong>",
92
+ "data-playback": "Joe Bloggs is your <strong>stepchild</strong>"
93
93
  }
94
94
  },
95
95
  {
@@ -99,8 +99,8 @@ layout: ~
99
99
  "text": "Brother or sister"
100
100
  },
101
101
  "attributes": {
102
- "data-title": "Joe Bloggs is your <em>brother or sister</em>",
103
- "data-playback": "Joe Bloggs is your <em>brother or sister</em>"
102
+ "data-title": "Joe Bloggs is your <strong>brother or sister</strong>",
103
+ "data-playback": "Joe Bloggs is your <strong>brother or sister</strong>"
104
104
  }
105
105
  },
106
106
  {
@@ -110,8 +110,8 @@ layout: ~
110
110
  "text": "Stepbrother or stepsister"
111
111
  },
112
112
  "attributes": {
113
- "data-title": "Joe Bloggs is your <em>stepbrother or sister</em>",
114
- "data-playback": "Joe Bloggs is your <em>stepbrother or sister</em>"
113
+ "data-title": "Joe Bloggs is your <strong>stepbrother or sister</strong>",
114
+ "data-playback": "Joe Bloggs is your <strong>stepbrother or sister</strong>"
115
115
  }
116
116
  },
117
117
  {
@@ -121,8 +121,8 @@ layout: ~
121
121
  "text": "Mother or father"
122
122
  },
123
123
  "attributes": {
124
- "data-title": "Joe Bloggs is your <em>mother or father</em>",
125
- "data-playback": "Joe Bloggs is your <em>mother or father</em>"
124
+ "data-title": "Joe Bloggs is your <strong>mother or father</strong>",
125
+ "data-playback": "Joe Bloggs is your <strong>mother or father</strong>"
126
126
  }
127
127
  },
128
128
  {
@@ -132,8 +132,8 @@ layout: ~
132
132
  "text": "Stepmother or stepfather"
133
133
  },
134
134
  "attributes": {
135
- "data-title": "Joe Bloggs is your <em>stepmother or stepfather</em>",
136
- "data-playback": "Joe Bloggs is your <em>stepmother or stepfather</em>"
135
+ "data-title": "Joe Bloggs is your <strong>stepmother or stepfather</strong>",
136
+ "data-playback": "Joe Bloggs is your <strong>stepmother or stepfather</strong>"
137
137
  }
138
138
  },
139
139
  {
@@ -143,8 +143,8 @@ layout: ~
143
143
  "text": "Grandchild"
144
144
  },
145
145
  "attributes": {
146
- "data-title": "Joe Bloggs is your <em>grandchild</em>",
147
- "data-playback": "Joe Bloggs is your <em>grandchild</em>"
146
+ "data-title": "Joe Bloggs is your <strong>grandchild</strong>",
147
+ "data-playback": "Joe Bloggs is your <strong>grandchild</strong>"
148
148
  }
149
149
  },
150
150
  {
@@ -154,8 +154,8 @@ layout: ~
154
154
  "text": "Grandparent"
155
155
  },
156
156
  "attributes": {
157
- "data-title": "Joe Bloggs is your <em>grandparent</em>",
158
- "data-playback": "Joe Bloggs is your <em>grandparent</em>"
157
+ "data-title": "Joe Bloggs is your <strong>grandparent</strong>",
158
+ "data-playback": "Joe Bloggs is your <strong>grandparent</strong>"
159
159
  }
160
160
  },
161
161
  {
@@ -165,8 +165,8 @@ layout: ~
165
165
  "text": "Other relation"
166
166
  },
167
167
  "attributes": {
168
- "data-title": "Joe Bloggs is your <em>other relation</em>",
169
- "data-playback": "Joe Bloggs is your <em>other relation</em>"
168
+ "data-title": "Joe Bloggs is your <strong>other relation</strong>",
169
+ "data-playback": "Joe Bloggs is your <strong>other relation</strong>"
170
170
  }
171
171
  },
172
172
  {
@@ -177,8 +177,8 @@ layout: ~
177
177
  "description": "Including foster child"
178
178
  },
179
179
  "attributes": {
180
- "data-title": "Joe Bloggs is <em>unrelated</em> to you",
181
- "data-playback": "Joe Bloggs is <em>unrelated</em> to you"
180
+ "data-title": "Joe Bloggs is <strong>unrelated</strong> to you",
181
+ "data-playback": "Joe Bloggs is <strong>unrelated</strong> to you"
182
182
  }
183
183
  }
184
184
  ]
@@ -23,7 +23,7 @@ layout: ~
23
23
 
24
24
  {% block main %}
25
25
  {% call onsQuestion({
26
- "title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>…</em>",
26
+ "title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>…</strong>",
27
27
  "description": "<p>Complete the sentence by selecting the appropriate relationship</p>",
28
28
  "readDescriptionFirst": true,
29
29
  "legendIsQuestionTitle": true,
@@ -31,7 +31,7 @@ layout: ~
31
31
  "submitButton": true
32
32
  }) %}
33
33
  {{ onsRelationships({
34
- "playback": "Amanda Bloggs is Joe Bloggs' <em>…</em>",
34
+ "playback": "Amanda Bloggs is Joe Bloggs' <strong>…</strong>",
35
35
  "name": "relationship",
36
36
  "dontWrap": true,
37
37
  "radios": [
@@ -42,8 +42,8 @@ layout: ~
42
42
  "text": "Husband or wife"
43
43
  },
44
44
  "attributes": {
45
- "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>husband or wife</em>",
46
- "data-playback": "Amanda Bloggs is Joe Bloggs' <em>husband or wife</em>"
45
+ "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>husband or wife</strong>",
46
+ "data-playback": "Amanda Bloggs is Joe Bloggs' <strong>husband or wife</strong>"
47
47
  }
48
48
  },
49
49
  {
@@ -53,8 +53,8 @@ layout: ~
53
53
  "text": "Legally registered civil partner"
54
54
  },
55
55
  "attributes": {
56
- "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>legally registered civil partner</em>",
57
- "data-playback": "Amanda Bloggs is Joe Bloggs' <em>legally registered civil partner</em>"
56
+ "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>legally registered civil partner</strong>",
57
+ "data-playback": "Amanda Bloggs is Joe Bloggs' <strong>legally registered civil partner</strong>"
58
58
  }
59
59
  },
60
60
  {
@@ -64,8 +64,8 @@ layout: ~
64
64
  "text": "Partner"
65
65
  },
66
66
  "attributes": {
67
- "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>partner</em>",
68
- "data-playback": "Amanda Bloggs is Joe Bloggs' <em>partner</em>"
67
+ "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>partner</strong>",
68
+ "data-playback": "Amanda Bloggs is Joe Bloggs' <strong>partner</strong>"
69
69
  }
70
70
  },
71
71
  {
@@ -75,8 +75,8 @@ layout: ~
75
75
  "text": "Son or daughter"
76
76
  },
77
77
  "attributes": {
78
- "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>son or daughter</em>",
79
- "data-playback": "Amanda Bloggs is Joe Bloggs' <em>son or daughter</em>"
78
+ "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>son or daughter</strong>",
79
+ "data-playback": "Amanda Bloggs is Joe Bloggs' <strong>son or daughter</strong>"
80
80
  }
81
81
  },
82
82
  {
@@ -86,8 +86,8 @@ layout: ~
86
86
  "text": "Stepchild"
87
87
  },
88
88
  "attributes": {
89
- "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>stepchild</em>",
90
- "data-playback": "Amanda Bloggs is Joe Bloggs' <em>stepchild</em>"
89
+ "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>stepchild</strong>",
90
+ "data-playback": "Amanda Bloggs is Joe Bloggs' <strong>stepchild</strong>"
91
91
  }
92
92
  },
93
93
  {
@@ -97,8 +97,8 @@ layout: ~
97
97
  "text": "Brother or sister"
98
98
  },
99
99
  "attributes": {
100
- "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>brother or sister</em>",
101
- "data-playback": "Amanda Bloggs is Joe Bloggs' <em>brother or sister</em>"
100
+ "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>brother or sister</strong>",
101
+ "data-playback": "Amanda Bloggs is Joe Bloggs' <strong>brother or sister</strong>"
102
102
  }
103
103
  },
104
104
  {
@@ -108,8 +108,8 @@ layout: ~
108
108
  "text": "Stepbrother or stepsister"
109
109
  },
110
110
  "attributes": {
111
- "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>stepbrother or sister</em>",
112
- "data-playback": "Amanda Bloggs is Joe Bloggs' <em>stepbrother or sister</em>"
111
+ "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>stepbrother or sister</strong>",
112
+ "data-playback": "Amanda Bloggs is Joe Bloggs' <strong>stepbrother or sister</strong>"
113
113
  }
114
114
  },
115
115
  {
@@ -119,8 +119,8 @@ layout: ~
119
119
  "text": "Mother or father"
120
120
  },
121
121
  "attributes": {
122
- "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>mother or father</em>",
123
- "data-playback": "Amanda Bloggs is Joe Bloggs' <em>mother or father</em>"
122
+ "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>mother or father</strong>",
123
+ "data-playback": "Amanda Bloggs is Joe Bloggs' <strong>mother or father</strong>"
124
124
  }
125
125
  },
126
126
  {
@@ -130,8 +130,8 @@ layout: ~
130
130
  "text": "Stepmother or stepfather"
131
131
  },
132
132
  "attributes": {
133
- "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>stepmother or stepfather</em>",
134
- "data-playback": "Amanda Bloggs is Joe Bloggs' <em>stepmother or stepfather</em>"
133
+ "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>stepmother or stepfather</strong>",
134
+ "data-playback": "Amanda Bloggs is Joe Bloggs' <strong>stepmother or stepfather</strong>"
135
135
  }
136
136
  },
137
137
  {
@@ -141,8 +141,8 @@ layout: ~
141
141
  "text": "Grandchild"
142
142
  },
143
143
  "attributes": {
144
- "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>grandchild</em>",
145
- "data-playback": "Amanda Bloggs is Joe Bloggs' <em>grandchild</em>"
144
+ "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>grandchild</strong>",
145
+ "data-playback": "Amanda Bloggs is Joe Bloggs' <strong>grandchild</strong>"
146
146
  }
147
147
  },
148
148
  {
@@ -152,8 +152,8 @@ layout: ~
152
152
  "text": "Grandparent"
153
153
  },
154
154
  "attributes": {
155
- "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>grandparents</em>",
156
- "data-playback": "Amanda Bloggs is Joe Bloggs' <em>grandparents</em>"
155
+ "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>grandparents</strong>",
156
+ "data-playback": "Amanda Bloggs is Joe Bloggs' <strong>grandparents</strong>"
157
157
  }
158
158
  },
159
159
  {
@@ -163,8 +163,8 @@ layout: ~
163
163
  "text": "Other relation"
164
164
  },
165
165
  "attributes": {
166
- "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <em>other relation</em>",
167
- "data-playback": "Amanda Bloggs is Joe Bloggs' <em>other relation</em>"
166
+ "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is their <strong>other relation</strong>",
167
+ "data-playback": "Amanda Bloggs is Joe Bloggs' <strong>other relation</strong>"
168
168
  }
169
169
  },
170
170
  {
@@ -175,8 +175,8 @@ layout: ~
175
175
  "description": "Including foster child"
176
176
  },
177
177
  "attributes": {
178
- "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is <em>unrelated</em> to Joe Bloggs",
179
- "data-playback": "Amanda Bloggs is <em>unrelated</em> to Joe Bloggs"
178
+ "data-title": "Thinking of Joe Bloggs, Amanda Bloggs is <strong>unrelated</strong> to Joe Bloggs",
179
+ "data-playback": "Amanda Bloggs is <strong>unrelated</strong> to Joe Bloggs"
180
180
  }
181
181
  }
182
182
  ]
@@ -2,7 +2,7 @@ import { renderComponent, setTestPage } from '../../tests/helpers/rendering';
2
2
 
3
3
  const EXAMPLE_RELATIONSHIPS = {
4
4
  dontWrap: true,
5
- playback: "Amanda Bloggs is Joe Bloggs' <em>…</em>",
5
+ playback: "Amanda Bloggs is Joe Bloggs' <strong>…</strong>",
6
6
  name: 'relationship',
7
7
  radios: [
8
8
  {
@@ -12,8 +12,8 @@ const EXAMPLE_RELATIONSHIPS = {
12
12
  text: 'Grandparent',
13
13
  },
14
14
  attributes: {
15
- 'data-title': 'Thinking of Joe Bloggs, Amanda Bloggs is their <em>grandparents</em>',
16
- 'data-playback': "Amanda Bloggs is Joe Bloggs' <em>grandparents</em>",
15
+ 'data-title': 'Thinking of Joe Bloggs, Amanda Bloggs is their <strong>grandparents</strong>',
16
+ 'data-playback': "Amanda Bloggs is Joe Bloggs' <strong>grandparents</strong>",
17
17
  },
18
18
  },
19
19
  {
@@ -23,8 +23,8 @@ const EXAMPLE_RELATIONSHIPS = {
23
23
  text: 'Other relation',
24
24
  },
25
25
  attributes: {
26
- 'data-title': 'Thinking of Joe Bloggs, Amanda Bloggs is their <em>other relation</em>',
27
- 'data-playback': "Amanda Bloggs is Joe Bloggs' <em>other relation</em>",
26
+ 'data-title': 'Thinking of Joe Bloggs, Amanda Bloggs is their <strong>other relation</strong>',
27
+ 'data-playback': "Amanda Bloggs is Joe Bloggs' <strong>other relation</strong>",
28
28
  },
29
29
  },
30
30
  {
@@ -35,8 +35,8 @@ const EXAMPLE_RELATIONSHIPS = {
35
35
  description: 'Including foster child',
36
36
  },
37
37
  attributes: {
38
- 'data-title': 'Thinking of Joe Bloggs, Amanda Bloggs is <em>unrelated</em> to Joe Bloggs',
39
- 'data-playback': 'Amanda Bloggs is <em>unrelated</em> to Joe Bloggs',
38
+ 'data-title': 'Thinking of Joe Bloggs, Amanda Bloggs is <strong>unrelated</strong> to Joe Bloggs',
39
+ 'data-playback': 'Amanda Bloggs is <strong>unrelated</strong> to Joe Bloggs',
40
40
  },
41
41
  },
42
42
  ],
@@ -49,7 +49,7 @@ describe('script: relationships', () => {
49
49
  renderComponent(
50
50
  'question',
51
51
  {
52
- title: 'Thinking of Joe Bloggs, Amanda Bloggs is their <em>…</em>',
52
+ title: 'Thinking of Joe Bloggs, Amanda Bloggs is their <strong>…</strong>',
53
53
  readDescriptionFirst: true,
54
54
  legendIsQuestionTitle: true,
55
55
  legendTitleClasses: 'ons-js-relationships-legend',
@@ -61,7 +61,7 @@ describe('script: relationships', () => {
61
61
 
62
62
  describe('when the component initialises', () => {
63
63
  it('then the playback paragraph should become visible', async () => {
64
- const hasHideClass = await page.$eval('.ons-relationships__playback', node => node.classList.contains('ons-u-d-no'));
64
+ const hasHideClass = await page.$eval('.ons-relationships__playback', (node) => node.classList.contains('ons-u-d-no'));
65
65
  expect(hasHideClass).toBe(false);
66
66
  });
67
67
  });
@@ -72,13 +72,13 @@ describe('script: relationships', () => {
72
72
  });
73
73
 
74
74
  it('the question title should be changed to reflect the relationship', async () => {
75
- const headingText = await page.$eval('h1', element => element.innerHTML);
76
- expect(headingText.trim()).toBe('Thinking of Joe Bloggs, Amanda Bloggs is their <em>other relation</em>');
75
+ const headingText = await page.$eval('h1', (element) => element.innerHTML);
76
+ expect(headingText.trim()).toBe('Thinking of Joe Bloggs, Amanda Bloggs is their <strong>other relation</strong>');
77
77
  });
78
78
 
79
79
  it('the playback should be changed to reflect the relationship', async () => {
80
- const playbackText = await page.$eval('.ons-relationships__playback', element => element.innerHTML);
81
- expect(playbackText.trim()).toBe("Amanda Bloggs is Joe Bloggs' <em>other relation</em>");
80
+ const playbackText = await page.$eval('.ons-relationships__playback', (element) => element.innerHTML);
81
+ expect(playbackText.trim()).toBe("Amanda Bloggs is Joe Bloggs' <strong>other relation</strong>");
82
82
  });
83
83
  });
84
84
  });
@@ -7,8 +7,11 @@
7
7
  "id": params.textarea.id,
8
8
  "name": params.textarea.name,
9
9
  "label": {
10
- "text": params.textarea.label.text
11
- }
10
+ "text": params.textarea.label.text,
11
+ "description": params.textarea.label.description
12
+ },
13
+ "charCheckLimit": params.textarea.charCheckLimit,
14
+ "rows": params.textarea.rows
12
15
  })
13
16
  }}
14
17
  <div class="ons-grid ons-grid--flex ons-grid--gutterless ons-grid--vertical-center ons-grid--no-wrap@s ons-u-mt-m ons-u-mb-m">
@@ -10,7 +10,14 @@ const EXAMPLE_TEXTAREA = {
10
10
  name: 'reply',
11
11
  label: {
12
12
  text: 'Reply',
13
+ description: 'Reply description',
13
14
  },
15
+ charCheckLimit: {
16
+ limit: 300,
17
+ charCountSingular: '{x} more character needed',
18
+ charCountPlural: '{x} more characters needed',
19
+ },
20
+ rows: 5,
14
21
  };
15
22
 
16
23
  const EXAMPLE_BUTTON = {
@@ -40,7 +47,6 @@ describe('macro: reply', () => {
40
47
  const textareaSpy = faker.spy('textarea');
41
48
 
42
49
  cheerio.load(faker.renderComponent('reply', EXAMPLE_REPLY));
43
-
44
50
  expect(textareaSpy.occurrences[0]).toEqual(EXAMPLE_TEXTAREA);
45
51
  });
46
52
 
@@ -1,5 +1,6 @@
1
1
  {% macro onsSectionNavigation(params) %}
2
- <nav class="ons-section-nav{% if params.variants == 'vertical' %} ons-section-nav--vertical{% endif %} {% if params.classes %} {{ params.classes }} {% endif %}"{% if params.id %} id="{{ params.id }}"{% endif %} aria-label="{{ params.ariaLabel | default("Section menu") }}">
2
+ <nav class="ons-section-nav{% if params.variants == 'vertical' %} ons-section-nav--vertical{% endif %} {% if params.classes %} {{ params.classes }} {% endif %}"{% if params.id %} id="{{ params.id }}"{% endif %} aria-labelledby="{{ params.hiddenTitleId | default("section-menu-nav-title")}}">
3
+ <h2 class="ons-u-vh" id="{{ params.hiddenTitleId | default("section-menu-nav-title") }}">{{ params.hiddenTitle | default("Pages in this section") }}</h2>
3
4
  {% if params.sections %}
4
5
  {% for section in params.sections %}
5
6
  <div class="ons-section-nav__sub">
@@ -135,21 +135,10 @@ describe('macro: section-navigation', () => {
135
135
  expect($('.ons-section-nav').hasClass('custom-class')).toBe(true);
136
136
  });
137
137
 
138
- it('has the provided `ariaLabel` parameter', () => {
139
- const $ = cheerio.load(
140
- renderComponent('section-navigation', {
141
- ...EXAMPLE_SECTION_NAVIGATION,
142
- ariaLabel: 'Section navigation menu',
143
- }),
144
- );
145
-
146
- expect($('.ons-section-nav').attr('aria-label')).toBe('Section navigation menu');
147
- });
148
-
149
- it('assumes a default `ariaLabel` of "Section menu"', () => {
138
+ it('assumes a default `hiddenTitleId` of "Section menu"', () => {
150
139
  const $ = cheerio.load(renderComponent('section-navigation', EXAMPLE_SECTION_NAVIGATION));
151
140
 
152
- expect($('.ons-section-nav').attr('aria-label')).toBe('Section menu');
141
+ expect($('.ons-section-nav').attr('aria-labelledby')).toBe('section-menu-nav-title');
153
142
  });
154
143
 
155
144
  describe('navigation items', () => {
@@ -115,7 +115,9 @@
115
115
  overflow-x: auto;
116
116
  width: 100%;
117
117
  &:focus {
118
- box-shadow: 0 0 0 3px var(--ons-color-page-light), 0 0 0 5px var(--ons-color-text-link-focus), 0 0 0 8px var(--ons-color-focus);
118
+ box-shadow: 0 0 0 3px var(--ons-color-page-light),
119
+ 0 0 0 5px var(--ons-color-text-link-focus),
120
+ 0 0 0 8px var(--ons-color-focus);
119
121
  outline: 3px solid transparent; // Add transparent outline because Windows High Contrast Mode doesn't show box-shadows
120
122
  outline-offset: 1px;
121
123
  }
@@ -141,13 +143,15 @@
141
143
  .ons-table__right-shadow {
142
144
  right: 0;
143
145
  &.ons-visible {
144
- box-shadow: inset -1px 0 0 0 #bfc1c3, inset -5px 0 0 0 rgba(191, 193, 195, 0.4);
146
+ box-shadow: inset -1px 0 0 0 #bfc1c3,
147
+ inset -5px 0 0 0 rgb(191 193 195 / 40%);
145
148
  }
146
149
  }
147
150
  .ons-table__left-shadow {
148
151
  left: 0;
149
152
  &.ons-visible {
150
- box-shadow: inset 1px 0 0 0 #bfc1c3, inset -5px 0 0 0 rgba(191, 193, 195, 0.4);
153
+ box-shadow: inset 1px 0 0 0 #bfc1c3,
154
+ inset -5px 0 0 0 rgb(191 193 195 / 40%);
151
155
  }
152
156
  }
153
157
  }
@@ -13,11 +13,11 @@
13
13
  {% set titleTag = params.titleTag | default("h2") %}
14
14
  <{{ titleTag }} class="ons-tabs__title ons-u-fs-r--b ons-u-mt-no">{{ params.title }}</{{ titleTag }}>
15
15
  <div>
16
- <ul class="ons-tabs__list">
17
- {%- for tab in params.tabs -%}
18
- <li class="ons-tab__list-item"><a href="#{{ tab.id if tab.id else tab.title|trim|replace(' ','-')|lower}}" class="ons-tab" data-ga="click" data-ga-category="tabs" data-ga-action="Show: {{ tab.title }}" data-ga-label="Show: {{ tab.title }}">{{ tab.title }}{% if tab.hiddenSpan %}<span class='ons-u-d-no'>{{tab.hiddenSpan}}</span>{% endif %}</a></li>
19
- {%- endfor -%}
20
- </ul>
16
+ <ul class="ons-tabs__list">
17
+ {%- for tab in params.tabs -%}
18
+ <li class="ons-tab__list-item"><a href="#{{ tab.id if tab.id else tab.title|trim|replace(' ','-')|lower}}" class="ons-tab" data-ga="click" data-ga-category="tabs" data-ga-action="Show: {{ tab.title }}" data-ga-label="Show: {{ tab.title }}">{{ tab.title }}{% if tab.hiddenSpan %}<span class='ons-u-vh'>{{tab.hiddenSpan}}</span>{% endif %}</a></li>
19
+ {%- endfor -%}
20
+ </ul>
21
21
  </div>
22
22
  {% for tab in params.tabs %}
23
23
  <section id="{{ tab.id if tab.id else tab.title|trim|replace(' ','-')|lower }}" class="ons-tabs__panel">
@@ -112,7 +112,7 @@ describe('macro: tabs', () => {
112
112
  it('has expected label text in tab links and visually hidden span in tab 1', () => {
113
113
  const $ = cheerio.load(renderComponent('tabs', EXAMPLE_TABS));
114
114
 
115
- expect($('.ons-tab:first').html()).toBe('Tab 1<span class="ons-u-d-no">for Example</span>');
115
+ expect($('.ons-tab:first').html()).toBe('Tab 1<span class="ons-u-vh">for Example</span>');
116
116
  expect(
117
117
  $('.ons-tab:last')
118
118
  .text()
@@ -30,6 +30,7 @@
30
30
  {
31
31
  "id": "video-description",
32
32
  "title": 'Description',
33
+ "hiddenSpan": 'for Census 2021 promotional TV advert video',
33
34
  "content": '<div class="example-video-block__details">
34
35
  <h3 class="ons-u-d-no@s">Description</h3>
35
36
  <p>The census provides a snapshot of everyone in England & Wales. We help local councils get the funding they need.</p>
@@ -39,6 +40,7 @@
39
40
  {
40
41
  "id": "video-transcript",
41
42
  "title": 'Transcript',
43
+ "hiddenSpan": 'for Census 2021 promotional TV advert video',
42
44
  "content": '<div class="example-video-block__details">
43
45
  <h3 class="ons-u-d-no@s">Transcript</h3>
44
46
  <p>I count.</p>
@@ -50,6 +52,7 @@
50
52
  {
51
53
  "id": "video-embed",
52
54
  "title": 'Embed',
55
+ "hiddenSpan": 'code for Census 2021 promotional TV advert video',
53
56
  "content": '<h3 class="ons-u-d-no@s">Embed</h3>
54
57
  <pre class="language-html"><code>' ~ '<iframe width="560" height="315" src="https://www.youtube.com/embed/_EGJlvkgbPo" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>' | e ~ '</code></pre>'
55
58
  }
@@ -8,7 +8,6 @@
8
8
  "id": "ukis",
9
9
  "title": 'UKIS',
10
10
  "showTitle": true,
11
- "hiddenSpan": 'for UKIS',
12
11
  "content": '<h3>Aim of this survey</h3>
13
12
  <p class="ons-u-fs-r">The aim of the UK Innovation Survey (UKIS) is to collect data from businesses about various aspects of their innovation related activities. Using this data we can measure the level, types and trends in innovation.</p>
14
13
  <h3>How we’ll use this data</h3>
@@ -8,9 +8,9 @@
8
8
  "text": "Please provide some feedback",
9
9
  "description": "For example, describe any difficulties you experienced in the use of this service"
10
10
  },
11
- "error": {
12
- "id": "feedback-error",
13
- "text": "Enter your feedback"
14
- }
11
+ "error": {
12
+ "id": "feedback-error",
13
+ "text": "Enter your feedback"
14
+ }
15
15
  })
16
16
  }}