govuk_publishing_components 35.6.0 → 35.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/component_guide/audit-filter.js +45 -0
- data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +206 -114
- data/app/assets/stylesheets/component_guide/application.scss +0 -25
- data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +5 -9
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-public.scss +4 -0
- data/app/views/govuk_publishing_components/audit/_component_contents.html.erb +37 -49
- data/app/views/govuk_publishing_components/audit/show.html.erb +2 -1
- data/app/views/govuk_publishing_components/components/_attachment.html.erb +38 -18
- data/app/views/govuk_publishing_components/components/_character_count.html.erb +4 -2
- data/app/views/govuk_publishing_components/components/_document_list.html.erb +8 -7
- data/app/views/govuk_publishing_components/components/_feedback.html.erb +1 -0
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +9 -2
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +1 -0
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +20 -14
- data/app/views/govuk_publishing_components/components/_radio.html.erb +1 -0
- data/app/views/govuk_publishing_components/components/_search.html.erb +1 -0
- data/app/views/govuk_publishing_components/components/_select.html.erb +1 -0
- data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/attachment/_thumbnail_document.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/attachment/_thumbnail_generic.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/attachment/_thumbnail_html.html.erb +3 -0
- data/app/views/govuk_publishing_components/components/attachment/_thumbnail_spreadsheet.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/docs/attachment.yml +21 -0
- data/app/views/govuk_publishing_components/components/docs/document_list.yml +17 -0
- data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +6 -0
- data/app/views/layouts/govuk_publishing_components/application.html.erb +23 -20
- data/config/locales/ar.yml +1 -0
- data/config/locales/az.yml +1 -0
- data/config/locales/be.yml +1 -0
- data/config/locales/bg.yml +1 -0
- data/config/locales/bn.yml +1 -0
- data/config/locales/cs.yml +1 -0
- data/config/locales/cy.yml +1 -0
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +1 -0
- data/config/locales/dr.yml +1 -0
- data/config/locales/el.yml +1 -0
- data/config/locales/en.yml +1 -0
- data/config/locales/es-419.yml +1 -0
- data/config/locales/es.yml +1 -0
- data/config/locales/et.yml +1 -0
- data/config/locales/fa.yml +1 -0
- data/config/locales/fi.yml +1 -0
- data/config/locales/fr.yml +1 -0
- data/config/locales/gd.yml +1 -0
- data/config/locales/gu.yml +1 -0
- data/config/locales/he.yml +1 -0
- data/config/locales/hi.yml +1 -0
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +1 -0
- data/config/locales/hy.yml +1 -0
- data/config/locales/id.yml +1 -0
- data/config/locales/is.yml +1 -0
- data/config/locales/it.yml +1 -0
- data/config/locales/ja.yml +1 -0
- data/config/locales/ka.yml +1 -0
- data/config/locales/kk.yml +1 -0
- data/config/locales/ko.yml +1 -0
- data/config/locales/lt.yml +1 -0
- data/config/locales/lv.yml +1 -0
- data/config/locales/ms.yml +1 -0
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +1 -0
- data/config/locales/no.yml +1 -0
- data/config/locales/pa-pk.yml +1 -0
- data/config/locales/pa.yml +1 -0
- data/config/locales/pl.yml +1 -0
- data/config/locales/ps.yml +1 -0
- data/config/locales/pt.yml +1 -0
- data/config/locales/ro.yml +1 -0
- data/config/locales/ru.yml +1 -0
- data/config/locales/si.yml +1 -0
- data/config/locales/sk.yml +1 -0
- data/config/locales/sl.yml +1 -0
- data/config/locales/so.yml +1 -0
- data/config/locales/sq.yml +1 -0
- data/config/locales/sr.yml +1 -0
- data/config/locales/sv.yml +1 -0
- data/config/locales/sw.yml +1 -0
- data/config/locales/ta.yml +1 -0
- data/config/locales/th.yml +1 -0
- data/config/locales/tk.yml +1 -0
- data/config/locales/tr.yml +1 -0
- data/config/locales/uk.yml +1 -0
- data/config/locales/ur.yml +1 -0
- data/config/locales/uz.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-hk.yml +1 -0
- data/config/locales/zh-tw.yml +1 -0
- data/config/locales/zh.yml +1 -0
- data/lib/govuk_publishing_components/app_helpers/asset_helper.rb +5 -1
- data/lib/govuk_publishing_components/presenters/attachment_helper.rb +15 -3
- data/lib/govuk_publishing_components/presenters/public_layout_helper.rb +5 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/axe-core/README.md +4 -0
- data/node_modules/axe-core/axe.js +25 -19
- data/node_modules/axe-core/axe.min.js +2 -2
- data/node_modules/axe-core/package.json +1 -1
- data/node_modules/axe-core/sri-history.json +4 -0
- metadata +4 -3
@@ -79,12 +79,16 @@ module GovukPublishingComponents
|
|
79
79
|
private
|
80
80
|
|
81
81
|
def is_already_used?(component)
|
82
|
-
if GovukPublishingComponents::Config.exclude_css_from_static
|
82
|
+
if GovukPublishingComponents::Config.exclude_css_from_static && !viewing_component_guide?
|
83
83
|
all_component_stylesheets_being_used.include?(component) || STATIC_STYLESHEET_LIST.include?(component)
|
84
84
|
else
|
85
85
|
all_component_stylesheets_being_used.include?(component)
|
86
86
|
end
|
87
87
|
end
|
88
|
+
|
89
|
+
def viewing_component_guide?
|
90
|
+
request&.path&.include?("/component-guide")
|
91
|
+
end
|
88
92
|
end
|
89
93
|
end
|
90
94
|
end
|
@@ -7,7 +7,7 @@ module GovukPublishingComponents
|
|
7
7
|
|
8
8
|
# Expects a hash of attachment data
|
9
9
|
# * title and url are required
|
10
|
-
# * content_type, filename, file_size, number of pages, alternative_format_contact_email can be provided
|
10
|
+
# * type, content_type, filename, file_size, number of pages, alternative_format_contact_email can be provided
|
11
11
|
def initialize(attachment_data)
|
12
12
|
@attachment_data = attachment_data.with_indifferent_access
|
13
13
|
end
|
@@ -16,6 +16,10 @@ module GovukPublishingComponents
|
|
16
16
|
@attachment_data[:thumbnail_url]
|
17
17
|
end
|
18
18
|
|
19
|
+
def preview_url
|
20
|
+
@attachment_data[:preview_url]
|
21
|
+
end
|
22
|
+
|
19
23
|
def title
|
20
24
|
attachment_data.fetch(:title)
|
21
25
|
end
|
@@ -24,6 +28,14 @@ module GovukPublishingComponents
|
|
24
28
|
attachment_data.fetch(:url)
|
25
29
|
end
|
26
30
|
|
31
|
+
def type
|
32
|
+
attachment_data.fetch(:type, "file")
|
33
|
+
end
|
34
|
+
|
35
|
+
def html?
|
36
|
+
type == "html"
|
37
|
+
end
|
38
|
+
|
27
39
|
def content_type
|
28
40
|
@content_type ||= SupportedContentType.find(
|
29
41
|
attachment_data[:content_type],
|
@@ -86,11 +98,11 @@ module GovukPublishingComponents
|
|
86
98
|
{ content_type: "application/rtf", abbr: "RTF", name: "Rich Text Format" }.freeze,
|
87
99
|
{ content_type: "application/vnd.ms-excel", name: "MS Excel Spreadsheet", spreadsheet: true }.freeze,
|
88
100
|
{ content_type: "application/vnd.ms-excel.sheet.macroenabled.12", abbr: "XLSM", name: "MS Excel Macro-Enabled Workbook" }.freeze,
|
89
|
-
{ content_type: "application/vnd.ms-powerpoint", name: "MS
|
101
|
+
{ content_type: "application/vnd.ms-powerpoint", name: "MS PowerPoint Presentation" }.freeze, # ppt
|
90
102
|
{ content_type: "application/vnd.oasis.opendocument.presentation", abbr: "ODP", name: "OpenDocument Presentation", opendocument: true }.freeze,
|
91
103
|
{ content_type: "application/vnd.oasis.opendocument.spreadsheet", abbr: "ODS", name: "OpenDocument Spreadsheet", opendocument: true, spreadsheet: true }.freeze,
|
92
104
|
{ content_type: "application/vnd.oasis.opendocument.text", abbr: "ODT", name: "OpenDocument Text document", opendocument: true, document: true }.freeze,
|
93
|
-
{ content_type: "application/vnd.openxmlformats-officedocument.presentationml.presentation", name: "MS
|
105
|
+
{ content_type: "application/vnd.openxmlformats-officedocument.presentationml.presentation", name: "MS PowerPoint Presentation" }.freeze, # pptx
|
94
106
|
{ content_type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", name: "MS Excel Spreadsheet", spreadsheet: true }.freeze, # xlsx
|
95
107
|
{ content_type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", name: "MS Word Document", document: true }.freeze, # docx
|
96
108
|
{ content_type: "application/xml", abbr: "XML", name: "XML Document" }.freeze,
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module GovukPublishingComponents
|
2
2
|
module Presenters
|
3
3
|
class PublicLayoutHelper
|
4
|
+
BLUE_BAR_BACKGROUND_COLOURS = %w[browse].freeze
|
4
5
|
FOOTER_NAVIGATION_COLUMNS = [2, 1].freeze
|
5
6
|
FOOTER_TRACK_ACTIONS = %w[topicsLink governmentactivityLink].freeze
|
6
7
|
FOOTER_META = {
|
@@ -69,6 +70,10 @@ module GovukPublishingComponents
|
|
69
70
|
FOOTER_TRACK_ACTIONS
|
70
71
|
end
|
71
72
|
|
73
|
+
def blue_bar_background_colours
|
74
|
+
BLUE_BAR_BACKGROUND_COLOURS
|
75
|
+
end
|
76
|
+
|
72
77
|
def generate_data_attribute(link, track_action)
|
73
78
|
{
|
74
79
|
track_category: "footerClicked",
|
@@ -157,6 +157,10 @@ Axe-core has a new minor release every 3 to 5 months, which usually introduces n
|
|
157
157
|
- See [release and support](doc/release-and-support.md) for details on the frequency of releases, long-term support and recommendations on upgrading axe-core.
|
158
158
|
- See [backward compatibility](doc/backwards-compatibility-doc.md) for details on the types of changes different releases may introduce.
|
159
159
|
|
160
|
+
## Deque Trademarks Policy
|
161
|
+
|
162
|
+
DEQUE, DEQUELABS, AXE®, and AXE-CORE® are trademarks of Deque Systems, Inc. Use of the Deque trademarks must be in accordance with [Deque's trademark policy](https://www.deque.com/legal/trademarks/).
|
163
|
+
|
160
164
|
## Supported ARIA Roles and Attributes.
|
161
165
|
|
162
166
|
Refer [axe-core ARIA support](./doc/aria-supported.md) for a complete list of ARIA supported roles and attributes by axe.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! axe v4.7.
|
1
|
+
/*! axe v4.7.2
|
2
2
|
* Copyright (c) 2023 Deque Systems, Inc.
|
3
3
|
*
|
4
4
|
* Your use of this Source Code Form is subject to the terms of the Mozilla Public
|
@@ -22,7 +22,7 @@
|
|
22
22
|
}, _typeof(obj);
|
23
23
|
}
|
24
24
|
var axe = axe || {};
|
25
|
-
axe.version = '4.7.
|
25
|
+
axe.version = '4.7.2';
|
26
26
|
if (typeof define === 'function' && define.amd) {
|
27
27
|
define('axe-core', [], function() {
|
28
28
|
return axe;
|
@@ -6130,14 +6130,20 @@
|
|
6130
6130
|
if (!window.Node) {
|
6131
6131
|
return;
|
6132
6132
|
}
|
6133
|
-
|
6134
|
-
|
6135
|
-
|
6136
|
-
|
6137
|
-
return;
|
6133
|
+
if (nodes instanceof window.Node || nodes instanceof abstract_virtual_node_default) {
|
6134
|
+
nodes = [ nodes ];
|
6135
|
+
} else {
|
6136
|
+
nodes = to_array_default(nodes);
|
6138
6137
|
}
|
6139
|
-
checkResult.relatedNodes =
|
6140
|
-
|
6138
|
+
checkResult.relatedNodes = [];
|
6139
|
+
nodes.forEach(function(node) {
|
6140
|
+
if (node instanceof abstract_virtual_node_default) {
|
6141
|
+
node = node.actualNode;
|
6142
|
+
}
|
6143
|
+
if (node instanceof window.Node) {
|
6144
|
+
var dqElm = new dq_element_default(node, options);
|
6145
|
+
checkResult.relatedNodes.push(dqElm);
|
6146
|
+
}
|
6141
6147
|
});
|
6142
6148
|
}
|
6143
6149
|
};
|
@@ -9299,7 +9305,7 @@
|
|
9299
9305
|
slider: {
|
9300
9306
|
type: 'widget',
|
9301
9307
|
requiredAttrs: [ 'aria-valuenow' ],
|
9302
|
-
allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-orientation', 'aria-readonly', 'aria-valuetext' ],
|
9308
|
+
allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-orientation', 'aria-readonly', 'aria-required', 'aria-valuetext' ],
|
9303
9309
|
superclassRole: [ 'input', 'range' ],
|
9304
9310
|
accessibleNameRequired: true,
|
9305
9311
|
childrenPresentational: true
|
@@ -9337,7 +9343,7 @@
|
|
9337
9343
|
switch: {
|
9338
9344
|
type: 'widget',
|
9339
9345
|
requiredAttrs: [ 'aria-checked' ],
|
9340
|
-
allowedAttrs: [ 'aria-readonly' ],
|
9346
|
+
allowedAttrs: [ 'aria-readonly', 'aria-required' ],
|
9341
9347
|
superclassRole: [ 'checkbox' ],
|
9342
9348
|
accessibleNameRequired: true,
|
9343
9349
|
nameFromContent: true,
|
@@ -28535,7 +28541,7 @@
|
|
28535
28541
|
selector: '[aria-hidden="true"]',
|
28536
28542
|
matches: 'aria-hidden-focus-matches',
|
28537
28543
|
excludeHidden: false,
|
28538
|
-
tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412' ],
|
28544
|
+
tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'TTv5', 'TT6.a' ],
|
28539
28545
|
actIds: [ '6cfa84' ],
|
28540
28546
|
all: [ 'focusable-modal-open', 'focusable-disabled', 'focusable-not-tabbable' ],
|
28541
28547
|
any: [],
|
@@ -29012,7 +29018,7 @@
|
|
29012
29018
|
id: 'frame-title-unique',
|
29013
29019
|
selector: 'frame[title], iframe[title]',
|
29014
29020
|
matches: 'frame-title-has-text-matches',
|
29015
|
-
tags: [ 'cat.text-alternatives', 'wcag412', 'wcag2a', 'TTv5', 'TT12.
|
29021
|
+
tags: [ 'cat.text-alternatives', 'wcag412', 'wcag2a', 'TTv5', 'TT12.d' ],
|
29016
29022
|
actIds: [ '4b1c6c' ],
|
29017
29023
|
all: [],
|
29018
29024
|
any: [],
|
@@ -29022,7 +29028,7 @@
|
|
29022
29028
|
id: 'frame-title',
|
29023
29029
|
selector: 'frame, iframe',
|
29024
29030
|
matches: 'no-negative-tabindex-matches',
|
29025
|
-
tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag412', 'section508', 'section508.22.i', 'TTv5', 'TT12.
|
29031
|
+
tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag412', 'section508', 'section508.22.i', 'TTv5', 'TT12.d' ],
|
29026
29032
|
actIds: [ 'cae760' ],
|
29027
29033
|
all: [],
|
29028
29034
|
any: [ {
|
@@ -29367,7 +29373,7 @@
|
|
29367
29373
|
id: 'meta-refresh',
|
29368
29374
|
selector: 'meta[http-equiv="refresh"][content]',
|
29369
29375
|
excludeHidden: false,
|
29370
|
-
tags: [ 'cat.time-and-media', 'wcag2a', 'wcag221', 'TTv5', '
|
29376
|
+
tags: [ 'cat.time-and-media', 'wcag2a', 'wcag221', 'TTv5', 'TT8.a' ],
|
29371
29377
|
actIds: [ 'bc659a', 'bisz58' ],
|
29372
29378
|
all: [],
|
29373
29379
|
any: [ {
|
@@ -29411,7 +29417,7 @@
|
|
29411
29417
|
}, {
|
29412
29418
|
id: 'nested-interactive',
|
29413
29419
|
matches: 'nested-interactive-matches',
|
29414
|
-
tags: [ 'cat.keyboard', 'wcag2a', 'wcag412', 'TTv5', '
|
29420
|
+
tags: [ 'cat.keyboard', 'wcag2a', 'wcag412', 'TTv5', 'TT6.a' ],
|
29415
29421
|
actIds: [ '307n5z' ],
|
29416
29422
|
all: [],
|
29417
29423
|
any: [ 'no-focusable-content' ],
|
@@ -29537,7 +29543,7 @@
|
|
29537
29543
|
id: 'scrollable-region-focusable',
|
29538
29544
|
selector: '*:not(select,textarea)',
|
29539
29545
|
matches: 'scrollable-region-focusable-matches',
|
29540
|
-
tags: [ 'cat.keyboard', 'wcag2a', 'wcag211' ],
|
29546
|
+
tags: [ 'cat.keyboard', 'wcag2a', 'wcag211', 'TTv5', 'TT4.a' ],
|
29541
29547
|
actIds: [ '0ssw9k' ],
|
29542
29548
|
all: [],
|
29543
29549
|
any: [ 'focusable-content', 'focusable-element' ],
|
@@ -29558,7 +29564,7 @@
|
|
29558
29564
|
}, {
|
29559
29565
|
id: 'server-side-image-map',
|
29560
29566
|
selector: 'img[ismap]',
|
29561
|
-
tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag211', 'section508', 'section508.22.f' ],
|
29567
|
+
tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag211', 'section508', 'section508.22.f', 'TTv5', 'TT4.a' ],
|
29562
29568
|
all: [],
|
29563
29569
|
any: [],
|
29564
29570
|
none: [ 'exists' ]
|
@@ -29637,7 +29643,7 @@
|
|
29637
29643
|
id: 'td-headers-attr',
|
29638
29644
|
selector: 'table',
|
29639
29645
|
matches: 'table-or-grid-role-matches',
|
29640
|
-
tags: [ 'cat.tables', 'wcag2a', 'wcag131', 'section508', 'section508.22.g' ],
|
29646
|
+
tags: [ 'cat.tables', 'wcag2a', 'wcag131', 'section508', 'section508.22.g', 'TTv5', 'TT14.b' ],
|
29641
29647
|
actIds: [ 'a25f45' ],
|
29642
29648
|
all: [ 'td-headers-attr' ],
|
29643
29649
|
any: [],
|