axe-core 4.10.2-canary.d260ea8 → 4.10.2-canary.ec7c6c8
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/axe.js +115 -99
- package/axe.min.js +2 -2
- package/locales/_template.json +8 -4
- package/locales/de.json +3 -3
- package/locales/ru.json +7 -3
- package/package.json +1 -1
- package/sri-history.json +3 -3
package/axe.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! axe v4.10.2-canary.
|
|
1
|
+
/*! axe v4.10.2-canary.ec7c6c8
|
|
2
2
|
* Copyright (c) 2015 - 2024 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(o);
|
|
23
23
|
}
|
|
24
24
|
var axe = axe || {};
|
|
25
|
-
axe.version = '4.10.2-canary.
|
|
25
|
+
axe.version = '4.10.2-canary.ec7c6c8';
|
|
26
26
|
if (typeof define === 'function' && define.amd) {
|
|
27
27
|
define('axe-core', [], function() {
|
|
28
28
|
return axe;
|
|
@@ -20505,54 +20505,6 @@
|
|
|
20505
20505
|
return out ? true : void 0;
|
|
20506
20506
|
}
|
|
20507
20507
|
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
20508
|
var aria_exports = {};
|
|
20557
20509
|
__export(aria_exports, {
|
|
20558
20510
|
allowedAttr: function allowedAttr() {
|
|
@@ -22774,6 +22726,66 @@
|
|
|
22774
22726
|
return !!attrDefinition;
|
|
22775
22727
|
}
|
|
22776
22728
|
var validate_attr_default = validateAttr;
|
|
22729
|
+
var messageKeys = [ 'cell-header-not-in-table', 'cell-header-not-th', 'header-refs-self', 'empty-hdrs' ];
|
|
22730
|
+
var notInTable = messageKeys[0], notTh = messageKeys[1], selfRef = messageKeys[2], emptyHdrs = messageKeys[3];
|
|
22731
|
+
function tdHeadersAttrEvaluate(node) {
|
|
22732
|
+
var cells = [];
|
|
22733
|
+
var cellRoleById = {};
|
|
22734
|
+
for (var rowIndex = 0; rowIndex < node.rows.length; rowIndex++) {
|
|
22735
|
+
var row = node.rows[rowIndex];
|
|
22736
|
+
for (var cellIndex = 0; cellIndex < row.cells.length; cellIndex++) {
|
|
22737
|
+
var cell = row.cells[cellIndex];
|
|
22738
|
+
cells.push(cell);
|
|
22739
|
+
var cellId = cell.getAttribute('id');
|
|
22740
|
+
if (cellId) {
|
|
22741
|
+
cellRoleById[cellId] = get_role_default(cell);
|
|
22742
|
+
}
|
|
22743
|
+
}
|
|
22744
|
+
}
|
|
22745
|
+
var badCells = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, selfRef, new Set()), notInTable, new Set()), notTh, new Set()), emptyHdrs, new Set());
|
|
22746
|
+
cells.forEach(function(cell) {
|
|
22747
|
+
if (!cell.hasAttribute('headers') || !_isVisibleToScreenReaders(cell)) {
|
|
22748
|
+
return;
|
|
22749
|
+
}
|
|
22750
|
+
var headersAttr = cell.getAttribute('headers').trim();
|
|
22751
|
+
if (!headersAttr) {
|
|
22752
|
+
badCells[emptyHdrs].add(cell);
|
|
22753
|
+
return;
|
|
22754
|
+
}
|
|
22755
|
+
var cellId = cell.getAttribute('id');
|
|
22756
|
+
var headers = token_list_default(headersAttr);
|
|
22757
|
+
headers.forEach(function(headerId) {
|
|
22758
|
+
if (cellId && headerId === cellId) {
|
|
22759
|
+
badCells[selfRef].add(cell);
|
|
22760
|
+
} else if (!cellRoleById[headerId]) {
|
|
22761
|
+
badCells[notInTable].add(cell);
|
|
22762
|
+
} else if (![ 'columnheader', 'rowheader' ].includes(cellRoleById[headerId])) {
|
|
22763
|
+
badCells[notTh].add(cell);
|
|
22764
|
+
}
|
|
22765
|
+
});
|
|
22766
|
+
});
|
|
22767
|
+
var _iterator15 = _createForOfIteratorHelper(messageKeys), _step15;
|
|
22768
|
+
try {
|
|
22769
|
+
for (_iterator15.s(); !(_step15 = _iterator15.n()).done; ) {
|
|
22770
|
+
var messageKey = _step15.value;
|
|
22771
|
+
if (badCells[messageKey].size > 0) {
|
|
22772
|
+
this.relatedNodes(_toConsumableArray(badCells[messageKey]));
|
|
22773
|
+
if (messageKey === emptyHdrs) {
|
|
22774
|
+
return void 0;
|
|
22775
|
+
}
|
|
22776
|
+
this.data({
|
|
22777
|
+
messageKey: messageKey
|
|
22778
|
+
});
|
|
22779
|
+
return false;
|
|
22780
|
+
}
|
|
22781
|
+
}
|
|
22782
|
+
} catch (err) {
|
|
22783
|
+
_iterator15.e(err);
|
|
22784
|
+
} finally {
|
|
22785
|
+
_iterator15.f();
|
|
22786
|
+
}
|
|
22787
|
+
return true;
|
|
22788
|
+
}
|
|
22777
22789
|
function tdHasHeaderEvaluate(node) {
|
|
22778
22790
|
var badCells = [];
|
|
22779
22791
|
var cells = get_all_cells_default(node);
|
|
@@ -23162,19 +23174,19 @@
|
|
|
23162
23174
|
return;
|
|
23163
23175
|
}
|
|
23164
23176
|
var frameAncestry = r.node.ancestry.slice(0, -1);
|
|
23165
|
-
var
|
|
23177
|
+
var _iterator16 = _createForOfIteratorHelper(iframeResults), _step16;
|
|
23166
23178
|
try {
|
|
23167
|
-
for (
|
|
23168
|
-
var iframeResult =
|
|
23179
|
+
for (_iterator16.s(); !(_step16 = _iterator16.n()).done; ) {
|
|
23180
|
+
var iframeResult = _step16.value;
|
|
23169
23181
|
if (_matchAncestry(frameAncestry, iframeResult.node.ancestry)) {
|
|
23170
23182
|
r.result = iframeResult.result;
|
|
23171
23183
|
break;
|
|
23172
23184
|
}
|
|
23173
23185
|
}
|
|
23174
23186
|
} catch (err) {
|
|
23175
|
-
|
|
23187
|
+
_iterator16.e(err);
|
|
23176
23188
|
} finally {
|
|
23177
|
-
|
|
23189
|
+
_iterator16.f();
|
|
23178
23190
|
}
|
|
23179
23191
|
});
|
|
23180
23192
|
iframeResults.forEach(function(r) {
|
|
@@ -23661,11 +23673,11 @@
|
|
|
23661
23673
|
}
|
|
23662
23674
|
function getShadowColorsMap(parsedShadows) {
|
|
23663
23675
|
var colorMap = {};
|
|
23664
|
-
var
|
|
23676
|
+
var _iterator17 = _createForOfIteratorHelper(parsedShadows), _step17;
|
|
23665
23677
|
try {
|
|
23666
|
-
for (
|
|
23678
|
+
for (_iterator17.s(); !(_step17 = _iterator17.n()).done; ) {
|
|
23667
23679
|
var _colorMap$colorStr;
|
|
23668
|
-
var
|
|
23680
|
+
var _step17$value = _step17.value, colorStr = _step17$value.colorStr, pixels = _step17$value.pixels;
|
|
23669
23681
|
(_colorMap$colorStr = colorMap[colorStr]) !== null && _colorMap$colorStr !== void 0 ? _colorMap$colorStr : colorMap[colorStr] = {
|
|
23670
23682
|
top: [],
|
|
23671
23683
|
right: [],
|
|
@@ -23686,9 +23698,9 @@
|
|
|
23686
23698
|
}
|
|
23687
23699
|
}
|
|
23688
23700
|
} catch (err) {
|
|
23689
|
-
|
|
23701
|
+
_iterator17.e(err);
|
|
23690
23702
|
} finally {
|
|
23691
|
-
|
|
23703
|
+
_iterator17.f();
|
|
23692
23704
|
}
|
|
23693
23705
|
return colorMap;
|
|
23694
23706
|
}
|
|
@@ -23765,10 +23777,10 @@
|
|
|
23765
23777
|
assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
|
|
23766
23778
|
var thinShadows = [];
|
|
23767
23779
|
var shadows = _parseTextShadows(textShadow);
|
|
23768
|
-
var
|
|
23780
|
+
var _iterator18 = _createForOfIteratorHelper(shadows), _step18;
|
|
23769
23781
|
try {
|
|
23770
|
-
for (
|
|
23771
|
-
var shadow =
|
|
23782
|
+
for (_iterator18.s(); !(_step18 = _iterator18.n()).done; ) {
|
|
23783
|
+
var shadow = _step18.value;
|
|
23772
23784
|
var colorStr = shadow.colorStr || style.getPropertyValue('color');
|
|
23773
23785
|
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
23786
|
if (maxRatio && blurRadius >= fontSize * maxRatio) {
|
|
@@ -23801,9 +23813,9 @@
|
|
|
23801
23813
|
shadowColors.push(_color3);
|
|
23802
23814
|
}
|
|
23803
23815
|
} catch (err) {
|
|
23804
|
-
|
|
23816
|
+
_iterator18.e(err);
|
|
23805
23817
|
} finally {
|
|
23806
|
-
|
|
23818
|
+
_iterator18.f();
|
|
23807
23819
|
}
|
|
23808
23820
|
if (thinShadows.length > 0) {
|
|
23809
23821
|
var strokeColors = _getStrokeColorsFromShadows(thinShadows, {
|
|
@@ -24131,11 +24143,11 @@
|
|
|
24131
24143
|
return fgColor;
|
|
24132
24144
|
}
|
|
24133
24145
|
function findNodeInContexts(contexts, node) {
|
|
24134
|
-
var
|
|
24146
|
+
var _iterator19 = _createForOfIteratorHelper(contexts), _step19;
|
|
24135
24147
|
try {
|
|
24136
|
-
for (
|
|
24148
|
+
for (_iterator19.s(); !(_step19 = _iterator19.n()).done; ) {
|
|
24137
24149
|
var _context$vNode;
|
|
24138
|
-
var context =
|
|
24150
|
+
var context = _step19.value;
|
|
24139
24151
|
if (((_context$vNode = context.vNode) === null || _context$vNode === void 0 ? void 0 : _context$vNode.actualNode) === node) {
|
|
24140
24152
|
return context;
|
|
24141
24153
|
}
|
|
@@ -24145,9 +24157,9 @@
|
|
|
24145
24157
|
}
|
|
24146
24158
|
}
|
|
24147
24159
|
} catch (err) {
|
|
24148
|
-
|
|
24160
|
+
_iterator19.e(err);
|
|
24149
24161
|
} finally {
|
|
24150
|
-
|
|
24162
|
+
_iterator19.f();
|
|
24151
24163
|
}
|
|
24152
24164
|
}
|
|
24153
24165
|
function hasValidContrastRatio(bg, fg, fontSize, isBold) {
|
|
@@ -24491,10 +24503,10 @@
|
|
|
24491
24503
|
function filterByElmsOverlap(vNode, nearbyElms) {
|
|
24492
24504
|
var fullyObscuringElms = [];
|
|
24493
24505
|
var partialObscuringElms = [];
|
|
24494
|
-
var
|
|
24506
|
+
var _iterator20 = _createForOfIteratorHelper(nearbyElms), _step20;
|
|
24495
24507
|
try {
|
|
24496
|
-
for (
|
|
24497
|
-
var vNeighbor =
|
|
24508
|
+
for (_iterator20.s(); !(_step20 = _iterator20.n()).done; ) {
|
|
24509
|
+
var vNeighbor = _step20.value;
|
|
24498
24510
|
if (!isDescendantNotInTabOrder2(vNode, vNeighbor) && _hasVisualOverlap(vNode, vNeighbor) && getCssPointerEvents(vNeighbor) !== 'none') {
|
|
24499
24511
|
if (isEnclosedRect2(vNode, vNeighbor)) {
|
|
24500
24512
|
fullyObscuringElms.push(vNeighbor);
|
|
@@ -24504,9 +24516,9 @@
|
|
|
24504
24516
|
}
|
|
24505
24517
|
}
|
|
24506
24518
|
} catch (err) {
|
|
24507
|
-
|
|
24519
|
+
_iterator20.e(err);
|
|
24508
24520
|
} finally {
|
|
24509
|
-
|
|
24521
|
+
_iterator20.f();
|
|
24510
24522
|
}
|
|
24511
24523
|
return {
|
|
24512
24524
|
fullyObscuringElms: fullyObscuringElms,
|
|
@@ -24579,10 +24591,10 @@
|
|
|
24579
24591
|
}
|
|
24580
24592
|
var closeNeighbors = [];
|
|
24581
24593
|
var closestOffset = minOffset;
|
|
24582
|
-
var
|
|
24594
|
+
var _iterator21 = _createForOfIteratorHelper(_findNearbyElms(vNode, minOffset)), _step21;
|
|
24583
24595
|
try {
|
|
24584
|
-
for (
|
|
24585
|
-
var vNeighbor =
|
|
24596
|
+
for (_iterator21.s(); !(_step21 = _iterator21.n()).done; ) {
|
|
24597
|
+
var vNeighbor = _step21.value;
|
|
24586
24598
|
if (get_role_type_default(vNeighbor) !== 'widget' || !_isFocusable(vNeighbor)) {
|
|
24587
24599
|
continue;
|
|
24588
24600
|
}
|
|
@@ -24611,9 +24623,9 @@
|
|
|
24611
24623
|
closeNeighbors.push(vNeighbor);
|
|
24612
24624
|
}
|
|
24613
24625
|
} catch (err) {
|
|
24614
|
-
|
|
24626
|
+
_iterator21.e(err);
|
|
24615
24627
|
} finally {
|
|
24616
|
-
|
|
24628
|
+
_iterator21.f();
|
|
24617
24629
|
}
|
|
24618
24630
|
if (closeNeighbors.length === 0) {
|
|
24619
24631
|
this.data({
|
|
@@ -26817,18 +26829,18 @@
|
|
|
26817
26829
|
if (Array.isArray(options[role])) {
|
|
26818
26830
|
allowed = unique_array_default(options[role].concat(allowed));
|
|
26819
26831
|
}
|
|
26820
|
-
var
|
|
26832
|
+
var _iterator22 = _createForOfIteratorHelper(virtualNode.attrNames), _step22;
|
|
26821
26833
|
try {
|
|
26822
|
-
for (
|
|
26823
|
-
var attrName =
|
|
26834
|
+
for (_iterator22.s(); !(_step22 = _iterator22.n()).done; ) {
|
|
26835
|
+
var attrName = _step22.value;
|
|
26824
26836
|
if (validate_attr_default(attrName) && !allowed.includes(attrName) && !ignoredAttrs(attrName, virtualNode.attr(attrName), virtualNode)) {
|
|
26825
26837
|
invalid.push(attrName);
|
|
26826
26838
|
}
|
|
26827
26839
|
}
|
|
26828
26840
|
} catch (err) {
|
|
26829
|
-
|
|
26841
|
+
_iterator22.e(err);
|
|
26830
26842
|
} finally {
|
|
26831
|
-
|
|
26843
|
+
_iterator22.f();
|
|
26832
26844
|
}
|
|
26833
26845
|
if (!invalid.length) {
|
|
26834
26846
|
return true;
|
|
@@ -28190,10 +28202,10 @@
|
|
|
28190
28202
|
value: function setAllowedOrigins(allowedOrigins) {
|
|
28191
28203
|
var defaultOrigin = getDefaultOrigin();
|
|
28192
28204
|
this.allowedOrigins = [];
|
|
28193
|
-
var
|
|
28205
|
+
var _iterator23 = _createForOfIteratorHelper(allowedOrigins), _step23;
|
|
28194
28206
|
try {
|
|
28195
|
-
for (
|
|
28196
|
-
var origin =
|
|
28207
|
+
for (_iterator23.s(); !(_step23 = _iterator23.n()).done; ) {
|
|
28208
|
+
var origin = _step23.value;
|
|
28197
28209
|
if (origin === constants_default.allOrigins) {
|
|
28198
28210
|
this.allowedOrigins = [ '*' ];
|
|
28199
28211
|
return;
|
|
@@ -28204,9 +28216,9 @@
|
|
|
28204
28216
|
}
|
|
28205
28217
|
}
|
|
28206
28218
|
} catch (err) {
|
|
28207
|
-
|
|
28219
|
+
_iterator23.e(err);
|
|
28208
28220
|
} finally {
|
|
28209
|
-
|
|
28221
|
+
_iterator23.f();
|
|
28210
28222
|
}
|
|
28211
28223
|
}
|
|
28212
28224
|
}, {
|
|
@@ -28996,10 +29008,10 @@
|
|
|
28996
29008
|
}
|
|
28997
29009
|
function setFrameSpec(partialResults) {
|
|
28998
29010
|
var frameStack = [];
|
|
28999
|
-
var
|
|
29011
|
+
var _iterator24 = _createForOfIteratorHelper(partialResults), _step24;
|
|
29000
29012
|
try {
|
|
29001
|
-
for (
|
|
29002
|
-
var partialResult =
|
|
29013
|
+
for (_iterator24.s(); !(_step24 = _iterator24.n()).done; ) {
|
|
29014
|
+
var partialResult = _step24.value;
|
|
29003
29015
|
var frameSpec = frameStack.shift();
|
|
29004
29016
|
if (!partialResult) {
|
|
29005
29017
|
continue;
|
|
@@ -29009,9 +29021,9 @@
|
|
|
29009
29021
|
frameStack.unshift.apply(frameStack, _toConsumableArray(frameSpecs));
|
|
29010
29022
|
}
|
|
29011
29023
|
} catch (err) {
|
|
29012
|
-
|
|
29024
|
+
_iterator24.e(err);
|
|
29013
29025
|
} finally {
|
|
29014
|
-
|
|
29026
|
+
_iterator24.f();
|
|
29015
29027
|
}
|
|
29016
29028
|
}
|
|
29017
29029
|
function getMergedFrameSpecs(_ref149) {
|
|
@@ -29616,8 +29628,8 @@
|
|
|
29616
29628
|
help: 'Non-empty <td> elements in larger <table> must have an associated table header'
|
|
29617
29629
|
},
|
|
29618
29630
|
'td-headers-attr': {
|
|
29619
|
-
description: 'Ensure that each cell in a table that uses the headers attribute refers only to other
|
|
29620
|
-
help: 'Table
|
|
29631
|
+
description: 'Ensure that each cell in a table that uses the headers attribute refers only to other <th> elements in that table',
|
|
29632
|
+
help: 'Table cell headers attributes must refer to other <th> elements in the same table'
|
|
29621
29633
|
},
|
|
29622
29634
|
'th-has-data-cells': {
|
|
29623
29635
|
description: 'Ensure that <th> elements and elements with role=columnheader/rowheader have data cells they describe',
|
|
@@ -30657,9 +30669,13 @@
|
|
|
30657
30669
|
'td-headers-attr': {
|
|
30658
30670
|
impact: 'serious',
|
|
30659
30671
|
messages: {
|
|
30660
|
-
pass: 'The headers attribute is exclusively used to refer to other cells in the table',
|
|
30672
|
+
pass: 'The headers attribute is exclusively used to refer to other header cells in the table',
|
|
30661
30673
|
incomplete: 'The headers attribute is empty',
|
|
30662
|
-
fail:
|
|
30674
|
+
fail: {
|
|
30675
|
+
'cell-header-not-in-table': 'The headers attribute is not exclusively used to refer to other header cells in the table',
|
|
30676
|
+
'cell-header-not-th': 'The headers attribute must refer to header cells, not data cells',
|
|
30677
|
+
'header-refs-self': 'The element with headers attribute refers to itself'
|
|
30678
|
+
}
|
|
30663
30679
|
}
|
|
30664
30680
|
},
|
|
30665
30681
|
'th-has-data-cells': {
|