govuk_publishing_components 21.13.0 → 21.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +6 -0
- data/app/controllers/govuk_publishing_components/application_controller.rb +10 -8
- data/app/views/govuk_publishing_components/components/docs/accordion.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/breadcrumbs.yml +2 -0
- data/app/views/govuk_publishing_components/components/docs/contents_list.yml +2 -0
- data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +9 -11
- data/app/views/govuk_publishing_components/components/docs/error_summary.yml +2 -0
- data/app/views/govuk_publishing_components/components/docs/govspeak.yml +2 -0
- data/app/views/govuk_publishing_components/components/docs/inverse_header.yml +2 -0
- data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +2 -0
- data/app/views/govuk_publishing_components/components/docs/layout_header.yml +5 -3
- data/app/views/govuk_publishing_components/components/docs/metadata.yml +2 -0
- data/app/views/govuk_publishing_components/components/docs/radio.yml +1 -2
- data/app/views/govuk_publishing_components/components/docs/skip_link.yml +2 -0
- data/app/views/govuk_publishing_components/components/feedback/_yes_no_banner.html.erb +55 -51
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5bcfe7943bc46cdae4ae9c7fd8278c442c3362f799e30fe08c933c1f7ae1c69
|
4
|
+
data.tar.gz: 271c01108ddb33cc7eeff626006d8d46f4ee835f77860cfef1a558648d3b4a30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a0217b070c0900247e5ec24ead3549f35715ab451e009d0fd8d1c40d0d22c4949acee256e6d306590c3d8c07771da41193563bbc7b69ef095d65f43a6d10e15
|
7
|
+
data.tar.gz: f841658b480950ee87b0afb40fb16323dd243b430653d8b5ceceec22207883aa0887e700f035e2c4e943664c91f0455efc2c9e379e1156672a1f490eb1e306ff
|
@@ -5,15 +5,17 @@ module GovukPublishingComponents
|
|
5
5
|
before_action :set_x_frame_options_header
|
6
6
|
before_action :set_disable_slimmer_header
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
if defined? content_security_policy
|
9
|
+
content_security_policy do |p|
|
10
|
+
# don't do anything if the app doesn't have a content security policy
|
11
|
+
next unless p.directives.any?
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
# Unfortunately the axe core script uses a dependency that uses eval
|
14
|
+
# see: https://github.com/dequelabs/axe-core/issues/1175
|
15
|
+
# Thus all components shown by govuk_publishing_components need this
|
16
|
+
# enabled
|
17
|
+
p.script_src(*p.script_src, :unsafe_eval)
|
18
|
+
end
|
17
19
|
end
|
18
20
|
|
19
21
|
private
|
@@ -8,6 +8,8 @@ shared_accessibility_criteria:
|
|
8
8
|
accessibility_criteria:
|
9
9
|
The breadcrumb links must have a text contrast ratio higher than 4.5:1 against the background colour to meet WCAG AA
|
10
10
|
(this especially applies when [using the inverse flag](/component-guide/breadcrumbs/inverse)).
|
11
|
+
accessibility_excluded_rules:
|
12
|
+
- skip-link # This component is creating a reference to #content which is part of the layout
|
11
13
|
display_html: true
|
12
14
|
examples:
|
13
15
|
default:
|
@@ -24,6 +24,8 @@ accessibility_criteria: |
|
|
24
24
|
Links with formatted numbers must separate the number and text with a space for correct screen reader pronunciation. This changes pronunciation from "1 dot Item" to "1 Item".
|
25
25
|
shared_accessibility_criteria:
|
26
26
|
- link
|
27
|
+
accessibility_excluded_rules:
|
28
|
+
- skip-link # The examples for this component are using references to sections on the page that do not exist in examples
|
27
29
|
examples:
|
28
30
|
default:
|
29
31
|
data:
|
@@ -57,31 +57,29 @@ examples:
|
|
57
57
|
title: "A content item"
|
58
58
|
links:
|
59
59
|
part_of_step_navs:
|
60
|
-
- title: "
|
60
|
+
- title: "Learn to drive a car: step by step"
|
61
61
|
base_path: "/micropigs-vs-micropugs"
|
62
62
|
details:
|
63
63
|
step_by_step_nav:
|
64
64
|
title: 'Stay in the UK after it leaves the EU (''settled status''): step by step'
|
65
65
|
steps:
|
66
|
-
- title: Check
|
66
|
+
- title: Check you're allowed to drive
|
67
67
|
contents:
|
68
68
|
- type: paragraph
|
69
|
-
text:
|
70
|
-
in the UK. '
|
69
|
+
text: Most people can start learning to drive when they’re 17.
|
71
70
|
- type: list
|
72
71
|
contents:
|
73
|
-
- text: Check
|
74
|
-
href: "/
|
72
|
+
- text: Check what age you can drive
|
73
|
+
href: "/vehicles-can-drive"
|
75
74
|
optional: false
|
76
|
-
- title:
|
75
|
+
- title: Driving lessons and practice
|
77
76
|
contents:
|
78
77
|
- type: paragraph
|
79
|
-
text: You
|
80
|
-
been living in the UK. This might affect when you choose to apply.
|
78
|
+
text: You need a provisional driving licence to take lessons or practice.
|
81
79
|
- type: list
|
82
80
|
contents:
|
83
|
-
- text:
|
84
|
-
href: "/
|
81
|
+
- text: The Highway Code
|
82
|
+
href: "/guidance/the-highway-code"
|
85
83
|
optional: false
|
86
84
|
with_brexit_cta_and_related_links:
|
87
85
|
data:
|
@@ -5,6 +5,8 @@ accessibility_criteria: |
|
|
5
5
|
- list of errors should be clickable and focus the inputs with errors
|
6
6
|
shared_accessibility_criteria:
|
7
7
|
- link
|
8
|
+
accessibility_excluded_rules:
|
9
|
+
- skip-link # This component is creating references to to sections on the page that do not exist in examples
|
8
10
|
examples:
|
9
11
|
default:
|
10
12
|
data:
|
@@ -17,6 +17,8 @@ accessibility_criteria: |
|
|
17
17
|
- text should have a text contrast ratio higher than 4.5:1 against the background colour to meet WCAG AA
|
18
18
|
shared_accessibility_criteria:
|
19
19
|
- link
|
20
|
+
accessibility_excluded_rules:
|
21
|
+
- landmark-complementary-is-top-level # Statistic headlines are generating an aside element which can not be a top level in the examples
|
20
22
|
examples:
|
21
23
|
basic_content:
|
22
24
|
data:
|
@@ -9,6 +9,8 @@ accessibility_criteria: |
|
|
9
9
|
* be used in conjunction with content that renders a text contrast ratio higher than 4.5:1
|
10
10
|
against the header colour to meet WCAG AA.
|
11
11
|
|
12
|
+
accessibility_excluded_rules:
|
13
|
+
- skip-link # Examples of this component contain breadcrumbs, creating a reference to #content which is part of the layout
|
12
14
|
examples:
|
13
15
|
default:
|
14
16
|
data:
|
@@ -36,6 +36,8 @@ accessibility_criteria: |
|
|
36
36
|
Assumption made is that is most predictable for users of assistive technologies.
|
37
37
|
The spec indicates that `contentinfo` is useful for "Examples of information included in this region of the page are copyrights and links to privacy statements.", which may indicate that it might be better placed around the 'meta' section of this component.
|
38
38
|
Should be challenged if user research indicates this is an issue.
|
39
|
+
accessibility_excluded_rules:
|
40
|
+
- landmark-contentinfo-is-top-level # The footer element can not be top level in the examples
|
39
41
|
examples:
|
40
42
|
default:
|
41
43
|
data: {}
|
@@ -5,6 +5,8 @@ body: |
|
|
5
5
|
staging or production).
|
6
6
|
govuk_frontend_components:
|
7
7
|
- header
|
8
|
+
accessibility_excluded_rules:
|
9
|
+
- landmark-banner-is-top-level # The header element can not be top level in the examples
|
8
10
|
examples:
|
9
11
|
default:
|
10
12
|
data:
|
@@ -27,12 +29,12 @@ examples:
|
|
27
29
|
environment: production
|
28
30
|
navigation_items:
|
29
31
|
- text: Navigation item 1
|
30
|
-
href: "
|
32
|
+
href: "item-1"
|
31
33
|
active: true
|
32
34
|
- text: Navigation item 2
|
33
|
-
href: "
|
35
|
+
href: "item-2"
|
34
36
|
- text: Hidden on desktop
|
35
|
-
href: "
|
37
|
+
href: "item-3"
|
36
38
|
show_only_in_collapsed_menu: true
|
37
39
|
full_width:
|
38
40
|
description: |
|
@@ -31,8 +31,7 @@ accessibility_criteria: |
|
|
31
31
|
- Left Arrow and Up Arrow: move focus to the previous radio button in the group, uncheck the previously focused button, and check the newly focused button. If focus is on the first button, focus moves to the last button.
|
32
32
|
|
33
33
|
accessibility_excluded_rules:
|
34
|
-
-
|
35
|
-
- aria-expanded # We use aria expanded to reflect the state of a conditionally revealed radio content even if this attribute is not officially supported on this element.
|
34
|
+
- aria-expanded # We use aria expanded to reflect the state of a conditionally revealed radio content even if this attribute is not officially supported on this element.
|
36
35
|
govuk_frontend_components:
|
37
36
|
- radios
|
38
37
|
examples:
|
@@ -9,6 +9,8 @@ accessibility_criteria: |
|
|
9
9
|
- indicate when they have focus
|
10
10
|
- becomes visible when pressing tab
|
11
11
|
- is the first items that screen readers hear and that keyboard users tab to
|
12
|
+
accessibility_excluded_rules:
|
13
|
+
- skip-link # This component is creating a reference to #content which is part of the layout
|
12
14
|
examples:
|
13
15
|
default:
|
14
16
|
data:
|
@@ -5,59 +5,63 @@
|
|
5
5
|
<div class="gem-c-feedback__prompt gem-c-feedback__js-show js-prompt" tabindex="-1">
|
6
6
|
<div class="gem-c-feedback__js-prompt-questions js-prompt-questions">
|
7
7
|
<h2 class="gem-c-feedback__prompt-question">Is this page useful?</h2>
|
8
|
-
|
9
|
-
<%= link_to contact_govuk_path, {
|
10
|
-
class: 'gem-c-feedback__prompt-link',
|
11
|
-
data: {
|
12
|
-
'track-category' => 'yesNoFeedbackForm',
|
13
|
-
'track-action' => 'ffMaybeClick'
|
14
|
-
},
|
15
|
-
'aria-expanded': false,
|
16
|
-
role: 'button',
|
17
|
-
style: 'display: none;',
|
18
|
-
hidden: 'hidden',
|
19
|
-
'aria-hidden': 'true',
|
20
|
-
} do %>
|
21
|
-
Maybe
|
22
|
-
<% end %>
|
23
|
-
|
24
|
-
<%= link_to contact_govuk_path, {
|
25
|
-
class: 'gem-c-feedback__prompt-link gem-c-feedback__prompt-link--useful js-page-is-useful',
|
26
|
-
data: {
|
27
|
-
'track-category' => 'yesNoFeedbackForm',
|
28
|
-
'track-action' => 'ffYesClick'
|
29
|
-
},
|
30
|
-
'aria-expanded': false,
|
31
|
-
role: 'button',
|
32
|
-
} do %>
|
33
|
-
Yes <span class="visually-hidden">this page is useful</span>
|
34
|
-
<% end %>
|
35
|
-
|
36
|
-
<%= link_to contact_govuk_path, {
|
37
|
-
class: 'gem-c-feedback__prompt-link js-toggle-form js-page-is-not-useful',
|
38
|
-
data: {
|
39
|
-
'track-category' => 'yesNoFeedbackForm',
|
40
|
-
'track-action' => 'ffNoClick'
|
41
|
-
},
|
42
|
-
'aria-controls': 'page-is-not-useful',
|
43
|
-
'aria-expanded': false,
|
44
|
-
role: 'button',
|
45
|
-
} do %>
|
46
|
-
No <span class="visually-hidden">this page is not useful</span>
|
47
|
-
<% end %>
|
48
|
-
|
49
8
|
<%= link_to contact_govuk_path, {
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
9
|
+
class: 'gem-c-feedback__prompt-link',
|
10
|
+
data: {
|
11
|
+
'track-category' => 'yesNoFeedbackForm',
|
12
|
+
'track-action' => 'ffMaybeClick'
|
13
|
+
},
|
14
|
+
'aria-expanded': false,
|
15
|
+
role: 'button',
|
16
|
+
style: 'display: none;',
|
17
|
+
hidden: 'hidden',
|
18
|
+
'aria-hidden': 'true',
|
19
|
+
} do %>
|
20
|
+
Maybe
|
60
21
|
<% end %>
|
22
|
+
<ul class="gem-c-feedback__option-list">
|
23
|
+
<li class="gem-c-feedback__option-list-item">
|
24
|
+
<%= link_to contact_govuk_path, {
|
25
|
+
class: 'gem-c-feedback__prompt-link gem-c-feedback__prompt-link--useful js-page-is-useful',
|
26
|
+
data: {
|
27
|
+
'track-category' => 'yesNoFeedbackForm',
|
28
|
+
'track-action' => 'ffYesClick'
|
29
|
+
},
|
30
|
+
'aria-expanded': false,
|
31
|
+
role: 'button',
|
32
|
+
} do %>
|
33
|
+
Yes <span class="visually-hidden">this page is useful</span>
|
34
|
+
<% end %>
|
35
|
+
</li>
|
36
|
+
<li class="gem-c-feedback__option-list-item">
|
37
|
+
<%= link_to contact_govuk_path, {
|
38
|
+
class: 'gem-c-feedback__prompt-link js-toggle-form js-page-is-not-useful',
|
39
|
+
data: {
|
40
|
+
'track-category' => 'yesNoFeedbackForm',
|
41
|
+
'track-action' => 'ffNoClick'
|
42
|
+
},
|
43
|
+
'aria-controls': 'page-is-not-useful',
|
44
|
+
'aria-expanded': false,
|
45
|
+
role: 'button',
|
46
|
+
} do %>
|
47
|
+
No <span class="visually-hidden">this page is not useful</span>
|
48
|
+
<% end %>
|
49
|
+
</li>
|
50
|
+
<li class="gem-c-feedback__option-list-item">
|
51
|
+
<%= link_to contact_govuk_path, {
|
52
|
+
class: 'gem-c-feedback__prompt-link gem-c-feedback__prompt-link--wrong js-toggle-form js-something-is-wrong',
|
53
|
+
data: {
|
54
|
+
'track-category' => 'Onsite Feedback',
|
55
|
+
'track-action' => 'GOV.UK Open Form'
|
56
|
+
},
|
57
|
+
'aria-controls': 'something-is-wrong',
|
58
|
+
'aria-expanded': false,
|
59
|
+
role: 'button',
|
60
|
+
} do %>
|
61
|
+
Is there anything wrong with this page?
|
62
|
+
<% end %>
|
63
|
+
</li>
|
64
|
+
</ul>
|
61
65
|
</div>
|
62
66
|
|
63
67
|
<div class="gem-c-feedback__prompt-success js-prompt-success js-hidden" tabindex="-1">
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 21.13.
|
4
|
+
version: 21.13.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gds-api-adapters
|