axe-core 4.10.2-canary.b7736de → 4.10.2-canary.cdc871e
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.
- package/README.md +2 -2
- package/axe.js +166 -135
- package/axe.min.js +3 -3
- package/locales/_template.json +9 -5
- package/locales/de.json +16 -16
- package/locales/ko.json +4 -4
- package/locales/ru.json +7 -3
- package/package.json +4 -3
- package/sri-history.json +3 -3
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Axe is an accessibility testing engine for websites and other HTML-based user in
|
|
|
14
14
|
|
|
15
15
|
## The Accessibility Rules
|
|
16
16
|
|
|
17
|
-
Axe-core has different types of rules, for WCAG 2.0, 2.1, 2.2 on level A, AA and AAA as well as a number of best practices that help you identify common accessibility practices like ensuring every page has an `h1` heading, and to help you avoid "gotchas" in ARIA like where an ARIA attribute you used will get ignored. The complete list of rules, grouped WCAG level and best practice, can found in [doc/rule-descriptions.md](./doc/rule-descriptions.md).
|
|
17
|
+
Axe-core has different types of rules, for WCAG 2.0, 2.1, 2.2 on level A, AA and AAA as well as a number of best practices that help you identify common accessibility practices like ensuring every page has an `h1` heading, and to help you avoid "gotchas" in ARIA like where an ARIA attribute you used will get ignored. The complete list of rules, grouped WCAG level and best practice, can be found in [doc/rule-descriptions.md](./doc/rule-descriptions.md).
|
|
18
18
|
|
|
19
19
|
With axe-core, you can find **on average 57% of WCAG issues automatically**. Additionally, axe-core will return elements as "incomplete" where axe-core could not be certain, and manual review is needed.
|
|
20
20
|
|
|
@@ -65,7 +65,7 @@ Axe was built to reflect how web development actually works. It works with all m
|
|
|
65
65
|
- It's actively supported by [Deque Systems](https://www.deque.com), a major accessibility vendor.
|
|
66
66
|
- It integrates with your existing functional/acceptance automated tests.
|
|
67
67
|
- It automatically determines which rules to run based on the evaluation context.
|
|
68
|
-
- Axe supports in-memory fixtures, static fixtures, integration tests and iframes of infinite depth.
|
|
68
|
+
- Axe supports in-memory fixtures, static fixtures, integration tests, and iframes of infinite depth.
|
|
69
69
|
- Axe is highly configurable.
|
|
70
70
|
|
|
71
71
|
## Supported Browsers
|
package/axe.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! axe v4.10.2-canary.
|
|
2
|
-
* Copyright (c) 2015 -
|
|
1
|
+
/*! axe v4.10.2-canary.cdc871e
|
|
2
|
+
* Copyright (c) 2015 - 2025 Deque Systems, Inc.
|
|
3
3
|
*
|
|
4
4
|
* Your use of this Source Code Form is subject to the terms of the Mozilla Public
|
|
5
5
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}, _typeof(o);
|
|
23
23
|
}
|
|
24
24
|
var axe = axe || {};
|
|
25
|
-
axe.version = '4.10.2-canary.
|
|
25
|
+
axe.version = '4.10.2-canary.cdc871e';
|
|
26
26
|
if (typeof define === 'function' && define.amd) {
|
|
27
27
|
define('axe-core', [], function() {
|
|
28
28
|
return axe;
|
|
@@ -6943,6 +6943,9 @@
|
|
|
6943
6943
|
parseStylesheet: function parseStylesheet() {
|
|
6944
6944
|
return parse_stylesheet_default;
|
|
6945
6945
|
},
|
|
6946
|
+
parseTabindex: function parseTabindex() {
|
|
6947
|
+
return parse_tabindex_default;
|
|
6948
|
+
},
|
|
6946
6949
|
performanceTimer: function performanceTimer() {
|
|
6947
6950
|
return performance_timer_default;
|
|
6948
6951
|
},
|
|
@@ -10299,9 +10302,8 @@
|
|
|
10299
10302
|
var nodeAndDescendents = query_selector_all_default(virtualNode, '*');
|
|
10300
10303
|
var tabbableElements = nodeAndDescendents.filter(function(vNode) {
|
|
10301
10304
|
var isFocusable2 = vNode.isFocusable;
|
|
10302
|
-
var tabIndex = vNode.actualNode.getAttribute('tabindex');
|
|
10303
|
-
tabIndex
|
|
10304
|
-
return tabIndex ? isFocusable2 && tabIndex >= 0 : isFocusable2;
|
|
10305
|
+
var tabIndex = parse_tabindex_default(vNode.actualNode.getAttribute('tabindex'));
|
|
10306
|
+
return tabIndex !== null ? isFocusable2 && tabIndex >= 0 : isFocusable2;
|
|
10305
10307
|
});
|
|
10306
10308
|
return tabbableElements;
|
|
10307
10309
|
}
|
|
@@ -10344,18 +10346,15 @@
|
|
|
10344
10346
|
} else if (is_natively_focusable_default(vNode)) {
|
|
10345
10347
|
return true;
|
|
10346
10348
|
}
|
|
10347
|
-
var tabindex = vNode.attr('tabindex');
|
|
10348
|
-
|
|
10349
|
-
return true;
|
|
10350
|
-
}
|
|
10351
|
-
return false;
|
|
10349
|
+
var tabindex = parse_tabindex_default(vNode.attr('tabindex'));
|
|
10350
|
+
return tabindex !== null;
|
|
10352
10351
|
}
|
|
10353
10352
|
function _isInTabOrder(el) {
|
|
10354
10353
|
var _nodeLookup6 = _nodeLookup(el), vNode = _nodeLookup6.vNode;
|
|
10355
10354
|
if (vNode.props.nodeType !== 1) {
|
|
10356
10355
|
return false;
|
|
10357
10356
|
}
|
|
10358
|
-
var tabindex =
|
|
10357
|
+
var tabindex = parse_tabindex_default(vNode.attr('tabindex'));
|
|
10359
10358
|
if (tabindex <= -1) {
|
|
10360
10359
|
return false;
|
|
10361
10360
|
}
|
|
@@ -11256,7 +11255,7 @@
|
|
|
11256
11255
|
superclassRole: [ 'composite' ]
|
|
11257
11256
|
},
|
|
11258
11257
|
tabpanel: {
|
|
11259
|
-
type: '
|
|
11258
|
+
type: 'structure',
|
|
11260
11259
|
allowedAttrs: [ 'aria-expanded' ],
|
|
11261
11260
|
superclassRole: [ 'section' ],
|
|
11262
11261
|
accessibleNameRequired: false
|
|
@@ -11835,7 +11834,7 @@
|
|
|
11835
11834
|
}, {
|
|
11836
11835
|
hasAccessibleName: true
|
|
11837
11836
|
} ],
|
|
11838
|
-
allowedRoles: [ 'button', 'checkbox', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'meter', 'option', 'progressbar', 'radio', 'scrollbar', 'separator', 'slider', 'switch', 'tab', 'treeitem', 'doc-cover' ]
|
|
11837
|
+
allowedRoles: [ 'button', 'checkbox', 'link', 'math', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'meter', 'option', 'progressbar', 'radio', 'scrollbar', 'separator', 'slider', 'switch', 'tab', 'treeitem', 'doc-cover' ]
|
|
11839
11838
|
},
|
|
11840
11839
|
usemap: {
|
|
11841
11840
|
matches: '[usemap]',
|
|
@@ -13893,7 +13892,7 @@
|
|
|
13893
13892
|
});
|
|
13894
13893
|
}
|
|
13895
13894
|
function insertedIntoFocusOrder(el) {
|
|
13896
|
-
var tabIndex =
|
|
13895
|
+
var tabIndex = parse_tabindex_default(el.getAttribute('tabindex'));
|
|
13897
13896
|
return tabIndex > -1 && _isFocusable(el) && !is_natively_focusable_default(el);
|
|
13898
13897
|
}
|
|
13899
13898
|
var inserted_into_focus_order_default = insertedIntoFocusOrder;
|
|
@@ -18616,12 +18615,8 @@
|
|
|
18616
18615
|
};
|
|
18617
18616
|
}
|
|
18618
18617
|
function frameFocusable(frame) {
|
|
18619
|
-
var tabIndex = frame.getAttribute('tabindex');
|
|
18620
|
-
|
|
18621
|
-
return true;
|
|
18622
|
-
}
|
|
18623
|
-
var _int = parseInt(tabIndex, 10);
|
|
18624
|
-
return isNaN(_int) || _int >= 0;
|
|
18618
|
+
var tabIndex = parse_tabindex_default(frame.getAttribute('tabindex'));
|
|
18619
|
+
return tabIndex === null || tabIndex >= 0;
|
|
18625
18620
|
}
|
|
18626
18621
|
function getBoundingSize(domNode) {
|
|
18627
18622
|
var width = parseInt(domNode.getAttribute('width'), 10);
|
|
@@ -19196,6 +19191,17 @@
|
|
|
19196
19191
|
});
|
|
19197
19192
|
}
|
|
19198
19193
|
var parse_crossorigin_stylesheet_default = parseCrossOriginStylesheet;
|
|
19194
|
+
function parseTabindex(value) {
|
|
19195
|
+
if (typeof value !== 'string') {
|
|
19196
|
+
return null;
|
|
19197
|
+
}
|
|
19198
|
+
var match = value.trim().match(/^([-+]?\d+)/);
|
|
19199
|
+
if (match) {
|
|
19200
|
+
return Number(match[1]);
|
|
19201
|
+
}
|
|
19202
|
+
return null;
|
|
19203
|
+
}
|
|
19204
|
+
var parse_tabindex_default = parseTabindex;
|
|
19199
19205
|
var performanceTimer = function() {
|
|
19200
19206
|
function now() {
|
|
19201
19207
|
if (window.performance && window.performance) {
|
|
@@ -19501,8 +19507,14 @@
|
|
|
19501
19507
|
}
|
|
19502
19508
|
function preloadMedia(_ref74) {
|
|
19503
19509
|
var _ref74$treeRoot = _ref74.treeRoot, treeRoot = _ref74$treeRoot === void 0 ? axe._tree[0] : _ref74$treeRoot;
|
|
19504
|
-
var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(_ref75) {
|
|
19510
|
+
var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video[autoplay], audio[autoplay]', function(_ref75) {
|
|
19505
19511
|
var actualNode = _ref75.actualNode;
|
|
19512
|
+
if (actualNode.preload === 'none' && actualNode.readyState === 0 && actualNode.networkState !== actualNode.NETWORK_LOADING) {
|
|
19513
|
+
return false;
|
|
19514
|
+
}
|
|
19515
|
+
if (actualNode.hasAttribute('paused') || actualNode.hasAttribute('muted')) {
|
|
19516
|
+
return false;
|
|
19517
|
+
}
|
|
19506
19518
|
if (actualNode.hasAttribute('src')) {
|
|
19507
19519
|
return !!actualNode.getAttribute('src');
|
|
19508
19520
|
}
|
|
@@ -20505,54 +20517,6 @@
|
|
|
20505
20517
|
return out ? true : void 0;
|
|
20506
20518
|
}
|
|
20507
20519
|
var th_has_data_cells_evaluate_default = thHasDataCellsEvaluate;
|
|
20508
|
-
function tdHeadersAttrEvaluate(node) {
|
|
20509
|
-
var cells = [];
|
|
20510
|
-
var reviewCells = [];
|
|
20511
|
-
var badCells = [];
|
|
20512
|
-
for (var rowIndex = 0; rowIndex < node.rows.length; rowIndex++) {
|
|
20513
|
-
var row = node.rows[rowIndex];
|
|
20514
|
-
for (var cellIndex = 0; cellIndex < row.cells.length; cellIndex++) {
|
|
20515
|
-
cells.push(row.cells[cellIndex]);
|
|
20516
|
-
}
|
|
20517
|
-
}
|
|
20518
|
-
var ids = cells.filter(function(cell) {
|
|
20519
|
-
return cell.getAttribute('id');
|
|
20520
|
-
}).map(function(cell) {
|
|
20521
|
-
return cell.getAttribute('id');
|
|
20522
|
-
});
|
|
20523
|
-
cells.forEach(function(cell) {
|
|
20524
|
-
var isSelf = false;
|
|
20525
|
-
var notOfTable = false;
|
|
20526
|
-
if (!cell.hasAttribute('headers') || !_isVisibleToScreenReaders(cell)) {
|
|
20527
|
-
return;
|
|
20528
|
-
}
|
|
20529
|
-
var headersAttr = cell.getAttribute('headers').trim();
|
|
20530
|
-
if (!headersAttr) {
|
|
20531
|
-
return reviewCells.push(cell);
|
|
20532
|
-
}
|
|
20533
|
-
var headers = token_list_default(headersAttr);
|
|
20534
|
-
if (headers.length !== 0) {
|
|
20535
|
-
if (cell.getAttribute('id')) {
|
|
20536
|
-
isSelf = headers.indexOf(cell.getAttribute('id').trim()) !== -1;
|
|
20537
|
-
}
|
|
20538
|
-
notOfTable = headers.some(function(header) {
|
|
20539
|
-
return !ids.includes(header);
|
|
20540
|
-
});
|
|
20541
|
-
if (isSelf || notOfTable) {
|
|
20542
|
-
badCells.push(cell);
|
|
20543
|
-
}
|
|
20544
|
-
}
|
|
20545
|
-
});
|
|
20546
|
-
if (badCells.length > 0) {
|
|
20547
|
-
this.relatedNodes(badCells);
|
|
20548
|
-
return false;
|
|
20549
|
-
}
|
|
20550
|
-
if (reviewCells.length) {
|
|
20551
|
-
this.relatedNodes(reviewCells);
|
|
20552
|
-
return void 0;
|
|
20553
|
-
}
|
|
20554
|
-
return true;
|
|
20555
|
-
}
|
|
20556
20520
|
var aria_exports = {};
|
|
20557
20521
|
__export(aria_exports, {
|
|
20558
20522
|
allowedAttr: function allowedAttr() {
|
|
@@ -22774,6 +22738,66 @@
|
|
|
22774
22738
|
return !!attrDefinition;
|
|
22775
22739
|
}
|
|
22776
22740
|
var validate_attr_default = validateAttr;
|
|
22741
|
+
var messageKeys = [ 'cell-header-not-in-table', 'cell-header-not-th', 'header-refs-self', 'empty-hdrs' ];
|
|
22742
|
+
var notInTable = messageKeys[0], notTh = messageKeys[1], selfRef = messageKeys[2], emptyHdrs = messageKeys[3];
|
|
22743
|
+
function tdHeadersAttrEvaluate(node) {
|
|
22744
|
+
var cells = [];
|
|
22745
|
+
var cellRoleById = {};
|
|
22746
|
+
for (var rowIndex = 0; rowIndex < node.rows.length; rowIndex++) {
|
|
22747
|
+
var row = node.rows[rowIndex];
|
|
22748
|
+
for (var cellIndex = 0; cellIndex < row.cells.length; cellIndex++) {
|
|
22749
|
+
var cell = row.cells[cellIndex];
|
|
22750
|
+
cells.push(cell);
|
|
22751
|
+
var cellId = cell.getAttribute('id');
|
|
22752
|
+
if (cellId) {
|
|
22753
|
+
cellRoleById[cellId] = get_role_default(cell);
|
|
22754
|
+
}
|
|
22755
|
+
}
|
|
22756
|
+
}
|
|
22757
|
+
var badCells = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, selfRef, new Set()), notInTable, new Set()), notTh, new Set()), emptyHdrs, new Set());
|
|
22758
|
+
cells.forEach(function(cell) {
|
|
22759
|
+
if (!cell.hasAttribute('headers') || !_isVisibleToScreenReaders(cell)) {
|
|
22760
|
+
return;
|
|
22761
|
+
}
|
|
22762
|
+
var headersAttr = cell.getAttribute('headers').trim();
|
|
22763
|
+
if (!headersAttr) {
|
|
22764
|
+
badCells[emptyHdrs].add(cell);
|
|
22765
|
+
return;
|
|
22766
|
+
}
|
|
22767
|
+
var cellId = cell.getAttribute('id');
|
|
22768
|
+
var headers = token_list_default(headersAttr);
|
|
22769
|
+
headers.forEach(function(headerId) {
|
|
22770
|
+
if (cellId && headerId === cellId) {
|
|
22771
|
+
badCells[selfRef].add(cell);
|
|
22772
|
+
} else if (!cellRoleById[headerId]) {
|
|
22773
|
+
badCells[notInTable].add(cell);
|
|
22774
|
+
} else if (![ 'columnheader', 'rowheader' ].includes(cellRoleById[headerId])) {
|
|
22775
|
+
badCells[notTh].add(cell);
|
|
22776
|
+
}
|
|
22777
|
+
});
|
|
22778
|
+
});
|
|
22779
|
+
var _iterator15 = _createForOfIteratorHelper(messageKeys), _step15;
|
|
22780
|
+
try {
|
|
22781
|
+
for (_iterator15.s(); !(_step15 = _iterator15.n()).done; ) {
|
|
22782
|
+
var messageKey = _step15.value;
|
|
22783
|
+
if (badCells[messageKey].size > 0) {
|
|
22784
|
+
this.relatedNodes(_toConsumableArray(badCells[messageKey]));
|
|
22785
|
+
if (messageKey === emptyHdrs) {
|
|
22786
|
+
return void 0;
|
|
22787
|
+
}
|
|
22788
|
+
this.data({
|
|
22789
|
+
messageKey: messageKey
|
|
22790
|
+
});
|
|
22791
|
+
return false;
|
|
22792
|
+
}
|
|
22793
|
+
}
|
|
22794
|
+
} catch (err) {
|
|
22795
|
+
_iterator15.e(err);
|
|
22796
|
+
} finally {
|
|
22797
|
+
_iterator15.f();
|
|
22798
|
+
}
|
|
22799
|
+
return true;
|
|
22800
|
+
}
|
|
22777
22801
|
function tdHasHeaderEvaluate(node) {
|
|
22778
22802
|
var badCells = [];
|
|
22779
22803
|
var cells = get_all_cells_default(node);
|
|
@@ -23162,19 +23186,19 @@
|
|
|
23162
23186
|
return;
|
|
23163
23187
|
}
|
|
23164
23188
|
var frameAncestry = r.node.ancestry.slice(0, -1);
|
|
23165
|
-
var
|
|
23189
|
+
var _iterator16 = _createForOfIteratorHelper(iframeResults), _step16;
|
|
23166
23190
|
try {
|
|
23167
|
-
for (
|
|
23168
|
-
var iframeResult =
|
|
23191
|
+
for (_iterator16.s(); !(_step16 = _iterator16.n()).done; ) {
|
|
23192
|
+
var iframeResult = _step16.value;
|
|
23169
23193
|
if (_matchAncestry(frameAncestry, iframeResult.node.ancestry)) {
|
|
23170
23194
|
r.result = iframeResult.result;
|
|
23171
23195
|
break;
|
|
23172
23196
|
}
|
|
23173
23197
|
}
|
|
23174
23198
|
} catch (err) {
|
|
23175
|
-
|
|
23199
|
+
_iterator16.e(err);
|
|
23176
23200
|
} finally {
|
|
23177
|
-
|
|
23201
|
+
_iterator16.f();
|
|
23178
23202
|
}
|
|
23179
23203
|
});
|
|
23180
23204
|
iframeResults.forEach(function(r) {
|
|
@@ -23661,11 +23685,11 @@
|
|
|
23661
23685
|
}
|
|
23662
23686
|
function getShadowColorsMap(parsedShadows) {
|
|
23663
23687
|
var colorMap = {};
|
|
23664
|
-
var
|
|
23688
|
+
var _iterator17 = _createForOfIteratorHelper(parsedShadows), _step17;
|
|
23665
23689
|
try {
|
|
23666
|
-
for (
|
|
23690
|
+
for (_iterator17.s(); !(_step17 = _iterator17.n()).done; ) {
|
|
23667
23691
|
var _colorMap$colorStr;
|
|
23668
|
-
var
|
|
23692
|
+
var _step17$value = _step17.value, colorStr = _step17$value.colorStr, pixels = _step17$value.pixels;
|
|
23669
23693
|
(_colorMap$colorStr = colorMap[colorStr]) !== null && _colorMap$colorStr !== void 0 ? _colorMap$colorStr : colorMap[colorStr] = {
|
|
23670
23694
|
top: [],
|
|
23671
23695
|
right: [],
|
|
@@ -23686,9 +23710,9 @@
|
|
|
23686
23710
|
}
|
|
23687
23711
|
}
|
|
23688
23712
|
} catch (err) {
|
|
23689
|
-
|
|
23713
|
+
_iterator17.e(err);
|
|
23690
23714
|
} finally {
|
|
23691
|
-
|
|
23715
|
+
_iterator17.f();
|
|
23692
23716
|
}
|
|
23693
23717
|
return colorMap;
|
|
23694
23718
|
}
|
|
@@ -23765,10 +23789,10 @@
|
|
|
23765
23789
|
assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
|
|
23766
23790
|
var thinShadows = [];
|
|
23767
23791
|
var shadows = _parseTextShadows(textShadow);
|
|
23768
|
-
var
|
|
23792
|
+
var _iterator18 = _createForOfIteratorHelper(shadows), _step18;
|
|
23769
23793
|
try {
|
|
23770
|
-
for (
|
|
23771
|
-
var shadow =
|
|
23794
|
+
for (_iterator18.s(); !(_step18 = _iterator18.n()).done; ) {
|
|
23795
|
+
var shadow = _step18.value;
|
|
23772
23796
|
var colorStr = shadow.colorStr || style.getPropertyValue('color');
|
|
23773
23797
|
var _shadow$pixels = _slicedToArray(shadow.pixels, 3), offsetX = _shadow$pixels[0], offsetY = _shadow$pixels[1], _shadow$pixels$ = _shadow$pixels[2], blurRadius = _shadow$pixels$ === void 0 ? 0 : _shadow$pixels$;
|
|
23774
23798
|
if (maxRatio && blurRadius >= fontSize * maxRatio) {
|
|
@@ -23801,9 +23825,9 @@
|
|
|
23801
23825
|
shadowColors.push(_color3);
|
|
23802
23826
|
}
|
|
23803
23827
|
} catch (err) {
|
|
23804
|
-
|
|
23828
|
+
_iterator18.e(err);
|
|
23805
23829
|
} finally {
|
|
23806
|
-
|
|
23830
|
+
_iterator18.f();
|
|
23807
23831
|
}
|
|
23808
23832
|
if (thinShadows.length > 0) {
|
|
23809
23833
|
var strokeColors = _getStrokeColorsFromShadows(thinShadows, {
|
|
@@ -24131,11 +24155,11 @@
|
|
|
24131
24155
|
return fgColor;
|
|
24132
24156
|
}
|
|
24133
24157
|
function findNodeInContexts(contexts, node) {
|
|
24134
|
-
var
|
|
24158
|
+
var _iterator19 = _createForOfIteratorHelper(contexts), _step19;
|
|
24135
24159
|
try {
|
|
24136
|
-
for (
|
|
24160
|
+
for (_iterator19.s(); !(_step19 = _iterator19.n()).done; ) {
|
|
24137
24161
|
var _context$vNode;
|
|
24138
|
-
var context =
|
|
24162
|
+
var context = _step19.value;
|
|
24139
24163
|
if (((_context$vNode = context.vNode) === null || _context$vNode === void 0 ? void 0 : _context$vNode.actualNode) === node) {
|
|
24140
24164
|
return context;
|
|
24141
24165
|
}
|
|
@@ -24145,9 +24169,9 @@
|
|
|
24145
24169
|
}
|
|
24146
24170
|
}
|
|
24147
24171
|
} catch (err) {
|
|
24148
|
-
|
|
24172
|
+
_iterator19.e(err);
|
|
24149
24173
|
} finally {
|
|
24150
|
-
|
|
24174
|
+
_iterator19.f();
|
|
24151
24175
|
}
|
|
24152
24176
|
}
|
|
24153
24177
|
function hasValidContrastRatio(bg, fg, fontSize, isBold) {
|
|
@@ -24491,10 +24515,10 @@
|
|
|
24491
24515
|
function filterByElmsOverlap(vNode, nearbyElms) {
|
|
24492
24516
|
var fullyObscuringElms = [];
|
|
24493
24517
|
var partialObscuringElms = [];
|
|
24494
|
-
var
|
|
24518
|
+
var _iterator20 = _createForOfIteratorHelper(nearbyElms), _step20;
|
|
24495
24519
|
try {
|
|
24496
|
-
for (
|
|
24497
|
-
var vNeighbor =
|
|
24520
|
+
for (_iterator20.s(); !(_step20 = _iterator20.n()).done; ) {
|
|
24521
|
+
var vNeighbor = _step20.value;
|
|
24498
24522
|
if (!isDescendantNotInTabOrder2(vNode, vNeighbor) && _hasVisualOverlap(vNode, vNeighbor) && getCssPointerEvents(vNeighbor) !== 'none') {
|
|
24499
24523
|
if (isEnclosedRect2(vNode, vNeighbor)) {
|
|
24500
24524
|
fullyObscuringElms.push(vNeighbor);
|
|
@@ -24504,9 +24528,9 @@
|
|
|
24504
24528
|
}
|
|
24505
24529
|
}
|
|
24506
24530
|
} catch (err) {
|
|
24507
|
-
|
|
24531
|
+
_iterator20.e(err);
|
|
24508
24532
|
} finally {
|
|
24509
|
-
|
|
24533
|
+
_iterator20.f();
|
|
24510
24534
|
}
|
|
24511
24535
|
return {
|
|
24512
24536
|
fullyObscuringElms: fullyObscuringElms,
|
|
@@ -24579,10 +24603,10 @@
|
|
|
24579
24603
|
}
|
|
24580
24604
|
var closeNeighbors = [];
|
|
24581
24605
|
var closestOffset = minOffset;
|
|
24582
|
-
var
|
|
24606
|
+
var _iterator21 = _createForOfIteratorHelper(_findNearbyElms(vNode, minOffset)), _step21;
|
|
24583
24607
|
try {
|
|
24584
|
-
for (
|
|
24585
|
-
var vNeighbor =
|
|
24608
|
+
for (_iterator21.s(); !(_step21 = _iterator21.n()).done; ) {
|
|
24609
|
+
var vNeighbor = _step21.value;
|
|
24586
24610
|
if (get_role_type_default(vNeighbor) !== 'widget' || !_isFocusable(vNeighbor)) {
|
|
24587
24611
|
continue;
|
|
24588
24612
|
}
|
|
@@ -24611,9 +24635,9 @@
|
|
|
24611
24635
|
closeNeighbors.push(vNeighbor);
|
|
24612
24636
|
}
|
|
24613
24637
|
} catch (err) {
|
|
24614
|
-
|
|
24638
|
+
_iterator21.e(err);
|
|
24615
24639
|
} finally {
|
|
24616
|
-
|
|
24640
|
+
_iterator21.f();
|
|
24617
24641
|
}
|
|
24618
24642
|
if (closeNeighbors.length === 0) {
|
|
24619
24643
|
this.data({
|
|
@@ -24858,16 +24882,20 @@
|
|
|
24858
24882
|
}
|
|
24859
24883
|
var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
|
|
24860
24884
|
function noAutoplayAudioEvaluate(node, options) {
|
|
24885
|
+
var hasControls = node.hasAttribute('controls');
|
|
24886
|
+
if (node.hasAttribute('loop')) {
|
|
24887
|
+
return hasControls;
|
|
24888
|
+
}
|
|
24861
24889
|
if (!node.duration) {
|
|
24862
24890
|
console.warn('axe.utils.preloadMedia did not load metadata');
|
|
24863
24891
|
return void 0;
|
|
24864
24892
|
}
|
|
24865
24893
|
var _options$allowedDurat = options.allowedDuration, allowedDuration = _options$allowedDurat === void 0 ? 3 : _options$allowedDurat;
|
|
24866
24894
|
var playableDuration = getPlayableDuration(node);
|
|
24867
|
-
if (playableDuration <= allowedDuration
|
|
24895
|
+
if (playableDuration <= allowedDuration) {
|
|
24868
24896
|
return true;
|
|
24869
24897
|
}
|
|
24870
|
-
if (!
|
|
24898
|
+
if (!hasControls) {
|
|
24871
24899
|
return false;
|
|
24872
24900
|
}
|
|
24873
24901
|
return true;
|
|
@@ -25422,8 +25450,8 @@
|
|
|
25422
25450
|
}
|
|
25423
25451
|
var alt_space_value_evaluate_default = altSpaceValueEvaluate;
|
|
25424
25452
|
function tabindexEvaluate(node, options, virtualNode) {
|
|
25425
|
-
var tabIndex =
|
|
25426
|
-
return
|
|
25453
|
+
var tabIndex = parse_tabindex_default(virtualNode.attr('tabindex'));
|
|
25454
|
+
return tabIndex === null || tabIndex <= 0;
|
|
25427
25455
|
}
|
|
25428
25456
|
var tabindex_evaluate_default = tabindexEvaluate;
|
|
25429
25457
|
function noFocusableContentEvaluate(node, options, virtualNode) {
|
|
@@ -25467,8 +25495,8 @@
|
|
|
25467
25495
|
return retVal;
|
|
25468
25496
|
}
|
|
25469
25497
|
function usesUnreliableHidingStrategy(vNode) {
|
|
25470
|
-
var tabIndex =
|
|
25471
|
-
return
|
|
25498
|
+
var tabIndex = parse_tabindex_default(vNode.attr('tabindex'));
|
|
25499
|
+
return tabIndex !== null && tabIndex < 0;
|
|
25472
25500
|
}
|
|
25473
25501
|
function landmarkIsTopLevelEvaluate(node) {
|
|
25474
25502
|
var landmarks = get_aria_roles_by_type_default('landmark');
|
|
@@ -25540,9 +25568,7 @@
|
|
|
25540
25568
|
}
|
|
25541
25569
|
var focusable_not_tabbable_evaluate_default = focusableNotTabbableEvaluate;
|
|
25542
25570
|
function focusableNoNameEvaluate(node, options, virtualNode) {
|
|
25543
|
-
|
|
25544
|
-
var inFocusOrder = _isFocusable(virtualNode) && tabIndex > -1;
|
|
25545
|
-
if (!inFocusOrder) {
|
|
25571
|
+
if (!_isInTabOrder(virtualNode)) {
|
|
25546
25572
|
return false;
|
|
25547
25573
|
}
|
|
25548
25574
|
try {
|
|
@@ -26104,7 +26130,8 @@
|
|
|
26104
26130
|
navigation: true,
|
|
26105
26131
|
region: true,
|
|
26106
26132
|
search: false,
|
|
26107
|
-
status: true
|
|
26133
|
+
status: true,
|
|
26134
|
+
tabpanel: true
|
|
26108
26135
|
};
|
|
26109
26136
|
function validScrollableTagName(node) {
|
|
26110
26137
|
var nodeName2 = node.nodeName.toUpperCase();
|
|
@@ -26817,18 +26844,18 @@
|
|
|
26817
26844
|
if (Array.isArray(options[role])) {
|
|
26818
26845
|
allowed = unique_array_default(options[role].concat(allowed));
|
|
26819
26846
|
}
|
|
26820
|
-
var
|
|
26847
|
+
var _iterator22 = _createForOfIteratorHelper(virtualNode.attrNames), _step22;
|
|
26821
26848
|
try {
|
|
26822
|
-
for (
|
|
26823
|
-
var attrName =
|
|
26849
|
+
for (_iterator22.s(); !(_step22 = _iterator22.n()).done; ) {
|
|
26850
|
+
var attrName = _step22.value;
|
|
26824
26851
|
if (validate_attr_default(attrName) && !allowed.includes(attrName) && !ignoredAttrs(attrName, virtualNode.attr(attrName), virtualNode)) {
|
|
26825
26852
|
invalid.push(attrName);
|
|
26826
26853
|
}
|
|
26827
26854
|
}
|
|
26828
26855
|
} catch (err) {
|
|
26829
|
-
|
|
26856
|
+
_iterator22.e(err);
|
|
26830
26857
|
} finally {
|
|
26831
|
-
|
|
26858
|
+
_iterator22.f();
|
|
26832
26859
|
}
|
|
26833
26860
|
if (!invalid.length) {
|
|
26834
26861
|
return true;
|
|
@@ -27007,8 +27034,8 @@
|
|
|
27007
27034
|
}
|
|
27008
27035
|
var no_role_matches_default = noRoleMatches;
|
|
27009
27036
|
function noNegativeTabindexMatches(node, virtualNode) {
|
|
27010
|
-
var tabindex =
|
|
27011
|
-
return
|
|
27037
|
+
var tabindex = parse_tabindex_default(virtualNode.attr('tabindex'));
|
|
27038
|
+
return tabindex === null || tabindex >= 0;
|
|
27012
27039
|
}
|
|
27013
27040
|
var no_negative_tabindex_matches_default = noNegativeTabindexMatches;
|
|
27014
27041
|
function noNamingMethodMatches(node, virtualNode) {
|
|
@@ -27338,14 +27365,14 @@
|
|
|
27338
27365
|
return false;
|
|
27339
27366
|
}
|
|
27340
27367
|
var role = virtualNode.attr('role');
|
|
27341
|
-
var tabIndex = virtualNode.attr('tabindex');
|
|
27342
|
-
if (tabIndex
|
|
27368
|
+
var tabIndex = parse_tabindex_default(virtualNode.attr('tabindex'));
|
|
27369
|
+
if (tabIndex < 0 && role) {
|
|
27343
27370
|
var roleDef = standards_default.ariaRoles[role];
|
|
27344
27371
|
if (roleDef === void 0 || roleDef.type !== 'widget') {
|
|
27345
27372
|
return false;
|
|
27346
27373
|
}
|
|
27347
27374
|
}
|
|
27348
|
-
if (tabIndex
|
|
27375
|
+
if (tabIndex < 0 && virtualNode.actualNode && !_isVisibleOnScreen(virtualNode) && !_isVisibleToScreenReaders(virtualNode)) {
|
|
27349
27376
|
return false;
|
|
27350
27377
|
}
|
|
27351
27378
|
return true;
|
|
@@ -28190,10 +28217,10 @@
|
|
|
28190
28217
|
value: function setAllowedOrigins(allowedOrigins) {
|
|
28191
28218
|
var defaultOrigin = getDefaultOrigin();
|
|
28192
28219
|
this.allowedOrigins = [];
|
|
28193
|
-
var
|
|
28220
|
+
var _iterator23 = _createForOfIteratorHelper(allowedOrigins), _step23;
|
|
28194
28221
|
try {
|
|
28195
|
-
for (
|
|
28196
|
-
var origin =
|
|
28222
|
+
for (_iterator23.s(); !(_step23 = _iterator23.n()).done; ) {
|
|
28223
|
+
var origin = _step23.value;
|
|
28197
28224
|
if (origin === constants_default.allOrigins) {
|
|
28198
28225
|
this.allowedOrigins = [ '*' ];
|
|
28199
28226
|
return;
|
|
@@ -28204,9 +28231,9 @@
|
|
|
28204
28231
|
}
|
|
28205
28232
|
}
|
|
28206
28233
|
} catch (err) {
|
|
28207
|
-
|
|
28234
|
+
_iterator23.e(err);
|
|
28208
28235
|
} finally {
|
|
28209
|
-
|
|
28236
|
+
_iterator23.f();
|
|
28210
28237
|
}
|
|
28211
28238
|
}
|
|
28212
28239
|
}, {
|
|
@@ -28996,10 +29023,10 @@
|
|
|
28996
29023
|
}
|
|
28997
29024
|
function setFrameSpec(partialResults) {
|
|
28998
29025
|
var frameStack = [];
|
|
28999
|
-
var
|
|
29026
|
+
var _iterator24 = _createForOfIteratorHelper(partialResults), _step24;
|
|
29000
29027
|
try {
|
|
29001
|
-
for (
|
|
29002
|
-
var partialResult =
|
|
29028
|
+
for (_iterator24.s(); !(_step24 = _iterator24.n()).done; ) {
|
|
29029
|
+
var partialResult = _step24.value;
|
|
29003
29030
|
var frameSpec = frameStack.shift();
|
|
29004
29031
|
if (!partialResult) {
|
|
29005
29032
|
continue;
|
|
@@ -29009,9 +29036,9 @@
|
|
|
29009
29036
|
frameStack.unshift.apply(frameStack, _toConsumableArray(frameSpecs));
|
|
29010
29037
|
}
|
|
29011
29038
|
} catch (err) {
|
|
29012
|
-
|
|
29039
|
+
_iterator24.e(err);
|
|
29013
29040
|
} finally {
|
|
29014
|
-
|
|
29041
|
+
_iterator24.f();
|
|
29015
29042
|
}
|
|
29016
29043
|
}
|
|
29017
29044
|
function getMergedFrameSpecs(_ref149) {
|
|
@@ -29616,8 +29643,8 @@
|
|
|
29616
29643
|
help: 'Non-empty <td> elements in larger <table> must have an associated table header'
|
|
29617
29644
|
},
|
|
29618
29645
|
'td-headers-attr': {
|
|
29619
|
-
description: 'Ensure that each cell in a table that uses the headers attribute refers only to other
|
|
29620
|
-
help: 'Table
|
|
29646
|
+
description: 'Ensure that each cell in a table that uses the headers attribute refers only to other <th> elements in that table',
|
|
29647
|
+
help: 'Table cell headers attributes must refer to other <th> elements in the same table'
|
|
29621
29648
|
},
|
|
29622
29649
|
'th-has-data-cells': {
|
|
29623
29650
|
description: 'Ensure that <th> elements and elements with role=columnheader/rowheader have data cells they describe',
|
|
@@ -30262,7 +30289,7 @@
|
|
|
30262
30289
|
impact: 'critical',
|
|
30263
30290
|
messages: {
|
|
30264
30291
|
pass: 'The multimedia element has a captions track',
|
|
30265
|
-
incomplete: 'Check that captions
|
|
30292
|
+
incomplete: 'Check that captions are available for the element'
|
|
30266
30293
|
}
|
|
30267
30294
|
},
|
|
30268
30295
|
'frame-tested': {
|
|
@@ -30657,9 +30684,13 @@
|
|
|
30657
30684
|
'td-headers-attr': {
|
|
30658
30685
|
impact: 'serious',
|
|
30659
30686
|
messages: {
|
|
30660
|
-
pass: 'The headers attribute is exclusively used to refer to other cells in the table',
|
|
30687
|
+
pass: 'The headers attribute is exclusively used to refer to other header cells in the table',
|
|
30661
30688
|
incomplete: 'The headers attribute is empty',
|
|
30662
|
-
fail:
|
|
30689
|
+
fail: {
|
|
30690
|
+
'cell-header-not-in-table': 'The headers attribute is not exclusively used to refer to other header cells in the table',
|
|
30691
|
+
'cell-header-not-th': 'The headers attribute must refer to header cells, not data cells',
|
|
30692
|
+
'header-refs-self': 'The element with headers attribute refers to itself'
|
|
30693
|
+
}
|
|
30663
30694
|
}
|
|
30664
30695
|
},
|
|
30665
30696
|
'th-has-data-cells': {
|