govuk_publishing_components 70.2.0 → 71.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +19 -2
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/pii-remover.js +3 -3
- data/app/assets/javascripts/govuk_publishing_components/components/govspeak.js +9 -0
- data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/table-scroll.js +108 -0
- data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +2 -2
- data/app/assets/stylesheets/component_guide/application.scss +7 -3
- data/app/assets/stylesheets/govuk_publishing_components/all-components.scss +0 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +0 -13
- data/app/assets/stylesheets/govuk_publishing_components/components/_chart.scss +31 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +0 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_service-navigation.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss +67 -0
- data/app/controllers/govuk_publishing_components/component_guide_controller.rb +11 -39
- data/app/models/govuk_publishing_components/component_doc.rb +2 -6
- data/app/models/govuk_publishing_components/component_docs.rb +2 -8
- data/app/views/govuk_publishing_components/component_guide/_component_list.html.erb +1 -5
- data/app/views/govuk_publishing_components/component_guide/component_doc/_component_output.html.erb +2 -10
- data/app/views/govuk_publishing_components/component_guide/example.html.erb +1 -1
- data/app/views/govuk_publishing_components/component_guide/index.html.erb +0 -7
- data/app/views/govuk_publishing_components/component_guide/preview.html.erb +1 -9
- data/app/views/govuk_publishing_components/component_guide/show.html.erb +10 -28
- data/app/views/govuk_publishing_components/components/_chart.html.erb +5 -5
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +0 -6
- data/app/views/govuk_publishing_components/components/_radio.html.erb +1 -2
- data/app/views/govuk_publishing_components/components/docs/chart.yml +76 -2
- data/app/views/govuk_publishing_components/components/docs/govspeak.yml +28 -0
- data/app/views/govuk_publishing_components/components/docs/metadata.yml +12 -12
- data/app/views/govuk_publishing_components/components/docs/service_navigation.yml +38 -3
- data/config/locales/ar.yml +2 -10
- data/config/locales/az.yml +2 -10
- data/config/locales/be.yml +2 -10
- data/config/locales/bg.yml +2 -10
- data/config/locales/bn.yml +2 -10
- data/config/locales/cs.yml +2 -10
- data/config/locales/cy.yml +6 -14
- data/config/locales/da.yml +2 -10
- data/config/locales/de.yml +2 -10
- data/config/locales/dr.yml +2 -10
- data/config/locales/el.yml +2 -10
- data/config/locales/en.yml +14 -22
- data/config/locales/es-419.yml +2 -10
- data/config/locales/es.yml +2 -10
- data/config/locales/et.yml +2 -10
- data/config/locales/fa.yml +2 -10
- data/config/locales/fi.yml +2 -10
- data/config/locales/fr.yml +2 -10
- data/config/locales/gd.yml +2 -10
- data/config/locales/gu.yml +2 -10
- data/config/locales/he.yml +2 -10
- data/config/locales/hi.yml +2 -10
- data/config/locales/hr.yml +2 -10
- data/config/locales/hu.yml +2 -10
- data/config/locales/hy.yml +2 -10
- data/config/locales/id.yml +2 -10
- data/config/locales/is.yml +2 -10
- data/config/locales/it.yml +2 -10
- data/config/locales/ja.yml +2 -10
- data/config/locales/ka.yml +2 -10
- data/config/locales/kk.yml +2 -10
- data/config/locales/ko.yml +2 -10
- data/config/locales/ku.yml +2 -10
- data/config/locales/ky.yml +2 -10
- data/config/locales/lt.yml +2 -10
- data/config/locales/lv.yml +2 -10
- data/config/locales/ms.yml +2 -10
- data/config/locales/mt.yml +2 -10
- data/config/locales/ne.yml +2 -10
- data/config/locales/nl.yml +2 -10
- data/config/locales/no.yml +2 -10
- data/config/locales/pa-pk.yml +2 -10
- data/config/locales/pa.yml +2 -10
- data/config/locales/pl.yml +2 -10
- data/config/locales/ps.yml +2 -10
- data/config/locales/pt.yml +2 -10
- data/config/locales/ro.yml +2 -10
- data/config/locales/ru.yml +2 -10
- data/config/locales/si.yml +2 -10
- data/config/locales/sk.yml +2 -10
- data/config/locales/sl.yml +2 -10
- data/config/locales/so.yml +2 -10
- data/config/locales/sq.yml +2 -10
- data/config/locales/sr.yml +2 -10
- data/config/locales/sv.yml +2 -10
- data/config/locales/sw.yml +2 -10
- data/config/locales/ta.yml +2 -10
- data/config/locales/th.yml +2 -10
- data/config/locales/ti.yml +2 -10
- data/config/locales/tk.yml +2 -10
- data/config/locales/tr.yml +2 -10
- data/config/locales/uk.yml +2 -10
- data/config/locales/ur.yml +2 -10
- data/config/locales/uz.yml +2 -10
- data/config/locales/vi.yml +2 -10
- data/config/locales/zh-hk.yml +2 -10
- data/config/locales/zh-tw.yml +2 -10
- data/config/locales/zh.yml +2 -10
- data/config/routes.rb +0 -7
- data/lib/govuk_publishing_components/config.rb +0 -4
- data/lib/govuk_publishing_components/presenters/chart_helper.rb +33 -12
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/axe-core/README.md +1 -0
- data/node_modules/axe-core/axe.js +7695 -3210
- data/node_modules/axe-core/axe.min.js +2 -2
- data/node_modules/axe-core/locales/_template.json +46 -20
- data/node_modules/axe-core/locales/az.json +1161 -0
- data/node_modules/axe-core/locales/de.json +1 -1
- data/node_modules/axe-core/package.json +7 -8
- data/node_modules/axe-core/sri-history.json +4 -0
- metadata +4 -6
- data/app/assets/javascripts/govuk_publishing_components/components/metadata.js +0 -24
- data/app/assets/stylesheets/govuk_publishing_components/components/_published-dates.scss +0 -55
- data/app/views/govuk_publishing_components/components/_published_dates.html.erb +0 -48
- data/app/views/govuk_publishing_components/components/docs/published_dates.yml +0 -37
|
@@ -5,17 +5,9 @@
|
|
|
5
5
|
<% end %>
|
|
6
6
|
|
|
7
7
|
<% @component_examples.each do |example| %>
|
|
8
|
-
<%
|
|
9
|
-
if @component_doc.type == "component"
|
|
10
|
-
example_path = component_example_path(@component_doc.id, example.id)
|
|
11
|
-
else
|
|
12
|
-
example_path = flexible_section_example_path(@component_doc.id, example.id)
|
|
13
|
-
end
|
|
14
|
-
%>
|
|
15
|
-
|
|
16
8
|
<div class="component-guide-preview-page">
|
|
17
9
|
<% if @component_examples.length > 1 %>
|
|
18
|
-
<h2 class="preview-title"><a href="<%=
|
|
10
|
+
<h2 class="preview-title"><a href="<%= component_example_path(@component_doc.id, example.id) %>"><%= example.name %></a></h2>
|
|
19
11
|
<% end %>
|
|
20
12
|
<div data-module="test-a11y" data-excluded-rules="<%= @component_doc.accessibility_excluded_rules %>">
|
|
21
13
|
<%= render "govuk_publishing_components/component_guide/component_doc/component", component_doc: @component_doc, example: example, preview_page: true %>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<% content_for :title, "#{@component_doc.name}
|
|
1
|
+
<% content_for :title, "#{@component_doc.name} component" %>
|
|
2
2
|
|
|
3
3
|
<% content_for :application_stylesheet do %>
|
|
4
4
|
<% if @component_doc.source == "application" %>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<%= render "govuk_publishing_components/components/heading", {
|
|
10
10
|
text: @component_doc.name,
|
|
11
|
-
context:
|
|
11
|
+
context: "Component",
|
|
12
12
|
heading_level: 1,
|
|
13
13
|
font_size: "xl",
|
|
14
14
|
margin_bottom: 8,
|
|
@@ -31,9 +31,7 @@
|
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
33
33
|
<% end %>
|
|
34
|
-
|
|
35
|
-
<p class="govuk-body"><%= link_to "Search for usage of this component on GitHub", @component_doc.github_search_url, class: "govuk-link" %>.</p>
|
|
36
|
-
<% end %>
|
|
34
|
+
<p class="govuk-body"><%= link_to "Search for usage of this component on GitHub", @component_doc.github_search_url, class: "govuk-link" %>.</p>
|
|
37
35
|
</div>
|
|
38
36
|
</div>
|
|
39
37
|
|
|
@@ -56,7 +54,7 @@
|
|
|
56
54
|
text: "Overview",
|
|
57
55
|
items: [
|
|
58
56
|
({ href: "#how-it-looks", text: "How it looks" } if @component_doc.display_preview? || @component_doc.display_html?),
|
|
59
|
-
{ href: "#how-to-call-this-component", text:
|
|
57
|
+
{ href: "#how-to-call-this-component", text: "How to call this component" },
|
|
60
58
|
({ href: "#govuk-design-system", text: "GOV.UK Design System" } if @component_doc.govuk_frontend_components.any?),
|
|
61
59
|
({ href: "#accessibility-acceptance-criteria", text: "Accessibility acceptance criteria" } if @component_doc.accessibility_criteria.present?),
|
|
62
60
|
].compact,
|
|
@@ -77,21 +75,14 @@
|
|
|
77
75
|
<h2 class="govuk-heading-l" id="overview">Overview</h2>
|
|
78
76
|
<% if @component_doc.display_preview? || @component_doc.display_html? %>
|
|
79
77
|
<h3 class="govuk-heading-m" id="how-it-looks">
|
|
80
|
-
<a href="<%= @
|
|
81
|
-
<small class="govuk-!-font-size-16">(<a href="<%= @
|
|
82
|
-
<small class="govuk-!-font-size-16">(<a href="<%= @
|
|
78
|
+
<a href="<%= component_example_path(@component_doc.id, "default") %>" class="govuk-link">How it looks</a>
|
|
79
|
+
<small class="govuk-!-font-size-16">(<a href="<%= component_preview_path(@component_doc.id, "default") %>" class="govuk-link">preview</a>)</small>
|
|
80
|
+
<small class="govuk-!-font-size-16">(<a href="<%= component_preview_all_path(@component_doc.id) %>" class="govuk-link">preview all</a>)</small>
|
|
83
81
|
</h3>
|
|
84
82
|
<%= render "govuk_publishing_components/component_guide/component_doc/preview", component_doc: @component_doc, example: @component_doc.example %>
|
|
85
83
|
<% end %>
|
|
86
84
|
|
|
87
|
-
|
|
88
|
-
<h3 class="govuk-heading-m govuk-!-margin-top-4" id="how-to-call-this-component">How to call this component</h3>
|
|
89
|
-
<% else %>
|
|
90
|
-
<h3 class="govuk-heading-m govuk-!-margin-top-4" id="how-to-call-this-component">Passing data to this flexible section</h3>
|
|
91
|
-
<div class="component-markdown component-markdown--no-margin">
|
|
92
|
-
<p>Flexible sections are not called in the way shown below, however this information serves as a reference for the data required by this flexible section.</p>
|
|
93
|
-
</div>
|
|
94
|
-
<% end %>
|
|
85
|
+
<h3 class="govuk-heading-m govuk-!-margin-top-4" id="how-to-call-this-component">How to call this component</h3>
|
|
95
86
|
<%= render "govuk_publishing_components/component_guide/component_doc/call", component_doc: @component_doc, example: @component_doc.example %>
|
|
96
87
|
|
|
97
88
|
<% if @component_doc.govuk_frontend_components.any? %>
|
|
@@ -139,17 +130,8 @@
|
|
|
139
130
|
<% @component_doc.other_examples.each do |example| %>
|
|
140
131
|
<div class="component-example" id="<%= example.id %>">
|
|
141
132
|
<h3 class="govuk-heading-m">
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
example_path = component_example_path(@component_doc.id, example.id)
|
|
145
|
-
preview_path = component_preview_path(@component_doc.id, example.id)
|
|
146
|
-
else
|
|
147
|
-
example_path = flexible_section_example_path(@component_doc.id, example.id)
|
|
148
|
-
preview_path = flexible_section_preview_path(@component_doc.id, example.id)
|
|
149
|
-
end
|
|
150
|
-
%>
|
|
151
|
-
<a href="<%= example_path %>" class="govuk-link"><%= example.name %></a>
|
|
152
|
-
<small>(<a href="<%= preview_path %>" class="govuk-link">preview</a>)</small>
|
|
133
|
+
<a href="<%= component_example_path(@component_doc.id, example.id) %>" class="govuk-link"><%= example.name %></a>
|
|
134
|
+
<small>(<a href="<%= component_preview_path(@component_doc.id, example.id) %>" class="govuk-link">preview</a>)</small>
|
|
153
135
|
</h3>
|
|
154
136
|
<% if example.html_description %>
|
|
155
137
|
<div class="component-markdown component-markdown--no-margin">
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
chart_id = "chart-id-#{SecureRandom.hex(4)}"
|
|
22
22
|
table_id = "table-id-#{SecureRandom.hex(4)}"
|
|
23
23
|
|
|
24
|
-
@
|
|
24
|
+
@include_chart_script ||= OpenStruct.new(script_included: false)
|
|
25
25
|
|
|
26
26
|
chart_helper = GovukPublishingComponents::Presenters::ChartHelper.new(local_assigns)
|
|
27
27
|
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
Chartkick.options[:html] = '<div id="%{id}"><noscript><p class="govuk-body">This chart uses JavaScript to work. To view the chart, turn on JavaScript in your browser’s settings.</p></noscript></div>'
|
|
32
32
|
%>
|
|
33
33
|
<% if rows.length > 0 && keys.length > 0 %>
|
|
34
|
-
<% unless @
|
|
34
|
+
<% unless @include_chart_script[:script_included] %>
|
|
35
35
|
<%= javascript_include_tag "https://www.gstatic.com/charts/loader.js" %>
|
|
36
|
-
<% @
|
|
36
|
+
<% @include_chart_script[:script_included] = true %>
|
|
37
37
|
<% end %>
|
|
38
38
|
<%= tag.div(**component_helper.all_attributes) do %>
|
|
39
39
|
<div class="<%= header_class %>">
|
|
@@ -80,13 +80,13 @@
|
|
|
80
80
|
<td class="govuk-table__cell"></td>
|
|
81
81
|
<% if table_direction == "horizontal" %>
|
|
82
82
|
<% keys.each do |key| %>
|
|
83
|
-
<th class="govuk-table__header" scope="col">
|
|
83
|
+
<th class="govuk-table__header govuk-table__cell--numeric" scope="col">
|
|
84
84
|
<%= key %>
|
|
85
85
|
</th>
|
|
86
86
|
<% end %>
|
|
87
87
|
<% else %>
|
|
88
88
|
<% rows.each do |row| %>
|
|
89
|
-
<th class="govuk-table__header govuk-table__header--stacked" scope="row">
|
|
89
|
+
<th class="govuk-table__header govuk-table__header--stacked govuk-table__cell--numeric" scope="row">
|
|
90
90
|
<%= row[:label] %>
|
|
91
91
|
</th>
|
|
92
92
|
<% end %>
|
|
@@ -78,12 +78,6 @@
|
|
|
78
78
|
<dt class="gem-c-metadata__term"><%= t("components.metadata.last_updated") %>:</dt>
|
|
79
79
|
<dd class="gem-c-metadata__definition">
|
|
80
80
|
<%= last_updated %>
|
|
81
|
-
<% if local_assigns.include?(:see_updates_link) %>
|
|
82
|
-
— <a href="#full-publication-update-history"
|
|
83
|
-
class="gem-c-metadata__definition-link govuk-!-display-none-print js-see-all-updates-link">
|
|
84
|
-
<%= t("components.metadata.see_all_updates") %>
|
|
85
|
-
</a>
|
|
86
|
-
<% end %>
|
|
87
81
|
<% if page_history.any? %>
|
|
88
82
|
<div class="gem-c-metadata__details-wrapper">
|
|
89
83
|
<%= render "govuk_publishing_components/components/details", {
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
id_prefix ||= "radio-#{SecureRandom.hex(4)}"
|
|
6
6
|
items ||= []
|
|
7
7
|
|
|
8
|
-
label ||= nil
|
|
9
8
|
heading ||= nil
|
|
10
9
|
heading_caption ||= nil
|
|
11
10
|
heading_size ||= nil
|
|
@@ -43,7 +42,7 @@
|
|
|
43
42
|
radio_classes << "govuk-radios--inline" if inline
|
|
44
43
|
|
|
45
44
|
legend_classes = %w(govuk-fieldset__legend)
|
|
46
|
-
legend_classes << "govuk-fieldset__legend--#{size}"
|
|
45
|
+
legend_classes << "govuk-fieldset__legend--#{size}" unless heading_level == "span" # `span` is returned by the shared helper if heading_level is set to 0 in the local assigns
|
|
47
46
|
legend_classes << "govuk-visually-hidden" if visually_hidden_heading
|
|
48
47
|
|
|
49
48
|
aria = "#{hint_id} #{"#{error_id}" if has_error}".strip if hint or has_error
|
|
@@ -170,8 +170,8 @@ examples:
|
|
|
170
170
|
data:
|
|
171
171
|
chart_type: "bar"
|
|
172
172
|
heading: Hats owned
|
|
173
|
-
h_axis_title:
|
|
174
|
-
v_axis_title:
|
|
173
|
+
h_axis_title: Hats owned
|
|
174
|
+
v_axis_title: Person
|
|
175
175
|
description: This chart shows page views for January 2015.
|
|
176
176
|
hide_legend: true
|
|
177
177
|
keys:
|
|
@@ -186,6 +186,80 @@ examples:
|
|
|
186
186
|
- 1
|
|
187
187
|
- 1
|
|
188
188
|
- 2
|
|
189
|
+
bar_chart_with_all_colours:
|
|
190
|
+
description: There are six colours. After that, charts should show black bars. Not that charts like this one are not recommended to be used in production, as GSS recommended a maximum of four categories. This is just to demonstrate all the available colours.
|
|
191
|
+
data:
|
|
192
|
+
header_three_quarters: true
|
|
193
|
+
chart_type: column
|
|
194
|
+
heading: "Chart 6: Vehicle miles travelled by vehicle type in Great Britain, 2019 to 2025"
|
|
195
|
+
h_axis_title: Vehicle type
|
|
196
|
+
v_axis_title: Billion vehicle miles
|
|
197
|
+
description: Chart 6 is a bar chart that shows that car traffic levels in 2025 increased by 2.5% from 2024, and were similar to pre-pandemic (2019) levels.
|
|
198
|
+
hide_legend: true
|
|
199
|
+
source: Department for Transport
|
|
200
|
+
keys:
|
|
201
|
+
- Cars
|
|
202
|
+
- Vans
|
|
203
|
+
- Lorries
|
|
204
|
+
- Motorcycles
|
|
205
|
+
- Buses
|
|
206
|
+
rows:
|
|
207
|
+
- label: 2019
|
|
208
|
+
values:
|
|
209
|
+
- 250
|
|
210
|
+
- 51
|
|
211
|
+
- 15
|
|
212
|
+
- 3
|
|
213
|
+
- 5
|
|
214
|
+
- label: 2020
|
|
215
|
+
values:
|
|
216
|
+
- 200
|
|
217
|
+
- 45
|
|
218
|
+
- 13
|
|
219
|
+
- 1
|
|
220
|
+
- 1
|
|
221
|
+
- label: 2021
|
|
222
|
+
values:
|
|
223
|
+
- 220
|
|
224
|
+
- 50
|
|
225
|
+
- 13
|
|
226
|
+
- 1
|
|
227
|
+
- 1
|
|
228
|
+
- label: 2022
|
|
229
|
+
values:
|
|
230
|
+
- 240
|
|
231
|
+
- 50
|
|
232
|
+
- 15
|
|
233
|
+
- 1
|
|
234
|
+
- 1
|
|
235
|
+
- label: 2023
|
|
236
|
+
values:
|
|
237
|
+
- 245
|
|
238
|
+
- 50
|
|
239
|
+
- 13
|
|
240
|
+
- 1
|
|
241
|
+
- 1
|
|
242
|
+
- label: 2024
|
|
243
|
+
values:
|
|
244
|
+
- 247
|
|
245
|
+
- 50
|
|
246
|
+
- 11
|
|
247
|
+
- 1
|
|
248
|
+
- 1
|
|
249
|
+
- label: 2025
|
|
250
|
+
values:
|
|
251
|
+
- 250
|
|
252
|
+
- 50
|
|
253
|
+
- 10
|
|
254
|
+
- 1
|
|
255
|
+
- 1
|
|
256
|
+
- label: 2026
|
|
257
|
+
values:
|
|
258
|
+
- 260
|
|
259
|
+
- 60
|
|
260
|
+
- 15
|
|
261
|
+
- 5
|
|
262
|
+
- 5
|
|
189
263
|
column_chart:
|
|
190
264
|
data:
|
|
191
265
|
chart_type: "column"
|
|
@@ -1127,6 +1127,34 @@ examples:
|
|
|
1127
1127
|
</tr>
|
|
1128
1128
|
</tbody>
|
|
1129
1129
|
</table>
|
|
1130
|
+
wide_table:
|
|
1131
|
+
data:
|
|
1132
|
+
block: |
|
|
1133
|
+
<table>
|
|
1134
|
+
<caption>Long place names, courtesy of Wikipedia</caption>
|
|
1135
|
+
<thead>
|
|
1136
|
+
<tr>
|
|
1137
|
+
<th>Name</th>
|
|
1138
|
+
<th>Location</th>
|
|
1139
|
+
<th>Language</th>
|
|
1140
|
+
<th>Translation</th>
|
|
1141
|
+
</tr>
|
|
1142
|
+
</thead>
|
|
1143
|
+
<tbody>
|
|
1144
|
+
<tr>
|
|
1145
|
+
<td>Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu</td>
|
|
1146
|
+
<td>Hill in North Island, New Zealand</td>
|
|
1147
|
+
<td>Māori</td>
|
|
1148
|
+
<td>"The summit where Tamatea, the man with the big knees, the climber of mountains, the land-swallower who travelled about, played his kōauau (flute) to his loved one".</td>
|
|
1149
|
+
</tr>
|
|
1150
|
+
<tr>
|
|
1151
|
+
<td>Azpilikuetagaraikosaroiarenberekolarrea</td>
|
|
1152
|
+
<td>Place in Azpilkueta, Navarre, Spain</td>
|
|
1153
|
+
<td>Basque language</td>
|
|
1154
|
+
<td>"The low meadow of the sheep pen in upper Azpilikueta".</td>
|
|
1155
|
+
</tr>
|
|
1156
|
+
</tbody>
|
|
1157
|
+
</table>
|
|
1130
1158
|
tables_with_alignments:
|
|
1131
1159
|
data:
|
|
1132
1160
|
block: |
|
|
@@ -30,13 +30,6 @@ examples:
|
|
|
30
30
|
data:
|
|
31
31
|
first_published: 14 June 2014
|
|
32
32
|
last_updated: 10 September 2015
|
|
33
|
-
updated_with_links_to_see_details:
|
|
34
|
-
description: If a `last_updated` value exists and `see_updates_link` is set to true,
|
|
35
|
-
a "See all updates" link will be shown. The link's href will be set to `#full-publication-update-history`,
|
|
36
|
-
taking users to the change history on the same page and expanding the section, if expandable, for example, [changes to the rates of capital gains tax](https://www.gov.uk/government/publications/changes-to-the-rates-of-capital-gains-tax)
|
|
37
|
-
data:
|
|
38
|
-
last_updated: 10 September 2015
|
|
39
|
-
see_updates_link: true
|
|
40
33
|
display_page_history:
|
|
41
34
|
description: |
|
|
42
35
|
This will set up an expandable section on the page, with a top border, to let users toggle the display of the page history. It also includes a hidden H2 heading of 'Updates to this page'. This heading will not be included if one is passed to the component using the `title` option.
|
|
@@ -390,7 +383,6 @@ examples:
|
|
|
390
383
|
with_title:
|
|
391
384
|
data:
|
|
392
385
|
last_updated: 10 September 2015
|
|
393
|
-
see_updates_link: true
|
|
394
386
|
title: Title
|
|
395
387
|
on_a_dark_background:
|
|
396
388
|
data:
|
|
@@ -408,7 +400,10 @@ examples:
|
|
|
408
400
|
]
|
|
409
401
|
first_published: 14 June 2014
|
|
410
402
|
last_updated: 10 September 2015
|
|
411
|
-
|
|
403
|
+
page_history:
|
|
404
|
+
- display_time: 1st January 1990
|
|
405
|
+
note: First published
|
|
406
|
+
timestamp: 1990-01-01T15:42:37.000+00:00
|
|
412
407
|
other:
|
|
413
408
|
Applies to: England, Scotland, and Wales (see detailed guidance for <a href="http://www.dardni.gov.uk/news-dard-pa022-a-13-new-procedure-for" rel="external">Northern Ireland</a>)
|
|
414
409
|
context:
|
|
@@ -430,7 +425,10 @@ examples:
|
|
|
430
425
|
]
|
|
431
426
|
first_published: 14 June 2014
|
|
432
427
|
last_updated: 10 September 2015
|
|
433
|
-
|
|
428
|
+
page_history:
|
|
429
|
+
- display_time: 1st January 1990
|
|
430
|
+
note: First published
|
|
431
|
+
timestamp: 1990-01-01T15:42:37.000+00:00
|
|
434
432
|
other:
|
|
435
433
|
Applies to: England, Scotland, and Wales (see detailed guidance for <a href="http://www.dardni.gov.uk/news-dard-pa022-a-13-new-procedure-for" rel="external">Northern Ireland</a>)
|
|
436
434
|
context:
|
|
@@ -454,7 +452,10 @@ examples:
|
|
|
454
452
|
]
|
|
455
453
|
first_published: 14 June 2014
|
|
456
454
|
last_updated: 10 September 2015
|
|
457
|
-
|
|
455
|
+
page_history:
|
|
456
|
+
- display_time: 1st January 1990
|
|
457
|
+
note: First published
|
|
458
|
+
timestamp: 1990-01-01T15:42:37.000+00:00
|
|
458
459
|
other:
|
|
459
460
|
Applies to: England, Scotland, and Wales (see detailed guidance for <a href="http://www.dardni.gov.uk/news-dard-pa022-a-13-new-procedure-for" rel="external">Northern Ireland</a>)
|
|
460
461
|
context:
|
|
@@ -464,5 +465,4 @@ examples:
|
|
|
464
465
|
Disables the GA4 link tracker on the 'See all updates' link. Tracking is enabled by default.
|
|
465
466
|
data:
|
|
466
467
|
last_updated: 10 September 2015
|
|
467
|
-
see_updates_link: true
|
|
468
468
|
disable_ga4: true
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
name: Service Navigation
|
|
2
|
-
description:
|
|
2
|
+
description: Helps users understand that they're using your service and lets them navigate around your service.
|
|
3
3
|
accessibility_criteria: |
|
|
4
4
|
- the component must use the correct heading level for the page
|
|
5
5
|
- text should have a text contrast ratio higher than 4.5:1 against the background colour to meet WCAG AA
|
|
6
|
-
- the icon must not be focusable or shown to screenreaders
|
|
7
6
|
accessibility_excluded_rules:
|
|
8
7
|
- landmark-unique
|
|
9
8
|
uses_component_wrapper_helper: true
|
|
@@ -23,6 +22,8 @@ examples:
|
|
|
23
22
|
href: "#"
|
|
24
23
|
- text: Navigation item 3
|
|
25
24
|
href: "#"
|
|
25
|
+
context:
|
|
26
|
+
full_width: true
|
|
26
27
|
with_custom_mobile_toggle_text:
|
|
27
28
|
data:
|
|
28
29
|
toggle_text: See the menu
|
|
@@ -34,13 +35,19 @@ examples:
|
|
|
34
35
|
href: "#"
|
|
35
36
|
- text: Navigation item 3
|
|
36
37
|
href: "#"
|
|
38
|
+
context:
|
|
39
|
+
full_width: true
|
|
37
40
|
with_service_name:
|
|
38
41
|
data:
|
|
39
42
|
service_name: My service name
|
|
43
|
+
context:
|
|
44
|
+
full_width: true
|
|
40
45
|
with_service_name_and_service_name_url:
|
|
41
46
|
data:
|
|
42
47
|
service_name: My service name
|
|
43
48
|
service_name_url: "#"
|
|
49
|
+
context:
|
|
50
|
+
full_width: true
|
|
44
51
|
with_service_name_and_navigation_links:
|
|
45
52
|
data:
|
|
46
53
|
service_name: My service name
|
|
@@ -51,15 +58,20 @@ examples:
|
|
|
51
58
|
href: "#"
|
|
52
59
|
- text: Navigation item 3
|
|
53
60
|
href: "#"
|
|
61
|
+
context:
|
|
62
|
+
full_width: true
|
|
54
63
|
hide_service_name_on_mobile:
|
|
55
64
|
description: |
|
|
56
|
-
|
|
65
|
+
Hides the first item in `navigation_items` on desktop. The first item should be replaced on desktop with the `service_name` link. This link is then hidden on mobile.
|
|
57
66
|
|
|
58
67
|
On mobile, use the `toggle_text` to show the name of the main page, but allow users to navigate to it with the first link in the `navigation_items`, which is hidden on desktop.
|
|
68
|
+
|
|
69
|
+
This is intended to prevent the repetition of 'Menu' options within the Service navigation component and the site header, and the duplication of the service name on mobile.
|
|
59
70
|
data:
|
|
60
71
|
service_name: My service home
|
|
61
72
|
service_name_url: "/home"
|
|
62
73
|
hide_service_name_on_mobile: true
|
|
74
|
+
toggle_text: My service
|
|
63
75
|
navigation_items:
|
|
64
76
|
- text: My service home
|
|
65
77
|
href: "/home"
|
|
@@ -69,6 +81,8 @@ examples:
|
|
|
69
81
|
href: "#"
|
|
70
82
|
- text: Navigation item 3
|
|
71
83
|
href: "#"
|
|
84
|
+
context:
|
|
85
|
+
full_width: true
|
|
72
86
|
with_data_attributes_on_items:
|
|
73
87
|
data:
|
|
74
88
|
navigation_items:
|
|
@@ -84,6 +98,8 @@ examples:
|
|
|
84
98
|
data:
|
|
85
99
|
module: "example-2"
|
|
86
100
|
something_else: "hello 2"
|
|
101
|
+
context:
|
|
102
|
+
full_width: true
|
|
87
103
|
with_custom_aria_label_on_the_nav_element:
|
|
88
104
|
data:
|
|
89
105
|
navigation_items:
|
|
@@ -93,14 +109,25 @@ examples:
|
|
|
93
109
|
- text: Navigation item 2
|
|
94
110
|
href: "#"
|
|
95
111
|
navigation_aria_label: "Custom label"
|
|
112
|
+
context:
|
|
113
|
+
full_width: true
|
|
96
114
|
full_width:
|
|
115
|
+
description: Normally the width of the component is constrained by a `govuk-width-container` element, to make it fit within the boundaries of a normal GOV.UK page. If the component is required to be full width, this option removes that class, allowing the component to stretch as wide as possible. This is used in the layout header component in the [Content data app](https://content-data.publishing.service.gov.uk/content).
|
|
97
116
|
data:
|
|
117
|
+
full_width: true
|
|
98
118
|
navigation_items:
|
|
99
119
|
- text: Navigation item 1
|
|
100
120
|
href: "#"
|
|
101
121
|
active: true
|
|
102
122
|
- text: Navigation item 2
|
|
103
123
|
href: "#"
|
|
124
|
+
- text: Navigation item 3
|
|
125
|
+
href: "#"
|
|
126
|
+
- text: Navigation item 4
|
|
127
|
+
href: "#"
|
|
128
|
+
- text: Navigation item 5
|
|
129
|
+
href: "#"
|
|
130
|
+
context:
|
|
104
131
|
full_width: true
|
|
105
132
|
inverse:
|
|
106
133
|
data:
|
|
@@ -111,6 +138,8 @@ examples:
|
|
|
111
138
|
- text: Navigation item 2
|
|
112
139
|
href: "#"
|
|
113
140
|
inverse: true
|
|
141
|
+
context:
|
|
142
|
+
full_width: true
|
|
114
143
|
with_navigation_links_and_collapse_navigation_on_mobile_set_to_false:
|
|
115
144
|
data:
|
|
116
145
|
navigation_items:
|
|
@@ -120,14 +149,20 @@ examples:
|
|
|
120
149
|
- text: Navigation item 2
|
|
121
150
|
href: "#"
|
|
122
151
|
collapse_navigation_on_mobile: false
|
|
152
|
+
context:
|
|
153
|
+
full_width: true
|
|
123
154
|
with_a_single_navigation_item:
|
|
124
155
|
data:
|
|
125
156
|
navigation_items:
|
|
126
157
|
- text: Navigation item 1
|
|
127
158
|
href: "#"
|
|
159
|
+
context:
|
|
160
|
+
full_width: true
|
|
128
161
|
with_a_single_navigation_item_and_collapse_navigation_on_mobile:
|
|
129
162
|
data:
|
|
130
163
|
navigation_items:
|
|
131
164
|
- text: Navigation item 1
|
|
132
165
|
href: "#"
|
|
133
166
|
collapse_navigation_on_mobile: true
|
|
167
|
+
context:
|
|
168
|
+
full_width: true
|
data/config/locales/ar.yml
CHANGED
|
@@ -154,13 +154,12 @@ ar:
|
|
|
154
154
|
metadata:
|
|
155
155
|
and: و
|
|
156
156
|
from: من
|
|
157
|
+
hidden_heading:
|
|
158
|
+
hide_all_updates: إخفاء كافة التحديثات
|
|
157
159
|
history: المحفوظات
|
|
158
160
|
last_updated: التحديث الأخير
|
|
159
161
|
part_of: جزء من
|
|
160
162
|
published: تاريخ النشر
|
|
161
|
-
see_all_updates: اطلع على كل التحديثات
|
|
162
|
-
hidden_heading:
|
|
163
|
-
hide_all_updates: إخفاء كافة التحديثات
|
|
164
163
|
show_all_updates: إظهار كل التحديثات
|
|
165
164
|
modal_dialogue:
|
|
166
165
|
close_modal: إغلاق مربع الحوار المشروط
|
|
@@ -187,13 +186,6 @@ ar:
|
|
|
187
186
|
password_shown_announcement:
|
|
188
187
|
print_link:
|
|
189
188
|
text: طباعة هذه الصفحة
|
|
190
|
-
published_dates:
|
|
191
|
-
hidden_heading:
|
|
192
|
-
hide_all_updates: إخفاء كافة التحديثات
|
|
193
|
-
last_updated: تاريخ آخر تحديث %{date}
|
|
194
|
-
published: تاريخ النشر %{date}
|
|
195
|
-
see_all_updates: اطلع على كل التحديثات
|
|
196
|
-
show_all_updates: إظهار كل التحديثات
|
|
197
189
|
radio:
|
|
198
190
|
or: أو
|
|
199
191
|
related_footer_navigation:
|
data/config/locales/az.yml
CHANGED
|
@@ -151,13 +151,12 @@ az:
|
|
|
151
151
|
metadata:
|
|
152
152
|
and:
|
|
153
153
|
from: "...dan (dən)"
|
|
154
|
+
hidden_heading:
|
|
155
|
+
hide_all_updates: bütün yenilmələri gizlət
|
|
154
156
|
history: Tarix
|
|
155
157
|
last_updated: Son yenilənmə
|
|
156
158
|
part_of: Hissə
|
|
157
159
|
published: Dərc edilib
|
|
158
|
-
see_all_updates: Bütün yeniləmələrə baxın
|
|
159
|
-
hidden_heading:
|
|
160
|
-
hide_all_updates: bütün yenilmələri gizlət
|
|
161
160
|
show_all_updates: bütün yeniləmələri göstər
|
|
162
161
|
modal_dialogue:
|
|
163
162
|
close_modal: Modal dialoqu bağla
|
|
@@ -184,13 +183,6 @@ az:
|
|
|
184
183
|
password_shown_announcement:
|
|
185
184
|
print_link:
|
|
186
185
|
text: Bu səhifəni çap et
|
|
187
|
-
published_dates:
|
|
188
|
-
hidden_heading:
|
|
189
|
-
hide_all_updates: bütün yenilmələri gizlət
|
|
190
|
-
last_updated: 'Son yenilənmə: %{date}'
|
|
191
|
-
published: 'Dərc edilib: %{date}'
|
|
192
|
-
see_all_updates: bütün yeniləmələrə baxın
|
|
193
|
-
show_all_updates: bütün yeniləmələri göstər
|
|
194
186
|
radio:
|
|
195
187
|
or: və ya
|
|
196
188
|
related_footer_navigation:
|
data/config/locales/be.yml
CHANGED
|
@@ -157,13 +157,12 @@ be:
|
|
|
157
157
|
metadata:
|
|
158
158
|
and:
|
|
159
159
|
from: З
|
|
160
|
+
hidden_heading:
|
|
161
|
+
hide_all_updates: схаваць усе абнаўленні
|
|
160
162
|
history: Гiсторыя
|
|
161
163
|
last_updated: Апошняе абнаўленне
|
|
162
164
|
part_of: Частка
|
|
163
165
|
published: Апублікаваны
|
|
164
|
-
see_all_updates: Паглядзець усе абнаўленні
|
|
165
|
-
hidden_heading:
|
|
166
|
-
hide_all_updates: схаваць усе абнаўленні
|
|
167
166
|
show_all_updates: паказаць усе абнаўленні
|
|
168
167
|
modal_dialogue:
|
|
169
168
|
close_modal: Зачыніць мадальны дыялог
|
|
@@ -190,13 +189,6 @@ be:
|
|
|
190
189
|
password_shown_announcement:
|
|
191
190
|
print_link:
|
|
192
191
|
text: Надрукаваць гэтую странiцу
|
|
193
|
-
published_dates:
|
|
194
|
-
hidden_heading:
|
|
195
|
-
hide_all_updates: схаваць усе абнаўленні
|
|
196
|
-
last_updated: Апошняе абнаўленне %{date}
|
|
197
|
-
published: Апублікавана %{date}
|
|
198
|
-
see_all_updates: паглядзець усе абнаўленні
|
|
199
|
-
show_all_updates: паказаць усе абнаўленні
|
|
200
192
|
radio:
|
|
201
193
|
or: або
|
|
202
194
|
related_footer_navigation:
|
data/config/locales/bg.yml
CHANGED
|
@@ -155,13 +155,12 @@ bg:
|
|
|
155
155
|
metadata:
|
|
156
156
|
and:
|
|
157
157
|
from: От
|
|
158
|
+
hidden_heading:
|
|
159
|
+
hide_all_updates: скриване на всички актуализации
|
|
158
160
|
history: История
|
|
159
161
|
last_updated: Последно актуализирани
|
|
160
162
|
part_of: Част от
|
|
161
163
|
published: Публикуван
|
|
162
|
-
see_all_updates: Вижте всички актуализации
|
|
163
|
-
hidden_heading:
|
|
164
|
-
hide_all_updates: скриване на всички актуализации
|
|
165
164
|
show_all_updates: показване на всички актуализации
|
|
166
165
|
modal_dialogue:
|
|
167
166
|
close_modal: Затваряне на модалния диалог
|
|
@@ -188,13 +187,6 @@ bg:
|
|
|
188
187
|
password_shown_announcement:
|
|
189
188
|
print_link:
|
|
190
189
|
text: Отпечатване на страницата
|
|
191
|
-
published_dates:
|
|
192
|
-
hidden_heading:
|
|
193
|
-
hide_all_updates: скриване на всички актуализации
|
|
194
|
-
last_updated: Последна актуализация %{date}
|
|
195
|
-
published: Публикувано на %{date}
|
|
196
|
-
see_all_updates: вижте всички актуализации
|
|
197
|
-
show_all_updates: показване на всички актуализации
|
|
198
190
|
radio:
|
|
199
191
|
or: или
|
|
200
192
|
related_footer_navigation:
|
data/config/locales/bn.yml
CHANGED
|
@@ -152,13 +152,12 @@ bn:
|
|
|
152
152
|
metadata:
|
|
153
153
|
and:
|
|
154
154
|
from: থেকে
|
|
155
|
+
hidden_heading:
|
|
156
|
+
hide_all_updates: সকল আপডেট লুকান
|
|
155
157
|
history: ইতিহাস
|
|
156
158
|
last_updated: সর্বশেষ আপডেট করা হয়েছে
|
|
157
159
|
part_of: এর অংশ
|
|
158
160
|
published: প্রকাশিত হয়েছে
|
|
159
|
-
see_all_updates: সকল আপডেট দেখুন
|
|
160
|
-
hidden_heading:
|
|
161
|
-
hide_all_updates: সকল আপডেট লুকান
|
|
162
161
|
show_all_updates: সকল আপডেট দেখান
|
|
163
162
|
modal_dialogue:
|
|
164
163
|
close_modal: ক্লোজ মোডাল ডায়ালগ
|
|
@@ -185,13 +184,6 @@ bn:
|
|
|
185
184
|
password_shown_announcement:
|
|
186
185
|
print_link:
|
|
187
186
|
text: এই পৃষ্ঠাটি প্রিন্ট করুন
|
|
188
|
-
published_dates:
|
|
189
|
-
hidden_heading:
|
|
190
|
-
hide_all_updates: সকল আপডেট লুকান
|
|
191
|
-
last_updated: সর্বশেষ হালনাগাদ হয়েছে %{date}
|
|
192
|
-
published: প্রকাশিত হওয়ার তারিখ %{date}
|
|
193
|
-
see_all_updates: সকল আপডেট দেখুন
|
|
194
|
-
show_all_updates: সকল আপডেট দেখান
|
|
195
187
|
radio:
|
|
196
188
|
or: অথবা
|
|
197
189
|
related_footer_navigation:
|