govuk_publishing_components 23.12.3 → 24.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/govuk_publishing_components/take-action-amber.svg +4 -0
  3. data/app/assets/images/govuk_publishing_components/take-action-green.svg +4 -0
  4. data/app/assets/images/govuk_publishing_components/take-action-red.svg +4 -0
  5. data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +0 -4
  6. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +44 -39
  7. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +0 -1
  8. data/app/assets/stylesheets/govuk_publishing_components/component_support.scss +0 -2
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +34 -17
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +14 -8
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_error-alert.scss +4 -4
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +35 -44
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +112 -47
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +8 -8
  15. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss +0 -5
  16. data/app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav.scss +2 -2
  17. data/app/models/govuk_publishing_components/component_doc.rb +1 -1
  18. data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +2 -8
  19. data/app/views/govuk_publishing_components/components/_document_list.html.erb +12 -2
  20. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +9 -4
  21. data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +2 -2
  22. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +21 -0
  23. data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +65 -1
  24. data/app/views/govuk_publishing_components/components/docs/document_list.yml +50 -7
  25. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +3 -3
  26. data/app/views/govuk_publishing_components/components/docs/layout_header.yml +11 -0
  27. data/app/views/govuk_publishing_components/components/docs/meta_tags.yml +99 -1
  28. data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +9 -4
  29. data/config/initializers/assets.rb +3 -1
  30. data/config/locales/cy.yml +6 -1
  31. data/config/locales/en.yml +8 -3
  32. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +183 -2
  33. data/lib/govuk_publishing_components/presenters/meta_tags.rb +2 -0
  34. data/lib/govuk_publishing_components/version.rb +1 -1
  35. data/node_modules/govuk-frontend/govuk/all.js +58 -1
  36. data/node_modules/govuk-frontend/govuk/components/_all.scss +2 -0
  37. data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +25 -10
  38. data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +12 -6
  39. data/node_modules/govuk-frontend/govuk/components/back-link/macro-options.json +4 -4
  40. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +34 -13
  41. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro-options.json +1 -0
  42. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/template.njk +2 -2
  43. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +2 -0
  44. data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +74 -31
  45. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +1 -0
  46. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +1 -1
  47. data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +85 -15
  48. data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +1 -1
  49. data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +145 -52
  50. data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +2 -2
  51. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
  52. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +51 -0
  53. data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +425 -0
  54. data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro-options.json +132 -0
  55. data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro.njk +3 -0
  56. data/node_modules/govuk-frontend/govuk/components/cookie-banner/template.njk +63 -0
  57. data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +84 -34
  58. data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +1 -1
  59. data/node_modules/govuk-frontend/govuk/components/date-input/template.njk +1 -1
  60. data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +35 -15
  61. data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +21 -10
  62. data/node_modules/govuk-frontend/govuk/components/error-message/macro-options.json +1 -0
  63. data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +2 -12
  64. data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +86 -25
  65. data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +20 -10
  66. data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +60 -13
  67. data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +37 -18
  68. data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +8 -5
  69. data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +36 -18
  70. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +2 -2
  71. data/node_modules/govuk-frontend/govuk/components/header/template.njk +4 -4
  72. data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +17 -8
  73. data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +130 -40
  74. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +1 -1
  75. data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +17 -8
  76. data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +20 -11
  77. data/node_modules/govuk-frontend/govuk/components/label/macro-options.json +1 -1
  78. data/node_modules/govuk-frontend/govuk/components/notification-banner/README.md +15 -0
  79. data/node_modules/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
  80. data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
  81. data/node_modules/govuk-frontend/govuk/components/notification-banner/fixtures.json +212 -0
  82. data/node_modules/govuk-frontend/govuk/components/notification-banner/macro-options.json +68 -0
  83. data/node_modules/govuk-frontend/govuk/components/notification-banner/macro.njk +3 -0
  84. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +61 -0
  85. data/node_modules/govuk-frontend/govuk/components/notification-banner/template.njk +47 -0
  86. data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +30 -13
  87. data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +20 -9
  88. data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +167 -50
  89. data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +97 -18
  90. data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +1 -1
  91. data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +21 -9
  92. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +118 -25
  93. data/node_modules/govuk-frontend/govuk/components/table/_index.scss +21 -0
  94. data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +92 -22
  95. data/node_modules/govuk-frontend/govuk/components/table/macro-options.json +2 -2
  96. data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +75 -18
  97. data/node_modules/govuk-frontend/govuk/components/tabs/macro-options.json +1 -1
  98. data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +28 -14
  99. data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +68 -17
  100. data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +19 -14
  101. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +94 -0
  102. data/node_modules/govuk-frontend/govuk/objects/_all.scss +1 -0
  103. data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +94 -0
  104. data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +9 -0
  105. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +3 -0
  106. data/node_modules/govuk-frontend/package.json +1 -1
  107. metadata +20 -18
  108. data/app/assets/images/govuk_publishing_components/chevron-banner/chevron-banner-small-focus.svg +0 -4
  109. data/app/assets/images/govuk_publishing_components/chevron-banner/chevron-banner-small.svg +0 -4
  110. data/app/assets/javascripts/govuk_publishing_components/components/header.js +0 -8
  111. data/app/assets/javascripts/govuk_publishing_components/lib/auto-track-event.js +0 -31
  112. data/app/assets/stylesheets/govuk_publishing_components/components/_chevron-banner.scss +0 -138
  113. data/app/assets/stylesheets/govuk_publishing_components/components/_list.scss +0 -1
  114. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_variables.scss +0 -27
  115. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_back-arrow.scss +0 -13
  116. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_clearfix.scss +0 -8
  117. data/app/views/govuk_publishing_components/components/_chevron_banner.html.erb +0 -19
  118. data/app/views/govuk_publishing_components/components/_subscription-links.html.erb +0 -85
  119. data/app/views/govuk_publishing_components/components/_translation-nav.html.erb +0 -33
  120. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_related_links.html.erb +0 -6
  121. data/app/views/govuk_publishing_components/components/docs/chevron_banner.yml +0 -33
  122. data/app/views/govuk_publishing_components/components/docs/subscription-links.yml +0 -103
  123. data/app/views/govuk_publishing_components/components/docs/translation-nav.yml +0 -139
@@ -79,7 +79,12 @@ en:
79
79
  transition:
80
80
  title: "Brexit"
81
81
  link_path: "/transition"
82
- link_text: "Check how the new Brexit rules affect you"
82
+ link_text: "Check what you need to do"
83
+ take_action_list:
84
+ red: Check
85
+ amber: Change
86
+ green: Go
87
+ aria_label: Brexit campaign slogan, Check, Change, Go.
83
88
  related_footer_navigation:
84
89
  collections: "Collections"
85
90
  policies: "Policies"
@@ -92,8 +97,8 @@ en:
92
97
  step_by_step_nav:
93
98
  show: "Show"
94
99
  hide: "Hide"
95
- show_all: "Show all"
96
- hide_all: "Hide all"
100
+ show_all: "Show all steps"
101
+ hide_all: "Hide all steps"
97
102
  step_by_step_nav_related:
98
103
  part_of: "Part of"
99
104
  subscription_links:
@@ -113,8 +113,189 @@ module GovukPublishingComponents
113
113
  tagged_to_brexit? && (page_content_id != brexit_start_page_content_id)
114
114
  end
115
115
 
116
- def transition_countdown_exception?
117
- content_item["content_id"] == "c3752802-f091-43a9-ba90-33568fccf391"
116
+ def brexit_cta_document_exceptions
117
+ # /government/news/30-creative-teams-awarded-up-to-100000-each-for-festival-uk-2022-rd-project
118
+ # and answer pages that have a start button (tracked in https://docs.google.com/spreadsheets/d/1ynH8zIjvElvK-u8JLI8KOYylxTbzJsoXRqEnqrnqv_4/edit)
119
+ %w[
120
+ c3752802-f091-43a9-ba90-33568fccf391
121
+ e1a9ce2b-4085-4761-b70f-d125a6571de3
122
+ 6a2bf66e-2313-4204-afd5-9940de5e1d66
123
+ f65b0ac7-b8cd-476b-bd5d-738268517659
124
+ 45ad868a-2e79-4029-991b-c29559d7eb29
125
+ e4e9c4ec-385e-4758-93ac-388bc154815e
126
+ cee73f76-83f0-44e2-b657-3b51a9cbc76e
127
+ 9a945506-60bc-44d8-a2ec-0eb2824732d6
128
+ 6ae16c12-a554-44e2-b3e3-596375aa1b9a
129
+ 9add4ccc-dc4c-44cf-9b69-6878c162d431
130
+ 4f5cf1cd-efda-4c49-8292-1db1c6c3cfb0
131
+ 73058592-dedf-4379-9a1d-d8222a796c0a
132
+ c9259172-5432-43a6-b710-409d463c7627
133
+ 59ecfc6d-cb9e-49b8-b013-fc368ebdf8ed
134
+ 9897695d-624b-4cb9-b873-f3113f0332a1
135
+ 715f4659-b058-46ec-84c8-cc346c210778
136
+ c63890f9-2356-4be3-9e07-6cf4b8de7081
137
+ e7661ec8-b678-444e-b4d0-a221fa83a7f7
138
+ 723f9c0a-bcdb-4d8f-952c-6df0ed468c57
139
+ a1c420b7-11d7-4b9c-a97e-406fb73c0200
140
+ c1347936-839b-4547-a570-0c315c34ee45
141
+ 1396f68b-6ffa-47ef-a049-414e7b548e81
142
+ 3b054acf-d0af-470e-b912-9481204d1a9a
143
+ 317b9c08-928b-4fd2-bc8e-4c6acf287c58
144
+ 44d6cb7a-d853-4cd8-a9cb-69eff0299d9e
145
+ 15517245-f142-4e45-ad84-773250f7d5a2
146
+ 6fe6644d-d037-4ea4-baf6-800dc1966ed0
147
+ 4a63625c-a195-4b86-9562-cb6653dd26ff
148
+ 47521233-20a8-4d02-ba31-6e1977448fd1
149
+ 7b8ca4ac-f3a3-41b8-9555-9e244c36575b
150
+ be1a82d1-e53c-431a-9e7a-337ed4b2654f
151
+ 6c445001-4e29-4853-8c14-444d7f9374ee
152
+ c8cf2a7c-5c13-4f3d-b1ff-6a7eb5533973
153
+ 2422a237-f8f1-4e9f-ad51-f1d44fde9755
154
+ ae000c08-c74f-467b-b8a4-90f138252a5c
155
+ 7eec7800-9c4d-4160-af53-57b5d3e02972
156
+ eb545b3b-111b-4c3c-890c-c9ec29b9090d
157
+ 8d705ade-8977-480d-9080-72a19e341c2a
158
+ 2a0dd317-0252-4c7c-8c13-b43af28406bc
159
+ f27e5792-a84b-4164-9890-7e86767634e8
160
+ b0b9a600-1fe6-4257-9e68-2be0f59ea25d
161
+ 28fa04ea-42e1-46ad-9abc-acf132c5666d
162
+ 64b27b8a-ae53-4034-a812-f4805cd7e3ad
163
+ 1dd5a75f-18b4-419d-b2b6-6d4808f2c7e4
164
+ b21b9e34-455c-4305-b4cc-4e6b8d3f7522
165
+ 0ab53a0d-b098-43a8-b3cc-8b3224697228
166
+ e3862156-ba5a-41ba-8ee6-22e5cd6a6144
167
+ 2e8f7fae-7164-459c-898b-0c0538eee3e0
168
+ 6087439c-26d2-4881-b345-5160e23f3b5e
169
+ cac78a0a-9c28-436a-a29e-8ccbe8fbc956
170
+ c2fd13a5-537b-4368-ac2e-6078b2c463f1
171
+ 98f0a21d-7b67-4089-a98c-f0a0177291a2
172
+ 06692612-8c39-464c-8aee-2aa62e6c8887
173
+ df943977-69cb-479d-a921-9410d603c471
174
+ 2656eb6b-f2eb-4982-8a90-e40d03a34a4d
175
+ 4ca8698b-4a24-45ff-baea-7633cc24b679
176
+ ed73581f-9bf8-48b5-bb66-935581a255e3
177
+ 15f1c594-af1d-4f16-97cc-ad4d12017509
178
+ ]
179
+ end
180
+
181
+ def brexit_cta_document_exception?
182
+ brexit_cta_document_exceptions.include?(content_item["content_id"])
183
+ end
184
+
185
+ def brexit_cta_document_type_exceptions
186
+ %w[
187
+ aaib_report
188
+ asylum_support_decision
189
+ fatality_notice
190
+ maib_report
191
+ raib_report
192
+ simple_smart_answer
193
+ transaction
194
+ ]
195
+ end
196
+
197
+ def brexit_cta_document_type_exception?
198
+ brexit_cta_document_type_exceptions.include?(content_item["document_type"])
199
+ end
200
+
201
+ def brexit_cta_taxon_allow_list
202
+ # Entering and staying in the UK
203
+ # Going and being abroad
204
+ # Corporate information
205
+ # Transport
206
+ # Environment
207
+ # International
208
+ # Defence and armed forces
209
+ # Society and culture
210
+ # Government
211
+ # Work
212
+ # Welfare
213
+ # Money
214
+ # Business and industry
215
+ # Health and social care
216
+ # Education > Further and higher education
217
+ # Education > Teaching and leadership
218
+ # Education > Funding and finance for students
219
+ # Coronavirus (COVID-19)
220
+ %w[
221
+ ba3a9702-da22-487f-86c1-8334a730e559
222
+ 9597c30a-605a-4e36-8bc1-47e5cdae41b3
223
+ a544d48b-1e9e-47fb-b427-7a987c658c14
224
+ a4038b29-b332-4f13-98b1-1c9709e216bc
225
+ 3cf97f69-84de-41ae-bc7b-7e2cc238fa58
226
+ 37d0fa26-abed-4c74-8835-b3b51ae1c8b2
227
+ e491505c-77ae-45b2-84be-8c94b94f6a2b
228
+ e2ca2f1a-0ff3-43ce-b813-16645ff27904
229
+ e48ab80a-de80-4e83-bf59-26316856a5f9
230
+ d0f1e5a3-c8f4-4780-8678-994f19104b21
231
+ dded88e2-f92e-424f-b73e-6ad24a839c51
232
+ 6acc9db4-780e-4a46-92b4-1812e3c2c48a
233
+ 495afdb6-47be-4df1-8b38-91c8adb1eefc
234
+ 8124ead8-8ebc-4faf-88ad-dd5cbcc92ba8
235
+ dd767840-363e-43ad-8835-c9ab516633de
236
+ ff00b8b2-dcdb-4659-93c2-291c9be354f3
237
+ 23265b25-7ec3-4960-8517-4ff8d4d92cac
238
+ 5b7b9532-a775-4bd2-a3aa-6ce380184b6c
239
+ ]
240
+ end
241
+
242
+ def brexit_cta_taxon_allow_list?
243
+ taxons = content_item.dig("links", "taxons").to_a
244
+ taxons.each do |taxon|
245
+ if brexit_cta_taxon_allow_list.include?(taxon["content_id"]) || parent_taxon_include?(taxon, brexit_cta_taxon_allow_list)
246
+ return true
247
+ end
248
+ end
249
+ false
250
+ end
251
+
252
+ def parent_taxon_include?(taxon, taxon_list)
253
+ if taxon.present?
254
+ if taxon.dig("links", "parent_taxons").to_a.any? { |taxon_item| taxon_list.include?(taxon_item["content_id"]) }
255
+ return true
256
+ end
257
+
258
+ taxon.dig("links", "parent_taxons").to_a.any? { |taxon_item| parent_taxon_include?(taxon_item, taxon_list) }
259
+ else
260
+ false
261
+ end
262
+ end
263
+
264
+ def brexit_cta_taxon_exception_list
265
+ # Entering and staying in the UK > Immigration offences
266
+ # Entering and staying in the UK > Inspections of border, immigration and asylum services
267
+ # Entering and staying in the UK > Refugees, asylum and human rights
268
+ # Transport > Local transport
269
+ # Education > Further and higher education > Education in prisons
270
+ %w[
271
+ fa13521f-9285-45b0-bd65-4a472a8037e7
272
+ 0fab9131-f877-4286-b4d8-922fbfb402b6
273
+ 08a8a69f-2825-4fe2-a4cf-c83458a5629e
274
+ 3b4d6319-fcef-4637-b35a-e3df76321894
275
+ 6426d1c5-93c8-4659-85d5-1f0d3368a124
276
+ ]
277
+ end
278
+
279
+ def brexit_cta_taxon_exception_list?
280
+ taxons = content_item.dig("links", "taxons").to_a
281
+ taxons.each do |taxon|
282
+ if brexit_cta_taxon_exception_list.include?(taxon["content_id"]) || parent_taxon_include?(taxon, brexit_cta_taxon_exception_list)
283
+ return true
284
+ end
285
+ end
286
+ false
287
+ end
288
+
289
+ def brexit_cta_exception?
290
+ brexit_cta_document_exception? ||
291
+ brexit_cta_document_type_exception? ||
292
+ brexit_cta_taxon_exception_list?
293
+ end
294
+
295
+ def show_brexit_cta?
296
+ brexit_cta_taxon_allow_list? &&
297
+ step_by_step_count.zero? &&
298
+ !brexit_cta_exception?
118
299
  end
119
300
 
120
301
  def step_by_step_count
@@ -31,6 +31,8 @@ module GovukPublishingComponents
31
31
  meta_tags["govuk:publishing-application"] = content_item[:publishing_app] if content_item[:publishing_app]
32
32
  meta_tags["govuk:schema-name"] = content_item[:schema_name] if content_item[:schema_name]
33
33
  meta_tags["govuk:content-id"] = content_item[:content_id] if content_item[:content_id]
34
+ meta_tags["govuk:navigation-page-type"] = content_item[:navigation_page_type] if content_item[:navigation_page_type]
35
+ meta_tags["govuk:section"] = content_item[:section] if content_item[:section]
34
36
  meta_tags["govuk:withdrawn"] = "withdrawn" if content_item[:withdrawn_notice].present?
35
37
  meta_tags["govuk:content-has-history"] = "true" if has_content_history?
36
38
  meta_tags["govuk:static-analytics:strip-dates"] = "true" if should_strip_dates_pii?(content_item, local_assigns)
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "23.12.3".freeze
2
+ VERSION = "24.0.0".freeze
3
3
  end
@@ -1498,7 +1498,7 @@ function CharacterCount ($module) {
1498
1498
  this.$module = $module;
1499
1499
  this.$textarea = $module.querySelector('.govuk-js-character-count');
1500
1500
  if (this.$textarea) {
1501
- this.$countMessage = $module.querySelector('[id=' + this.$textarea.id + '-info]');
1501
+ this.$countMessage = $module.querySelector('[id="' + this.$textarea.id + '-info"]');
1502
1502
  }
1503
1503
  }
1504
1504
 
@@ -1959,6 +1959,58 @@ ErrorSummary.prototype.getAssociatedLegendOrLabel = function ($input) {
1959
1959
  $input.closest('label')
1960
1960
  };
1961
1961
 
1962
+ function NotificationBanner ($module) {
1963
+ this.$module = $module;
1964
+ }
1965
+
1966
+ /**
1967
+ * Initialise the component
1968
+ */
1969
+ NotificationBanner.prototype.init = function () {
1970
+ var $module = this.$module;
1971
+ // Check for module
1972
+ if (!$module) {
1973
+ return
1974
+ }
1975
+
1976
+ this.setFocus();
1977
+ };
1978
+
1979
+ /**
1980
+ * Focus the element
1981
+ *
1982
+ * If `role="alert"` is set, focus the element to help some assistive technologies
1983
+ * prioritise announcing it.
1984
+ *
1985
+ * You can turn off the auto-focus functionality by setting `data-disable-auto-focus="true"` in the
1986
+ * component HTML. You might wish to do this based on user research findings, or to avoid a clash
1987
+ * with another element which should be focused when the page loads.
1988
+ */
1989
+ NotificationBanner.prototype.setFocus = function () {
1990
+ var $module = this.$module;
1991
+
1992
+ if ($module.getAttribute('data-disable-auto-focus') === 'true') {
1993
+ return
1994
+ }
1995
+
1996
+ if ($module.getAttribute('role') !== 'alert') {
1997
+ return
1998
+ }
1999
+
2000
+ // Set tabindex to -1 to make the element focusable with JavaScript.
2001
+ // Remove the tabindex on blur as the component doesn't need to be focusable after the page has
2002
+ // loaded.
2003
+ if (!$module.getAttribute('tabindex')) {
2004
+ $module.setAttribute('tabindex', '-1');
2005
+
2006
+ $module.addEventListener('blur', function () {
2007
+ $module.removeAttribute('tabindex');
2008
+ });
2009
+ }
2010
+
2011
+ $module.focus();
2012
+ };
2013
+
1962
2014
  function Header ($module) {
1963
2015
  this.$module = $module;
1964
2016
  this.$menuButton = $module && $module.querySelector('.govuk-js-header-toggle');
@@ -2476,6 +2528,11 @@ function initAll (options) {
2476
2528
  var $toggleButton = scope.querySelector('[data-module="govuk-header"]');
2477
2529
  new Header($toggleButton).init();
2478
2530
 
2531
+ var $notificationBanners = scope.querySelectorAll('[data-module="govuk-notification-banner"]');
2532
+ nodeListForEach($notificationBanners, function ($notificationBanner) {
2533
+ new NotificationBanner($notificationBanner).init();
2534
+ });
2535
+
2479
2536
  var $radios = scope.querySelectorAll('[data-module="govuk-radios"]');
2480
2537
  nodeListForEach($radios, function ($radio) {
2481
2538
  new Radios($radio).init();
@@ -6,6 +6,7 @@
6
6
  @import "button/index";
7
7
  @import "checkboxes/index";
8
8
  @import "character-count/index";
9
+ @import "cookie-banner/index";
9
10
  @import "summary-list/index";
10
11
  @import "date-input/index";
11
12
  @import "details/index";
@@ -19,6 +20,7 @@
19
20
  @import "input/index";
20
21
  @import "inset-text/index";
21
22
  @import "label/index";
23
+ @import "notification-banner/index";
22
24
  @import "panel/index";
23
25
  @import "phase-banner/index";
24
26
  @import "tabs/index";
@@ -24,7 +24,8 @@
24
24
  }
25
25
  ]
26
26
  },
27
- "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"default-example\">\n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"default-example-heading-1\">\n Section A\n </span>\n </h2>\n \n </div>\n <div id=\"default-example-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"default-example-heading-1\">\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>Example item 1</li>\n</ul>\n\n </div>\n </div>\n \n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"default-example-heading-2\">\n Section B\n </span>\n </h2>\n \n </div>\n <div id=\"default-example-content-2\" class=\"govuk-accordion__section-content\" aria-labelledby=\"default-example-heading-2\">\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>Example item 2</li>\n</ul>\n\n </div>\n </div>\n \n \n</div>"
27
+ "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"default-example\">\n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"default-example-heading-1\">\n Section A\n </span>\n </h2>\n \n </div>\n <div id=\"default-example-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"default-example-heading-1\">\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>Example item 1</li>\n</ul>\n\n </div>\n </div>\n \n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"default-example-heading-2\">\n Section B\n </span>\n </h2>\n \n </div>\n <div id=\"default-example-content-2\" class=\"govuk-accordion__section-content\" aria-labelledby=\"default-example-heading-2\">\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>Example item 2</li>\n</ul>\n\n </div>\n </div>\n \n \n</div>",
28
+ "hidden": false
28
29
  },
29
30
  {
30
31
  "name": "with additional descriptions",
@@ -55,7 +56,8 @@
55
56
  }
56
57
  ]
57
58
  },
58
- "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"with-descriptions\">\n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"with-descriptions-heading-1\">\n Test\n </span>\n </h2>\n \n <div class=\"govuk-accordion__section-summary govuk-body\" id=\"with-descriptions-summary-1\">\n Additional description\n </div>\n \n </div>\n <div id=\"with-descriptions-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"with-descriptions-heading-1\">\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>Example item 1</li>\n</ul>\n\n </div>\n </div>\n \n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"with-descriptions-heading-2\">\n Test 2\n </span>\n </h2>\n \n <div class=\"govuk-accordion__section-summary govuk-body\" id=\"with-descriptions-summary-2\">\n <span class=\"govuk-!-font-weight-regular\">Additional description</span>\n </div>\n \n </div>\n <div id=\"with-descriptions-content-2\" class=\"govuk-accordion__section-content\" aria-labelledby=\"with-descriptions-heading-2\">\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>Example item 2</li>\n</ul>\n\n </div>\n </div>\n \n \n</div>"
59
+ "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"with-descriptions\">\n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"with-descriptions-heading-1\">\n Test\n </span>\n </h2>\n \n <div class=\"govuk-accordion__section-summary govuk-body\" id=\"with-descriptions-summary-1\">\n Additional description\n </div>\n \n </div>\n <div id=\"with-descriptions-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"with-descriptions-heading-1\">\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>Example item 1</li>\n</ul>\n\n </div>\n </div>\n \n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"with-descriptions-heading-2\">\n Test 2\n </span>\n </h2>\n \n <div class=\"govuk-accordion__section-summary govuk-body\" id=\"with-descriptions-summary-2\">\n <span class=\"govuk-!-font-weight-regular\">Additional description</span>\n </div>\n \n </div>\n <div id=\"with-descriptions-content-2\" class=\"govuk-accordion__section-content\" aria-labelledby=\"with-descriptions-heading-2\">\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>Example item 2</li>\n</ul>\n\n </div>\n </div>\n \n \n</div>",
60
+ "hidden": false
59
61
  },
60
62
  {
61
63
  "name": "with one section open",
@@ -81,7 +83,8 @@
81
83
  }
82
84
  ]
83
85
  },
84
- "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"one-section-open-example\">\n \n \n <div class=\"govuk-accordion__section govuk-accordion__section--expanded\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"one-section-open-example-heading-1\">\n Section A\n </span>\n </h2>\n \n </div>\n <div id=\"one-section-open-example-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"one-section-open-example-heading-1\">\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>Example item 1</li>\n</ul>\n\n </div>\n </div>\n \n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"one-section-open-example-heading-2\">\n Section B\n </span>\n </h2>\n \n </div>\n <div id=\"one-section-open-example-content-2\" class=\"govuk-accordion__section-content\" aria-labelledby=\"one-section-open-example-heading-2\">\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>Example item 2</li>\n</ul>\n\n </div>\n </div>\n \n \n</div>"
86
+ "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"one-section-open-example\">\n \n \n <div class=\"govuk-accordion__section govuk-accordion__section--expanded\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"one-section-open-example-heading-1\">\n Section A\n </span>\n </h2>\n \n </div>\n <div id=\"one-section-open-example-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"one-section-open-example-heading-1\">\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>Example item 1</li>\n</ul>\n\n </div>\n </div>\n \n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"one-section-open-example-heading-2\">\n Section B\n </span>\n </h2>\n \n </div>\n <div id=\"one-section-open-example-content-2\" class=\"govuk-accordion__section-content\" aria-labelledby=\"one-section-open-example-heading-2\">\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>Example item 2</li>\n</ul>\n\n </div>\n </div>\n \n \n</div>",
87
+ "hidden": false
85
88
  },
86
89
  {
87
90
  "name": "with all sections already open",
@@ -108,7 +111,8 @@
108
111
  }
109
112
  ]
110
113
  },
111
- "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"all-sections-open-example\">\n \n \n <div class=\"govuk-accordion__section govuk-accordion__section--expanded\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"all-sections-open-example-heading-1\">\n Section A\n </span>\n </h2>\n \n </div>\n <div id=\"all-sections-open-example-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"all-sections-open-example-heading-1\">\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>Example item 1</li>\n</ul>\n\n </div>\n </div>\n \n \n \n <div class=\"govuk-accordion__section govuk-accordion__section--expanded\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"all-sections-open-example-heading-2\">\n Section B\n </span>\n </h2>\n \n </div>\n <div id=\"all-sections-open-example-content-2\" class=\"govuk-accordion__section-content\" aria-labelledby=\"all-sections-open-example-heading-2\">\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>Example item 2</li>\n</ul>\n\n </div>\n </div>\n \n \n</div>"
114
+ "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"all-sections-open-example\">\n \n \n <div class=\"govuk-accordion__section govuk-accordion__section--expanded\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"all-sections-open-example-heading-1\">\n Section A\n </span>\n </h2>\n \n </div>\n <div id=\"all-sections-open-example-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"all-sections-open-example-heading-1\">\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>Example item 1</li>\n</ul>\n\n </div>\n </div>\n \n \n \n <div class=\"govuk-accordion__section govuk-accordion__section--expanded\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"all-sections-open-example-heading-2\">\n Section B\n </span>\n </h2>\n \n </div>\n <div id=\"all-sections-open-example-content-2\" class=\"govuk-accordion__section-content\" aria-labelledby=\"all-sections-open-example-heading-2\">\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>Example item 2</li>\n</ul>\n\n </div>\n </div>\n \n \n</div>",
115
+ "hidden": false
112
116
  },
113
117
  {
114
118
  "name": "with focusable elements inside",
@@ -133,11 +137,13 @@
133
137
  }
134
138
  ]
135
139
  },
136
- "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"with-focusable-elements\">\n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"with-focusable-elements-heading-1\">\n Section A\n </span>\n </h2>\n \n </div>\n <div id=\"with-focusable-elements-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"with-focusable-elements-heading-1\">\n <a class=\"govuk-link\" href=\"#\">Link A</a>\n </div>\n </div>\n \n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"with-focusable-elements-heading-2\">\n Section B\n </span>\n </h2>\n \n </div>\n <div id=\"with-focusable-elements-content-2\" class=\"govuk-accordion__section-content\" aria-labelledby=\"with-focusable-elements-heading-2\">\n <a class=\"govuk-link\" href=\"#\">Link B</a>\n </div>\n </div>\n \n \n</div>"
140
+ "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"with-focusable-elements\">\n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"with-focusable-elements-heading-1\">\n Section A\n </span>\n </h2>\n \n </div>\n <div id=\"with-focusable-elements-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"with-focusable-elements-heading-1\">\n <a class=\"govuk-link\" href=\"#\">Link A</a>\n </div>\n </div>\n \n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"with-focusable-elements-heading-2\">\n Section B\n </span>\n </h2>\n \n </div>\n <div id=\"with-focusable-elements-content-2\" class=\"govuk-accordion__section-content\" aria-labelledby=\"with-focusable-elements-heading-2\">\n <a class=\"govuk-link\" href=\"#\">Link B</a>\n </div>\n </div>\n \n \n</div>",
141
+ "hidden": false
137
142
  },
138
143
  {
139
144
  "name": "classes",
140
145
  "options": {
146
+ "id": "accordion-classes",
141
147
  "classes": "myClass",
142
148
  "items": [
143
149
  {
@@ -150,11 +156,13 @@
150
156
  }
151
157
  ]
152
158
  },
153
- "html": "<div class=\"govuk-accordion myClass\" data-module=\"govuk-accordion\" id=\"\">\n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"-heading-1\">\n Section A\n </span>\n </h2>\n \n </div>\n <div id=\"-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"-heading-1\">\n Some content\n </div>\n </div>\n \n \n</div>"
159
+ "html": "<div class=\"govuk-accordion myClass\" data-module=\"govuk-accordion\" id=\"accordion-classes\">\n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-classes-heading-1\">\n Section A\n </span>\n </h2>\n \n </div>\n <div id=\"accordion-classes-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"accordion-classes-heading-1\">\n Some content\n </div>\n </div>\n \n \n</div>",
160
+ "hidden": true
154
161
  },
155
162
  {
156
163
  "name": "attributes",
157
164
  "options": {
165
+ "id": "accordion-attributes",
158
166
  "attributes": {
159
167
  "data-attribute": "value"
160
168
  },
@@ -169,11 +177,13 @@
169
177
  }
170
178
  ]
171
179
  },
172
- "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"\" data-attribute=\"value\">\n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"-heading-1\">\n Section A\n </span>\n </h2>\n \n </div>\n <div id=\"-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"-heading-1\">\n Some content\n </div>\n </div>\n \n \n</div>"
180
+ "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"accordion-attributes\" data-attribute=\"value\">\n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-attributes-heading-1\">\n Section A\n </span>\n </h2>\n \n </div>\n <div id=\"accordion-attributes-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"accordion-attributes-heading-1\">\n Some content\n </div>\n </div>\n \n \n</div>",
181
+ "hidden": true
173
182
  },
174
183
  {
175
184
  "name": "custom heading level",
176
185
  "options": {
186
+ "id": "accordion-heading",
177
187
  "headingLevel": 3,
178
188
  "items": [
179
189
  {
@@ -186,11 +196,13 @@
186
196
  }
187
197
  ]
188
198
  },
189
- "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"\">\n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h3 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"-heading-1\">\n Section A\n </span>\n </h3>\n \n </div>\n <div id=\"-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"-heading-1\">\n Some content\n </div>\n </div>\n \n \n</div>"
199
+ "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"accordion-heading\">\n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h3 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-heading-heading-1\">\n Section A\n </span>\n </h3>\n \n </div>\n <div id=\"accordion-heading-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"accordion-heading-heading-1\">\n Some content\n </div>\n </div>\n \n \n</div>",
200
+ "hidden": true
190
201
  },
191
202
  {
192
203
  "name": "heading html",
193
204
  "options": {
205
+ "id": "accordion-heading-html",
194
206
  "items": [
195
207
  {
196
208
  "heading": {
@@ -202,11 +214,13 @@
202
214
  }
203
215
  ]
204
216
  },
205
- "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"\">\n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"-heading-1\">\n <span class=\"myClass\">Section A</span>\n </span>\n </h2>\n \n </div>\n <div id=\"-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"-heading-1\">\n Some content\n </div>\n </div>\n \n \n</div>"
217
+ "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"accordion-heading-html\">\n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-heading-html-heading-1\">\n <span class=\"myClass\">Section A</span>\n </span>\n </h2>\n \n </div>\n <div id=\"accordion-heading-html-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"accordion-heading-html-heading-1\">\n Some content\n </div>\n </div>\n \n \n</div>",
218
+ "hidden": true
206
219
  },
207
220
  {
208
221
  "name": "with falsey values",
209
222
  "options": {
223
+ "id": "accordion-falsey",
210
224
  "items": [
211
225
  {
212
226
  "heading": {
@@ -229,7 +243,8 @@
229
243
  }
230
244
  ]
231
245
  },
232
- "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"\">\n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"-heading-1\">\n Section A\n </span>\n </h2>\n \n </div>\n <div id=\"-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"-heading-1\">\n Some content\n </div>\n </div>\n \n \n \n \n \n \n \n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"-heading-5\">\n Section B\n </span>\n </h2>\n \n </div>\n <div id=\"-content-5\" class=\"govuk-accordion__section-content\" aria-labelledby=\"-heading-5\">\n Some content\n </div>\n </div>\n \n \n</div>"
246
+ "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"accordion-falsey\">\n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-falsey-heading-1\">\n Section A\n </span>\n </h2>\n \n </div>\n <div id=\"accordion-falsey-content-1\" class=\"govuk-accordion__section-content\" aria-labelledby=\"accordion-falsey-heading-1\">\n Some content\n </div>\n </div>\n \n \n \n \n \n \n \n \n \n <div class=\"govuk-accordion__section \">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-falsey-heading-5\">\n Section B\n </span>\n </h2>\n \n </div>\n <div id=\"accordion-falsey-content-5\" class=\"govuk-accordion__section-content\" aria-labelledby=\"accordion-falsey-heading-5\">\n Some content\n </div>\n </div>\n \n \n</div>",
247
+ "hidden": true
233
248
  }
234
249
  ]
235
250
  }