govuk_publishing_components 46.1.0 → 46.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/govuk_publishing_components/audit_components.rb +0 -6
- data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +8 -9
- data/app/views/govuk_publishing_components/components/_related_navigation.html.erb +5 -3
- data/app/views/govuk_publishing_components/components/_search.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/docs/previous_and_next_navigation.yml +1 -0
- data/app/views/govuk_publishing_components/components/docs/related_navigation.yml +1 -0
- data/config/locales/cy.yml +3 -3
- 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: 8a75bcb074cc5edf15955ec4a071e6d74e6984ee21d6d3e72293d587427da46a
|
4
|
+
data.tar.gz: 52fa477353b3ea17d59cb2c0ab27fef05a84b8850b3161faf68502d5e7873393
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc69bdcd45eaa41ee2a5a9bd42b969b8d1344e0eb232d09268d93da2ff28eb57737c8baaa127531fe9763cd4fb29e94ad609ec538ca99c37512d609604adbcdf
|
7
|
+
data.tar.gz: ba7b791951b7fe631e8ededa5309fcf5caf0d43a2481b15bce8a308c9f22b04db24e54048fca93ac0c740a0f55ecd6136a30a8cbecad8c004a163a58f79b6394
|
@@ -262,12 +262,6 @@ module GovukPublishingComponents
|
|
262
262
|
match: /(GovukPublishingComponents::Presenters::ComponentWrapperHelper.new)/,
|
263
263
|
used_by: [],
|
264
264
|
},
|
265
|
-
{
|
266
|
-
name: "Heading helper",
|
267
|
-
link: "lib/govuk_publishing_components/presenters/heading_helper.rb",
|
268
|
-
match: /(GovukPublishingComponents::Presenters::HeadingHelper.new)/,
|
269
|
-
used_by: [],
|
270
|
-
},
|
271
265
|
{
|
272
266
|
name: "Shared helper",
|
273
267
|
link: "lib/govuk_publishing_components/presenters/shared_helper.rb",
|
data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb
CHANGED
@@ -2,16 +2,15 @@
|
|
2
2
|
add_gem_component_stylesheet("previous-and-next-navigation")
|
3
3
|
disable_ga4 ||= false
|
4
4
|
|
5
|
+
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
6
|
+
component_helper.add_class("govuk-pagination govuk-pagination--block")
|
7
|
+
component_helper.add_role("navigation")
|
8
|
+
component_helper.add_aria_attribute({ label: t("components.previous_and_next_navigation.pagination") })
|
9
|
+
component_helper.add_data_attribute({ module: "ga4-link-tracker" }) unless disable_ga4
|
10
|
+
|
5
11
|
if local_assigns.include?(:next_page) || local_assigns.include?(:previous_page)
|
6
12
|
%>
|
7
|
-
|
8
|
-
class="govuk-pagination govuk-pagination--block"
|
9
|
-
role="navigation"
|
10
|
-
aria-label="<%= t("components.previous_and_next_navigation.pagination") %>"
|
11
|
-
<% unless disable_ga4 %>
|
12
|
-
data-module="ga4-link-tracker"
|
13
|
-
<% end %>
|
14
|
-
>
|
13
|
+
<%= tag.nav(**component_helper.all_attributes) do %>
|
15
14
|
<% if local_assigns.include?(:previous_page) %>
|
16
15
|
<%
|
17
16
|
title = previous_page[:title] || t("components.previous_and_next_navigation.previous")
|
@@ -73,5 +72,5 @@
|
|
73
72
|
</a>
|
74
73
|
</div>
|
75
74
|
<% end %>
|
76
|
-
|
75
|
+
<% end %>
|
77
76
|
<% end %>
|
@@ -3,16 +3,18 @@
|
|
3
3
|
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
|
4
4
|
disable_ga4 ||= false
|
5
5
|
ga4_type = local_assigns[:context] == :footer ? "contextual footer" : "related content"
|
6
|
-
data = {}
|
7
|
-
data[:module] = "ga4-link-tracker" unless disable_ga4
|
8
6
|
ga4_tracking_counts ||= OpenStruct.new(index_section_count: 0)
|
9
7
|
ga4_tracking_counts.index_section_count += related_nav_helper.index_section_count
|
10
8
|
|
9
|
+
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
10
|
+
component_helper.add_class("gem-c-related-navigation govuk-!-display-none-print")
|
11
|
+
component_helper.add_data_attribute({ module: "ga4-link-tracker" }) unless disable_ga4
|
12
|
+
|
11
13
|
add_gem_component_stylesheet("related-navigation")
|
12
14
|
%>
|
13
15
|
<% if related_nav_helper.related_navigation? %>
|
14
16
|
<% random = SecureRandom.hex(4) %>
|
15
|
-
<%= tag.div(
|
17
|
+
<%= tag.div(**component_helper.all_attributes) do %>
|
16
18
|
<% if local_assigns[:context] != :footer %>
|
17
19
|
<h2 id="related-nav-related_items-<%= random %>"
|
18
20
|
class="gem-c-related-navigation__main-heading"
|
@@ -3,7 +3,6 @@
|
|
3
3
|
add_gem_component_stylesheet("label")
|
4
4
|
|
5
5
|
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
|
6
|
-
heading_helper = GovukPublishingComponents::Presenters::HeadingHelper.new(local_assigns)
|
7
6
|
|
8
7
|
aria_controls ||= nil
|
9
8
|
button_text ||= t("components.search_box.search_button")
|
@@ -19,6 +19,7 @@ accessibility_criteria: |
|
|
19
19
|
- identify itself as pagination navigation
|
20
20
|
- provide a distinction between the navigation text and label text of the links both visually and for screenreaders
|
21
21
|
|
22
|
+
uses_component_wrapper_helper: true
|
22
23
|
shared_accessibility_criteria:
|
23
24
|
- link
|
24
25
|
accessibility_excluded_rules:
|
@@ -3,6 +3,7 @@ description: Component showing related content, including topics, guidance and c
|
|
3
3
|
accessibility_criteria: |
|
4
4
|
- Should have a role of 'navigation' on any navigation elements inside the component
|
5
5
|
- Should be marked up as navigation and not as tangential content
|
6
|
+
uses_component_wrapper_helper: true
|
6
7
|
shared_accessibility_criteria:
|
7
8
|
- link
|
8
9
|
accessibility_excluded_rules:
|
data/config/locales/cy.yml
CHANGED
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: 46.
|
4
|
+
version: 46.2.0
|
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: 2024-12-
|
11
|
+
date: 2024-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chartkick
|