govuk_publishing_components 28.9.1 → 29.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/config/govuk_publishing_components_manifest.js +15 -3
- data/app/assets/javascripts/govuk_publishing_components/analytics/cross-domain-tracking.js +55 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics.js +3 -0
- data/app/assets/javascripts/govuk_publishing_components/dependencies.js +2 -5
- data/app/assets/javascripts/govuk_publishing_components/modules.js +15 -18
- data/app/assets/javascripts/govuk_publishing_components/{rum-loader.js.erb → rum-loader.js} +13 -10
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +1 -1
- data/app/views/govuk_publishing_components/components/_cards.html.erb +9 -25
- data/app/views/govuk_publishing_components/components/_input.html.erb +3 -0
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +7 -1
- data/app/views/govuk_publishing_components/components/_lead_paragraph.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_summary_list.html.erb +27 -22
- data/app/views/govuk_publishing_components/components/docs/attachment.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/big_number.yml +3 -3
- data/app/views/govuk_publishing_components/components/docs/breadcrumbs.yml +3 -3
- data/app/views/govuk_publishing_components/components/docs/button.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/cards.yml +12 -6
- data/app/views/govuk_publishing_components/components/docs/checkboxes.yml +5 -5
- data/app/views/govuk_publishing_components/components/docs/contents_list.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/contextual_breadcrumbs.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/contextual_guidance.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/date_input.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/details.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/devolved_nations.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/document_list.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/error_alert.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/error_summary.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/feedback.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/fieldset.yml +4 -4
- data/app/views/govuk_publishing_components/components/docs/heading.yml +4 -4
- data/app/views/govuk_publishing_components/components/docs/hint.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/input.yml +18 -15
- data/app/views/govuk_publishing_components/components/docs/inset_text.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/label.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/lead_paragraph.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/list.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/metadata.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/notice.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/print_link.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/search.yml +4 -4
- data/app/views/govuk_publishing_components/components/docs/select.yml +5 -5
- data/app/views/govuk_publishing_components/components/docs/show_password.yml +3 -3
- data/app/views/govuk_publishing_components/components/docs/signup_link.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/single_page_notification_button.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml +3 -3
- data/app/views/govuk_publishing_components/components/docs/subscription_links.yml +3 -3
- data/app/views/govuk_publishing_components/components/docs/success_alert.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/summary_list.yml +2 -7
- data/app/views/govuk_publishing_components/components/docs/table.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/textarea.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/title.yml +1 -1
- data/config/initializers/assets.rb +15 -45
- data/lib/govuk_publishing_components/presenters/attachment.rb +4 -7
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +13 -119
- data/node_modules/jquery/AUTHORS.txt +0 -266
- data/node_modules/jquery/LICENSE.txt +0 -36
- data/node_modules/jquery/README.md +0 -65
- data/node_modules/jquery/bower.json +0 -14
- data/node_modules/jquery/dist/jquery.js +0 -11008
- data/node_modules/jquery/dist/jquery.min.js +0 -5
- data/node_modules/jquery/dist/jquery.min.map +0 -1
- data/node_modules/jquery/external/sizzle/LICENSE.txt +0 -36
- data/node_modules/jquery/external/sizzle/dist/sizzle.js +0 -2143
- data/node_modules/jquery/external/sizzle/dist/sizzle.min.js +0 -3
- data/node_modules/jquery/external/sizzle/dist/sizzle.min.map +0 -1
- data/node_modules/jquery/package.json +0 -85
- data/node_modules/jquery/src/ajax/jsonp.js +0 -100
- data/node_modules/jquery/src/ajax/load.js +0 -83
- data/node_modules/jquery/src/ajax/parseJSON.js +0 -53
- data/node_modules/jquery/src/ajax/parseXML.js +0 -31
- data/node_modules/jquery/src/ajax/script.js +0 -95
- data/node_modules/jquery/src/ajax/var/location.js +0 -3
- data/node_modules/jquery/src/ajax/var/nonce.js +0 -5
- data/node_modules/jquery/src/ajax/var/rquery.js +0 -3
- data/node_modules/jquery/src/ajax/xhr.js +0 -229
- data/node_modules/jquery/src/ajax.js +0 -842
- data/node_modules/jquery/src/attributes/attr.js +0 -281
- data/node_modules/jquery/src/attributes/classes.js +0 -174
- data/node_modules/jquery/src/attributes/prop.js +0 -156
- data/node_modules/jquery/src/attributes/support.js +0 -70
- data/node_modules/jquery/src/attributes/val.js +0 -191
- data/node_modules/jquery/src/attributes.js +0 -11
- data/node_modules/jquery/src/callbacks.js +0 -232
- data/node_modules/jquery/src/core/access.js +0 -65
- data/node_modules/jquery/src/core/init.js +0 -140
- data/node_modules/jquery/src/core/parseHTML.js +0 -41
- data/node_modules/jquery/src/core/ready.js +0 -163
- data/node_modules/jquery/src/core/var/rsingleTag.js +0 -5
- data/node_modules/jquery/src/core.js +0 -529
- data/node_modules/jquery/src/css/addGetHookIf.js +0 -24
- data/node_modules/jquery/src/css/adjustCSS.js +0 -65
- data/node_modules/jquery/src/css/curCSS.js +0 -137
- data/node_modules/jquery/src/css/defaultDisplay.js +0 -72
- data/node_modules/jquery/src/css/hiddenVisibleSelectors.js +0 -42
- data/node_modules/jquery/src/css/showHide.js +0 -45
- data/node_modules/jquery/src/css/support.js +0 -184
- data/node_modules/jquery/src/css/var/cssExpand.js +0 -3
- data/node_modules/jquery/src/css/var/isHidden.js +0 -16
- data/node_modules/jquery/src/css/var/rmargin.js +0 -3
- data/node_modules/jquery/src/css/var/rnumnonpx.js +0 -5
- data/node_modules/jquery/src/css/var/swap.js +0 -24
- data/node_modules/jquery/src/css.js +0 -563
- data/node_modules/jquery/src/data/support.js +0 -23
- data/node_modules/jquery/src/data/var/acceptData.js +0 -20
- data/node_modules/jquery/src/data.js +0 -342
- data/node_modules/jquery/src/deferred.js +0 -159
- data/node_modules/jquery/src/deprecated.js +0 -34
- data/node_modules/jquery/src/dimensions.js +0 -56
- data/node_modules/jquery/src/effects/Tween.js +0 -121
- data/node_modules/jquery/src/effects/animatedSelector.js +0 -13
- data/node_modules/jquery/src/effects/support.js +0 -58
- data/node_modules/jquery/src/effects.js +0 -640
- data/node_modules/jquery/src/event/ajax.js +0 -20
- data/node_modules/jquery/src/event/alias.js +0 -25
- data/node_modules/jquery/src/event/support.js +0 -28
- data/node_modules/jquery/src/event.js +0 -1134
- data/node_modules/jquery/src/exports/amd.js +0 -24
- data/node_modules/jquery/src/exports/global.js +0 -26
- data/node_modules/jquery/src/intro.js +0 -44
- data/node_modules/jquery/src/jquery.js +0 -37
- data/node_modules/jquery/src/manipulation/_evalUrl.js +0 -21
- data/node_modules/jquery/src/manipulation/buildFragment.js +0 -157
- data/node_modules/jquery/src/manipulation/createSafeFragment.js +0 -20
- data/node_modules/jquery/src/manipulation/getAll.js +0 -33
- data/node_modules/jquery/src/manipulation/setGlobalEval.js +0 -19
- data/node_modules/jquery/src/manipulation/support.js +0 -72
- data/node_modules/jquery/src/manipulation/var/nodeNames.js +0 -5
- data/node_modules/jquery/src/manipulation/var/rcheckableType.js +0 -3
- data/node_modules/jquery/src/manipulation/var/rleadingWhitespace.js +0 -3
- data/node_modules/jquery/src/manipulation/var/rscriptType.js +0 -3
- data/node_modules/jquery/src/manipulation/var/rtagName.js +0 -3
- data/node_modules/jquery/src/manipulation/wrapMap.js +0 -30
- data/node_modules/jquery/src/manipulation.js +0 -585
- data/node_modules/jquery/src/offset.js +0 -219
- data/node_modules/jquery/src/outro.js +0 -2
- data/node_modules/jquery/src/queue/delay.js +0 -22
- data/node_modules/jquery/src/queue.js +0 -144
- data/node_modules/jquery/src/selector-sizzle.js +0 -14
- data/node_modules/jquery/src/selector.js +0 -1
- data/node_modules/jquery/src/serialize.js +0 -125
- data/node_modules/jquery/src/support.js +0 -63
- data/node_modules/jquery/src/traversing/findFilter.js +0 -100
- data/node_modules/jquery/src/traversing/var/dir.js +0 -20
- data/node_modules/jquery/src/traversing/var/rneedsContext.js +0 -6
- data/node_modules/jquery/src/traversing/var/siblings.js +0 -15
- data/node_modules/jquery/src/traversing.js +0 -179
- data/node_modules/jquery/src/var/class2type.js +0 -5
- data/node_modules/jquery/src/var/concat.js +0 -5
- data/node_modules/jquery/src/var/deletedIds.js +0 -3
- data/node_modules/jquery/src/var/document.js +0 -3
- data/node_modules/jquery/src/var/documentElement.js +0 -5
- data/node_modules/jquery/src/var/hasOwn.js +0 -5
- data/node_modules/jquery/src/var/indexOf.js +0 -5
- data/node_modules/jquery/src/var/pnum.js +0 -3
- data/node_modules/jquery/src/var/push.js +0 -5
- data/node_modules/jquery/src/var/rcssNum.js +0 -7
- data/node_modules/jquery/src/var/rnotwhite.js +0 -3
- data/node_modules/jquery/src/var/slice.js +0 -5
- data/node_modules/jquery/src/var/support.js +0 -5
- data/node_modules/jquery/src/var/toString.js +0 -5
- data/node_modules/jquery/src/wrap.js +0 -77
@@ -15,7 +15,7 @@ shared_accessibility_criteria:
|
|
15
15
|
- link
|
16
16
|
examples:
|
17
17
|
default:
|
18
|
-
description: Reveals a
|
18
|
+
description: Reveals a contextual guidance on the side overflowing the container
|
19
19
|
data:
|
20
20
|
html_for: news-title
|
21
21
|
title: Writing a news title
|
@@ -1,7 +1,7 @@
|
|
1
1
|
name: Cookie banner
|
2
2
|
description: Help users manage their personal data by telling them when you store cookies on their device.
|
3
3
|
body: |
|
4
|
-
By default the cookie banner is shown to all users with just a link to the settings page. If
|
4
|
+
By default the cookie banner is shown to all users with just a link to the settings page. If JavaScript is on this is enhanced to show accept/reject buttons if preferences aren't set, or to hide the banner if they are.
|
5
5
|
|
6
6
|
Setting `data-hide-cookie-banner="true"` on any link inside the banner will overwrite the default action and when clicked will dismiss the cookie banner for a period of 365 days (approx. 1 year).
|
7
7
|
|
@@ -35,7 +35,7 @@ examples:
|
|
35
35
|
data:
|
36
36
|
title: Can we store analytics cookies on your device?
|
37
37
|
text: Analytics cookies help us understand how our website is being used.
|
38
|
-
confirmation_message: You’ve accepted all cookies. You can
|
38
|
+
confirmation_message: You’ve accepted all cookies. You can `<a class='govuk-link' href='/cookies'>change your cookie settings</a>` at any time.
|
39
39
|
services_cookies:
|
40
40
|
"yes":
|
41
41
|
text: "Yes"
|
@@ -14,7 +14,7 @@ accessibility_criteria: |
|
|
14
14
|
|
15
15
|
Labels use the [label component](/component-guide/label).
|
16
16
|
|
17
|
-
Avoid using autofocus and tabindex unless you have user research to support this behaviour.
|
17
|
+
Avoid using [`autofocus`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus) and `tabindex` unless you have user research to support this behaviour.
|
18
18
|
govuk_frontend_components:
|
19
19
|
- date-input
|
20
20
|
examples:
|
@@ -22,7 +22,7 @@ examples:
|
|
22
22
|
block: |
|
23
23
|
We need to know your nationality so we can work out which elections you’re entitled to vote in. If you can’t provide your nationality, you’ll have to send copies of identity documents through the post.
|
24
24
|
with_data_attributes:
|
25
|
-
description: Can be used for tracking. Tracking is applied to the summary element when the details element is opened and closed. By default, `track-label` is set to the status (
|
25
|
+
description: Can be used for tracking. Tracking is applied to the summary element when the details element is opened and closed. By default, `track-label` is set to the status (`open` or `closed`) unless a `track_label` is passed into the component.
|
26
26
|
data:
|
27
27
|
title: Help with nationality
|
28
28
|
data_attributes:
|
@@ -83,7 +83,7 @@ examples:
|
|
83
83
|
alternative_url: /
|
84
84
|
type: detailed_guide
|
85
85
|
specific_heading level:
|
86
|
-
description: Use a different heading level for the main link title. Defaults to `
|
86
|
+
description: Use a different heading level for the main link title. Defaults to `h2` if not passed.
|
87
87
|
data:
|
88
88
|
heading_level: 3
|
89
89
|
national_applicability:
|
@@ -254,7 +254,7 @@ examples:
|
|
254
254
|
context:
|
255
255
|
right_to_left: true
|
256
256
|
with_parts:
|
257
|
-
description: Display child items, such as parts of guides or travel advice. Child items accept the same
|
257
|
+
description: Display child items, such as parts of guides or travel advice. Child items accept the same parameters as parent items.
|
258
258
|
data:
|
259
259
|
items:
|
260
260
|
- link:
|
@@ -285,7 +285,7 @@ examples:
|
|
285
285
|
|
286
286
|
Locales can be set separately for the document link text and individual metadata items. To set link text locale, pass a locale attribute along with the link object. To set metadata locale, pass a locale attribute containing a parallel object to your metadata (depending on which metadata have translations and which need a lang attribute to specify that they are in a different language).
|
287
287
|
|
288
|
-
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
|
288
|
+
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.
|
289
289
|
data:
|
290
290
|
items:
|
291
291
|
- link:
|
@@ -3,7 +3,7 @@ description: Used at the top of the page, to summarise a unsuccessful user actio
|
|
3
3
|
accessibility_criteria: |
|
4
4
|
- should be focused on page load, to ensure the message is noticed by
|
5
5
|
assistive tech
|
6
|
-
- Should have a role of
|
6
|
+
- Should have a role of `alert` to communicate that is a important and
|
7
7
|
time sensitive message
|
8
8
|
examples:
|
9
9
|
default:
|
@@ -45,9 +45,9 @@ examples:
|
|
45
45
|
title: Message to alert the user to a problem goes here
|
46
46
|
description: Optional description of the errors and how to correct them
|
47
47
|
items:
|
48
|
-
- text: Descriptive link to the question with an error
|
48
|
+
- text: Descriptive link to the question with an error opening in a new window
|
49
49
|
href: '#example-error-1'
|
50
50
|
target: '_blank'
|
51
|
-
- text: Descriptive link to the question with an error
|
51
|
+
- text: Descriptive link to the question with an error opening in the same window
|
52
52
|
href: '#example-error-2'
|
53
53
|
target: '_self'
|
@@ -19,7 +19,7 @@ accessibility_criteria: |
|
|
19
19
|
* indicate when they have focus
|
20
20
|
* be recognisable as form input elements
|
21
21
|
* have correctly associated labels
|
22
|
-
* be of the appropriate type for their use, e.g. password inputs should be of type
|
22
|
+
* be of the appropriate type for their use, e.g. password inputs should be of type `password`
|
23
23
|
shared_accessibility_criteria:
|
24
24
|
- link
|
25
25
|
examples:
|
@@ -3,7 +3,7 @@ description: The fieldset element is used to group several controls within a web
|
|
3
3
|
body: |
|
4
4
|
[Using the fieldset and legend elements](https://accessibility.blog.gov.uk/2016/07/22/using-the-fieldset-and-legend-elements/)
|
5
5
|
|
6
|
-
You can use the
|
6
|
+
You can use the `text` property or pass `text` as a block.
|
7
7
|
accessibility_criteria: |
|
8
8
|
- must give inputs within the fieldset context with legend text
|
9
9
|
examples:
|
@@ -29,7 +29,7 @@ examples:
|
|
29
29
|
<input type="radio" id="passport-no" name="default">
|
30
30
|
<label for="passport-no">No</label>
|
31
31
|
with_heading:
|
32
|
-
description: Make the legend different sizes. Valid options are
|
32
|
+
description: Make the legend different sizes. Valid options are `s`, `m`, `l` and `xl`.
|
33
33
|
data:
|
34
34
|
legend_text: 'Do you have a driving license?'
|
35
35
|
heading_level: 2
|
@@ -42,7 +42,7 @@ examples:
|
|
42
42
|
<input type="radio" id="level-no" name="default">
|
43
43
|
<label for="level-no">No</label>
|
44
44
|
with_custom_legend_size:
|
45
|
-
description: Make the legend different sizes. Valid options are
|
45
|
+
description: Make the legend different sizes. Valid options are `s`, `m`, `l` and `xl`.
|
46
46
|
data:
|
47
47
|
legend_text: 'Do you have a driving license?'
|
48
48
|
heading_size: 'l'
|
@@ -54,7 +54,7 @@ examples:
|
|
54
54
|
<input type="radio" id="size-no" name="default">
|
55
55
|
<label for="size-no">No</label>
|
56
56
|
with_error_message:
|
57
|
-
description: The component also accepts an error_id
|
57
|
+
description: The component also accepts an `error_id`, or generates one automatically.
|
58
58
|
data:
|
59
59
|
legend_text: 'Do you have a passport?'
|
60
60
|
error_message: 'Please choose an option'
|
@@ -27,7 +27,7 @@ examples:
|
|
27
27
|
description: |
|
28
28
|
Set a different font size for the heading. Uses the [GOV.UK Frontend heading sizes](https://design-system.service.gov.uk/styles/typography/#headings) but defaults to 27px for legacy reasons. Valid options are `xl`, `l`, `m` and `s`.
|
29
29
|
|
30
|
-
This option is not tied to the heading_level option in order to give flexibility.
|
30
|
+
This option is not tied to the `heading_level` option in order to give flexibility.
|
31
31
|
data:
|
32
32
|
text: 'One big heading'
|
33
33
|
font_size: "xl"
|
@@ -46,7 +46,7 @@ examples:
|
|
46
46
|
text: 'Padded'
|
47
47
|
padding: true
|
48
48
|
with_margin:
|
49
|
-
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.
|
49
|
+
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.
|
50
50
|
data:
|
51
51
|
text: 'Really big bottom margin'
|
52
52
|
margin_bottom: 9
|
@@ -59,7 +59,7 @@ examples:
|
|
59
59
|
text: 'Consultation description'
|
60
60
|
mobile_top_margin: true
|
61
61
|
with_border:
|
62
|
-
description: A top border can be applied to the component of different thicknesses. Accepted values are 1 (1px), 2 (2px) and 5 (5px). Note that this works best with padding applied.
|
62
|
+
description: A top border can be applied to the component of different thicknesses. Accepted values are `1` (`1px`), `2` (`2px`) and `5` (`5px`). Note that this works best with padding applied.
|
63
63
|
data:
|
64
64
|
text: 'With a border'
|
65
65
|
padding: true
|
@@ -81,7 +81,7 @@ examples:
|
|
81
81
|
description: |
|
82
82
|
The component is used on translated pages that don’t have a translation for the text strings. This means that it could display the fallback English string if the translate method can’t find an appropriate translation. This makes sure that the lang can be set to ensure that browsers understand which parts of the page are in each language.
|
83
83
|
|
84
|
-
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
|
84
|
+
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.
|
85
85
|
data:
|
86
86
|
text: "Ein gweinidogion"
|
87
87
|
lang: "cy"
|
@@ -15,7 +15,7 @@ examples:
|
|
15
15
|
data:
|
16
16
|
text: "It’s on your National Insurance card, benefit letter, payslip or P60. For example, ‘QQ 12 34 56 C’."
|
17
17
|
with_margin_bottom:
|
18
|
-
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 3 (15px).
|
18
|
+
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 `3` (`15px`).
|
19
19
|
data:
|
20
20
|
text: "You qualify if you were born in the UK before June 1960."
|
21
21
|
margin_bottom: 9
|
@@ -14,7 +14,7 @@ accessibility_criteria: |
|
|
14
14
|
|
15
15
|
Labels use the [label component](/component-guide/label).
|
16
16
|
|
17
|
-
Avoid using autofocus and tabindex unless you have user research to support this behaviour.
|
17
|
+
Avoid using `autofocus` and `tabindex` unless you have user research to support this behaviour.
|
18
18
|
govuk_frontend_components:
|
19
19
|
- text-input
|
20
20
|
examples:
|
@@ -24,12 +24,19 @@ examples:
|
|
24
24
|
text: "What is your name?"
|
25
25
|
name: "name"
|
26
26
|
specific_input_type:
|
27
|
-
description: By default the input will be type="text"
|
27
|
+
description: By default the input will be `type="text"`. This parameter accepts an alternative, e.g. `search` or `email`. `spellcheck="false"` is the default this can be changed by passing a `true` value. Consider adding `autocomplete`. No validation is done on this input.
|
28
28
|
data:
|
29
29
|
label:
|
30
30
|
text: "What is your email address?"
|
31
31
|
name: "address"
|
32
32
|
type: "email"
|
33
|
+
with_autocomplete:
|
34
|
+
data:
|
35
|
+
label:
|
36
|
+
text: "Automatically complete the field with a user's email address (in supporting browsers)"
|
37
|
+
name: "name"
|
38
|
+
type: "email"
|
39
|
+
autocomplete: "email"
|
33
40
|
numeric_input:
|
34
41
|
description: If input is set to `type="number"` we set the component up as described in the [GOV.UK Design System guidance](https://design-system.service.gov.uk/components/text-input/#numbers) adding `inputmode` and `pattern`. These values can be overridden if necessary.
|
35
42
|
data:
|
@@ -38,7 +45,7 @@ examples:
|
|
38
45
|
name: "account-number"
|
39
46
|
type: "number"
|
40
47
|
with_an_identifier:
|
41
|
-
description: Give the input a specific ID
|
48
|
+
description: Give the input a specific `ID`.
|
42
49
|
data:
|
43
50
|
label:
|
44
51
|
text: "Has an id"
|
@@ -46,11 +53,11 @@ examples:
|
|
46
53
|
id: "hasid"
|
47
54
|
with_aria_attributes:
|
48
55
|
description: |
|
49
|
-
The component accepts two possible aria attributes: aria-describedby and aria-controls
|
56
|
+
The component accepts two possible aria attributes: `aria-describedby` and `aria-controls`.
|
50
57
|
|
51
|
-
[aria-describedby](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute) is used to indicate the ID of the element that describes the input. This will be overridden in the event of an error, where the error will be used for the describedby attribute value. This example uses the ID of the main container for demonstration purposes as there aren't any useful elements with IDs in the component guide. In real use this would be passed the ID of an element that correctly described the input.
|
58
|
+
[`aria-describedby`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute) is used to indicate the `ID` of the element that describes the input. This will be overridden in the event of an error, where the error will be used for the `describedby` attribute value. This example uses the `ID` of the main container for demonstration purposes as there aren't any useful elements with `IDs` in the component guide. In real use this would be passed the `ID` of an element that correctly described the input.
|
52
59
|
|
53
|
-
aria-controls allows the addition of an aria-controls attribute, for use in places like the finders where the page is updated dynamically after value changes to the input.
|
60
|
+
`aria-controls` allows the addition of an `aria-controls` attribute, for use in places like the finders where the page is updated dynamically after value changes to the input.
|
54
61
|
data:
|
55
62
|
label:
|
56
63
|
text: "This is an example only and may not work with a screen reader"
|
@@ -104,13 +111,6 @@ examples:
|
|
104
111
|
name: "name"
|
105
112
|
value: "You can't type more"
|
106
113
|
maxlength: 10
|
107
|
-
with_autocomplete:
|
108
|
-
data:
|
109
|
-
label:
|
110
|
-
text: "Automatically complete the field with a user's email address (in supporting browsers)"
|
111
|
-
name: "name"
|
112
|
-
type: "email"
|
113
|
-
autocomplete: "email"
|
114
114
|
with_custom_width:
|
115
115
|
data:
|
116
116
|
label:
|
@@ -119,17 +119,20 @@ examples:
|
|
119
119
|
name: "name"
|
120
120
|
width: 10
|
121
121
|
with_search_icon:
|
122
|
+
description: |
|
123
|
+
Adds a search icon, [`spellcheck`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck) can also be added to indicate that the element should be, if possible, checked for spelling errors.
|
122
124
|
data:
|
123
125
|
label:
|
124
126
|
text: "Search the internet"
|
125
127
|
name: "search-box"
|
126
128
|
type: "search"
|
127
129
|
search_icon: true
|
130
|
+
spellcheck: true
|
128
131
|
with_label_as_heading:
|
129
132
|
description: |
|
130
|
-
Wraps the label in a heading tag. Valid options are 1 to 6
|
133
|
+
Wraps the label in a heading tag. Valid options are `1` to `6`. To adjust the size of the label/heading, use the `heading_size` option. Valid options are `s`, `m`, `l` and `xl`.
|
131
134
|
|
132
|
-
Based on the [heading/label pattern](https://design-system.service.gov.uk/patterns/question-pages/) in the Design System.
|
135
|
+
Based on the [heading/label pattern](https://design-system.service.gov.uk/patterns/question-pages/) in the GOV.UK Design System.
|
133
136
|
data:
|
134
137
|
label:
|
135
138
|
text: "This is a heading 1 and a label"
|
@@ -19,7 +19,7 @@ examples:
|
|
19
19
|
<a class="govuk-link" href='/foo'>Check for broken links</a>
|
20
20
|
</div>
|
21
21
|
with_custom_margins:
|
22
|
-
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 of 6 (30px) top and bottom.
|
22
|
+
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 of `6` (`30px`) top and bottom.
|
23
23
|
data:
|
24
24
|
text: "When a failure occurs, you must submit logbook, landing and transhipment data manually to the UK Fisheries Call Centre each day and by no later than 23.59 UTC"
|
25
25
|
margin_top: 0
|
@@ -13,7 +13,7 @@ accessibility_criteria: |
|
|
13
13
|
|
14
14
|
- be associated with an input. The `hint_id` must match the `aria-describedby` property on the input your label is associated with.
|
15
15
|
|
16
|
-
If hint text is within a label it will be announced in its
|
16
|
+
If hint text is within a label it will be announced in its entirety by screen readers. By putting the hint alongside labels and associating hints with inputs using `aria-describedby`, then screen readers will read the label, describe the type of input (eg radio) and then read additional text. It means users of screen readers can scan and skip options as easy as people making choices with sight. [A discussion of this approach](https://github.com/alphagov/govuk_elements/issues/574).
|
17
17
|
govuk_frontend_components:
|
18
18
|
- label
|
19
19
|
examples:
|
@@ -15,12 +15,12 @@ accessibility_criteria: |
|
|
15
15
|
|
16
16
|
- avoid navigation landmarks or roles
|
17
17
|
|
18
|
-
The footer element alone is sufficient for such cases; while a [nav element](https://www.w3.org/TR/html52/sections.html#the-nav-element) can be used, it is usually unnecessary.
|
18
|
+
The footer element alone is sufficient for such cases; while a [`nav` element](https://www.w3.org/TR/html52/sections.html#the-nav-element) can be used, it is usually unnecessary.
|
19
19
|
|
20
20
|
Note: This decision has been made based on prior experience seeing removal of overuse of `<nav>` elements from www.GOV.UK, which made it confusing for users of assistive technologies to know what were the most important navigation aspects of GOV.UK.
|
21
21
|
Should be challenged if user research indicates this is an issue.
|
22
22
|
|
23
|
-
- have a role of [`contentinfo`](https://www.w3.org/TR/wai-aria-1.1/#contentinfo) at the root of the component (
|
23
|
+
- have a role of [`contentinfo`](https://www.w3.org/TR/wai-aria-1.1/#contentinfo) at the root of the component (`<footer>`)
|
24
24
|
|
25
25
|
Note: This decision has been made given that most uses of this role tend to be used directly on a `<footer>` element.
|
26
26
|
Assumption made is that is most predictable for users of assistive technologies.
|
@@ -21,7 +21,7 @@ examples:
|
|
21
21
|
context:
|
22
22
|
dark_background: true
|
23
23
|
custom_margin_bottom:
|
24
|
-
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 a margin bottom of 45px
|
24
|
+
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 a margin bottom of `45px`.
|
25
25
|
data:
|
26
26
|
text: This is some example text for a lead paragraph
|
27
27
|
margin_bottom: 6
|
@@ -66,7 +66,7 @@ examples:
|
|
66
66
|
description: |
|
67
67
|
Sets the margin on the bottom of the list element.
|
68
68
|
|
69
|
-
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 20px margin.
|
69
|
+
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 `20px` margin.
|
70
70
|
data:
|
71
71
|
margin_bottom: 9
|
72
72
|
<<: *default-example-data
|
@@ -359,7 +359,7 @@ examples:
|
|
359
359
|
dark_background: true
|
360
360
|
with_custom_margin_bottom:
|
361
361
|
description: |
|
362
|
-
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 the `margin-bottom` values defined in the [responsive-bottom-margin mixin](https://github.com/alphagov/govuk_publishing_components/blob/master/app/assets/stylesheets/govuk_publishing_components/components/mixins/_margins.scss#L1)
|
362
|
+
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 the `margin-bottom` values defined in the [responsive-bottom-margin mixin](https://github.com/alphagov/govuk_publishing_components/blob/master/app/assets/stylesheets/govuk_publishing_components/components/mixins/_margins.scss#L1)
|
363
363
|
data:
|
364
364
|
first_published: 14 June 2014
|
365
365
|
last_updated: 10 September 2015
|
@@ -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
|
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
|
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
|
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
|
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
|
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
|
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!!'
|
data/app/views/govuk_publishing_components/components/docs/single_page_notification_button.yml
CHANGED
@@ -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:
|
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 – 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 (
|
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
|
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
|