axe-core 4.4.2-canary.1cae5ea → 4.4.2-canary.27031a8
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.d.ts +1 -0
- package/axe.js +113 -46
- package/axe.min.js +2 -2
- package/package.json +1 -1
- package/sri-history.json +3 -3
package/axe.d.ts
CHANGED
package/axe.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! axe v4.4.2-canary.
|
|
1
|
+
/*! axe v4.4.2-canary.27031a8
|
|
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.2-canary.
|
|
25
|
+
axe.version = '4.4.2-canary.27031a8';
|
|
26
26
|
if (typeof define === 'function' && define.amd) {
|
|
27
27
|
define('axe-core', [], function() {
|
|
28
28
|
return axe;
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
function _setPrototypeOf(o, p) {
|
|
85
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
85
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
86
86
|
o.__proto__ = p;
|
|
87
87
|
return o;
|
|
88
88
|
};
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
function _getPrototypeOf(o) {
|
|
136
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
136
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
137
137
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
138
138
|
};
|
|
139
139
|
return _getPrototypeOf(o);
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
function _extends() {
|
|
238
|
-
_extends = Object.assign
|
|
238
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
239
239
|
for (var i = 1; i < arguments.length; i++) {
|
|
240
240
|
var source = arguments[i];
|
|
241
241
|
for (var key in source) {
|
|
@@ -4617,8 +4617,8 @@
|
|
|
4617
4617
|
this.buffer._bytes[d] = tmp[i];
|
|
4618
4618
|
}
|
|
4619
4619
|
} else {
|
|
4620
|
-
for (i = 0, s = array.byteOffset, d = byteOffset; i < byteLength; i += 1,
|
|
4621
|
-
d += 1) {
|
|
4620
|
+
for (i = 0, s = array.byteOffset, d = byteOffset; i < byteLength; i += 1,
|
|
4621
|
+
s += 1, d += 1) {
|
|
4622
4622
|
this.buffer._bytes[d] = array.buffer._bytes[s];
|
|
4623
4623
|
}
|
|
4624
4624
|
}
|
|
@@ -18557,7 +18557,7 @@
|
|
|
18557
18557
|
if (_typeof(aValue) !== _typeof(bValue)) {
|
|
18558
18558
|
return false;
|
|
18559
18559
|
}
|
|
18560
|
-
if (
|
|
18560
|
+
if (_typeof(aValue) === 'object' || _typeof(bValue) === 'object') {
|
|
18561
18561
|
return isIdenticalObject(aValue, bValue);
|
|
18562
18562
|
}
|
|
18563
18563
|
return aValue === bValue;
|
|
@@ -19010,11 +19010,27 @@
|
|
|
19010
19010
|
});
|
|
19011
19011
|
}
|
|
19012
19012
|
var internal_link_present_evaluate_default = internalLinkPresentEvaluate;
|
|
19013
|
+
var separatorRegex = /[;,\s]/;
|
|
19014
|
+
var validRedirectNumRegex = /^[0-9.]+$/;
|
|
19013
19015
|
function metaRefreshEvaluate(node, options, virtualNode) {
|
|
19014
|
-
var
|
|
19015
|
-
|
|
19016
|
+
var _ref83 = options || {}, minDelay = _ref83.minDelay, maxDelay = _ref83.maxDelay;
|
|
19017
|
+
var content = (virtualNode.attr('content') || '').trim();
|
|
19018
|
+
var _content$split = content.split(separatorRegex), _content$split2 = _slicedToArray(_content$split, 1), redirectStr = _content$split2[0];
|
|
19019
|
+
if (!redirectStr.match(validRedirectNumRegex)) {
|
|
19020
|
+
return true;
|
|
19021
|
+
}
|
|
19022
|
+
var redirectDelay = parseFloat(redirectStr);
|
|
19023
|
+
this.data({
|
|
19024
|
+
redirectDelay: redirectDelay
|
|
19025
|
+
});
|
|
19026
|
+
if (typeof minDelay === 'number' && redirectDelay <= options.minDelay) {
|
|
19027
|
+
return true;
|
|
19028
|
+
}
|
|
19029
|
+
if (typeof maxDelay === 'number' && redirectDelay > options.maxDelay) {
|
|
19030
|
+
return true;
|
|
19031
|
+
}
|
|
19032
|
+
return false;
|
|
19016
19033
|
}
|
|
19017
|
-
var meta_refresh_evaluate_default = metaRefreshEvaluate;
|
|
19018
19034
|
function normalizeFontWeight(weight) {
|
|
19019
19035
|
switch (weight) {
|
|
19020
19036
|
case 'lighter':
|
|
@@ -19164,8 +19180,8 @@
|
|
|
19164
19180
|
} else if (node !== document.body && has_content_default(node, true)) {
|
|
19165
19181
|
return [ virtualNode ];
|
|
19166
19182
|
} else {
|
|
19167
|
-
return virtualNode.children.filter(function(
|
|
19168
|
-
var actualNode =
|
|
19183
|
+
return virtualNode.children.filter(function(_ref84) {
|
|
19184
|
+
var actualNode = _ref84.actualNode;
|
|
19169
19185
|
return actualNode.nodeType === 1;
|
|
19170
19186
|
}).map(function(vNode) {
|
|
19171
19187
|
return findRegionlessElms(vNode, options);
|
|
@@ -19343,8 +19359,8 @@
|
|
|
19343
19359
|
if (!virtualNode.children) {
|
|
19344
19360
|
return void 0;
|
|
19345
19361
|
}
|
|
19346
|
-
var titleNode = virtualNode.children.find(function(
|
|
19347
|
-
var props =
|
|
19362
|
+
var titleNode = virtualNode.children.find(function(_ref85) {
|
|
19363
|
+
var props = _ref85.props;
|
|
19348
19364
|
return props.nodeName === 'title';
|
|
19349
19365
|
});
|
|
19350
19366
|
if (!titleNode) {
|
|
@@ -19919,7 +19935,7 @@
|
|
|
19919
19935
|
if (!role || [ 'none', 'presentation' ].includes(role)) {
|
|
19920
19936
|
return true;
|
|
19921
19937
|
}
|
|
19922
|
-
var
|
|
19938
|
+
var _ref86 = aria_roles_default[role] || {}, accessibleNameRequired = _ref86.accessibleNameRequired;
|
|
19923
19939
|
if (accessibleNameRequired || _isFocusable(virtualNode)) {
|
|
19924
19940
|
return true;
|
|
19925
19941
|
}
|
|
@@ -19937,6 +19953,11 @@
|
|
|
19937
19953
|
return true;
|
|
19938
19954
|
}
|
|
19939
19955
|
var no_naming_method_matches_default = noNamingMethodMatches;
|
|
19956
|
+
function noNegativeTabindexMatches(node, virtualNode) {
|
|
19957
|
+
var tabindex = parseInt(virtualNode.attr('tabindex'), 10);
|
|
19958
|
+
return isNaN(tabindex) || tabindex >= 0;
|
|
19959
|
+
}
|
|
19960
|
+
var no_negative_tabindex_matches_default = noNegativeTabindexMatches;
|
|
19940
19961
|
function noRoleMatches(node) {
|
|
19941
19962
|
return !node.getAttribute('role');
|
|
19942
19963
|
}
|
|
@@ -20111,7 +20132,7 @@
|
|
|
20111
20132
|
'link-in-text-block-matches': link_in_text_block_matches_default,
|
|
20112
20133
|
'listitem-evaluate': listitemEvaluate,
|
|
20113
20134
|
'matches-definition-evaluate': matches_definition_evaluate_default,
|
|
20114
|
-
'meta-refresh-evaluate':
|
|
20135
|
+
'meta-refresh-evaluate': metaRefreshEvaluate,
|
|
20115
20136
|
'meta-viewport-scale-evaluate': meta_viewport_scale_evaluate_default,
|
|
20116
20137
|
'multiple-label-evaluate': multiple_label_evaluate_default,
|
|
20117
20138
|
'nested-interactive-matches': nested_interactive_matches_default,
|
|
@@ -20122,6 +20143,7 @@
|
|
|
20122
20143
|
'no-focusable-content-evaluate': noFocusableContentEvaluate,
|
|
20123
20144
|
'no-implicit-explicit-label-evaluate': no_implicit_explicit_label_evaluate_default,
|
|
20124
20145
|
'no-naming-method-matches': no_naming_method_matches_default,
|
|
20146
|
+
'no-negative-tabindex-matches': no_negative_tabindex_matches_default,
|
|
20125
20147
|
'no-role-matches': no_role_matches_default,
|
|
20126
20148
|
'non-empty-if-present-evaluate': non_empty_if_present_evaluate_default,
|
|
20127
20149
|
'not-html-matches': not_html_matches_default,
|
|
@@ -21165,8 +21187,8 @@
|
|
|
21165
21187
|
});
|
|
21166
21188
|
};
|
|
21167
21189
|
}
|
|
21168
|
-
function getHelpUrl(
|
|
21169
|
-
var brand =
|
|
21190
|
+
function getHelpUrl(_ref87, ruleId, version) {
|
|
21191
|
+
var brand = _ref87.brand, application = _ref87.application, lang = _ref87.lang;
|
|
21170
21192
|
return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
|
|
21171
21193
|
}
|
|
21172
21194
|
var audit_default = Audit;
|
|
@@ -21581,9 +21603,9 @@
|
|
|
21581
21603
|
});
|
|
21582
21604
|
}
|
|
21583
21605
|
var run_virtual_rule_default = runVirtualRule;
|
|
21584
|
-
function normalizeRunParams(
|
|
21585
|
-
var
|
|
21586
|
-
var
|
|
21606
|
+
function normalizeRunParams(_ref88) {
|
|
21607
|
+
var _ref90, _options$reporter, _axe$_audit;
|
|
21608
|
+
var _ref89 = _slicedToArray(_ref88, 3), context5 = _ref89[0], options = _ref89[1], callback = _ref89[2];
|
|
21587
21609
|
var typeErr = new TypeError('axe.run arguments are invalid');
|
|
21588
21610
|
if (!isContext(context5)) {
|
|
21589
21611
|
if (callback !== void 0) {
|
|
@@ -21604,7 +21626,7 @@
|
|
|
21604
21626
|
throw typeErr;
|
|
21605
21627
|
}
|
|
21606
21628
|
options = clone_default(options);
|
|
21607
|
-
options.reporter = (
|
|
21629
|
+
options.reporter = (_ref90 = (_options$reporter = options.reporter) !== null && _options$reporter !== void 0 ? _options$reporter : (_axe$_audit = axe._audit) === null || _axe$_audit === void 0 ? void 0 : _axe$_audit.reporter) !== null && _ref90 !== void 0 ? _ref90 : 'v1';
|
|
21608
21630
|
return {
|
|
21609
21631
|
context: context5,
|
|
21610
21632
|
options: options,
|
|
@@ -21729,14 +21751,14 @@
|
|
|
21729
21751
|
return new Promise(function(res, rej) {
|
|
21730
21752
|
axe._audit.run(contextObj, options, res, rej);
|
|
21731
21753
|
}).then(function(results) {
|
|
21732
|
-
results = results.map(function(
|
|
21733
|
-
var nodes =
|
|
21754
|
+
results = results.map(function(_ref91) {
|
|
21755
|
+
var nodes = _ref91.nodes, result = _objectWithoutProperties(_ref91, _excluded8);
|
|
21734
21756
|
return _extends({
|
|
21735
21757
|
nodes: nodes.map(serializeNode)
|
|
21736
21758
|
}, result);
|
|
21737
21759
|
});
|
|
21738
|
-
var frames = contextObj.frames.map(function(
|
|
21739
|
-
var node =
|
|
21760
|
+
var frames = contextObj.frames.map(function(_ref92) {
|
|
21761
|
+
var node = _ref92.node;
|
|
21740
21762
|
return new dq_element_default(node, options).toJSON();
|
|
21741
21763
|
});
|
|
21742
21764
|
var environmentData;
|
|
@@ -21756,13 +21778,13 @@
|
|
|
21756
21778
|
return Promise.reject(err2);
|
|
21757
21779
|
});
|
|
21758
21780
|
}
|
|
21759
|
-
function serializeNode(
|
|
21760
|
-
var node =
|
|
21781
|
+
function serializeNode(_ref93) {
|
|
21782
|
+
var node = _ref93.node, nodeResult = _objectWithoutProperties(_ref93, _excluded9);
|
|
21761
21783
|
nodeResult.node = node.toJSON();
|
|
21762
21784
|
for (var _i32 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i32 < _arr2.length; _i32++) {
|
|
21763
21785
|
var type = _arr2[_i32];
|
|
21764
|
-
nodeResult[type] = nodeResult[type].map(function(
|
|
21765
|
-
var relatedNodes =
|
|
21786
|
+
nodeResult[type] = nodeResult[type].map(function(_ref94) {
|
|
21787
|
+
var relatedNodes = _ref94.relatedNodes, checkResult = _objectWithoutProperties(_ref94, _excluded10);
|
|
21766
21788
|
return _extends({}, checkResult, {
|
|
21767
21789
|
relatedNodes: relatedNodes.map(function(node2) {
|
|
21768
21790
|
return node2.toJSON();
|
|
@@ -21773,14 +21795,14 @@
|
|
|
21773
21795
|
return nodeResult;
|
|
21774
21796
|
}
|
|
21775
21797
|
function finishRun(partialResults) {
|
|
21776
|
-
var
|
|
21798
|
+
var _ref96, _options$reporter2, _axe$_audit2;
|
|
21777
21799
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
21778
21800
|
options = clone_default(options);
|
|
21779
|
-
var
|
|
21801
|
+
var _ref95 = partialResults.find(function(r) {
|
|
21780
21802
|
return r.environmentData;
|
|
21781
|
-
}) || {}, environmentData =
|
|
21803
|
+
}) || {}, environmentData = _ref95.environmentData;
|
|
21782
21804
|
axe._audit.normalizeOptions(options);
|
|
21783
|
-
options.reporter = (
|
|
21805
|
+
options.reporter = (_ref96 = (_options$reporter2 = options.reporter) !== null && _options$reporter2 !== void 0 ? _options$reporter2 : (_axe$_audit2 = axe._audit) === null || _axe$_audit2 === void 0 ? void 0 : _axe$_audit2.reporter) !== null && _ref96 !== void 0 ? _ref96 : 'v1';
|
|
21784
21806
|
setFrameSpec(partialResults);
|
|
21785
21807
|
var results = merge_results_default(partialResults);
|
|
21786
21808
|
results = axe._audit.after(results, options);
|
|
@@ -21810,8 +21832,8 @@
|
|
|
21810
21832
|
_iterator4.f();
|
|
21811
21833
|
}
|
|
21812
21834
|
}
|
|
21813
|
-
function getMergedFrameSpecs(
|
|
21814
|
-
var childFrameSpecs =
|
|
21835
|
+
function getMergedFrameSpecs(_ref97) {
|
|
21836
|
+
var childFrameSpecs = _ref97.frames, parentFrameSpec = _ref97.frameSpec;
|
|
21815
21837
|
if (!parentFrameSpec) {
|
|
21816
21838
|
return childFrameSpecs;
|
|
21817
21839
|
}
|
|
@@ -21874,9 +21896,9 @@
|
|
|
21874
21896
|
for (var _i33 = 0, _types = types; _i33 < _types.length; _i33++) {
|
|
21875
21897
|
var type = _types[_i33];
|
|
21876
21898
|
if (transformedResult[type] && Array.isArray(transformedResult[type])) {
|
|
21877
|
-
transformedResult[type] = transformedResult[type].map(function(
|
|
21899
|
+
transformedResult[type] = transformedResult[type].map(function(_ref98) {
|
|
21878
21900
|
var _node;
|
|
21879
|
-
var node =
|
|
21901
|
+
var node = _ref98.node, typeResult = _objectWithoutProperties(_ref98, _excluded13);
|
|
21880
21902
|
node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
|
|
21881
21903
|
return _extends({
|
|
21882
21904
|
node: node
|
|
@@ -22279,9 +22301,13 @@
|
|
|
22279
22301
|
description: 'Ensures <marquee> elements are not used',
|
|
22280
22302
|
help: '<marquee> elements are deprecated and must not be used'
|
|
22281
22303
|
},
|
|
22304
|
+
'meta-refresh-no-exceptions': {
|
|
22305
|
+
description: 'Ensures <meta http-equiv="refresh"> is not used for delayed refresh',
|
|
22306
|
+
help: 'Delayed refresh must not be used'
|
|
22307
|
+
},
|
|
22282
22308
|
'meta-refresh': {
|
|
22283
|
-
description: 'Ensures <meta http-equiv="refresh"> is not used',
|
|
22284
|
-
help: '
|
|
22309
|
+
description: 'Ensures <meta http-equiv="refresh"> is not used for delayed refresh',
|
|
22310
|
+
help: 'Delayed refresh under 20 hours must not be used'
|
|
22285
22311
|
},
|
|
22286
22312
|
'meta-viewport-large': {
|
|
22287
22313
|
description: 'Ensures <meta name="viewport"> can scale a significant amount',
|
|
@@ -23032,11 +23058,18 @@
|
|
|
23032
23058
|
fail: 'Page does not have a landmark region'
|
|
23033
23059
|
}
|
|
23034
23060
|
},
|
|
23061
|
+
'meta-refresh-no-exceptions': {
|
|
23062
|
+
impact: 'minor',
|
|
23063
|
+
messages: {
|
|
23064
|
+
pass: '<meta> tag does not immediately refresh the page',
|
|
23065
|
+
fail: '<meta> tag forces timed refresh of page'
|
|
23066
|
+
}
|
|
23067
|
+
},
|
|
23035
23068
|
'meta-refresh': {
|
|
23036
23069
|
impact: 'critical',
|
|
23037
23070
|
messages: {
|
|
23038
23071
|
pass: '<meta> tag does not immediately refresh the page',
|
|
23039
|
-
fail: '<meta> tag forces timed refresh of page'
|
|
23072
|
+
fail: '<meta> tag forces timed refresh of page (less than 20 hours)'
|
|
23040
23073
|
}
|
|
23041
23074
|
},
|
|
23042
23075
|
'p-as-heading': {
|
|
@@ -23896,7 +23929,8 @@
|
|
|
23896
23929
|
}, {
|
|
23897
23930
|
id: 'frame-title',
|
|
23898
23931
|
selector: 'frame, iframe',
|
|
23899
|
-
|
|
23932
|
+
matches: 'no-negative-tabindex-matches',
|
|
23933
|
+
tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag412', 'section508', 'section508.22.i' ],
|
|
23900
23934
|
actIds: [ 'cae760' ],
|
|
23901
23935
|
all: [],
|
|
23902
23936
|
any: [ {
|
|
@@ -24208,14 +24242,36 @@
|
|
|
24208
24242
|
all: [],
|
|
24209
24243
|
any: [],
|
|
24210
24244
|
none: [ 'is-on-screen' ]
|
|
24245
|
+
}, {
|
|
24246
|
+
id: 'meta-refresh-no-exceptions',
|
|
24247
|
+
selector: 'meta[http-equiv="refresh"][content]',
|
|
24248
|
+
excludeHidden: false,
|
|
24249
|
+
enabled: false,
|
|
24250
|
+
tags: [ 'cat.time-and-media', 'wcag2aaa', 'wcag224', 'wcag325' ],
|
|
24251
|
+
actIds: [ 'bisz58' ],
|
|
24252
|
+
all: [],
|
|
24253
|
+
any: [ {
|
|
24254
|
+
options: {
|
|
24255
|
+
minDelay: 0,
|
|
24256
|
+
maxDelay: false
|
|
24257
|
+
},
|
|
24258
|
+
id: 'meta-refresh-no-exceptions'
|
|
24259
|
+
} ],
|
|
24260
|
+
none: []
|
|
24211
24261
|
}, {
|
|
24212
24262
|
id: 'meta-refresh',
|
|
24213
|
-
selector: 'meta[http-equiv="refresh"]',
|
|
24263
|
+
selector: 'meta[http-equiv="refresh"][content]',
|
|
24214
24264
|
excludeHidden: false,
|
|
24215
24265
|
tags: [ 'cat.time-and-media', 'wcag2a', 'wcag221', 'wcag224', 'wcag325' ],
|
|
24216
24266
|
actIds: [ 'bc659a' ],
|
|
24217
24267
|
all: [],
|
|
24218
|
-
any: [
|
|
24268
|
+
any: [ {
|
|
24269
|
+
options: {
|
|
24270
|
+
minDelay: 0,
|
|
24271
|
+
maxDelay: 72e3
|
|
24272
|
+
},
|
|
24273
|
+
id: 'meta-refresh'
|
|
24274
|
+
} ],
|
|
24219
24275
|
none: []
|
|
24220
24276
|
}, {
|
|
24221
24277
|
id: 'meta-viewport-large',
|
|
@@ -24842,9 +24898,20 @@
|
|
|
24842
24898
|
options: {
|
|
24843
24899
|
selector: 'main, [role=main]'
|
|
24844
24900
|
}
|
|
24901
|
+
}, {
|
|
24902
|
+
id: 'meta-refresh-no-exceptions',
|
|
24903
|
+
evaluate: 'meta-refresh-evaluate',
|
|
24904
|
+
options: {
|
|
24905
|
+
minDelay: 0,
|
|
24906
|
+
maxDelay: false
|
|
24907
|
+
}
|
|
24845
24908
|
}, {
|
|
24846
24909
|
id: 'meta-refresh',
|
|
24847
|
-
evaluate: 'meta-refresh-evaluate'
|
|
24910
|
+
evaluate: 'meta-refresh-evaluate',
|
|
24911
|
+
options: {
|
|
24912
|
+
minDelay: 0,
|
|
24913
|
+
maxDelay: 72e3
|
|
24914
|
+
}
|
|
24848
24915
|
}, {
|
|
24849
24916
|
id: 'p-as-heading',
|
|
24850
24917
|
evaluate: 'p-as-heading-evaluate',
|