axe-core 4.10.2 → 4.10.3-canary.491f4ec
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.d.ts +23 -4
- package/axe.js +180 -143
- package/axe.min.js +3 -3
- package/locales/_template.json +9 -5
- package/locales/de.json +19 -19
- package/locales/ko.json +4 -4
- package/locales/ru.json +1127 -0
- package/package.json +4 -3
- package/sri-history.json +401 -393
package/axe.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! axe v4.10.
|
|
2
|
-
* Copyright (c) 2015 -
|
|
1
|
+
/*! axe v4.10.3-canary.491f4ec
|
|
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.
|
|
25
|
+
axe.version = '4.10.3-canary.491f4ec';
|
|
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) {
|
|
@@ -27329,6 +27356,10 @@
|
|
|
27329
27356
|
if ([ 'textarea', 'input', 'select' ].includes(nodeName2) === false) {
|
|
27330
27357
|
return false;
|
|
27331
27358
|
}
|
|
27359
|
+
var ariaReadonly = virtualNode.attr('aria-readonly') || 'false';
|
|
27360
|
+
if (virtualNode.hasAttr('readonly') || ariaReadonly.toLowerCase() === 'true') {
|
|
27361
|
+
return false;
|
|
27362
|
+
}
|
|
27332
27363
|
var excludedInputTypes = [ 'submit', 'reset', 'button', 'hidden' ];
|
|
27333
27364
|
if (nodeName2 === 'input' && excludedInputTypes.includes(virtualNode.props.type)) {
|
|
27334
27365
|
return false;
|
|
@@ -27338,14 +27369,14 @@
|
|
|
27338
27369
|
return false;
|
|
27339
27370
|
}
|
|
27340
27371
|
var role = virtualNode.attr('role');
|
|
27341
|
-
var tabIndex = virtualNode.attr('tabindex');
|
|
27342
|
-
if (tabIndex
|
|
27372
|
+
var tabIndex = parse_tabindex_default(virtualNode.attr('tabindex'));
|
|
27373
|
+
if (tabIndex < 0 && role) {
|
|
27343
27374
|
var roleDef = standards_default.ariaRoles[role];
|
|
27344
27375
|
if (roleDef === void 0 || roleDef.type !== 'widget') {
|
|
27345
27376
|
return false;
|
|
27346
27377
|
}
|
|
27347
27378
|
}
|
|
27348
|
-
if (tabIndex
|
|
27379
|
+
if (tabIndex < 0 && virtualNode.actualNode && !_isVisibleOnScreen(virtualNode) && !_isVisibleToScreenReaders(virtualNode)) {
|
|
27349
27380
|
return false;
|
|
27350
27381
|
}
|
|
27351
27382
|
return true;
|
|
@@ -27836,16 +27867,18 @@
|
|
|
27836
27867
|
});
|
|
27837
27868
|
});
|
|
27838
27869
|
});
|
|
27839
|
-
q.defer(function(res) {
|
|
27840
|
-
return setTimeout(res, 0);
|
|
27841
|
-
});
|
|
27842
|
-
if (options.performanceTimer) {
|
|
27843
|
-
this._logRulePerformance();
|
|
27844
|
-
}
|
|
27845
27870
|
q.then(function() {
|
|
27846
|
-
|
|
27871
|
+
if (options.performanceTimer) {
|
|
27872
|
+
_this9._logRulePerformance();
|
|
27873
|
+
}
|
|
27874
|
+
setTimeout(function() {
|
|
27875
|
+
resolve(ruleResult);
|
|
27876
|
+
}, 0);
|
|
27847
27877
|
})['catch'](function(error) {
|
|
27848
|
-
|
|
27878
|
+
if (options.performanceTimer) {
|
|
27879
|
+
_this9._logRulePerformance();
|
|
27880
|
+
}
|
|
27881
|
+
reject(error);
|
|
27849
27882
|
});
|
|
27850
27883
|
};
|
|
27851
27884
|
Rule.prototype.runSync = function runSync2(context) {
|
|
@@ -28188,10 +28221,10 @@
|
|
|
28188
28221
|
value: function setAllowedOrigins(allowedOrigins) {
|
|
28189
28222
|
var defaultOrigin = getDefaultOrigin();
|
|
28190
28223
|
this.allowedOrigins = [];
|
|
28191
|
-
var
|
|
28224
|
+
var _iterator23 = _createForOfIteratorHelper(allowedOrigins), _step23;
|
|
28192
28225
|
try {
|
|
28193
|
-
for (
|
|
28194
|
-
var origin =
|
|
28226
|
+
for (_iterator23.s(); !(_step23 = _iterator23.n()).done; ) {
|
|
28227
|
+
var origin = _step23.value;
|
|
28195
28228
|
if (origin === constants_default.allOrigins) {
|
|
28196
28229
|
this.allowedOrigins = [ '*' ];
|
|
28197
28230
|
return;
|
|
@@ -28202,9 +28235,9 @@
|
|
|
28202
28235
|
}
|
|
28203
28236
|
}
|
|
28204
28237
|
} catch (err) {
|
|
28205
|
-
|
|
28238
|
+
_iterator23.e(err);
|
|
28206
28239
|
} finally {
|
|
28207
|
-
|
|
28240
|
+
_iterator23.f();
|
|
28208
28241
|
}
|
|
28209
28242
|
}
|
|
28210
28243
|
}, {
|
|
@@ -28994,10 +29027,10 @@
|
|
|
28994
29027
|
}
|
|
28995
29028
|
function setFrameSpec(partialResults) {
|
|
28996
29029
|
var frameStack = [];
|
|
28997
|
-
var
|
|
29030
|
+
var _iterator24 = _createForOfIteratorHelper(partialResults), _step24;
|
|
28998
29031
|
try {
|
|
28999
|
-
for (
|
|
29000
|
-
var partialResult =
|
|
29032
|
+
for (_iterator24.s(); !(_step24 = _iterator24.n()).done; ) {
|
|
29033
|
+
var partialResult = _step24.value;
|
|
29001
29034
|
var frameSpec = frameStack.shift();
|
|
29002
29035
|
if (!partialResult) {
|
|
29003
29036
|
continue;
|
|
@@ -29007,9 +29040,9 @@
|
|
|
29007
29040
|
frameStack.unshift.apply(frameStack, _toConsumableArray(frameSpecs));
|
|
29008
29041
|
}
|
|
29009
29042
|
} catch (err) {
|
|
29010
|
-
|
|
29043
|
+
_iterator24.e(err);
|
|
29011
29044
|
} finally {
|
|
29012
|
-
|
|
29045
|
+
_iterator24.f();
|
|
29013
29046
|
}
|
|
29014
29047
|
}
|
|
29015
29048
|
function getMergedFrameSpecs(_ref149) {
|
|
@@ -29614,8 +29647,8 @@
|
|
|
29614
29647
|
help: 'Non-empty <td> elements in larger <table> must have an associated table header'
|
|
29615
29648
|
},
|
|
29616
29649
|
'td-headers-attr': {
|
|
29617
|
-
description: 'Ensure that each cell in a table that uses the headers attribute refers only to other
|
|
29618
|
-
help: 'Table
|
|
29650
|
+
description: 'Ensure that each cell in a table that uses the headers attribute refers only to other <th> elements in that table',
|
|
29651
|
+
help: 'Table cell headers attributes must refer to other <th> elements in the same table'
|
|
29619
29652
|
},
|
|
29620
29653
|
'th-has-data-cells': {
|
|
29621
29654
|
description: 'Ensure that <th> elements and elements with role=columnheader/rowheader have data cells they describe',
|
|
@@ -30260,7 +30293,7 @@
|
|
|
30260
30293
|
impact: 'critical',
|
|
30261
30294
|
messages: {
|
|
30262
30295
|
pass: 'The multimedia element has a captions track',
|
|
30263
|
-
incomplete: 'Check that captions
|
|
30296
|
+
incomplete: 'Check that captions are available for the element'
|
|
30264
30297
|
}
|
|
30265
30298
|
},
|
|
30266
30299
|
'frame-tested': {
|
|
@@ -30655,9 +30688,13 @@
|
|
|
30655
30688
|
'td-headers-attr': {
|
|
30656
30689
|
impact: 'serious',
|
|
30657
30690
|
messages: {
|
|
30658
|
-
pass: 'The headers attribute is exclusively used to refer to other cells in the table',
|
|
30691
|
+
pass: 'The headers attribute is exclusively used to refer to other header cells in the table',
|
|
30659
30692
|
incomplete: 'The headers attribute is empty',
|
|
30660
|
-
fail:
|
|
30693
|
+
fail: {
|
|
30694
|
+
'cell-header-not-in-table': 'The headers attribute is not exclusively used to refer to other header cells in the table',
|
|
30695
|
+
'cell-header-not-th': 'The headers attribute must refer to header cells, not data cells',
|
|
30696
|
+
'header-refs-self': 'The element with headers attribute refers to itself'
|
|
30697
|
+
}
|
|
30661
30698
|
}
|
|
30662
30699
|
},
|
|
30663
30700
|
'th-has-data-cells': {
|