govuk_publishing_components 28.9.2 → 29.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/config/govuk_publishing_components_manifest.js +15 -3
  4. data/app/assets/javascripts/govuk_publishing_components/dependencies.js +2 -5
  5. data/app/assets/javascripts/govuk_publishing_components/modules.js +15 -18
  6. data/app/assets/javascripts/govuk_publishing_components/{rum-loader.js.erb → rum-loader.js} +13 -10
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +1 -0
  8. data/app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb +0 -5
  9. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +7 -1
  10. data/app/views/govuk_publishing_components/components/docs/big_number.yml +3 -3
  11. data/app/views/govuk_publishing_components/components/docs/breadcrumbs.yml +3 -3
  12. data/app/views/govuk_publishing_components/components/docs/button.yml +2 -2
  13. data/app/views/govuk_publishing_components/components/docs/checkboxes.yml +5 -5
  14. data/app/views/govuk_publishing_components/components/docs/contents_list.yml +1 -1
  15. data/app/views/govuk_publishing_components/components/docs/contextual_breadcrumbs.yml +1 -1
  16. data/app/views/govuk_publishing_components/components/docs/contextual_guidance.yml +1 -1
  17. data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +2 -2
  18. data/app/views/govuk_publishing_components/components/docs/date_input.yml +1 -1
  19. data/app/views/govuk_publishing_components/components/docs/details.yml +1 -1
  20. data/app/views/govuk_publishing_components/components/docs/devolved_nations.yml +1 -1
  21. data/app/views/govuk_publishing_components/components/docs/document_list.yml +2 -2
  22. data/app/views/govuk_publishing_components/components/docs/error_alert.yml +1 -1
  23. data/app/views/govuk_publishing_components/components/docs/error_summary.yml +2 -2
  24. data/app/views/govuk_publishing_components/components/docs/feedback.yml +1 -1
  25. data/app/views/govuk_publishing_components/components/docs/fieldset.yml +4 -4
  26. data/app/views/govuk_publishing_components/components/docs/heading.yml +4 -4
  27. data/app/views/govuk_publishing_components/components/docs/hint.yml +1 -1
  28. data/app/views/govuk_publishing_components/components/docs/input.yml +3 -3
  29. data/app/views/govuk_publishing_components/components/docs/inset_text.yml +1 -1
  30. data/app/views/govuk_publishing_components/components/docs/label.yml +1 -1
  31. data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +2 -2
  32. data/app/views/govuk_publishing_components/components/docs/lead_paragraph.yml +1 -1
  33. data/app/views/govuk_publishing_components/components/docs/metadata.yml +1 -1
  34. data/app/views/govuk_publishing_components/components/docs/notice.yml +2 -2
  35. data/app/views/govuk_publishing_components/components/docs/print_link.yml +1 -1
  36. data/app/views/govuk_publishing_components/components/docs/search.yml +4 -4
  37. data/app/views/govuk_publishing_components/components/docs/select.yml +5 -5
  38. data/app/views/govuk_publishing_components/components/docs/show_password.yml +3 -3
  39. data/app/views/govuk_publishing_components/components/docs/signup_link.yml +1 -1
  40. data/app/views/govuk_publishing_components/components/docs/single_page_notification_button.yml +2 -2
  41. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml +1 -1
  42. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml +3 -3
  43. data/app/views/govuk_publishing_components/components/docs/subscription_links.yml +3 -3
  44. data/app/views/govuk_publishing_components/components/docs/success_alert.yml +1 -1
  45. data/app/views/govuk_publishing_components/components/docs/table.yml +1 -1
  46. data/app/views/govuk_publishing_components/components/docs/textarea.yml +1 -1
  47. data/app/views/govuk_publishing_components/components/docs/title.yml +1 -1
  48. data/config/initializers/assets.rb +15 -45
  49. data/lib/govuk_publishing_components/presenters/attachment.rb +3 -2
  50. data/lib/govuk_publishing_components/presenters/breadcrumb_selector.rb +0 -11
  51. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +0 -20
  52. data/lib/govuk_publishing_components/presenters/meta_tags.rb +1 -37
  53. data/lib/govuk_publishing_components/version.rb +1 -1
  54. data/lib/govuk_publishing_components.rb +0 -1
  55. metadata +10 -118
  56. data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_priority.rb +0 -118
  57. data/node_modules/jquery/AUTHORS.txt +0 -266
  58. data/node_modules/jquery/LICENSE.txt +0 -36
  59. data/node_modules/jquery/README.md +0 -65
  60. data/node_modules/jquery/bower.json +0 -14
  61. data/node_modules/jquery/dist/jquery.js +0 -11008
  62. data/node_modules/jquery/dist/jquery.min.js +0 -5
  63. data/node_modules/jquery/dist/jquery.min.map +0 -1
  64. data/node_modules/jquery/external/sizzle/LICENSE.txt +0 -36
  65. data/node_modules/jquery/external/sizzle/dist/sizzle.js +0 -2143
  66. data/node_modules/jquery/external/sizzle/dist/sizzle.min.js +0 -3
  67. data/node_modules/jquery/external/sizzle/dist/sizzle.min.map +0 -1
  68. data/node_modules/jquery/package.json +0 -85
  69. data/node_modules/jquery/src/ajax/jsonp.js +0 -100
  70. data/node_modules/jquery/src/ajax/load.js +0 -83
  71. data/node_modules/jquery/src/ajax/parseJSON.js +0 -53
  72. data/node_modules/jquery/src/ajax/parseXML.js +0 -31
  73. data/node_modules/jquery/src/ajax/script.js +0 -95
  74. data/node_modules/jquery/src/ajax/var/location.js +0 -3
  75. data/node_modules/jquery/src/ajax/var/nonce.js +0 -5
  76. data/node_modules/jquery/src/ajax/var/rquery.js +0 -3
  77. data/node_modules/jquery/src/ajax/xhr.js +0 -229
  78. data/node_modules/jquery/src/ajax.js +0 -842
  79. data/node_modules/jquery/src/attributes/attr.js +0 -281
  80. data/node_modules/jquery/src/attributes/classes.js +0 -174
  81. data/node_modules/jquery/src/attributes/prop.js +0 -156
  82. data/node_modules/jquery/src/attributes/support.js +0 -70
  83. data/node_modules/jquery/src/attributes/val.js +0 -191
  84. data/node_modules/jquery/src/attributes.js +0 -11
  85. data/node_modules/jquery/src/callbacks.js +0 -232
  86. data/node_modules/jquery/src/core/access.js +0 -65
  87. data/node_modules/jquery/src/core/init.js +0 -140
  88. data/node_modules/jquery/src/core/parseHTML.js +0 -41
  89. data/node_modules/jquery/src/core/ready.js +0 -163
  90. data/node_modules/jquery/src/core/var/rsingleTag.js +0 -5
  91. data/node_modules/jquery/src/core.js +0 -529
  92. data/node_modules/jquery/src/css/addGetHookIf.js +0 -24
  93. data/node_modules/jquery/src/css/adjustCSS.js +0 -65
  94. data/node_modules/jquery/src/css/curCSS.js +0 -137
  95. data/node_modules/jquery/src/css/defaultDisplay.js +0 -72
  96. data/node_modules/jquery/src/css/hiddenVisibleSelectors.js +0 -42
  97. data/node_modules/jquery/src/css/showHide.js +0 -45
  98. data/node_modules/jquery/src/css/support.js +0 -184
  99. data/node_modules/jquery/src/css/var/cssExpand.js +0 -3
  100. data/node_modules/jquery/src/css/var/isHidden.js +0 -16
  101. data/node_modules/jquery/src/css/var/rmargin.js +0 -3
  102. data/node_modules/jquery/src/css/var/rnumnonpx.js +0 -5
  103. data/node_modules/jquery/src/css/var/swap.js +0 -24
  104. data/node_modules/jquery/src/css.js +0 -563
  105. data/node_modules/jquery/src/data/support.js +0 -23
  106. data/node_modules/jquery/src/data/var/acceptData.js +0 -20
  107. data/node_modules/jquery/src/data.js +0 -342
  108. data/node_modules/jquery/src/deferred.js +0 -159
  109. data/node_modules/jquery/src/deprecated.js +0 -34
  110. data/node_modules/jquery/src/dimensions.js +0 -56
  111. data/node_modules/jquery/src/effects/Tween.js +0 -121
  112. data/node_modules/jquery/src/effects/animatedSelector.js +0 -13
  113. data/node_modules/jquery/src/effects/support.js +0 -58
  114. data/node_modules/jquery/src/effects.js +0 -640
  115. data/node_modules/jquery/src/event/ajax.js +0 -20
  116. data/node_modules/jquery/src/event/alias.js +0 -25
  117. data/node_modules/jquery/src/event/support.js +0 -28
  118. data/node_modules/jquery/src/event.js +0 -1134
  119. data/node_modules/jquery/src/exports/amd.js +0 -24
  120. data/node_modules/jquery/src/exports/global.js +0 -26
  121. data/node_modules/jquery/src/intro.js +0 -44
  122. data/node_modules/jquery/src/jquery.js +0 -37
  123. data/node_modules/jquery/src/manipulation/_evalUrl.js +0 -21
  124. data/node_modules/jquery/src/manipulation/buildFragment.js +0 -157
  125. data/node_modules/jquery/src/manipulation/createSafeFragment.js +0 -20
  126. data/node_modules/jquery/src/manipulation/getAll.js +0 -33
  127. data/node_modules/jquery/src/manipulation/setGlobalEval.js +0 -19
  128. data/node_modules/jquery/src/manipulation/support.js +0 -72
  129. data/node_modules/jquery/src/manipulation/var/nodeNames.js +0 -5
  130. data/node_modules/jquery/src/manipulation/var/rcheckableType.js +0 -3
  131. data/node_modules/jquery/src/manipulation/var/rleadingWhitespace.js +0 -3
  132. data/node_modules/jquery/src/manipulation/var/rscriptType.js +0 -3
  133. data/node_modules/jquery/src/manipulation/var/rtagName.js +0 -3
  134. data/node_modules/jquery/src/manipulation/wrapMap.js +0 -30
  135. data/node_modules/jquery/src/manipulation.js +0 -585
  136. data/node_modules/jquery/src/offset.js +0 -219
  137. data/node_modules/jquery/src/outro.js +0 -2
  138. data/node_modules/jquery/src/queue/delay.js +0 -22
  139. data/node_modules/jquery/src/queue.js +0 -144
  140. data/node_modules/jquery/src/selector-sizzle.js +0 -14
  141. data/node_modules/jquery/src/selector.js +0 -1
  142. data/node_modules/jquery/src/serialize.js +0 -125
  143. data/node_modules/jquery/src/support.js +0 -63
  144. data/node_modules/jquery/src/traversing/findFilter.js +0 -100
  145. data/node_modules/jquery/src/traversing/var/dir.js +0 -20
  146. data/node_modules/jquery/src/traversing/var/rneedsContext.js +0 -6
  147. data/node_modules/jquery/src/traversing/var/siblings.js +0 -15
  148. data/node_modules/jquery/src/traversing.js +0 -179
  149. data/node_modules/jquery/src/var/class2type.js +0 -5
  150. data/node_modules/jquery/src/var/concat.js +0 -5
  151. data/node_modules/jquery/src/var/deletedIds.js +0 -3
  152. data/node_modules/jquery/src/var/document.js +0 -3
  153. data/node_modules/jquery/src/var/documentElement.js +0 -5
  154. data/node_modules/jquery/src/var/hasOwn.js +0 -5
  155. data/node_modules/jquery/src/var/indexOf.js +0 -5
  156. data/node_modules/jquery/src/var/pnum.js +0 -3
  157. data/node_modules/jquery/src/var/push.js +0 -5
  158. data/node_modules/jquery/src/var/rcssNum.js +0 -7
  159. data/node_modules/jquery/src/var/rnotwhite.js +0 -3
  160. data/node_modules/jquery/src/var/slice.js +0 -5
  161. data/node_modules/jquery/src/var/support.js +0 -5
  162. data/node_modules/jquery/src/var/toString.js +0 -5
  163. data/node_modules/jquery/src/wrap.js +0 -77
@@ -3,7 +3,7 @@ description: A notice to convey and highlight information
3
3
  body: |
4
4
  The notice component replaces the notice and withdrawal notice patterns on GOV.UK.
5
5
 
6
- The component accepts either a simple string description_text parameter that it wraps in a paragraph, or a description_govspeak parameter that is rendered through govspeak for more complex HTML layout.
6
+ The component accepts either a simple string `description_text` parameter that it wraps in a paragraph, or a `description_govspeak` parameter that is rendered through govspeak for more complex HTML layout.
7
7
  accessibility_criteria: |
8
8
  The notice must:
9
9
 
@@ -45,7 +45,7 @@ examples:
45
45
  with_locale:
46
46
  description: |
47
47
  Passing a lang value allows the content of the notice to be labelled as being a different language from surrounding content.
48
- The lang attribute must be set to a [valid BCP47 string](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang#Language_tag_syntax). A valid code can be the two or three letter language code - for example, English is en or eng, Korean is ko or kor - but if in doubt please check.
48
+ The lang attribute must be set to a [valid BCP47 string](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang#Language_tag_syntax). A valid code can be the two or three letter language code - for example, English is `en` or `eng`, Korean is `ko` or `kor` - but if in doubt please check.
49
49
  data:
50
50
  title: 'This publication was withdrawn on 30 September 2015'
51
51
  description_govspeak: <p>This document is no longer current. We published a new version on 30 September 2015.</p>
@@ -23,7 +23,7 @@ examples:
23
23
  track-action: "clicked"
24
24
  track-label: "Print this page"
25
25
  with_custom_margins:
26
- description: The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having margin level 3 on top and bottom.
26
+ description: The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having margin level `3` on top and bottom.
27
27
  data:
28
28
  margin_top: 0
29
29
  margin_bottom: 4
@@ -4,7 +4,7 @@ body: |
4
4
  A search box with label and attached submit button. The component must be used within an HTML form.
5
5
  The search input has a name="q" attribute and a customisable ID and NAME.
6
6
 
7
- It can be used on white or on govuk-blue using the on_govuk_blue option.
7
+ It can be used on white or on govuk-blue using the `on_govuk_blue` option.
8
8
 
9
9
  Markup such as heading tags can be included in the label using the label_text option. Styling is not included in the component for heading tags in labels, however this is what the search results page does.
10
10
  accessibility_criteria: |
@@ -74,7 +74,7 @@ examples:
74
74
  label_size: "xl"
75
75
  wrap_label_inside_a_heading:
76
76
  description: |
77
- Puts the label inside a heading; heading level defaults to 2 if not set.
77
+ Puts the label inside a heading; heading level defaults to `2` if not set.
78
78
 
79
79
  (The size of the label can still be set with `label_size` to appear more like a heading.)
80
80
  data:
@@ -84,7 +84,7 @@ examples:
84
84
  description: |
85
85
  Allows the spacing at the bottom of the component to be adjusted.
86
86
 
87
- This accepts a number from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having no margin bottom.
87
+ This accepts a number from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having no margin bottom.
88
88
  data:
89
89
  margin_bottom: 9
90
90
  with_margin_bottom_for_the_label:
@@ -93,7 +93,7 @@ examples:
93
93
 
94
94
  Requires `inline_label` to be false.
95
95
 
96
- This accepts a number from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having no margin bottom.
96
+ This accepts a number from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having no margin bottom.
97
97
  data:
98
98
  label_margin_bottom: 9
99
99
  inline_label: false
@@ -55,7 +55,7 @@ examples:
55
55
  - text: 'Something else'
56
56
  value: 'option2'
57
57
  with_tracking:
58
- description: 'Tracking can be enabled on the select component by passing a minimum of data_track_category and data_track_action. Other tracking attributes are optional. Note: tracking events do not currently fire within the component guide.'
58
+ description: 'Tracking can be enabled on the select component by passing a minimum of `data_track_category` and `data_track_action`. Other tracking attributes are optional. Note: tracking events do not currently fire within the component guide.'
59
59
  data:
60
60
  id: 'dropdown3'
61
61
  label: 'With tracking enabled'
@@ -103,7 +103,7 @@ examples:
103
103
  - text: 'Option three'
104
104
  value: 'option3'
105
105
  with_error:
106
- description: If the user has to select an option, it is recommended that a radio button is used instead of a select, but this is not always possible. Note that error_id is optional, if it is not passed one will be generated automatically.
106
+ description: If the user has to select an option, it is recommended that a radio button is used instead of a select, but this is not always possible. Note that `error_id` is optional, if it is not passed one will be generated automatically.
107
107
  data:
108
108
  id: 'dropdown4-1'
109
109
  label: 'How will you be travelling to the conference?'
@@ -117,7 +117,7 @@ examples:
117
117
  - text: 'Will make own arrangements'
118
118
  value: 'option2'
119
119
  with_error_id_but_no_message:
120
- description: For some selects the error message should be rendered separately but an error state is still required (currently required in smart answers). In this scenario an error_id can be passed without an error_message to highlight the component and set aria-describedby correctly.
120
+ description: For some selects the error message should be rendered separately but an error state is still required (currently required in smart answers). In this scenario an `error_id` can be passed without an `error_message` to highlight the component and set `aria-describedby` correctly.
121
121
  data:
122
122
  id: 'dropdown4-2'
123
123
  label: 'What lunch option would you like?'
@@ -143,7 +143,7 @@ examples:
143
143
  - text: 'Option three'
144
144
  value: 'option3'
145
145
  with_custom_label_size:
146
- description: Make the label different sizes. Valid options are 's', 'm', 'l' and 'xl'.
146
+ description: Make the label different sizes. Valid options are `s`, `m`, `l` and `xl`.
147
147
  data:
148
148
  id: 'dropdown6'
149
149
  label: 'Bigger!'
@@ -156,7 +156,7 @@ examples:
156
156
  - text: 'Option three'
157
157
  value: 'option3'
158
158
  with_page_heading:
159
- description: This adds a H1 element with a label element inside containing the text supplied.
159
+ description: This adds a `h1` element with a label element inside containing the text supplied.
160
160
  data:
161
161
  id: 'select-with-heading'
162
162
  label: 'This is a page heading'
@@ -38,14 +38,14 @@ examples:
38
38
  text: Please enter your password
39
39
  value: this is my password
40
40
  disable_form_submit_check:
41
- description: The component sets the `autocomplete` attribute on the input to "off" so that browsers don't remember the password. This isn't reliable, so the component reverts the input type back to a password when its parent form is submitted. If this is causing conflicts with other JavaScript on your form, you can set `disable-form-submit-check` to `true` to disable this functionality and implement it yourself.
41
+ description: The component sets the `autocomplete` attribute on the input to `off` so that browsers don't remember the password. This isn't reliable, so the component reverts the input type back to a password when its parent form is submitted. If this is causing conflicts with other JavaScript on your form, you can set `disable-form-submit-check` to `true` to disable this functionality and implement it yourself.
42
42
  data:
43
43
  label:
44
44
  text: Please enter your password
45
45
  value: this is my password
46
46
  disable_form_submit_check: true
47
47
  set_autocomplete_attribute:
48
- description: By default, autocomplete is set to `off`. This can be set to `new-password` or `current-password` to help browsers differentiate between new and current passwords.
48
+ description: By default, `autocomplete` is set to `off`. This can be set to `new-password` or `current-password` to help browsers differentiate between new and current passwords.
49
49
  data:
50
50
  label:
51
51
  text: Please enter your password
@@ -80,7 +80,7 @@ examples:
80
80
  - text: Look I keep telling you
81
81
  - text: This isn't your password
82
82
  with_data_attributes:
83
- description: Data attributes can be passed to add to the input element. If the data attribute starts with `data-button-` this attribute will be applied to the show/hide button, instead of the input. Note that if JS is disabled, all attributes are added to the input.
83
+ description: Data attributes can be passed to add to the input element. If the data attribute starts with `data-button-` this attribute will be applied to the show/hide button, instead of the input. Note that if JavaScript disabled, all attributes are added to the input.
84
84
  data:
85
85
  label:
86
86
  text: Your password
@@ -24,7 +24,7 @@ examples:
24
24
  link_text: 'Click right here to sign up!!'
25
25
  link_href: '/this-signs-you-up'
26
26
  with_custom_margin_bottom:
27
- description: The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having no margin bottom.
27
+ description: The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having no margin bottom.
28
28
  data:
29
29
  heading: 'Sign up for email notifications'
30
30
  link_text: 'Click right here to sign up!!'
@@ -27,7 +27,7 @@ examples:
27
27
  test_attribute: "testing"
28
28
  with_margin_bottom:
29
29
  description: |
30
- The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having a margin bottom of 15px.
30
+ The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having a margin bottom of 15px.
31
31
  data:
32
32
  base_path: '/current-page-path'
33
33
  margin_bottom: 5
@@ -41,7 +41,7 @@ examples:
41
41
  description: |
42
42
  When there is more than one button on a page, we should specify their location so that Analytics can differentiate between them.
43
43
 
44
- The location should have one of two values: "top" or "bottom".
44
+ The location should have one of two values: `top` or `bottom`.
45
45
 
46
46
  When this parameter is passed, its value is reflected in the `data-action` attribute (i.e "Unsubscribe-button-top"). When the flag is not present, `data-action` defaults to "Subscribe-button" or "Unsubscribe-button", depending on the state of the button.
47
47
  data:
@@ -22,7 +22,7 @@ accessibility_criteria: |
22
22
  - inform the user which step the current page is in
23
23
  - be readable when only the text of the page is zoomed - achieved for the numbers and logic elements by their text being wrapped in several elements that give them a white background and ensure the text when zoomed expands to the left, not to the right, where it would obscure the step titles
24
24
 
25
- The show/hide all button only needs to list the first panel id in the aria-controls attribute, rather than all of them.
25
+ The show/hide all button only needs to list the first panel `id` in the `aria-controls` attribute, rather than all of them.
26
26
 
27
27
  Step headings must use a button element:
28
28
 
@@ -7,7 +7,7 @@ accessibility_criteria: |
7
7
 
8
8
  An earlier version of the component did not use a heading element &ndash; this failed WCAG 2.1 Success Criterion 1.3.1 ("Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text.")
9
9
 
10
- An early version of the component contained a hidden skip link for keyboard and screen reader users, that jumped to the step by step navigation component in the sidebar (similiar to the 'skip to content' link at the top of all GOV.UK pages). User testing suggested that rather than helping users it confused them, so this has been removed.
10
+ An early version of the component contained a hidden skip link for keyboard and screen reader users, that jumped to the step by step navigation component in the sidebar (similar to the 'skip to content' link at the top of all GOV.UK pages). User testing suggested that rather than helping users it confused them, so this has been removed.
11
11
  shared_accessibility_criteria:
12
12
  - link
13
13
  examples:
@@ -24,12 +24,12 @@ examples:
24
24
  path: /childcare-parenting/pregnancy-and-birth
25
25
  with_margin_bottom:
26
26
  description: |
27
- The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having a margin bottom of 30px.
27
+ The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having a margin bottom of `30px`.
28
28
  data:
29
29
  title: 'Learn to practice flexible spacing: step by step'
30
30
  margin_bottom: 9
31
31
  with_unique_tracking:
32
- description: In order to identify the step by step navigation the component is part of, we need to track a unique ID of the navigation in Google Analytics. This ID should be the same across all pages that are linked from and are part of that navigation. Its value is included in any tracking events, specifically in dimension96. It refers to the ID of the step nav that the component links to.
32
+ description: In order to identify the step by step navigation the component is part of, we need to track a unique `ID` of the navigation in Google Analytics. This `ID` should be the same across all pages that are linked from and are part of that navigation. Its value is included in any tracking events, specifically in dimension96. It refers to the `ID` of the step nav that the component links to.
33
33
  data:
34
34
  title: 'With a tracking id'
35
35
  path: '#'
@@ -1,7 +1,7 @@
1
1
  name: Subscription links
2
2
  description: Links to ‘Get emails’ and ‘Subscribe to feed’
3
3
  body: |
4
- <strong>NOTE: This component includes a h2 heading by default but can be suppressed by using `hide_heading` option (see below)<strong>
4
+ <strong>NOTE: This component includes a `h2` heading by default but can be suppressed by using `hide_heading` option (see below)<strong>
5
5
  accessibility_criteria: |
6
6
  Icons in subscription links must be presentational and ignored by screen readers.
7
7
 
@@ -11,7 +11,7 @@ accessibility_criteria: |
11
11
  - be usable with touch
12
12
  - be recognised by screen readers as a button
13
13
  - announce to screen readers whether they are expanded or collapsed
14
- - show hidden elements by default when Javascript is disabled
14
+ - show hidden elements by default when JavaScript is disabled
15
15
  shared_accessibility_criteria:
16
16
  - link
17
17
  examples:
@@ -20,7 +20,7 @@ examples:
20
20
  email_signup_link: '/foreign-travel-advice/singapore/email-signup'
21
21
  feed_link: '/foreign-travel-advice/singapore.atom'
22
22
  with_margin:
23
- description: The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having no margin bottom, although some margin is supplied by the links themselves (so that when they stack on mobile there is space between them).
23
+ description: The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having no margin bottom, although some margin is supplied by the links themselves (so that when they stack on mobile there is space between them).
24
24
  data:
25
25
  email_signup_link: '/foreign-travel-advice/singapore/email-signup'
26
26
  feed_link: '/foreign-travel-advice/singapore.atom'
@@ -39,7 +39,7 @@ examples:
39
39
  Nullam sed neque quis turpis.
40
40
  with_custom_margin_bottom:
41
41
  description: |
42
- The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). The default margins for the component are inherited from the [notification-banner](https://github.com/alphagov/govuk-frontend/blob/main/package/govuk/components/notification-banner/_index.scss) styles defined in the Design System.
42
+ The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). The default margins for the component are inherited from the [notification-banner](https://github.com/alphagov/govuk-frontend/blob/main/package/govuk/components/notification-banner/_index.scss) styles defined in the Design System.
43
43
  data:
44
44
  message: Message to alert the user to a successful action goes here
45
45
  margin_bottom: 3
@@ -2,7 +2,7 @@ name: Table
2
2
  description: A table component to make information easier to compare and scan for users.
3
3
  accessibility_criteria: |
4
4
  Accessible tables need HTML markup that indicates header cells and data cells and defines their relationship. Assistive technologies use this information to provide context to users.
5
- Header cells must be marked up with <th>, and data cells with <td> to make tables accessible.
5
+ Header cells must be marked up with `<th>`, and data cells with `<td>` to make tables accessible.
6
6
  For more complex tables, explicit associations is needed using scope attributes.
7
7
  shared_accessibility_criteria:
8
8
  - link
@@ -28,7 +28,7 @@ examples:
28
28
  name: "emergency-name"
29
29
  id: "emergency-id"
30
30
  with_margin_bottom:
31
- description: The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to a margin bottom of 6 (30px).
31
+ description: The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to a margin bottom of 6 (30px).
32
32
  data:
33
33
  margin_bottom: 9
34
34
  label:
@@ -47,7 +47,7 @@ examples:
47
47
  average_title_length: long
48
48
  with_margin_bottom:
49
49
  description: |
50
- The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having a margin bottom of 50px.
50
+ The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having a margin bottom of 50px.
51
51
 
52
52
  This margin is responsive at certain sizes, see the link above for more detail. Note also that the component has a (responsive) top margin set as well, which cannot be modified.
53
53
  data:
@@ -1,50 +1,13 @@
1
1
  return unless Rails.application.config.respond_to?(:assets)
2
2
 
3
- # GOV.UK Publishing Components assets
4
- Rails.application.config.assets.precompile += %w[
5
- component_guide/accessibility-test.js
6
- component_guide/application.js
7
- component_guide/filter-components.js
8
- component_guide/print.css
9
- govuk_publishing_components/rum-loader.js
10
- govuk_publishing_components/vendor/lux/lux-reporter.js
11
- govuk_publishing_components/vendor/lux/lux-measurer.js
12
- govuk_publishing_components/all_components.js
13
- govuk_publishing_components/dependencies.js
14
- govuk_publishing_components/ie.js
15
- govuk_publishing_components/modules.js
16
- govuk_publishing_components/vendor/modernizr.js
17
- govuk_publishing_components/analytics.js
18
- govuk_publishing_components/component_guide.css
19
- govuk_publishing_components/favicon-development.png
20
- govuk_publishing_components/favicon-example.png
21
- govuk_publishing_components/favicon-integration.png
22
- govuk_publishing_components/favicon-production.png
23
- govuk_publishing_components/favicon-staging.png
24
- govuk_publishing_components/govuk-logo.png
25
- govuk_publishing_components/govuk-schema-placeholder-1x1.png
26
- govuk_publishing_components/govuk-schema-placeholder-4x3.png
27
- govuk_publishing_components/govuk-schema-placeholder-16x9.png
28
- govuk_publishing_components/search-button.png
29
- govuk_publishing_components/icon-file-download.svg
30
- govuk_publishing_components/icon-important.svg
31
- govuk_publishing_components/crests/*.png
32
- govuk_publishing_components/take-action-amber.svg
33
- govuk_publishing_components/take-action-green.svg
34
- govuk_publishing_components/take-action-red.svg
35
- ]
36
-
37
- # GOV.UK Frontend assets
38
- Rails.application.config.assets.precompile += %w[
39
- govuk-logotype-crown.png
40
- favicon.ico
41
- govuk-opengraph-image.png
42
- govuk-mask-icon.svg
43
- govuk-apple-touch-icon-180x180.png
44
- govuk-apple-touch-icon-167x167.png
45
- govuk-apple-touch-icon-152x152.png
46
- govuk-apple-touch-icon.png
47
- ]
3
+ # Include the govuk_publishing_components manifest into list of assets to
4
+ # be pre-compiled. This allows that the same Sprockets manifest to be used 0
5
+ # with Sprockets 3 and 4 without applications needing to manually require it.
6
+ #
7
+ # In future we may want applications to link directly to this from their
8
+ # manifest file as the use of `config.assets.precompile` is discouraged
9
+ # from version 4: https://github.com/rails/sprockets/blob/58cca17aa447fcee17703e4ab4dbfaab630e7ed4/UPGRADING.md
10
+ Rails.application.config.assets.precompile += %w[govuk_publishing_components_manifest.js]
48
11
 
49
12
  Rails.application.config.assets.paths += %W[
50
13
  #{__dir__}/../../node_modules/govuk-frontend/govuk/assets/images
@@ -52,3 +15,10 @@ Rails.application.config.assets.paths += %W[
52
15
  #{__dir__}/../../node_modules/govuk-frontend/
53
16
  #{__dir__}/../../node_modules/
54
17
  ]
18
+
19
+ # We've experienced segmentation faults when pre-compiling assets with libsass.
20
+ # Disabling Sprockets 4's export_concurrent setting seems to resolve the issues
21
+ # see: https://github.com/rails/sprockets/issues/633
22
+ Rails.application.config.assets.configure do |env|
23
+ env.export_concurrent = false if env.respond_to?(:export_concurrent=)
24
+ end
@@ -4,8 +4,9 @@ module GovukPublishingComponents
4
4
  # Various departments are taking part in a pilot to use a form
5
5
  # rather than direct email for users to request accessible formats. When the pilot
6
6
  # scheme is rolled out further this can be removed.
7
- # Currently the pilot is paused so there are no participants.
8
- EMAILS_IN_ACCESSIBLE_FORMAT_REQUEST_PILOT = %w[govuk_publishing_components@example.com].freeze
7
+ # Currently the HMRC are participating in the pilot.
8
+ EMAILS_IN_ACCESSIBLE_FORMAT_REQUEST_PILOT = %w[govuk_publishing_components@example.com
9
+ different.format@hmrc.gov.uk].freeze
9
10
 
10
11
  delegate :opendocument?, :document?, :spreadsheet?, to: :content_type
11
12
 
@@ -17,19 +17,8 @@ module GovukPublishingComponents
17
17
  best_match_option[:step_by_step]
18
18
  end
19
19
 
20
- def priority_breadcrumbs
21
- return if hide_priority_breadcrumb?
22
- return parent_item_navigation.priority_breadcrumbs if content_item_navigation.html_publication_with_parent?
23
-
24
- content_item_navigation.priority_breadcrumbs
25
- end
26
-
27
20
  private
28
21
 
29
- def hide_priority_breadcrumb?
30
- content_item_navigation.content_tagged_to_current_step_by_step? && content_item_navigation.tagged_to_brexit?
31
- end
32
-
33
22
  def best_match_option
34
23
  return content_item_options unless content_item_navigation.html_publication_with_parent?
35
24
 
@@ -33,10 +33,6 @@ module GovukPublishingComponents
33
33
  @taxon_breadcrumbs ||= ContentBreadcrumbsBasedOnTaxons.call(content_item)
34
34
  end
35
35
 
36
- def priority_breadcrumbs
37
- @priority_breadcrumbs ||= ContentBreadcrumbsBasedOnPriority.call(content_item, query_parameters)
38
- end
39
-
40
36
  def topic_breadcrumbs
41
37
  @topic_breadcrumbs ||= ContentBreadcrumbsBasedOnTopic.call(content_item)
42
38
  end
@@ -92,22 +88,6 @@ module GovukPublishingComponents
92
88
  content_item.dig("links", "topics").present?
93
89
  end
94
90
 
95
- def tagged_to_brexit?
96
- taxons = content_item.dig("links", "taxons").to_a
97
- brexit_taxon = "d6c2de5d-ef90-45d1-82d4-5f2438369eea"
98
- world_brexit_taxon = "d4c4d91d-fbe7-4eff-bd57-189138c626c9"
99
-
100
- taxons.each do |taxon|
101
- if taxon["content_id"].eql?(brexit_taxon) ||
102
- taxon["content_id"].eql?(world_brexit_taxon) ||
103
- taxon.dig("links", "parent_taxons").to_a.any? { |taxon_item| taxon_item["content_id"].eql?(brexit_taxon) }
104
- return true
105
- end
106
- end
107
-
108
- false
109
- end
110
-
111
91
  def content_tagged_to_current_step_by_step?
112
92
  # TODO: remove indirection here
113
93
  step_nav_helper.show_header?
@@ -20,12 +20,7 @@ module GovukPublishingComponents
20
20
  meta_tags = add_organisation_tags(meta_tags)
21
21
  meta_tags = add_political_tags(meta_tags)
22
22
  meta_tags = add_taxonomy_tags(meta_tags)
23
- meta_tags = add_step_by_step_tags(meta_tags)
24
- add_brexit_tags("govuk:brexit-audience", meta_tags)
25
- end
26
-
27
- def brexit_priority_breadcrumb_tag
28
- add_brexit_tags("govuk:brexit-superbreadcrumb")
23
+ add_step_by_step_tags(meta_tags)
29
24
  end
30
25
 
31
26
  private
@@ -116,37 +111,6 @@ module GovukPublishingComponents
116
111
  meta_tags
117
112
  end
118
113
 
119
- def add_brexit_tags(tag_key, meta_tags = {})
120
- links = content_item[:links]
121
- taxons = links[:taxons] unless links.nil?
122
-
123
- return meta_tags if taxons.blank?
124
- return meta_tags unless tagged_to_priority_taxon?
125
-
126
- taxon =
127
- tag_key == "govuk:brexit-audience" ? priority_brexit_taxon : priority_taxon
128
-
129
- brexit_audience = priority_taxon_helper.brexit_audience(taxon)
130
- meta_tags[tag_key] = brexit_audience if brexit_audience.present?
131
- meta_tags
132
- end
133
-
134
- def tagged_to_priority_taxon?
135
- priority_taxon_helper.priority_taxon.present?
136
- end
137
-
138
- def priority_taxon_helper
139
- @priority_taxon_helper ||= ContentBreadcrumbsBasedOnPriority.new(content_item.deep_stringify_keys, request.query_parameters)
140
- end
141
-
142
- def priority_taxon
143
- priority_taxon_helper.priority_taxon
144
- end
145
-
146
- def priority_brexit_taxon
147
- priority_taxon_helper.priority_brexit_taxon
148
- end
149
-
150
114
  def has_content_history?
151
115
  (content_item[:public_updated_at] && details[:first_public_at] && content_item[:public_updated_at] != details[:first_public_at]) ||
152
116
  (details[:change_history] && details[:change_history].size > 1)
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "28.9.2".freeze
2
+ VERSION = "29.1.0".freeze
3
3
  end
@@ -17,7 +17,6 @@ require "govuk_publishing_components/presenters/step_by_step_nav_helper"
17
17
  require "govuk_publishing_components/presenters/page_with_step_by_step_navigation"
18
18
  require "govuk_publishing_components/presenters/public_layout_helper"
19
19
  require "govuk_publishing_components/presenters/content_breadcrumbs_based_on_ancestors"
20
- require "govuk_publishing_components/presenters/content_breadcrumbs_based_on_priority"
21
20
  require "govuk_publishing_components/presenters/content_breadcrumbs_based_on_taxons"
22
21
  require "govuk_publishing_components/presenters/content_breadcrumbs_based_on_topic"
23
22
  require "govuk_publishing_components/presenters/checkboxes_helper"