govuk_publishing_components 21.56.0 → 21.56.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb +11 -7
- data/lib/govuk_publishing_components.rb +2 -1
- data/lib/govuk_publishing_components/presenters/breadcrumb_selector.rb +50 -42
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_ancestors.rb +41 -0
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_priority.rb +1 -0
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_taxons.rb +4 -0
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_topic.rb +38 -0
- data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +15 -4
- data/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb +3 -1
- data/lib/govuk_publishing_components/presenters/related_navigation_helper.rb +18 -17
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/axe-core/CHANGELOG.md +11 -0
- data/node_modules/axe-core/axe.js +36 -9
- data/node_modules/axe-core/axe.min.js +2 -2
- data/node_modules/axe-core/bower.json +1 -1
- data/node_modules/axe-core/lib/checks/color/color-contrast.js +2 -2
- data/node_modules/axe-core/lib/checks/lists/listitem.js +1 -1
- data/node_modules/axe-core/lib/checks/mobile/meta-viewport-scale.js +3 -0
- data/node_modules/axe-core/lib/commons/dom/is-visible.js +37 -19
- data/node_modules/axe-core/lib/core/public/configure.js +26 -0
- data/node_modules/axe-core/lib/rules/aria-input-field-name.json +1 -1
- data/node_modules/axe-core/package.json +12 -12
- data/node_modules/axe-core/sri-history.json +4 -0
- metadata +4 -3
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_parent.rb +0 -39
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! axe v3.5.
|
1
|
+
/*! axe v3.5.5
|
2
2
|
* Copyright (c) 2020 Deque Systems, Inc.
|
3
3
|
*
|
4
4
|
* Your use of this Source Code Form is subject to the terms of the Mozilla Public
|
@@ -27,7 +27,7 @@
|
|
27
27
|
return _typeof(obj);
|
28
28
|
}
|
29
29
|
var axe = axe || {};
|
30
|
-
axe.version = '3.5.
|
30
|
+
axe.version = '3.5.5';
|
31
31
|
if (typeof define === 'function' && define.amd) {
|
32
32
|
define('axe-core', [], function() {
|
33
33
|
'use strict';
|
@@ -9976,13 +9976,25 @@
|
|
9976
9976
|
audit.reporter = spec.reporter;
|
9977
9977
|
}
|
9978
9978
|
if (spec.checks) {
|
9979
|
+
if (!Array.isArray(spec.checks)) {
|
9980
|
+
throw new TypeError('Checks property must be an array');
|
9981
|
+
}
|
9979
9982
|
spec.checks.forEach(function(check) {
|
9983
|
+
if (!check.id) {
|
9984
|
+
throw new TypeError('Configured check '.concat(JSON.stringify(check), ' is invalid. Checks must be an object with at least an id property'));
|
9985
|
+
}
|
9980
9986
|
audit.addCheck(check);
|
9981
9987
|
});
|
9982
9988
|
}
|
9983
9989
|
var modifiedRules = [];
|
9984
9990
|
if (spec.rules) {
|
9991
|
+
if (!Array.isArray(spec.rules)) {
|
9992
|
+
throw new TypeError('Rules property must be an array');
|
9993
|
+
}
|
9985
9994
|
spec.rules.forEach(function(rule) {
|
9995
|
+
if (!rule.id) {
|
9996
|
+
throw new TypeError('Configured rule '.concat(JSON.stringify(rule), ' is invalid. Rules must be an object with at least an id property'));
|
9997
|
+
}
|
9986
9998
|
modifiedRules.push(rule.id);
|
9987
9999
|
audit.addRule(rule);
|
9988
10000
|
});
|
@@ -13698,7 +13710,7 @@
|
|
13698
13710
|
},
|
13699
13711
|
'aria-input-field-name': {
|
13700
13712
|
description: 'Ensures every ARIA input field has an accessible name',
|
13701
|
-
help: 'ARIA input fields have an accessible name'
|
13713
|
+
help: 'ARIA input fields must have an accessible name'
|
13702
13714
|
},
|
13703
13715
|
'aria-required-attr': {
|
13704
13716
|
description: 'Ensures elements with ARIA roles have all required ARIA attributes',
|
@@ -16679,8 +16691,8 @@
|
|
16679
16691
|
var fgColor = color.getForegroundColor(node, noScroll, bgColor);
|
16680
16692
|
var nodeStyle = window.getComputedStyle(node);
|
16681
16693
|
var fontSize = parseFloat(nodeStyle.getPropertyValue('font-size'));
|
16682
|
-
var fontWeight =
|
16683
|
-
var bold =
|
16694
|
+
var fontWeight = nodeStyle.getPropertyValue('font-weight');
|
16695
|
+
var bold = parseFloat(fontWeight) >= 700 || fontWeight === 'bold';
|
16684
16696
|
var cr = color.hasValidContrastRatio(bgColor, fgColor, fontSize, bold);
|
16685
16697
|
var truncatedResult = Math.floor(cr.contrastRatio * 100) / 100;
|
16686
16698
|
var missing;
|
@@ -17604,7 +17616,7 @@
|
|
17604
17616
|
}
|
17605
17617
|
var parentTagName = parent.nodeName.toUpperCase();
|
17606
17618
|
var parentRole = (parent.getAttribute('role') || '').toLowerCase();
|
17607
|
-
if (
|
17619
|
+
if ([ 'presentation', 'none', 'list' ].includes(parentRole)) {
|
17608
17620
|
return true;
|
17609
17621
|
}
|
17610
17622
|
if (parentRole && axe.commons.aria.isValidRole(parentRole)) {
|
@@ -18006,6 +18018,9 @@
|
|
18006
18018
|
return out;
|
18007
18019
|
}
|
18008
18020
|
var _contentValue$split = contentValue.split('='), _contentValue$split2 = _slicedToArray(_contentValue$split, 2), key = _contentValue$split2[0], value = _contentValue$split2[1];
|
18021
|
+
if (!key || !value) {
|
18022
|
+
return out;
|
18023
|
+
}
|
18009
18024
|
var curatedKey = key.toLowerCase().trim();
|
18010
18025
|
var curatedValue = value.toLowerCase().trim();
|
18011
18026
|
if (curatedKey === 'maximum-scale' && curatedValue === 'yes') {
|
@@ -18048,6 +18063,9 @@
|
|
18048
18063
|
return out;
|
18049
18064
|
}
|
18050
18065
|
var _contentValue$split3 = contentValue.split('='), _contentValue$split4 = _slicedToArray(_contentValue$split3, 2), key = _contentValue$split4[0], value = _contentValue$split4[1];
|
18066
|
+
if (!key || !value) {
|
18067
|
+
return out;
|
18068
|
+
}
|
18051
18069
|
var curatedKey = key.toLowerCase().trim();
|
18052
18070
|
var curatedValue = value.toLowerCase().trim();
|
18053
18071
|
if (curatedKey === 'maximum-scale' && curatedValue === 'yes') {
|
@@ -22193,12 +22211,21 @@
|
|
22193
22211
|
return false;
|
22194
22212
|
}
|
22195
22213
|
var nodeName = el.nodeName.toUpperCase();
|
22196
|
-
if (nodeName !== 'AREA' && style.getPropertyValue('display') === 'none' || [ 'STYLE', 'SCRIPT', 'NOSCRIPT', 'TEMPLATE' ].includes(nodeName) || !screenReader && isClipped(style) || !recursed && (style.getPropertyValue('visibility') === 'hidden' || !screenReader && dom.isOffscreen(el)) || screenReader && el.getAttribute('aria-hidden') === 'true') {
|
22197
|
-
return false;
|
22198
|
-
}
|
22199
22214
|
if (nodeName === 'AREA') {
|
22200
22215
|
return isAreaVisible(el, screenReader, recursed);
|
22201
22216
|
}
|
22217
|
+
if (style.getPropertyValue('display') === 'none' || [ 'STYLE', 'SCRIPT', 'NOSCRIPT', 'TEMPLATE' ].includes(nodeName)) {
|
22218
|
+
return false;
|
22219
|
+
}
|
22220
|
+
if (screenReader && el.getAttribute('aria-hidden') === 'true') {
|
22221
|
+
return false;
|
22222
|
+
}
|
22223
|
+
if (!screenReader && (isClipped(style) || style.getPropertyValue('opacity') === '0' || axe.utils.getScroll(el) && parseInt(style.getPropertyValue('height')) === 0)) {
|
22224
|
+
return false;
|
22225
|
+
}
|
22226
|
+
if (!recursed && (style.getPropertyValue('visibility') === 'hidden' || !screenReader && axe.commons.dom.isOffscreen(el))) {
|
22227
|
+
return false;
|
22228
|
+
}
|
22202
22229
|
var parent = el.assignedSlot ? el.assignedSlot : el.parentNode;
|
22203
22230
|
var isVisible = false;
|
22204
22231
|
if (parent) {
|