axe-core 4.4.3-canary.a2c2d2f → 4.4.3-canary.b16f553
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 +31 -16
- package/axe.min.js +2 -2
- package/locales/_template.json +1 -1
- package/package.json +1 -1
- package/sri-history.json +3 -3
package/axe.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! axe v4.4.3-canary.
|
|
1
|
+
/*! axe v4.4.3-canary.b16f553
|
|
2
2
|
* Copyright (c) 2022 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.4.3-canary.
|
|
25
|
+
axe.version = '4.4.3-canary.b16f553';
|
|
26
26
|
if (typeof define === 'function' && define.amd) {
|
|
27
27
|
define('axe-core', [], function() {
|
|
28
28
|
return axe;
|
|
@@ -12973,9 +12973,11 @@
|
|
|
12973
12973
|
}
|
|
12974
12974
|
var get_cell_position_default = memoize_default(getCellPosition);
|
|
12975
12975
|
function getScope(cell) {
|
|
12976
|
-
var
|
|
12977
|
-
|
|
12978
|
-
|
|
12976
|
+
var vNode = cell instanceof abstract_virtual_node_default ? cell : get_node_from_tree_default(cell);
|
|
12977
|
+
cell = vNode.actualNode;
|
|
12978
|
+
var scope = vNode.attr('scope');
|
|
12979
|
+
var role = vNode.attr('role');
|
|
12980
|
+
if (![ 'td', 'th' ].includes(vNode.props.nodeName)) {
|
|
12979
12981
|
throw new TypeError('Expected TD or TH element');
|
|
12980
12982
|
}
|
|
12981
12983
|
if (role === 'columnheader') {
|
|
@@ -12984,8 +12986,10 @@
|
|
|
12984
12986
|
return 'row';
|
|
12985
12987
|
} else if (scope === 'col' || scope === 'row') {
|
|
12986
12988
|
return scope;
|
|
12987
|
-
} else if (
|
|
12989
|
+
} else if (vNode.props.nodeName !== 'th') {
|
|
12988
12990
|
return false;
|
|
12991
|
+
} else if (!vNode.actualNode) {
|
|
12992
|
+
return 'auto';
|
|
12989
12993
|
}
|
|
12990
12994
|
var tableGrid = to_grid_default(find_up_default(cell, 'table'));
|
|
12991
12995
|
var pos = get_cell_position_default(cell, tableGrid);
|
|
@@ -13134,10 +13138,10 @@
|
|
|
13134
13138
|
textarea: 'textbox',
|
|
13135
13139
|
tfoot: 'rowgroup',
|
|
13136
13140
|
th: function th(vNode) {
|
|
13137
|
-
if (is_column_header_default(vNode
|
|
13141
|
+
if (is_column_header_default(vNode)) {
|
|
13138
13142
|
return 'columnheader';
|
|
13139
13143
|
}
|
|
13140
|
-
if (is_row_header_default(vNode
|
|
13144
|
+
if (is_row_header_default(vNode)) {
|
|
13141
13145
|
return 'rowheader';
|
|
13142
13146
|
}
|
|
13143
13147
|
},
|
|
@@ -20934,12 +20938,22 @@
|
|
|
20934
20938
|
return nodes;
|
|
20935
20939
|
}
|
|
20936
20940
|
Rule.prototype.after = function after(result, options) {
|
|
20941
|
+
var _this8 = this;
|
|
20937
20942
|
var afterChecks = findAfterChecks(this);
|
|
20938
20943
|
var ruleID = this.id;
|
|
20939
20944
|
afterChecks.forEach(function(check) {
|
|
20940
20945
|
var beforeResults = findCheckResults(result.nodes, check.id);
|
|
20941
20946
|
var option = get_check_option_default(check, ruleID, options);
|
|
20942
20947
|
var afterResults = check.after(beforeResults, option);
|
|
20948
|
+
if (_this8.reviewOnFail) {
|
|
20949
|
+
afterResults.forEach(function(checkResult) {
|
|
20950
|
+
var changeAnyAllResults = (_this8.any.includes(checkResult.id) || _this8.all.includes(checkResult.id)) && checkResult.result === false;
|
|
20951
|
+
var changeNoneResult = _this8.none.includes(checkResult.id) && checkResult.result === true;
|
|
20952
|
+
if (changeAnyAllResults || changeNoneResult) {
|
|
20953
|
+
checkResult.result = void 0;
|
|
20954
|
+
}
|
|
20955
|
+
});
|
|
20956
|
+
}
|
|
20943
20957
|
beforeResults.forEach(function(item) {
|
|
20944
20958
|
delete item.node;
|
|
20945
20959
|
if (afterResults.indexOf(item) === -1) {
|
|
@@ -21450,16 +21464,16 @@
|
|
|
21450
21464
|
}, {
|
|
21451
21465
|
key: '_constructHelpUrls',
|
|
21452
21466
|
value: function _constructHelpUrls() {
|
|
21453
|
-
var
|
|
21467
|
+
var _this9 = this;
|
|
21454
21468
|
var previous = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
21455
21469
|
var version = (axe.version.match(/^[1-9][0-9]*\.[0-9]+/) || [ 'x.y' ])[0];
|
|
21456
21470
|
this.rules.forEach(function(rule) {
|
|
21457
|
-
if (!
|
|
21458
|
-
|
|
21471
|
+
if (!_this9.data.rules[rule.id]) {
|
|
21472
|
+
_this9.data.rules[rule.id] = {};
|
|
21459
21473
|
}
|
|
21460
|
-
var metaData =
|
|
21474
|
+
var metaData = _this9.data.rules[rule.id];
|
|
21461
21475
|
if (typeof metaData.helpUrl !== 'string' || previous && metaData.helpUrl === getHelpUrl(previous, rule.id, version)) {
|
|
21462
|
-
metaData.helpUrl = getHelpUrl(
|
|
21476
|
+
metaData.helpUrl = getHelpUrl(_this9, rule.id, version);
|
|
21463
21477
|
}
|
|
21464
21478
|
});
|
|
21465
21479
|
}
|
|
@@ -22514,7 +22528,7 @@
|
|
|
22514
22528
|
},
|
|
22515
22529
|
'frame-title-unique': {
|
|
22516
22530
|
description: 'Ensures <iframe> and <frame> elements contain a unique title attribute',
|
|
22517
|
-
help: 'Frames
|
|
22531
|
+
help: 'Frames must have a unique title attribute'
|
|
22518
22532
|
},
|
|
22519
22533
|
'frame-title': {
|
|
22520
22534
|
description: 'Ensures <iframe> and <frame> elements have an accessible name',
|
|
@@ -24294,11 +24308,12 @@
|
|
|
24294
24308
|
id: 'frame-title-unique',
|
|
24295
24309
|
selector: 'frame[title], iframe[title]',
|
|
24296
24310
|
matches: 'frame-title-has-text-matches',
|
|
24297
|
-
tags: [ 'cat.text-alternatives', '
|
|
24311
|
+
tags: [ 'cat.text-alternatives', 'wcag412', 'wcag2a' ],
|
|
24298
24312
|
actIds: [ '4b1c6c' ],
|
|
24299
24313
|
all: [],
|
|
24300
24314
|
any: [],
|
|
24301
|
-
none: [ 'unique-frame-title' ]
|
|
24315
|
+
none: [ 'unique-frame-title' ],
|
|
24316
|
+
reviewOnFail: true
|
|
24302
24317
|
}, {
|
|
24303
24318
|
id: 'frame-title',
|
|
24304
24319
|
selector: 'frame, iframe',
|