axe-core 4.7.2-canary.de3da89 → 4.7.2-canary.f151508
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 +821 -678
- package/axe.min.js +2 -2
- package/locales/_template.json +5 -0
- package/package.json +2 -1
- package/sri-history.json +3 -3
package/axe.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! axe v4.7.2-canary.
|
|
1
|
+
/*! axe v4.7.2-canary.f151508
|
|
2
2
|
* Copyright (c) 2023 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.7.2-canary.
|
|
25
|
+
axe.version = '4.7.2-canary.f151508';
|
|
26
26
|
if (typeof define === 'function' && define.amd) {
|
|
27
27
|
define('axe-core', [], function() {
|
|
28
28
|
return axe;
|
|
@@ -5084,7 +5084,7 @@
|
|
|
5084
5084
|
return check_helper_default;
|
|
5085
5085
|
},
|
|
5086
5086
|
clone: function clone() {
|
|
5087
|
-
return
|
|
5087
|
+
return _clone;
|
|
5088
5088
|
},
|
|
5089
5089
|
closest: function closest() {
|
|
5090
5090
|
return closest_default;
|
|
@@ -5114,7 +5114,7 @@
|
|
|
5114
5114
|
return _filterHtmlAttrs;
|
|
5115
5115
|
},
|
|
5116
5116
|
finalizeRuleResult: function finalizeRuleResult() {
|
|
5117
|
-
return
|
|
5117
|
+
return _finalizeRuleResult;
|
|
5118
5118
|
},
|
|
5119
5119
|
findBy: function findBy() {
|
|
5120
5120
|
return find_by_default;
|
|
@@ -5138,7 +5138,7 @@
|
|
|
5138
5138
|
return _getEnvironmentData;
|
|
5139
5139
|
},
|
|
5140
5140
|
getFlattenedTree: function getFlattenedTree() {
|
|
5141
|
-
return
|
|
5141
|
+
return _getFlattenedTree;
|
|
5142
5142
|
},
|
|
5143
5143
|
getFrameContexts: function getFrameContexts() {
|
|
5144
5144
|
return _getFrameContexts;
|
|
@@ -5159,7 +5159,7 @@
|
|
|
5159
5159
|
return get_root_node_default;
|
|
5160
5160
|
},
|
|
5161
5161
|
getRule: function getRule() {
|
|
5162
|
-
return
|
|
5162
|
+
return _getRule;
|
|
5163
5163
|
},
|
|
5164
5164
|
getScroll: function getScroll() {
|
|
5165
5165
|
return get_scroll_default;
|
|
@@ -5174,7 +5174,7 @@
|
|
|
5174
5174
|
return _getSelectorData;
|
|
5175
5175
|
},
|
|
5176
5176
|
getShadowSelector: function getShadowSelector() {
|
|
5177
|
-
return
|
|
5177
|
+
return _getShadowSelector;
|
|
5178
5178
|
},
|
|
5179
5179
|
getStandards: function getStandards() {
|
|
5180
5180
|
return _getStandards;
|
|
@@ -5207,10 +5207,10 @@
|
|
|
5207
5207
|
return is_xhtml_default;
|
|
5208
5208
|
},
|
|
5209
5209
|
matchAncestry: function matchAncestry() {
|
|
5210
|
-
return
|
|
5210
|
+
return _matchAncestry;
|
|
5211
5211
|
},
|
|
5212
5212
|
matches: function matches() {
|
|
5213
|
-
return
|
|
5213
|
+
return _matches;
|
|
5214
5214
|
},
|
|
5215
5215
|
matchesExpression: function matchesExpression() {
|
|
5216
5216
|
return _matchesExpression;
|
|
@@ -5246,7 +5246,7 @@
|
|
|
5246
5246
|
return _pollyfillElementsFromPoint;
|
|
5247
5247
|
},
|
|
5248
5248
|
preload: function preload() {
|
|
5249
|
-
return
|
|
5249
|
+
return _preload;
|
|
5250
5250
|
},
|
|
5251
5251
|
preloadCssom: function preloadCssom() {
|
|
5252
5252
|
return preload_cssom_default;
|
|
@@ -5258,7 +5258,7 @@
|
|
|
5258
5258
|
return process_message_default;
|
|
5259
5259
|
},
|
|
5260
5260
|
publishMetaData: function publishMetaData() {
|
|
5261
|
-
return
|
|
5261
|
+
return _publishMetaData;
|
|
5262
5262
|
},
|
|
5263
5263
|
querySelectorAll: function querySelectorAll() {
|
|
5264
5264
|
return query_selector_all_default;
|
|
@@ -5385,9 +5385,10 @@
|
|
|
5385
5385
|
return nodeResult;
|
|
5386
5386
|
}
|
|
5387
5387
|
var aggregate_checks_default = aggregateChecks;
|
|
5388
|
-
function
|
|
5389
|
-
var rule = axe._audit.rules.find(function(
|
|
5390
|
-
|
|
5388
|
+
function _finalizeRuleResult(ruleResult) {
|
|
5389
|
+
var rule = axe._audit.rules.find(function(_ref) {
|
|
5390
|
+
var id = _ref.id;
|
|
5391
|
+
return id === ruleResult.id;
|
|
5391
5392
|
});
|
|
5392
5393
|
if (rule && rule.impact) {
|
|
5393
5394
|
ruleResult.nodes.forEach(function(node) {
|
|
@@ -5402,14 +5403,13 @@
|
|
|
5402
5403
|
delete ruleResult.nodes;
|
|
5403
5404
|
return ruleResult;
|
|
5404
5405
|
}
|
|
5405
|
-
var finalize_result_default = finalizeRuleResult;
|
|
5406
5406
|
function aggregateNodeResults(nodeResults) {
|
|
5407
5407
|
var ruleResult = {};
|
|
5408
5408
|
nodeResults = nodeResults.map(function(nodeResult) {
|
|
5409
5409
|
if (nodeResult.any && nodeResult.all && nodeResult.none) {
|
|
5410
5410
|
return aggregate_checks_default(nodeResult);
|
|
5411
5411
|
} else if (Array.isArray(nodeResult.node)) {
|
|
5412
|
-
return
|
|
5412
|
+
return _finalizeRuleResult(nodeResult);
|
|
5413
5413
|
} else {
|
|
5414
5414
|
throw new TypeError('Invalid Result type');
|
|
5415
5415
|
}
|
|
@@ -5447,8 +5447,8 @@
|
|
|
5447
5447
|
function copyToGroup(resultObject, subResult, group) {
|
|
5448
5448
|
var resultCopy = Object.assign({}, subResult);
|
|
5449
5449
|
resultCopy.nodes = (resultCopy[group] || []).concat();
|
|
5450
|
-
constants_default.resultGroups.forEach(function(
|
|
5451
|
-
delete resultCopy[
|
|
5450
|
+
constants_default.resultGroups.forEach(function(resultGroup) {
|
|
5451
|
+
delete resultCopy[resultGroup];
|
|
5452
5452
|
});
|
|
5453
5453
|
resultObject[group].push(resultCopy);
|
|
5454
5454
|
}
|
|
@@ -5664,7 +5664,7 @@
|
|
|
5664
5664
|
return doc.createElement('A').localName === 'A';
|
|
5665
5665
|
});
|
|
5666
5666
|
var is_xhtml_default = isXHTML;
|
|
5667
|
-
function
|
|
5667
|
+
function _getShadowSelector(generateSelector2, elm) {
|
|
5668
5668
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
5669
5669
|
if (!elm) {
|
|
5670
5670
|
return '';
|
|
@@ -5689,12 +5689,10 @@
|
|
|
5689
5689
|
elm: elm,
|
|
5690
5690
|
doc: doc
|
|
5691
5691
|
});
|
|
5692
|
-
return stack.map(function(
|
|
5693
|
-
|
|
5694
|
-
return generateSelector2(elm2, options, doc2);
|
|
5692
|
+
return stack.map(function(item) {
|
|
5693
|
+
return generateSelector2(item.elm, options, item.doc);
|
|
5695
5694
|
});
|
|
5696
5695
|
}
|
|
5697
|
-
var get_shadow_selector_default = getShadowSelector;
|
|
5698
5696
|
var ignoredAttributes = [ 'class', 'style', 'id', 'selected', 'checked', 'disabled', 'tabindex', 'aria-checked', 'aria-selected', 'aria-invalid', 'aria-activedescendant', 'aria-busy', 'aria-disabled', 'aria-expanded', 'aria-grabbed', 'aria-pressed', 'aria-valuenow' ];
|
|
5699
5697
|
var MAXATTRIBUTELENGTH = 31;
|
|
5700
5698
|
var attrCharsRegex = /([\\"])/g;
|
|
@@ -5910,7 +5908,7 @@
|
|
|
5910
5908
|
return ':root';
|
|
5911
5909
|
}
|
|
5912
5910
|
function _getSelector(elm, options) {
|
|
5913
|
-
return
|
|
5911
|
+
return _getShadowSelector(generateSelector, elm, options);
|
|
5914
5912
|
}
|
|
5915
5913
|
function generateAncestry(node) {
|
|
5916
5914
|
var nodeName2 = node.nodeName.toLowerCase();
|
|
@@ -5926,7 +5924,7 @@
|
|
|
5926
5924
|
return generateAncestry(parent) + ' > ' + nodeName2 + nthChild;
|
|
5927
5925
|
}
|
|
5928
5926
|
function _getAncestry(elm, options) {
|
|
5929
|
-
return
|
|
5927
|
+
return _getShadowSelector(generateAncestry, elm, options);
|
|
5930
5928
|
}
|
|
5931
5929
|
function getXPathArray(node, path) {
|
|
5932
5930
|
var sibling, count;
|
|
@@ -6154,28 +6152,35 @@
|
|
|
6154
6152
|
};
|
|
6155
6153
|
}
|
|
6156
6154
|
var check_helper_default = checkHelper;
|
|
6157
|
-
function
|
|
6155
|
+
function _clone(obj) {
|
|
6156
|
+
return cloneRecused(obj, new Map());
|
|
6157
|
+
}
|
|
6158
|
+
function cloneRecused(obj, seen) {
|
|
6158
6159
|
var _window, _window2;
|
|
6159
|
-
|
|
6160
|
-
if ((_window = window) !== null && _window !== void 0 && _window.Node && obj instanceof window.Node || (_window2 = window) !== null && _window2 !== void 0 && _window2.HTMLCollection && obj instanceof window.HTMLCollection) {
|
|
6160
|
+
if (obj === null || _typeof(obj) !== 'object') {
|
|
6161
6161
|
return obj;
|
|
6162
6162
|
}
|
|
6163
|
-
if (
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
}
|
|
6163
|
+
if ((_window = window) !== null && _window !== void 0 && _window.Node && obj instanceof window.Node || (_window2 = window) !== null && _window2 !== void 0 && _window2.HTMLCollection && obj instanceof window.HTMLCollection || 'nodeName' in obj && 'nodeType' in obj && 'ownerDocument' in obj) {
|
|
6164
|
+
return obj;
|
|
6165
|
+
}
|
|
6166
|
+
if (seen.has(obj)) {
|
|
6167
|
+
return seen.get(obj);
|
|
6168
|
+
}
|
|
6169
|
+
if (Array.isArray(obj)) {
|
|
6170
|
+
var out2 = [];
|
|
6171
|
+
seen.set(obj, out2);
|
|
6172
|
+
obj.forEach(function(value) {
|
|
6173
|
+
out2.push(cloneRecused(value, seen));
|
|
6174
|
+
});
|
|
6175
|
+
return out2;
|
|
6176
|
+
}
|
|
6177
|
+
var out = {};
|
|
6178
|
+
seen.set(obj, out);
|
|
6179
|
+
for (var key in obj) {
|
|
6180
|
+
out[key] = cloneRecused(obj[key], seen);
|
|
6175
6181
|
}
|
|
6176
6182
|
return out;
|
|
6177
6183
|
}
|
|
6178
|
-
var clone_default = clone;
|
|
6179
6184
|
var import_css_selector_parser = __toModule(require_lib());
|
|
6180
6185
|
var parser = new import_css_selector_parser.CssSelectorParser();
|
|
6181
6186
|
parser.registerSelectorPseudos('not');
|
|
@@ -6183,6 +6188,12 @@
|
|
|
6183
6188
|
parser.registerNestingOperators('>');
|
|
6184
6189
|
parser.registerAttrEqualityMods('^', '$', '*', '~');
|
|
6185
6190
|
var css_parser_default = parser;
|
|
6191
|
+
function _matches(vNode, selector) {
|
|
6192
|
+
var expressions = _convertSelector(selector);
|
|
6193
|
+
return expressions.some(function(expression) {
|
|
6194
|
+
return _matchesExpression(vNode, expression);
|
|
6195
|
+
});
|
|
6196
|
+
}
|
|
6186
6197
|
function matchesTag(vNode, exp) {
|
|
6187
6198
|
return vNode.props.nodeType === 1 && (exp.tag === '*' || vNode.props.nodeName === exp.tag);
|
|
6188
6199
|
}
|
|
@@ -6353,32 +6364,25 @@
|
|
|
6353
6364
|
}
|
|
6354
6365
|
var isArray = Array.isArray(expressions);
|
|
6355
6366
|
var expression = isArray ? expressions[index] : expressions;
|
|
6356
|
-
var
|
|
6357
|
-
while (!
|
|
6367
|
+
var machedExpression = matchExpression(vNode, expression);
|
|
6368
|
+
while (!machedExpression && matchAnyParent && vNode.parent) {
|
|
6358
6369
|
vNode = vNode.parent;
|
|
6359
|
-
|
|
6370
|
+
machedExpression = matchExpression(vNode, expression);
|
|
6360
6371
|
}
|
|
6361
6372
|
if (index > 0) {
|
|
6362
6373
|
if ([ ' ', '>' ].includes(expression.combinator) === false) {
|
|
6363
6374
|
throw new Error('axe.utils.matchesExpression does not support the combinator: ' + expression.combinator);
|
|
6364
6375
|
}
|
|
6365
|
-
|
|
6376
|
+
machedExpression = machedExpression && optimizedMatchesExpression(vNode.parent, expressions, index - 1, expression.combinator === ' ');
|
|
6366
6377
|
}
|
|
6367
|
-
return
|
|
6378
|
+
return machedExpression;
|
|
6368
6379
|
}
|
|
6369
6380
|
function _matchesExpression(vNode, expressions, matchAnyParent) {
|
|
6370
6381
|
return optimizedMatchesExpression(vNode, expressions, expressions.length - 1, matchAnyParent);
|
|
6371
6382
|
}
|
|
6372
|
-
function matches(vNode, selector) {
|
|
6373
|
-
var expressions = _convertSelector(selector);
|
|
6374
|
-
return expressions.some(function(expression) {
|
|
6375
|
-
return _matchesExpression(vNode, expression);
|
|
6376
|
-
});
|
|
6377
|
-
}
|
|
6378
|
-
var matches_default = matches;
|
|
6379
6383
|
function closest(vNode, selector) {
|
|
6380
6384
|
while (vNode) {
|
|
6381
|
-
if (
|
|
6385
|
+
if (_matches(vNode, selector)) {
|
|
6382
6386
|
return vNode;
|
|
6383
6387
|
}
|
|
6384
6388
|
if (typeof vNode.parent === 'undefined') {
|
|
@@ -7641,10 +7645,10 @@
|
|
|
7641
7645
|
var top = _ref14.top, right = _ref14.right, bottom = _ref14.bottom, left = _ref14.left;
|
|
7642
7646
|
return y >= top && x <= right && y <= bottom && x >= left;
|
|
7643
7647
|
}
|
|
7644
|
-
var
|
|
7645
|
-
var
|
|
7646
|
-
var
|
|
7647
|
-
var
|
|
7648
|
+
var ROOT_LEVEL = 0;
|
|
7649
|
+
var DEFAULT_LEVEL = .1;
|
|
7650
|
+
var FLOAT_LEVEL = .2;
|
|
7651
|
+
var POSITION_LEVEL = .3;
|
|
7648
7652
|
var nodeIndex = 0;
|
|
7649
7653
|
function _createGrid() {
|
|
7650
7654
|
var root = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body;
|
|
@@ -7661,7 +7665,7 @@
|
|
|
7661
7665
|
vNode = new virtual_node_default(document.documentElement);
|
|
7662
7666
|
}
|
|
7663
7667
|
nodeIndex = 0;
|
|
7664
|
-
vNode._stackingOrder = [
|
|
7668
|
+
vNode._stackingOrder = [ createStackingContext(ROOT_LEVEL, nodeIndex++, null) ];
|
|
7665
7669
|
(_rootGrid = rootGrid) !== null && _rootGrid !== void 0 ? _rootGrid : rootGrid = new Grid();
|
|
7666
7670
|
addNodeToGrid(rootGrid, vNode);
|
|
7667
7671
|
if (get_scroll_default(vNode.actualNode)) {
|
|
@@ -7773,41 +7777,46 @@
|
|
|
7773
7777
|
var display2 = vNode.getComputedStylePropertyValue('display');
|
|
7774
7778
|
return [ 'flex', 'inline-flex', 'grid', 'inline-grid' ].includes(display2);
|
|
7775
7779
|
}
|
|
7776
|
-
function createStackingOrder(vNode, parentVNode,
|
|
7780
|
+
function createStackingOrder(vNode, parentVNode, treeOrder) {
|
|
7777
7781
|
var stackingOrder = parentVNode._stackingOrder.slice();
|
|
7778
|
-
if (
|
|
7779
|
-
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7782
|
+
if (isStackingContext(vNode, parentVNode)) {
|
|
7783
|
+
var index = stackingOrder.findIndex(function(_ref15) {
|
|
7784
|
+
var stackLevel2 = _ref15.stackLevel;
|
|
7785
|
+
return [ ROOT_LEVEL, FLOAT_LEVEL, POSITION_LEVEL ].includes(stackLevel2);
|
|
7786
|
+
});
|
|
7787
|
+
if (index !== -1) {
|
|
7788
|
+
stackingOrder.splice(index, stackingOrder.length - index);
|
|
7783
7789
|
}
|
|
7784
|
-
return stackingOrder;
|
|
7785
|
-
}
|
|
7786
|
-
var index = stackingOrder.findIndex(function(_ref15) {
|
|
7787
|
-
var value = _ref15.value;
|
|
7788
|
-
return [ ROOT_ORDER, FLOAT_ORDER, POSITION_STATIC_ORDER ].includes(value);
|
|
7789
|
-
});
|
|
7790
|
-
if (index !== -1) {
|
|
7791
|
-
stackingOrder.splice(index, stackingOrder.length - index);
|
|
7792
7790
|
}
|
|
7793
|
-
var
|
|
7794
|
-
if (
|
|
7795
|
-
stackingOrder.push(
|
|
7796
|
-
return stackingOrder;
|
|
7791
|
+
var stackLevel = getStackLevel(vNode, parentVNode);
|
|
7792
|
+
if (stackLevel !== null) {
|
|
7793
|
+
stackingOrder.push(createStackingContext(stackLevel, treeOrder, vNode));
|
|
7797
7794
|
}
|
|
7798
|
-
var _float = nodeIndex3.toString();
|
|
7799
|
-
while (_float.length < 10) {
|
|
7800
|
-
_float = '0' + _float;
|
|
7801
|
-
}
|
|
7802
|
-
stackingOrder.push(createContext(parseFloat(''.concat(DEFAULT_ORDER).concat(_float)), vNode));
|
|
7803
7795
|
return stackingOrder;
|
|
7804
7796
|
}
|
|
7805
|
-
function
|
|
7797
|
+
function createStackingContext(stackLevel, treeOrder, vNode) {
|
|
7806
7798
|
return {
|
|
7807
|
-
|
|
7799
|
+
stackLevel: stackLevel,
|
|
7800
|
+
treeOrder: treeOrder,
|
|
7808
7801
|
vNode: vNode
|
|
7809
7802
|
};
|
|
7810
7803
|
}
|
|
7804
|
+
function getStackLevel(vNode, parentVNode) {
|
|
7805
|
+
var zIndex = getRealZIndex(vNode, parentVNode);
|
|
7806
|
+
if (![ 'auto', '0' ].includes(zIndex)) {
|
|
7807
|
+
return parseInt(zIndex);
|
|
7808
|
+
}
|
|
7809
|
+
if (vNode.getComputedStylePropertyValue('position') !== 'static') {
|
|
7810
|
+
return POSITION_LEVEL;
|
|
7811
|
+
}
|
|
7812
|
+
if (vNode.getComputedStylePropertyValue('float') !== 'none') {
|
|
7813
|
+
return FLOAT_LEVEL;
|
|
7814
|
+
}
|
|
7815
|
+
if (isStackingContext(vNode, parentVNode)) {
|
|
7816
|
+
return DEFAULT_LEVEL;
|
|
7817
|
+
}
|
|
7818
|
+
return null;
|
|
7819
|
+
}
|
|
7811
7820
|
function getRealZIndex(vNode, parentVNode) {
|
|
7812
7821
|
var position = vNode.getComputedStylePropertyValue('position');
|
|
7813
7822
|
if (position === 'static' && !isFlexOrGridContainer(parentVNode)) {
|
|
@@ -7830,8 +7839,8 @@
|
|
|
7830
7839
|
checkedNodes.push(parentVNode);
|
|
7831
7840
|
parentVNode = get_node_from_tree_default(parentVNode.actualNode.parentElement || parentVNode.actualNode.parentNode);
|
|
7832
7841
|
}
|
|
7833
|
-
checkedNodes.forEach(function(
|
|
7834
|
-
return
|
|
7842
|
+
checkedNodes.forEach(function(virtualNode) {
|
|
7843
|
+
return virtualNode._scrollRegionParent = scrollRegionParent;
|
|
7835
7844
|
});
|
|
7836
7845
|
return scrollRegionParent;
|
|
7837
7846
|
}
|
|
@@ -8168,12 +8177,15 @@
|
|
|
8168
8177
|
} else if (typeof a2._stackingOrder[_i7] === 'undefined') {
|
|
8169
8178
|
return 1;
|
|
8170
8179
|
}
|
|
8171
|
-
if (b2._stackingOrder[_i7].
|
|
8180
|
+
if (b2._stackingOrder[_i7].stackLevel > a2._stackingOrder[_i7].stackLevel) {
|
|
8172
8181
|
return 1;
|
|
8173
8182
|
}
|
|
8174
|
-
if (b2._stackingOrder[_i7].
|
|
8183
|
+
if (b2._stackingOrder[_i7].stackLevel < a2._stackingOrder[_i7].stackLevel) {
|
|
8175
8184
|
return -1;
|
|
8176
8185
|
}
|
|
8186
|
+
if (b2._stackingOrder[_i7].treeOrder !== a2._stackingOrder[_i7].treeOrder) {
|
|
8187
|
+
return b2._stackingOrder[_i7].treeOrder - a2._stackingOrder[_i7].treeOrder;
|
|
8188
|
+
}
|
|
8177
8189
|
}
|
|
8178
8190
|
var aNode = a2.actualNode;
|
|
8179
8191
|
var bNode = b2.actualNode;
|
|
@@ -8404,8 +8416,8 @@
|
|
|
8404
8416
|
try {
|
|
8405
8417
|
var _loop3 = function _loop3() {
|
|
8406
8418
|
var overlapRect = _step3.value;
|
|
8407
|
-
uniqueRects = uniqueRects.reduce(function(
|
|
8408
|
-
return
|
|
8419
|
+
uniqueRects = uniqueRects.reduce(function(rects, inputRect) {
|
|
8420
|
+
return rects.concat(splitRect(inputRect, overlapRect));
|
|
8409
8421
|
}, []);
|
|
8410
8422
|
};
|
|
8411
8423
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done; ) {
|
|
@@ -8524,7 +8536,7 @@
|
|
|
8524
8536
|
return accessible_text_default;
|
|
8525
8537
|
},
|
|
8526
8538
|
accessibleTextVirtual: function accessibleTextVirtual() {
|
|
8527
|
-
return
|
|
8539
|
+
return _accessibleTextVirtual;
|
|
8528
8540
|
},
|
|
8529
8541
|
autocomplete: function autocomplete() {
|
|
8530
8542
|
return _autocomplete;
|
|
@@ -8542,7 +8554,7 @@
|
|
|
8542
8554
|
return is_human_interpretable_default;
|
|
8543
8555
|
},
|
|
8544
8556
|
isIconLigature: function isIconLigature() {
|
|
8545
|
-
return
|
|
8557
|
+
return _isIconLigature;
|
|
8546
8558
|
},
|
|
8547
8559
|
isValidAutocomplete: function isValidAutocomplete() {
|
|
8548
8560
|
return is_valid_autocomplete_default;
|
|
@@ -8560,7 +8572,7 @@
|
|
|
8560
8572
|
return native_element_type_default;
|
|
8561
8573
|
},
|
|
8562
8574
|
nativeTextAlternative: function nativeTextAlternative() {
|
|
8563
|
-
return
|
|
8575
|
+
return _nativeTextAlternative;
|
|
8564
8576
|
},
|
|
8565
8577
|
nativeTextMethods: function nativeTextMethods() {
|
|
8566
8578
|
return native_text_methods_default;
|
|
@@ -8610,7 +8622,7 @@
|
|
|
8610
8622
|
var idrefs_default = idrefs;
|
|
8611
8623
|
function accessibleText(element, context) {
|
|
8612
8624
|
var virtualNode = get_node_from_tree_default(element);
|
|
8613
|
-
return
|
|
8625
|
+
return _accessibleTextVirtual(virtualNode, context);
|
|
8614
8626
|
}
|
|
8615
8627
|
var accessible_text_default = accessibleText;
|
|
8616
8628
|
function arialabelledbyText(element) {
|
|
@@ -9716,7 +9728,7 @@
|
|
|
9716
9728
|
},
|
|
9717
9729
|
aside: {
|
|
9718
9730
|
contentTypes: [ 'sectioning', 'flow' ],
|
|
9719
|
-
allowedRoles: [ 'feed', 'note', 'presentation', 'none', 'region', 'search', 'doc-dedication', 'doc-example', 'doc-footnote', 'doc-pullquote', 'doc-tip' ]
|
|
9731
|
+
allowedRoles: [ 'feed', 'note', 'presentation', 'none', 'region', 'search', 'doc-dedication', 'doc-example', 'doc-footnote', 'doc-glossary', 'doc-pullquote', 'doc-tip' ]
|
|
9720
9732
|
},
|
|
9721
9733
|
audio: {
|
|
9722
9734
|
variant: {
|
|
@@ -10654,7 +10666,7 @@
|
|
|
10654
10666
|
}
|
|
10655
10667
|
}
|
|
10656
10668
|
var get_cell_position_default = memoize_default(getCellPosition);
|
|
10657
|
-
function
|
|
10669
|
+
function _getScope(el) {
|
|
10658
10670
|
var _nodeLookup6 = _nodeLookup(el), vNode = _nodeLookup6.vNode, cell = _nodeLookup6.domNode;
|
|
10659
10671
|
var scope = vNode.attr('scope');
|
|
10660
10672
|
var role = vNode.attr('role');
|
|
@@ -10674,29 +10686,28 @@
|
|
|
10674
10686
|
}
|
|
10675
10687
|
var tableGrid = to_grid_default(find_up_default(cell, 'table'));
|
|
10676
10688
|
var pos = get_cell_position_default(cell, tableGrid);
|
|
10677
|
-
var headerRow = tableGrid[pos.y].
|
|
10678
|
-
return
|
|
10679
|
-
}
|
|
10689
|
+
var headerRow = tableGrid[pos.y].every(function(node) {
|
|
10690
|
+
return node.nodeName.toUpperCase() === 'TH';
|
|
10691
|
+
});
|
|
10680
10692
|
if (headerRow) {
|
|
10681
10693
|
return 'col';
|
|
10682
10694
|
}
|
|
10683
10695
|
var headerCol = tableGrid.map(function(col) {
|
|
10684
10696
|
return col[pos.x];
|
|
10685
|
-
}).
|
|
10686
|
-
return
|
|
10687
|
-
}
|
|
10697
|
+
}).every(function(node) {
|
|
10698
|
+
return node && node.nodeName.toUpperCase() === 'TH';
|
|
10699
|
+
});
|
|
10688
10700
|
if (headerCol) {
|
|
10689
10701
|
return 'row';
|
|
10690
10702
|
}
|
|
10691
10703
|
return 'auto';
|
|
10692
10704
|
}
|
|
10693
|
-
var get_scope_default = getScope;
|
|
10694
10705
|
function isColumnHeader(element) {
|
|
10695
|
-
return [ 'col', 'auto' ].indexOf(
|
|
10706
|
+
return [ 'col', 'auto' ].indexOf(_getScope(element)) !== -1;
|
|
10696
10707
|
}
|
|
10697
10708
|
var is_column_header_default = isColumnHeader;
|
|
10698
10709
|
function isRowHeader(cell) {
|
|
10699
|
-
return [ 'row', 'auto' ].includes(
|
|
10710
|
+
return [ 'row', 'auto' ].includes(_getScope(cell));
|
|
10700
10711
|
}
|
|
10701
10712
|
var is_row_header_default = isRowHeader;
|
|
10702
10713
|
function sanitize(str) {
|
|
@@ -10907,7 +10918,7 @@
|
|
|
10907
10918
|
}
|
|
10908
10919
|
var from_primative_default = fromPrimative;
|
|
10909
10920
|
function hasAccessibleName2(vNode, matcher) {
|
|
10910
|
-
return from_primative_default(!!
|
|
10921
|
+
return from_primative_default(!!_accessibleTextVirtual(vNode), matcher);
|
|
10911
10922
|
}
|
|
10912
10923
|
var has_accessible_name_default = hasAccessibleName2;
|
|
10913
10924
|
function fromFunction(getValue, matcher) {
|
|
@@ -10927,10 +10938,9 @@
|
|
|
10927
10938
|
}, matcher);
|
|
10928
10939
|
}
|
|
10929
10940
|
var attributes_default = attributes;
|
|
10930
|
-
function condition(arg,
|
|
10931
|
-
return !!
|
|
10941
|
+
function condition(arg, matcher) {
|
|
10942
|
+
return !!matcher(arg);
|
|
10932
10943
|
}
|
|
10933
|
-
var condition_default = condition;
|
|
10934
10944
|
function explicitRole(vNode, matcher) {
|
|
10935
10945
|
return from_primative_default(get_explicit_role_default(vNode), matcher);
|
|
10936
10946
|
}
|
|
@@ -10958,7 +10968,7 @@
|
|
|
10958
10968
|
var matchers = {
|
|
10959
10969
|
hasAccessibleName: has_accessible_name_default,
|
|
10960
10970
|
attributes: attributes_default,
|
|
10961
|
-
condition:
|
|
10971
|
+
condition: condition,
|
|
10962
10972
|
explicitRole: explicit_role_default,
|
|
10963
10973
|
implicitRole: implicit_role_default2,
|
|
10964
10974
|
nodeName: node_name_default,
|
|
@@ -10973,7 +10983,7 @@
|
|
|
10973
10983
|
});
|
|
10974
10984
|
}
|
|
10975
10985
|
if (typeof definition === 'string') {
|
|
10976
|
-
return
|
|
10986
|
+
return _matches(vNode, definition);
|
|
10977
10987
|
}
|
|
10978
10988
|
return Object.keys(definition).every(function(matcherName) {
|
|
10979
10989
|
if (!matchers[matcherName]) {
|
|
@@ -10988,19 +10998,19 @@
|
|
|
10988
10998
|
function matches2(vNode, definition) {
|
|
10989
10999
|
return from_definition_default(vNode, definition);
|
|
10990
11000
|
}
|
|
10991
|
-
var
|
|
10992
|
-
|
|
10993
|
-
|
|
10994
|
-
|
|
10995
|
-
|
|
10996
|
-
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
11002
|
-
|
|
11003
|
-
var
|
|
11001
|
+
var matches_default = matches2;
|
|
11002
|
+
matches_default.hasAccessibleName = has_accessible_name_default;
|
|
11003
|
+
matches_default.attributes = attributes_default;
|
|
11004
|
+
matches_default.condition = condition;
|
|
11005
|
+
matches_default.explicitRole = explicit_role_default;
|
|
11006
|
+
matches_default.fromDefinition = from_definition_default;
|
|
11007
|
+
matches_default.fromFunction = from_function_default;
|
|
11008
|
+
matches_default.fromPrimative = from_primative_default;
|
|
11009
|
+
matches_default.implicitRole = implicit_role_default2;
|
|
11010
|
+
matches_default.nodeName = node_name_default;
|
|
11011
|
+
matches_default.properties = properties_default;
|
|
11012
|
+
matches_default.semanticRole = semantic_role_default;
|
|
11013
|
+
var matches_default2 = matches_default;
|
|
11004
11014
|
function getElementSpec(vNode) {
|
|
11005
11015
|
var _ref28 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref28$noMatchAccessi = _ref28.noMatchAccessibleName, noMatchAccessibleName = _ref28$noMatchAccessi === void 0 ? false : _ref28$noMatchAccessi;
|
|
11006
11016
|
var standard = standards_default.htmlElms[vNode.props.nodeName];
|
|
@@ -11022,7 +11032,7 @@
|
|
|
11022
11032
|
return standard;
|
|
11023
11033
|
}
|
|
11024
11034
|
}
|
|
11025
|
-
if (
|
|
11035
|
+
if (matches_default2(vNode, matches4)) {
|
|
11026
11036
|
for (var propName in props) {
|
|
11027
11037
|
if (props.hasOwnProperty(propName)) {
|
|
11028
11038
|
spec[propName] = props[propName];
|
|
@@ -11147,7 +11157,7 @@
|
|
|
11147
11157
|
if (vNode.props.nodeType !== 1 || !node.hasAttr('title')) {
|
|
11148
11158
|
return '';
|
|
11149
11159
|
}
|
|
11150
|
-
if (!
|
|
11160
|
+
if (!matches_default(vNode, alwaysTitleElements) && [ 'none', 'presentation' ].includes(get_role_default(vNode))) {
|
|
11151
11161
|
return '';
|
|
11152
11162
|
}
|
|
11153
11163
|
return vNode.attr('title');
|
|
@@ -11188,7 +11198,7 @@
|
|
|
11188
11198
|
var get_owned_virtual_default = getOwnedVirtual;
|
|
11189
11199
|
function subtreeText(virtualNode) {
|
|
11190
11200
|
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11191
|
-
var alreadyProcessed2 =
|
|
11201
|
+
var alreadyProcessed2 = _accessibleTextVirtual.alreadyProcessed;
|
|
11192
11202
|
context.startNode = context.startNode || virtualNode;
|
|
11193
11203
|
var _context = context, strict = _context.strict, inControlContext = _context.inControlContext, inLabelledByContext = _context.inLabelledByContext;
|
|
11194
11204
|
var _get_element_spec_def2 = get_element_spec_default(virtualNode, {
|
|
@@ -11215,7 +11225,7 @@
|
|
|
11215
11225
|
var phrasingElements = get_elements_by_content_type_default('phrasing').concat([ '#text' ]);
|
|
11216
11226
|
function appendAccessibleText(contentText, virtualNode, context) {
|
|
11217
11227
|
var nodeName2 = virtualNode.props.nodeName;
|
|
11218
|
-
var contentTextAdd =
|
|
11228
|
+
var contentTextAdd = _accessibleTextVirtual(virtualNode, context);
|
|
11219
11229
|
if (!contentTextAdd) {
|
|
11220
11230
|
return contentText;
|
|
11221
11231
|
}
|
|
@@ -11232,7 +11242,7 @@
|
|
|
11232
11242
|
var subtree_text_default = subtreeText;
|
|
11233
11243
|
function labelText(virtualNode) {
|
|
11234
11244
|
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11235
|
-
var alreadyProcessed2 =
|
|
11245
|
+
var alreadyProcessed2 = _accessibleTextVirtual.alreadyProcessed;
|
|
11236
11246
|
if (context.inControlContext || context.inLabelledByContext || alreadyProcessed2(virtualNode, context)) {
|
|
11237
11247
|
return '';
|
|
11238
11248
|
}
|
|
@@ -11315,20 +11325,20 @@
|
|
|
11315
11325
|
return accessible_text_default(candidate, context);
|
|
11316
11326
|
}
|
|
11317
11327
|
var native_text_methods_default = nativeTextMethods;
|
|
11318
|
-
function
|
|
11328
|
+
function _nativeTextAlternative(virtualNode) {
|
|
11319
11329
|
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11320
11330
|
var actualNode = virtualNode.actualNode;
|
|
11321
11331
|
if (virtualNode.props.nodeType !== 1 || [ 'presentation', 'none' ].includes(get_role_default(virtualNode))) {
|
|
11322
11332
|
return '';
|
|
11323
11333
|
}
|
|
11324
11334
|
var textMethods = findTextMethods(virtualNode);
|
|
11325
|
-
var
|
|
11326
|
-
return
|
|
11335
|
+
var accessibleName = textMethods.reduce(function(accName, step) {
|
|
11336
|
+
return accName || step(virtualNode, context);
|
|
11327
11337
|
}, '');
|
|
11328
11338
|
if (context.debug) {
|
|
11329
|
-
axe.log(
|
|
11339
|
+
axe.log(accessibleName || '{empty-value}', actualNode, context);
|
|
11330
11340
|
}
|
|
11331
|
-
return
|
|
11341
|
+
return accessibleName;
|
|
11332
11342
|
}
|
|
11333
11343
|
function findTextMethods(virtualNode) {
|
|
11334
11344
|
var elmSpec = get_element_spec_default(virtualNode, {
|
|
@@ -11339,7 +11349,6 @@
|
|
|
11339
11349
|
return native_text_methods_default[methodName];
|
|
11340
11350
|
});
|
|
11341
11351
|
}
|
|
11342
|
-
var native_text_alternative_default = nativeTextAlternative;
|
|
11343
11352
|
var unsupported = {
|
|
11344
11353
|
accessibleNameFromFieldValue: [ 'combobox', 'listbox', 'progressbar' ]
|
|
11345
11354
|
};
|
|
@@ -11493,7 +11502,7 @@
|
|
|
11493
11502
|
if (selected.length === 0) {
|
|
11494
11503
|
return '';
|
|
11495
11504
|
}
|
|
11496
|
-
return
|
|
11505
|
+
return _accessibleTextVirtual(selected[0], context);
|
|
11497
11506
|
}
|
|
11498
11507
|
function ariaComboboxValue(node, context) {
|
|
11499
11508
|
var _nodeLookup16 = _nodeLookup(node), vNode = _nodeLookup16.vNode;
|
|
@@ -11540,7 +11549,7 @@
|
|
|
11540
11549
|
return false;
|
|
11541
11550
|
}
|
|
11542
11551
|
var has_unicode_default = hasUnicode;
|
|
11543
|
-
function
|
|
11552
|
+
function _isIconLigature(textVNode) {
|
|
11544
11553
|
var differenceThreshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .15;
|
|
11545
11554
|
var occurrenceThreshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
|
|
11546
11555
|
var nodeValue = textVNode.actualNode.nodeValue.trim();
|
|
@@ -11613,8 +11622,8 @@
|
|
|
11613
11622
|
}
|
|
11614
11623
|
return ++diff;
|
|
11615
11624
|
}, 0);
|
|
11616
|
-
var expectedWidth = nodeValue.split('').reduce(function(
|
|
11617
|
-
return
|
|
11625
|
+
var expectedWidth = nodeValue.split('').reduce(function(totalWidth, _char2) {
|
|
11626
|
+
return totalWidth + canvasContext.measureText(_char2).width;
|
|
11618
11627
|
}, 0);
|
|
11619
11628
|
var actualWidth = canvasContext.measureText(nodeValue).width;
|
|
11620
11629
|
var pixelDifference = differences / compareData.length;
|
|
@@ -11625,8 +11634,7 @@
|
|
|
11625
11634
|
}
|
|
11626
11635
|
return false;
|
|
11627
11636
|
}
|
|
11628
|
-
|
|
11629
|
-
function accessibleTextVirtual(virtualNode) {
|
|
11637
|
+
function _accessibleTextVirtual(virtualNode) {
|
|
11630
11638
|
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11631
11639
|
context = prepareContext(virtualNode, context);
|
|
11632
11640
|
if (shouldIgnoreHidden(virtualNode, context)) {
|
|
@@ -11635,20 +11643,20 @@
|
|
|
11635
11643
|
if (shouldIgnoreIconLigature(virtualNode, context)) {
|
|
11636
11644
|
return '';
|
|
11637
11645
|
}
|
|
11638
|
-
var computationSteps = [ arialabelledby_text_default, _arialabelText,
|
|
11639
|
-
var
|
|
11646
|
+
var computationSteps = [ arialabelledby_text_default, _arialabelText, _nativeTextAlternative, form_control_value_default, subtree_text_default, textNodeValue, title_text_default ];
|
|
11647
|
+
var accessibleName = computationSteps.reduce(function(accName, step) {
|
|
11640
11648
|
if (context.startNode === virtualNode) {
|
|
11641
|
-
|
|
11649
|
+
accName = sanitize_default(accName);
|
|
11642
11650
|
}
|
|
11643
|
-
if (
|
|
11644
|
-
return
|
|
11651
|
+
if (accName !== '') {
|
|
11652
|
+
return accName;
|
|
11645
11653
|
}
|
|
11646
11654
|
return step(virtualNode, context);
|
|
11647
11655
|
}, '');
|
|
11648
11656
|
if (context.debug) {
|
|
11649
|
-
axe.log(
|
|
11657
|
+
axe.log(accessibleName || '{empty-value}', virtualNode.actualNode, context);
|
|
11650
11658
|
}
|
|
11651
|
-
return
|
|
11659
|
+
return accessibleName;
|
|
11652
11660
|
}
|
|
11653
11661
|
function textNodeValue(virtualNode) {
|
|
11654
11662
|
if (virtualNode.props.nodeType !== 3) {
|
|
@@ -11672,7 +11680,7 @@
|
|
|
11672
11680
|
if (virtualNode.props.nodeType !== 3 || !ignoreIconLigature) {
|
|
11673
11681
|
return false;
|
|
11674
11682
|
}
|
|
11675
|
-
return
|
|
11683
|
+
return _isIconLigature(virtualNode, pixelThreshold, occurrenceThreshold);
|
|
11676
11684
|
}
|
|
11677
11685
|
function prepareContext(virtualNode, context) {
|
|
11678
11686
|
if (!context.startNode) {
|
|
@@ -11687,7 +11695,7 @@
|
|
|
11687
11695
|
}
|
|
11688
11696
|
return context;
|
|
11689
11697
|
}
|
|
11690
|
-
|
|
11698
|
+
_accessibleTextVirtual.alreadyProcessed = function alreadyProcessed(virtualnode, context) {
|
|
11691
11699
|
context.processed = context.processed || [];
|
|
11692
11700
|
if (context.processed.includes(virtualnode)) {
|
|
11693
11701
|
return true;
|
|
@@ -11695,7 +11703,6 @@
|
|
|
11695
11703
|
context.processed.push(virtualnode);
|
|
11696
11704
|
return false;
|
|
11697
11705
|
};
|
|
11698
|
-
var accessible_text_virtual_default = accessibleTextVirtual;
|
|
11699
11706
|
function removeUnicode(str, options) {
|
|
11700
11707
|
var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations;
|
|
11701
11708
|
if (emoji) {
|
|
@@ -12836,8 +12843,8 @@
|
|
|
12836
12843
|
format.type || (format.type = 'function');
|
|
12837
12844
|
format.name || (format.name = 'color');
|
|
12838
12845
|
format.coordGrammar = parseCoordGrammar(format.coords);
|
|
12839
|
-
var coordFormats = Object.entries(this.coords).map(function(
|
|
12840
|
-
var
|
|
12846
|
+
var coordFormats = Object.entries(this.coords).map(function(_ref154, i) {
|
|
12847
|
+
var _ref155 = _slicedToArray(_ref154, 2), id = _ref155[0], coordMeta = _ref155[1];
|
|
12841
12848
|
var outputType = format.coordGrammar[i][0];
|
|
12842
12849
|
var fromRange = coordMeta.range || coordMeta.refRange;
|
|
12843
12850
|
var toRange = outputType.range, suffix = '';
|
|
@@ -16135,6 +16142,18 @@
|
|
|
16135
16142
|
});
|
|
16136
16143
|
}
|
|
16137
16144
|
var hasShadowRoot;
|
|
16145
|
+
function _getFlattenedTree() {
|
|
16146
|
+
var node = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.documentElement;
|
|
16147
|
+
var shadowId = arguments.length > 1 ? arguments[1] : undefined;
|
|
16148
|
+
hasShadowRoot = false;
|
|
16149
|
+
var selectorMap = {};
|
|
16150
|
+
cache_default.set('nodeMap', new WeakMap());
|
|
16151
|
+
cache_default.set('selectorMap', selectorMap);
|
|
16152
|
+
var tree = flattenTree(node, shadowId, null);
|
|
16153
|
+
tree[0]._selectorMap = selectorMap;
|
|
16154
|
+
tree[0]._hasShadowRoot = hasShadowRoot;
|
|
16155
|
+
return tree;
|
|
16156
|
+
}
|
|
16138
16157
|
function getSlotChildren(node) {
|
|
16139
16158
|
var retVal = [];
|
|
16140
16159
|
node = node.firstChild;
|
|
@@ -16151,8 +16170,8 @@
|
|
|
16151
16170
|
}
|
|
16152
16171
|
function flattenTree(node, shadowId, parent) {
|
|
16153
16172
|
var retVal, realArray, nodeName2;
|
|
16154
|
-
function reduceShadowDOM(res, child,
|
|
16155
|
-
var replacements = flattenTree(child, shadowId,
|
|
16173
|
+
function reduceShadowDOM(res, child, parentVNode) {
|
|
16174
|
+
var replacements = flattenTree(child, shadowId, parentVNode);
|
|
16156
16175
|
if (replacements) {
|
|
16157
16176
|
res = res.concat(replacements);
|
|
16158
16177
|
}
|
|
@@ -16209,19 +16228,6 @@
|
|
|
16209
16228
|
}
|
|
16210
16229
|
}
|
|
16211
16230
|
}
|
|
16212
|
-
function getFlattenedTree() {
|
|
16213
|
-
var node = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.documentElement;
|
|
16214
|
-
var shadowId = arguments.length > 1 ? arguments[1] : undefined;
|
|
16215
|
-
hasShadowRoot = false;
|
|
16216
|
-
var selectorMap = {};
|
|
16217
|
-
cache_default.set('nodeMap', new WeakMap());
|
|
16218
|
-
cache_default.set('selectorMap', selectorMap);
|
|
16219
|
-
var tree = flattenTree(node, shadowId, null);
|
|
16220
|
-
tree[0]._selectorMap = selectorMap;
|
|
16221
|
-
tree[0]._hasShadowRoot = hasShadowRoot;
|
|
16222
|
-
return tree;
|
|
16223
|
-
}
|
|
16224
|
-
var get_flattened_tree_default = getFlattenedTree;
|
|
16225
16231
|
function getBaseLang(lang) {
|
|
16226
16232
|
if (!lang) {
|
|
16227
16233
|
return '';
|
|
@@ -16249,48 +16255,14 @@
|
|
|
16249
16255
|
}
|
|
16250
16256
|
var failure_summary_default = failureSummary;
|
|
16251
16257
|
function incompleteFallbackMessage() {
|
|
16252
|
-
var
|
|
16253
|
-
if (typeof
|
|
16254
|
-
|
|
16258
|
+
var message = axe._audit.data.incompleteFallbackMessage;
|
|
16259
|
+
if (typeof message === 'function') {
|
|
16260
|
+
message = message();
|
|
16255
16261
|
}
|
|
16256
|
-
if (typeof
|
|
16262
|
+
if (typeof message !== 'string') {
|
|
16257
16263
|
return '';
|
|
16258
16264
|
}
|
|
16259
|
-
return
|
|
16260
|
-
}
|
|
16261
|
-
function normalizeRelatedNodes(node, options) {
|
|
16262
|
-
[ 'any', 'all', 'none' ].forEach(function(type2) {
|
|
16263
|
-
if (!Array.isArray(node[type2])) {
|
|
16264
|
-
return;
|
|
16265
|
-
}
|
|
16266
|
-
node[type2].filter(function(checkRes) {
|
|
16267
|
-
return Array.isArray(checkRes.relatedNodes);
|
|
16268
|
-
}).forEach(function(checkRes) {
|
|
16269
|
-
checkRes.relatedNodes = checkRes.relatedNodes.map(function(relatedNode) {
|
|
16270
|
-
var _relatedNode$source;
|
|
16271
|
-
var res = {
|
|
16272
|
-
html: (_relatedNode$source = relatedNode === null || relatedNode === void 0 ? void 0 : relatedNode.source) !== null && _relatedNode$source !== void 0 ? _relatedNode$source : 'Undefined'
|
|
16273
|
-
};
|
|
16274
|
-
if (options.elementRef && !(relatedNode !== null && relatedNode !== void 0 && relatedNode.fromFrame)) {
|
|
16275
|
-
var _relatedNode$element;
|
|
16276
|
-
res.element = (_relatedNode$element = relatedNode === null || relatedNode === void 0 ? void 0 : relatedNode.element) !== null && _relatedNode$element !== void 0 ? _relatedNode$element : null;
|
|
16277
|
-
}
|
|
16278
|
-
if (options.selectors !== false || relatedNode !== null && relatedNode !== void 0 && relatedNode.fromFrame) {
|
|
16279
|
-
var _relatedNode$selector;
|
|
16280
|
-
res.target = (_relatedNode$selector = relatedNode === null || relatedNode === void 0 ? void 0 : relatedNode.selector) !== null && _relatedNode$selector !== void 0 ? _relatedNode$selector : [ ':root' ];
|
|
16281
|
-
}
|
|
16282
|
-
if (options.ancestry) {
|
|
16283
|
-
var _relatedNode$ancestry;
|
|
16284
|
-
res.ancestry = (_relatedNode$ancestry = relatedNode === null || relatedNode === void 0 ? void 0 : relatedNode.ancestry) !== null && _relatedNode$ancestry !== void 0 ? _relatedNode$ancestry : [ ':root' ];
|
|
16285
|
-
}
|
|
16286
|
-
if (options.xpath) {
|
|
16287
|
-
var _relatedNode$xpath;
|
|
16288
|
-
res.xpath = (_relatedNode$xpath = relatedNode === null || relatedNode === void 0 ? void 0 : relatedNode.xpath) !== null && _relatedNode$xpath !== void 0 ? _relatedNode$xpath : [ '/' ];
|
|
16289
|
-
}
|
|
16290
|
-
return res;
|
|
16291
|
-
});
|
|
16292
|
-
});
|
|
16293
|
-
});
|
|
16265
|
+
return message;
|
|
16294
16266
|
}
|
|
16295
16267
|
var resultKeys = constants_default.resultGroups;
|
|
16296
16268
|
function processAggregate(results, options) {
|
|
@@ -16328,8 +16300,8 @@
|
|
|
16328
16300
|
return subResult;
|
|
16329
16301
|
});
|
|
16330
16302
|
}
|
|
16331
|
-
resultKeys.forEach(function(
|
|
16332
|
-
return delete ruleResult[
|
|
16303
|
+
resultKeys.forEach(function(resultKey) {
|
|
16304
|
+
return delete ruleResult[resultKey];
|
|
16333
16305
|
});
|
|
16334
16306
|
delete ruleResult.pageLevel;
|
|
16335
16307
|
delete ruleResult.result;
|
|
@@ -16338,7 +16310,40 @@
|
|
|
16338
16310
|
});
|
|
16339
16311
|
return resultObject;
|
|
16340
16312
|
}
|
|
16341
|
-
|
|
16313
|
+
function normalizeRelatedNodes(node, options) {
|
|
16314
|
+
[ 'any', 'all', 'none' ].forEach(function(type2) {
|
|
16315
|
+
if (!Array.isArray(node[type2])) {
|
|
16316
|
+
return;
|
|
16317
|
+
}
|
|
16318
|
+
node[type2].filter(function(checkRes) {
|
|
16319
|
+
return Array.isArray(checkRes.relatedNodes);
|
|
16320
|
+
}).forEach(function(checkRes) {
|
|
16321
|
+
checkRes.relatedNodes = checkRes.relatedNodes.map(function(relatedNode) {
|
|
16322
|
+
var _relatedNode$source;
|
|
16323
|
+
var res = {
|
|
16324
|
+
html: (_relatedNode$source = relatedNode === null || relatedNode === void 0 ? void 0 : relatedNode.source) !== null && _relatedNode$source !== void 0 ? _relatedNode$source : 'Undefined'
|
|
16325
|
+
};
|
|
16326
|
+
if (options.elementRef && !(relatedNode !== null && relatedNode !== void 0 && relatedNode.fromFrame)) {
|
|
16327
|
+
var _relatedNode$element;
|
|
16328
|
+
res.element = (_relatedNode$element = relatedNode === null || relatedNode === void 0 ? void 0 : relatedNode.element) !== null && _relatedNode$element !== void 0 ? _relatedNode$element : null;
|
|
16329
|
+
}
|
|
16330
|
+
if (options.selectors !== false || relatedNode !== null && relatedNode !== void 0 && relatedNode.fromFrame) {
|
|
16331
|
+
var _relatedNode$selector;
|
|
16332
|
+
res.target = (_relatedNode$selector = relatedNode === null || relatedNode === void 0 ? void 0 : relatedNode.selector) !== null && _relatedNode$selector !== void 0 ? _relatedNode$selector : [ ':root' ];
|
|
16333
|
+
}
|
|
16334
|
+
if (options.ancestry) {
|
|
16335
|
+
var _relatedNode$ancestry;
|
|
16336
|
+
res.ancestry = (_relatedNode$ancestry = relatedNode === null || relatedNode === void 0 ? void 0 : relatedNode.ancestry) !== null && _relatedNode$ancestry !== void 0 ? _relatedNode$ancestry : [ ':root' ];
|
|
16337
|
+
}
|
|
16338
|
+
if (options.xpath) {
|
|
16339
|
+
var _relatedNode$xpath;
|
|
16340
|
+
res.xpath = (_relatedNode$xpath = relatedNode === null || relatedNode === void 0 ? void 0 : relatedNode.xpath) !== null && _relatedNode$xpath !== void 0 ? _relatedNode$xpath : [ '/' ];
|
|
16341
|
+
}
|
|
16342
|
+
return res;
|
|
16343
|
+
});
|
|
16344
|
+
});
|
|
16345
|
+
});
|
|
16346
|
+
}
|
|
16342
16347
|
var dataRegex = /\$\{\s?data\s?\}/g;
|
|
16343
16348
|
function substitute(str, data) {
|
|
16344
16349
|
if (typeof data === 'string') {
|
|
@@ -16590,18 +16595,18 @@
|
|
|
16590
16595
|
}
|
|
16591
16596
|
function assertLabelledFrameSelector(selector) {
|
|
16592
16597
|
assert2(Array.isArray(selector.fromFrames), 'fromFrames property must be an array');
|
|
16593
|
-
assert2(selector.fromFrames.every(function(
|
|
16594
|
-
return !objectHasOwn(
|
|
16598
|
+
assert2(selector.fromFrames.every(function(fromFrameSelector) {
|
|
16599
|
+
return !objectHasOwn(fromFrameSelector, 'fromFrames');
|
|
16595
16600
|
}), 'Invalid context; fromFrames selector must be appended, rather than nested');
|
|
16596
16601
|
assert2(!objectHasOwn(selector, 'fromShadowDom'), 'fromFrames and fromShadowDom cannot be used on the same object');
|
|
16597
16602
|
}
|
|
16598
16603
|
function assertLabelledShadowDomSelector(selector) {
|
|
16599
16604
|
assert2(Array.isArray(selector.fromShadowDom), 'fromShadowDom property must be an array');
|
|
16600
|
-
assert2(selector.fromShadowDom.every(function(
|
|
16601
|
-
return !objectHasOwn(
|
|
16605
|
+
assert2(selector.fromShadowDom.every(function(fromShadowDomSelector) {
|
|
16606
|
+
return !objectHasOwn(fromShadowDomSelector, 'fromFrames');
|
|
16602
16607
|
}), 'shadow selector must be inside fromFrame instead');
|
|
16603
|
-
assert2(selector.fromShadowDom.every(function(
|
|
16604
|
-
return !objectHasOwn(
|
|
16608
|
+
assert2(selector.fromShadowDom.every(function(fromShadowDomSelector) {
|
|
16609
|
+
return !objectHasOwn(fromShadowDomSelector, 'fromShadowDom');
|
|
16605
16610
|
}), 'fromShadowDom selector must be appended, rather than nested');
|
|
16606
16611
|
}
|
|
16607
16612
|
function isShadowSelector(selector) {
|
|
@@ -16663,14 +16668,14 @@
|
|
|
16663
16668
|
}
|
|
16664
16669
|
function Context(spec, flatTree) {
|
|
16665
16670
|
var _spec, _spec2, _spec3, _spec4, _this5 = this;
|
|
16666
|
-
spec =
|
|
16671
|
+
spec = _clone(spec);
|
|
16667
16672
|
this.frames = [];
|
|
16668
16673
|
this.page = typeof ((_spec = spec) === null || _spec === void 0 ? void 0 : _spec.page) === 'boolean' ? spec.page : void 0;
|
|
16669
16674
|
this.initiator = typeof ((_spec2 = spec) === null || _spec2 === void 0 ? void 0 : _spec2.initiator) === 'boolean' ? spec.initiator : true;
|
|
16670
16675
|
this.focusable = typeof ((_spec3 = spec) === null || _spec3 === void 0 ? void 0 : _spec3.focusable) === 'boolean' ? spec.focusable : true;
|
|
16671
16676
|
this.size = _typeof((_spec4 = spec) === null || _spec4 === void 0 ? void 0 : _spec4.size) === 'object' ? spec.size : {};
|
|
16672
16677
|
spec = normalizeContext(spec);
|
|
16673
|
-
this.flatTree = flatTree !== null && flatTree !== void 0 ? flatTree :
|
|
16678
|
+
this.flatTree = flatTree !== null && flatTree !== void 0 ? flatTree : _getFlattenedTree(getRootNode2(spec));
|
|
16674
16679
|
this.exclude = spec.exclude;
|
|
16675
16680
|
this.include = spec.include;
|
|
16676
16681
|
this.include = parseSelectorArray(this, 'include');
|
|
@@ -16738,16 +16743,16 @@
|
|
|
16738
16743
|
};
|
|
16739
16744
|
});
|
|
16740
16745
|
}
|
|
16741
|
-
function
|
|
16742
|
-
var rule = axe._audit.rules.find(function(
|
|
16743
|
-
|
|
16746
|
+
function _getRule(ruleId) {
|
|
16747
|
+
var rule = axe._audit.rules.find(function(_ref71) {
|
|
16748
|
+
var id = _ref71.id;
|
|
16749
|
+
return id === ruleId;
|
|
16744
16750
|
});
|
|
16745
16751
|
if (!rule) {
|
|
16746
16752
|
throw new Error('Cannot find rule by id: '.concat(ruleId));
|
|
16747
16753
|
}
|
|
16748
16754
|
return rule;
|
|
16749
16755
|
}
|
|
16750
|
-
var get_rule_default = getRule;
|
|
16751
16756
|
function getScroll(elm) {
|
|
16752
16757
|
var buffer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
16753
16758
|
var overflowX = elm.scrollWidth > elm.clientWidth + buffer;
|
|
@@ -16796,7 +16801,7 @@
|
|
|
16796
16801
|
}
|
|
16797
16802
|
var get_scroll_state_default = getScrollState;
|
|
16798
16803
|
function _getStandards() {
|
|
16799
|
-
return
|
|
16804
|
+
return _clone(standards_default);
|
|
16800
16805
|
}
|
|
16801
16806
|
function getStyleSheetFactory(dynamicDoc) {
|
|
16802
16807
|
if (!dynamicDoc) {
|
|
@@ -16879,8 +16884,8 @@
|
|
|
16879
16884
|
return !!standards_default.htmlElms[nodeName2];
|
|
16880
16885
|
}
|
|
16881
16886
|
var is_html_element_default = isHtmlElement;
|
|
16882
|
-
function _isNodeInContext(node,
|
|
16883
|
-
var
|
|
16887
|
+
function _isNodeInContext(node, _ref72) {
|
|
16888
|
+
var _ref72$include = _ref72.include, include = _ref72$include === void 0 ? [] : _ref72$include, _ref72$exclude = _ref72.exclude, exclude = _ref72$exclude === void 0 ? [] : _ref72$exclude;
|
|
16884
16889
|
var filterInclude = include.filter(function(candidate) {
|
|
16885
16890
|
return _contains(candidate, node);
|
|
16886
16891
|
});
|
|
@@ -16914,24 +16919,23 @@
|
|
|
16914
16919
|
}
|
|
16915
16920
|
return deepest;
|
|
16916
16921
|
}
|
|
16917
|
-
function
|
|
16922
|
+
function _matchAncestry(ancestryA, ancestryB) {
|
|
16918
16923
|
if (ancestryA.length !== ancestryB.length) {
|
|
16919
16924
|
return false;
|
|
16920
16925
|
}
|
|
16921
|
-
return ancestryA.every(function(selectorA,
|
|
16922
|
-
var selectorB = ancestryB[
|
|
16926
|
+
return ancestryA.every(function(selectorA, ancestorIndex) {
|
|
16927
|
+
var selectorB = ancestryB[ancestorIndex];
|
|
16923
16928
|
if (!Array.isArray(selectorA)) {
|
|
16924
16929
|
return selectorA === selectorB;
|
|
16925
16930
|
}
|
|
16926
16931
|
if (selectorA.length !== selectorB.length) {
|
|
16927
16932
|
return false;
|
|
16928
16933
|
}
|
|
16929
|
-
return selectorA.every(function(str,
|
|
16930
|
-
return selectorB[
|
|
16934
|
+
return selectorA.every(function(str, selectorIndex) {
|
|
16935
|
+
return selectorB[selectorIndex] === str;
|
|
16931
16936
|
});
|
|
16932
16937
|
});
|
|
16933
16938
|
}
|
|
16934
|
-
var match_ancestry_default = matchAncestry;
|
|
16935
16939
|
function nodeSorter(nodeA, nodeB) {
|
|
16936
16940
|
nodeA = nodeA.actualNode || nodeA;
|
|
16937
16941
|
nodeB = nodeB.actualNode || nodeB;
|
|
@@ -17447,8 +17451,8 @@
|
|
|
17447
17451
|
return matchExpressions(domTree, expressions, filter);
|
|
17448
17452
|
}
|
|
17449
17453
|
var query_selector_all_filter_default = querySelectorAllFilter;
|
|
17450
|
-
function preloadCssom(
|
|
17451
|
-
var
|
|
17454
|
+
function preloadCssom(_ref73) {
|
|
17455
|
+
var _ref73$treeRoot = _ref73.treeRoot, treeRoot = _ref73$treeRoot === void 0 ? axe._tree[0] : _ref73$treeRoot;
|
|
17452
17456
|
var rootNodes = getAllRootNodesInTree(treeRoot);
|
|
17453
17457
|
if (!rootNodes.length) {
|
|
17454
17458
|
return Promise.resolve();
|
|
@@ -17478,8 +17482,8 @@
|
|
|
17478
17482
|
}
|
|
17479
17483
|
function getCssomForAllRootNodes(rootNodes, convertDataToStylesheet) {
|
|
17480
17484
|
var promises = [];
|
|
17481
|
-
rootNodes.forEach(function(
|
|
17482
|
-
var rootNode =
|
|
17485
|
+
rootNodes.forEach(function(_ref74, index) {
|
|
17486
|
+
var rootNode = _ref74.rootNode, shadowId = _ref74.shadowId;
|
|
17483
17487
|
var sheets = getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet);
|
|
17484
17488
|
if (!sheets) {
|
|
17485
17489
|
return Promise.all(promises);
|
|
@@ -17563,10 +17567,10 @@
|
|
|
17563
17567
|
return true;
|
|
17564
17568
|
});
|
|
17565
17569
|
}
|
|
17566
|
-
function preloadMedia(
|
|
17567
|
-
var
|
|
17568
|
-
var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(
|
|
17569
|
-
var actualNode =
|
|
17570
|
+
function preloadMedia(_ref75) {
|
|
17571
|
+
var _ref75$treeRoot = _ref75.treeRoot, treeRoot = _ref75$treeRoot === void 0 ? axe._tree[0] : _ref75$treeRoot;
|
|
17572
|
+
var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(_ref76) {
|
|
17573
|
+
var actualNode = _ref76.actualNode;
|
|
17570
17574
|
if (actualNode.hasAttribute('src')) {
|
|
17571
17575
|
return !!actualNode.getAttribute('src');
|
|
17572
17576
|
}
|
|
@@ -17578,8 +17582,8 @@
|
|
|
17578
17582
|
}
|
|
17579
17583
|
return true;
|
|
17580
17584
|
});
|
|
17581
|
-
return Promise.all(mediaVirtualNodes.map(function(
|
|
17582
|
-
var actualNode =
|
|
17585
|
+
return Promise.all(mediaVirtualNodes.map(function(_ref77) {
|
|
17586
|
+
var actualNode = _ref77.actualNode;
|
|
17583
17587
|
return isMediaElementReady(actualNode);
|
|
17584
17588
|
}));
|
|
17585
17589
|
}
|
|
@@ -17596,8 +17600,37 @@
|
|
|
17596
17600
|
elm.addEventListener('loadedmetadata', onMediaReady);
|
|
17597
17601
|
});
|
|
17598
17602
|
}
|
|
17599
|
-
function
|
|
17600
|
-
|
|
17603
|
+
function _preload(options) {
|
|
17604
|
+
var preloadFunctionsMap = {
|
|
17605
|
+
cssom: preload_cssom_default,
|
|
17606
|
+
media: preload_media_default
|
|
17607
|
+
};
|
|
17608
|
+
if (!_shouldPreload(options)) {
|
|
17609
|
+
return Promise.resolve();
|
|
17610
|
+
}
|
|
17611
|
+
return new Promise(function(resolve, reject) {
|
|
17612
|
+
var _getPreloadConfig2 = _getPreloadConfig(options), assets = _getPreloadConfig2.assets, timeout = _getPreloadConfig2.timeout;
|
|
17613
|
+
var preloadTimeout = setTimeout(function() {
|
|
17614
|
+
return reject(new Error('Preload assets timed out.'));
|
|
17615
|
+
}, timeout);
|
|
17616
|
+
Promise.all(assets.map(function(asset) {
|
|
17617
|
+
return preloadFunctionsMap[asset](options).then(function(results) {
|
|
17618
|
+
return _defineProperty({}, asset, results);
|
|
17619
|
+
});
|
|
17620
|
+
})).then(function(results) {
|
|
17621
|
+
var preloadAssets = results.reduce(function(out, result) {
|
|
17622
|
+
return _extends({}, out, result);
|
|
17623
|
+
}, {});
|
|
17624
|
+
clearTimeout(preloadTimeout);
|
|
17625
|
+
resolve(preloadAssets);
|
|
17626
|
+
})['catch'](function(err2) {
|
|
17627
|
+
clearTimeout(preloadTimeout);
|
|
17628
|
+
reject(err2);
|
|
17629
|
+
});
|
|
17630
|
+
});
|
|
17631
|
+
}
|
|
17632
|
+
function isValidPreloadObject(preloadObj) {
|
|
17633
|
+
return _typeof(preloadObj) === 'object' && Array.isArray(preloadObj.assets);
|
|
17601
17634
|
}
|
|
17602
17635
|
function _shouldPreload(options) {
|
|
17603
17636
|
if (!options || options.preload === void 0 || options.preload === null) {
|
|
@@ -17634,40 +17667,24 @@
|
|
|
17634
17667
|
}
|
|
17635
17668
|
return config;
|
|
17636
17669
|
}
|
|
17637
|
-
function
|
|
17638
|
-
var
|
|
17639
|
-
|
|
17640
|
-
|
|
17641
|
-
|
|
17642
|
-
|
|
17643
|
-
|
|
17644
|
-
|
|
17645
|
-
|
|
17646
|
-
|
|
17647
|
-
|
|
17648
|
-
return reject(new Error('Preload assets timed out.'));
|
|
17649
|
-
}, timeout);
|
|
17650
|
-
Promise.all(assets.map(function(asset) {
|
|
17651
|
-
return preloadFunctionsMap[asset](options).then(function(results) {
|
|
17652
|
-
return _defineProperty({}, asset, results);
|
|
17653
|
-
});
|
|
17654
|
-
})).then(function(results) {
|
|
17655
|
-
var preloadAssets = results.reduce(function(out, result) {
|
|
17656
|
-
return _extends({}, out, result);
|
|
17657
|
-
}, {});
|
|
17658
|
-
clearTimeout(preloadTimeout);
|
|
17659
|
-
resolve(preloadAssets);
|
|
17660
|
-
})['catch'](function(err2) {
|
|
17661
|
-
clearTimeout(preloadTimeout);
|
|
17662
|
-
reject(err2);
|
|
17663
|
-
});
|
|
17670
|
+
function _publishMetaData(ruleResult) {
|
|
17671
|
+
var checksData = axe._audit.data.checks || {};
|
|
17672
|
+
var rulesData = axe._audit.data.rules || {};
|
|
17673
|
+
var rule = find_by_default(axe._audit.rules, 'id', ruleResult.id) || {};
|
|
17674
|
+
ruleResult.tags = _clone(rule.tags || []);
|
|
17675
|
+
var shouldBeTrue = extender(checksData, true, rule);
|
|
17676
|
+
var shouldBeFalse = extender(checksData, false, rule);
|
|
17677
|
+
ruleResult.nodes.forEach(function(detail) {
|
|
17678
|
+
detail.any.forEach(shouldBeTrue);
|
|
17679
|
+
detail.all.forEach(shouldBeTrue);
|
|
17680
|
+
detail.none.forEach(shouldBeFalse);
|
|
17664
17681
|
});
|
|
17682
|
+
extend_meta_data_default(ruleResult, _clone(rulesData[ruleResult.id] || {}));
|
|
17665
17683
|
}
|
|
17666
|
-
var preload_default = preload;
|
|
17667
17684
|
function getIncompleteReason(checkData, messages) {
|
|
17668
|
-
function getDefaultMsg(
|
|
17669
|
-
if (
|
|
17670
|
-
return
|
|
17685
|
+
function getDefaultMsg(message) {
|
|
17686
|
+
if (message.incomplete && message.incomplete['default']) {
|
|
17687
|
+
return message.incomplete['default'];
|
|
17671
17688
|
} else {
|
|
17672
17689
|
return incompleteFallbackMessage();
|
|
17673
17690
|
}
|
|
@@ -17714,21 +17731,6 @@
|
|
|
17714
17731
|
extend_meta_data_default(check, data);
|
|
17715
17732
|
};
|
|
17716
17733
|
}
|
|
17717
|
-
function publishMetaData(ruleResult) {
|
|
17718
|
-
var checksData = axe._audit.data.checks || {};
|
|
17719
|
-
var rulesData = axe._audit.data.rules || {};
|
|
17720
|
-
var rule = find_by_default(axe._audit.rules, 'id', ruleResult.id) || {};
|
|
17721
|
-
ruleResult.tags = clone_default(rule.tags || []);
|
|
17722
|
-
var shouldBeTrue = extender(checksData, true, rule);
|
|
17723
|
-
var shouldBeFalse = extender(checksData, false, rule);
|
|
17724
|
-
ruleResult.nodes.forEach(function(detail) {
|
|
17725
|
-
detail.any.forEach(shouldBeTrue);
|
|
17726
|
-
detail.all.forEach(shouldBeTrue);
|
|
17727
|
-
detail.none.forEach(shouldBeFalse);
|
|
17728
|
-
});
|
|
17729
|
-
extend_meta_data_default(ruleResult, clone_default(rulesData[ruleResult.id] || {}));
|
|
17730
|
-
}
|
|
17731
|
-
var publish_metadata_default = publishMetaData;
|
|
17732
17734
|
function querySelectorAll(domTree, selector) {
|
|
17733
17735
|
return query_selector_all_filter_default(domTree, selector);
|
|
17734
17736
|
}
|
|
@@ -17884,8 +17886,8 @@
|
|
|
17884
17886
|
}
|
|
17885
17887
|
}
|
|
17886
17888
|
function setScrollState(scrollState) {
|
|
17887
|
-
scrollState.forEach(function(
|
|
17888
|
-
var elm =
|
|
17889
|
+
scrollState.forEach(function(_ref79) {
|
|
17890
|
+
var elm = _ref79.elm, top = _ref79.top, left = _ref79.left;
|
|
17889
17891
|
return setScroll(elm, top, left);
|
|
17890
17892
|
});
|
|
17891
17893
|
}
|
|
@@ -17913,8 +17915,8 @@
|
|
|
17913
17915
|
}
|
|
17914
17916
|
return selectAllRecursive(selectorArr, doc);
|
|
17915
17917
|
}
|
|
17916
|
-
function selectAllRecursive(
|
|
17917
|
-
var
|
|
17918
|
+
function selectAllRecursive(_ref80, doc) {
|
|
17919
|
+
var _ref81 = _toArray(_ref80), selectorStr = _ref81[0], restSelector = _ref81.slice(1);
|
|
17918
17920
|
var elms = doc.querySelectorAll(selectorStr);
|
|
17919
17921
|
if (restSelector.length === 0) {
|
|
17920
17922
|
return Array.from(elms);
|
|
@@ -18018,9 +18020,9 @@
|
|
|
18018
18020
|
nodeTypeToName[nodeNamesToTypes[nodeName2]] = nodeName2;
|
|
18019
18021
|
});
|
|
18020
18022
|
function normaliseProps(serialNode) {
|
|
18021
|
-
var _serialNode$nodeName,
|
|
18023
|
+
var _serialNode$nodeName, _ref82, _serialNode$nodeType;
|
|
18022
18024
|
var nodeName2 = (_serialNode$nodeName = serialNode.nodeName) !== null && _serialNode$nodeName !== void 0 ? _serialNode$nodeName : nodeTypeToName[serialNode.nodeType];
|
|
18023
|
-
var nodeType = (
|
|
18025
|
+
var nodeType = (_ref82 = (_serialNode$nodeType = serialNode.nodeType) !== null && _serialNode$nodeType !== void 0 ? _serialNode$nodeType : nodeNamesToTypes[serialNode.nodeName]) !== null && _ref82 !== void 0 ? _ref82 : 1;
|
|
18024
18026
|
assert_default(typeof nodeType === 'number', 'nodeType has to be a number, got \''.concat(nodeType, '\''));
|
|
18025
18027
|
assert_default(typeof nodeName2 === 'string', 'nodeName has to be a string, got \''.concat(nodeName2, '\''));
|
|
18026
18028
|
nodeName2 = nodeName2.toLowerCase();
|
|
@@ -18041,8 +18043,8 @@
|
|
|
18041
18043
|
delete props.attributes;
|
|
18042
18044
|
return Object.freeze(props);
|
|
18043
18045
|
}
|
|
18044
|
-
function normaliseAttrs(
|
|
18045
|
-
var
|
|
18046
|
+
function normaliseAttrs(_ref83) {
|
|
18047
|
+
var _ref83$attributes = _ref83.attributes, attributes2 = _ref83$attributes === void 0 ? {} : _ref83$attributes;
|
|
18046
18048
|
var attrMap = {
|
|
18047
18049
|
htmlFor: 'for',
|
|
18048
18050
|
className: 'class'
|
|
@@ -20207,8 +20209,8 @@
|
|
|
20207
20209
|
nodeName: [ 'abbr', 'address', 'canvas', 'div', 'p', 'pre', 'blockquote', 'ins', 'del', 'output', 'span', 'table', 'tbody', 'thead', 'tfoot', 'td', 'em', 'strong', 'small', 's', 'cite', 'q', 'dfn', 'abbr', 'time', 'code', 'var', 'samp', 'kbd', 'sub', 'sup', 'i', 'b', 'u', 'mark', 'ruby', 'rt', 'rp', 'bdi', 'bdo', 'br', 'wbr', 'th', 'tr' ]
|
|
20208
20210
|
} ];
|
|
20209
20211
|
lookupTable.evaluateRoleForElement = {
|
|
20210
|
-
A: function A(
|
|
20211
|
-
var node =
|
|
20212
|
+
A: function A(_ref84) {
|
|
20213
|
+
var node = _ref84.node, out = _ref84.out;
|
|
20212
20214
|
if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
|
|
20213
20215
|
return true;
|
|
20214
20216
|
}
|
|
@@ -20217,19 +20219,19 @@
|
|
|
20217
20219
|
}
|
|
20218
20220
|
return true;
|
|
20219
20221
|
},
|
|
20220
|
-
AREA: function AREA(
|
|
20221
|
-
var node =
|
|
20222
|
+
AREA: function AREA(_ref85) {
|
|
20223
|
+
var node = _ref85.node;
|
|
20222
20224
|
return !node.href;
|
|
20223
20225
|
},
|
|
20224
|
-
BUTTON: function BUTTON(
|
|
20225
|
-
var node =
|
|
20226
|
+
BUTTON: function BUTTON(_ref86) {
|
|
20227
|
+
var node = _ref86.node, role = _ref86.role, out = _ref86.out;
|
|
20226
20228
|
if (node.getAttribute('type') === 'menu') {
|
|
20227
20229
|
return role === 'menuitem';
|
|
20228
20230
|
}
|
|
20229
20231
|
return out;
|
|
20230
20232
|
},
|
|
20231
|
-
IMG: function IMG(
|
|
20232
|
-
var node =
|
|
20233
|
+
IMG: function IMG(_ref87) {
|
|
20234
|
+
var node = _ref87.node, role = _ref87.role, out = _ref87.out;
|
|
20233
20235
|
switch (node.alt) {
|
|
20234
20236
|
case null:
|
|
20235
20237
|
return out;
|
|
@@ -20241,8 +20243,8 @@
|
|
|
20241
20243
|
return role !== 'presentation' && role !== 'none';
|
|
20242
20244
|
}
|
|
20243
20245
|
},
|
|
20244
|
-
INPUT: function INPUT(
|
|
20245
|
-
var node =
|
|
20246
|
+
INPUT: function INPUT(_ref88) {
|
|
20247
|
+
var node = _ref88.node, role = _ref88.role, out = _ref88.out;
|
|
20246
20248
|
switch (node.type) {
|
|
20247
20249
|
case 'button':
|
|
20248
20250
|
case 'image':
|
|
@@ -20272,32 +20274,32 @@
|
|
|
20272
20274
|
return false;
|
|
20273
20275
|
}
|
|
20274
20276
|
},
|
|
20275
|
-
LI: function LI(
|
|
20276
|
-
var node =
|
|
20277
|
+
LI: function LI(_ref89) {
|
|
20278
|
+
var node = _ref89.node, out = _ref89.out;
|
|
20277
20279
|
var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
|
|
20278
20280
|
if (hasImplicitListitemRole) {
|
|
20279
20281
|
return out;
|
|
20280
20282
|
}
|
|
20281
20283
|
return true;
|
|
20282
20284
|
},
|
|
20283
|
-
MENU: function MENU(
|
|
20284
|
-
var node =
|
|
20285
|
+
MENU: function MENU(_ref90) {
|
|
20286
|
+
var node = _ref90.node;
|
|
20285
20287
|
if (node.getAttribute('type') === 'context') {
|
|
20286
20288
|
return false;
|
|
20287
20289
|
}
|
|
20288
20290
|
return true;
|
|
20289
20291
|
},
|
|
20290
|
-
OPTION: function OPTION(
|
|
20291
|
-
var node =
|
|
20292
|
+
OPTION: function OPTION(_ref91) {
|
|
20293
|
+
var node = _ref91.node;
|
|
20292
20294
|
var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
|
|
20293
20295
|
return !withinOptionList;
|
|
20294
20296
|
},
|
|
20295
|
-
SELECT: function SELECT(
|
|
20296
|
-
var node =
|
|
20297
|
+
SELECT: function SELECT(_ref92) {
|
|
20298
|
+
var node = _ref92.node, role = _ref92.role;
|
|
20297
20299
|
return !node.multiple && node.size <= 1 && role === 'menu';
|
|
20298
20300
|
},
|
|
20299
|
-
SVG: function SVG(
|
|
20300
|
-
var node =
|
|
20301
|
+
SVG: function SVG(_ref93) {
|
|
20302
|
+
var node = _ref93.node, out = _ref93.out;
|
|
20301
20303
|
if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
|
|
20302
20304
|
return true;
|
|
20303
20305
|
}
|
|
@@ -20312,7 +20314,7 @@
|
|
|
20312
20314
|
var implicit = null;
|
|
20313
20315
|
var roles = lookup_table_default.role[role];
|
|
20314
20316
|
if (roles && roles.implicit) {
|
|
20315
|
-
implicit =
|
|
20317
|
+
implicit = _clone(roles.implicit);
|
|
20316
20318
|
}
|
|
20317
20319
|
return implicit;
|
|
20318
20320
|
}
|
|
@@ -20323,7 +20325,7 @@
|
|
|
20323
20325
|
var is_accessible_ref_default = isAccessibleRef;
|
|
20324
20326
|
function _isComboboxPopup(virtualNode) {
|
|
20325
20327
|
var _popupRoles;
|
|
20326
|
-
var
|
|
20328
|
+
var _ref94 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, popupRoles = _ref94.popupRoles;
|
|
20327
20329
|
var role = get_role_default(virtualNode);
|
|
20328
20330
|
(_popupRoles = popupRoles) !== null && _popupRoles !== void 0 ? _popupRoles : popupRoles = aria_attrs_default['aria-haspopup'].values;
|
|
20329
20331
|
if (!popupRoles.includes(role)) {
|
|
@@ -20542,7 +20544,7 @@
|
|
|
20542
20544
|
}
|
|
20543
20545
|
function ariaConditionalRowAttr(node) {
|
|
20544
20546
|
var _invalidTableRowAttrs, _invalidTableRowAttrs2;
|
|
20545
|
-
var
|
|
20547
|
+
var _ref95 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, invalidTableRowAttrs = _ref95.invalidTableRowAttrs;
|
|
20546
20548
|
var virtualNode = arguments.length > 2 ? arguments[2] : undefined;
|
|
20547
20549
|
var invalidAttrs = (_invalidTableRowAttrs = invalidTableRowAttrs === null || invalidTableRowAttrs === void 0 ? void 0 : (_invalidTableRowAttrs2 = invalidTableRowAttrs.filter) === null || _invalidTableRowAttrs2 === void 0 ? void 0 : _invalidTableRowAttrs2.call(invalidTableRowAttrs, function(invalidAttr) {
|
|
20548
20550
|
return virtualNode.hasAttr(invalidAttr);
|
|
@@ -20583,24 +20585,24 @@
|
|
|
20583
20585
|
}
|
|
20584
20586
|
function ariaErrormessageEvaluate(node, options, virtualNode) {
|
|
20585
20587
|
options = Array.isArray(options) ? options : [];
|
|
20586
|
-
var
|
|
20588
|
+
var errorMessageAttr = virtualNode.attr('aria-errormessage');
|
|
20587
20589
|
var hasAttr = virtualNode.hasAttr('aria-errormessage');
|
|
20588
20590
|
var invaid = virtualNode.attr('aria-invalid');
|
|
20589
20591
|
var hasInvallid = virtualNode.hasAttr('aria-invalid');
|
|
20590
20592
|
if (!hasInvallid || invaid === 'false') {
|
|
20591
20593
|
return true;
|
|
20592
20594
|
}
|
|
20593
|
-
function validateAttrValue2(
|
|
20594
|
-
if (
|
|
20595
|
+
function validateAttrValue2(attr) {
|
|
20596
|
+
if (attr.trim() === '') {
|
|
20595
20597
|
return standards_default.ariaAttrs['aria-errormessage'].allowEmpty;
|
|
20596
20598
|
}
|
|
20597
20599
|
var idref;
|
|
20598
20600
|
try {
|
|
20599
|
-
idref =
|
|
20601
|
+
idref = attr && idrefs_default(virtualNode, 'aria-errormessage')[0];
|
|
20600
20602
|
} catch (e) {
|
|
20601
20603
|
this.data({
|
|
20602
20604
|
messageKey: 'idrefs',
|
|
20603
|
-
values: token_list_default(
|
|
20605
|
+
values: token_list_default(attr)
|
|
20604
20606
|
});
|
|
20605
20607
|
return void 0;
|
|
20606
20608
|
}
|
|
@@ -20608,21 +20610,20 @@
|
|
|
20608
20610
|
if (!_isVisibleToScreenReaders(idref)) {
|
|
20609
20611
|
this.data({
|
|
20610
20612
|
messageKey: 'hidden',
|
|
20611
|
-
values: token_list_default(
|
|
20613
|
+
values: token_list_default(attr)
|
|
20612
20614
|
});
|
|
20613
20615
|
return false;
|
|
20614
20616
|
}
|
|
20615
|
-
return idref.getAttribute('role') === 'alert' || idref.getAttribute('aria-live') === 'assertive' || idref.getAttribute('aria-live') === 'polite' || token_list_default(virtualNode.attr('aria-describedby')).indexOf(
|
|
20617
|
+
return idref.getAttribute('role') === 'alert' || idref.getAttribute('aria-live') === 'assertive' || idref.getAttribute('aria-live') === 'polite' || token_list_default(virtualNode.attr('aria-describedby')).indexOf(attr) > -1;
|
|
20616
20618
|
}
|
|
20617
20619
|
return;
|
|
20618
20620
|
}
|
|
20619
|
-
if (options.indexOf(
|
|
20620
|
-
this.data(token_list_default(
|
|
20621
|
-
return validateAttrValue2.call(this,
|
|
20621
|
+
if (options.indexOf(errorMessageAttr) === -1 && hasAttr) {
|
|
20622
|
+
this.data(token_list_default(errorMessageAttr));
|
|
20623
|
+
return validateAttrValue2.call(this, errorMessageAttr);
|
|
20622
20624
|
}
|
|
20623
20625
|
return true;
|
|
20624
20626
|
}
|
|
20625
|
-
var aria_errormessage_evaluate_default = ariaErrormessageEvaluate;
|
|
20626
20627
|
function ariaHiddenBodyEvaluate(node, options, virtualNode) {
|
|
20627
20628
|
return virtualNode.attr('aria-hidden') !== 'true';
|
|
20628
20629
|
}
|
|
@@ -20738,27 +20739,27 @@
|
|
|
20738
20739
|
}
|
|
20739
20740
|
function ariaRequiredChildrenEvaluate(node, options, virtualNode) {
|
|
20740
20741
|
var reviewEmpty = options && Array.isArray(options.reviewEmpty) ? options.reviewEmpty : [];
|
|
20741
|
-
var
|
|
20742
|
+
var explicitRole2 = get_explicit_role_default(virtualNode, {
|
|
20742
20743
|
dpub: true
|
|
20743
20744
|
});
|
|
20744
|
-
var required = required_owned_default(
|
|
20745
|
+
var required = required_owned_default(explicitRole2);
|
|
20745
20746
|
if (required === null) {
|
|
20746
20747
|
return true;
|
|
20747
20748
|
}
|
|
20748
20749
|
var _getOwnedRoles = getOwnedRoles(virtualNode, required), ownedRoles = _getOwnedRoles.ownedRoles, ownedElements = _getOwnedRoles.ownedElements;
|
|
20749
|
-
var unallowed = ownedRoles.filter(function(
|
|
20750
|
-
var
|
|
20751
|
-
return !required.includes(
|
|
20750
|
+
var unallowed = ownedRoles.filter(function(_ref96) {
|
|
20751
|
+
var role = _ref96.role;
|
|
20752
|
+
return !required.includes(role);
|
|
20752
20753
|
});
|
|
20753
20754
|
if (unallowed.length) {
|
|
20754
|
-
this.relatedNodes(unallowed.map(function(
|
|
20755
|
-
var ownedElement =
|
|
20755
|
+
this.relatedNodes(unallowed.map(function(_ref97) {
|
|
20756
|
+
var ownedElement = _ref97.ownedElement;
|
|
20756
20757
|
return ownedElement;
|
|
20757
20758
|
}));
|
|
20758
20759
|
this.data({
|
|
20759
20760
|
messageKey: 'unallowed',
|
|
20760
|
-
values: unallowed.map(function(
|
|
20761
|
-
var ownedElement =
|
|
20761
|
+
values: unallowed.map(function(_ref98) {
|
|
20762
|
+
var ownedElement = _ref98.ownedElement, attr = _ref98.attr;
|
|
20762
20763
|
return getUnallowedSelector(ownedElement, attr);
|
|
20763
20764
|
}).filter(function(selector, index, array) {
|
|
20764
20765
|
return array.indexOf(selector) === index;
|
|
@@ -20766,12 +20767,12 @@
|
|
|
20766
20767
|
});
|
|
20767
20768
|
return false;
|
|
20768
20769
|
}
|
|
20769
|
-
var missing = missingRequiredChildren(virtualNode,
|
|
20770
|
+
var missing = missingRequiredChildren(virtualNode, required, ownedRoles);
|
|
20770
20771
|
if (!missing) {
|
|
20771
20772
|
return true;
|
|
20772
20773
|
}
|
|
20773
20774
|
this.data(missing);
|
|
20774
|
-
if (reviewEmpty.includes(
|
|
20775
|
+
if (reviewEmpty.includes(explicitRole2) && !ownedElements.some(isContent)) {
|
|
20775
20776
|
return void 0;
|
|
20776
20777
|
}
|
|
20777
20778
|
return false;
|
|
@@ -20814,12 +20815,12 @@
|
|
|
20814
20815
|
ownedElements: ownedElements
|
|
20815
20816
|
};
|
|
20816
20817
|
}
|
|
20817
|
-
function missingRequiredChildren(virtualNode,
|
|
20818
|
+
function missingRequiredChildren(virtualNode, required, ownedRoles) {
|
|
20818
20819
|
var _loop8 = function _loop8(_i30) {
|
|
20819
|
-
var
|
|
20820
|
-
if (required.includes(
|
|
20820
|
+
var role = ownedRoles[_i30].role;
|
|
20821
|
+
if (required.includes(role)) {
|
|
20821
20822
|
required = required.filter(function(requiredRole) {
|
|
20822
|
-
return requiredRole !==
|
|
20823
|
+
return requiredRole !== role;
|
|
20823
20824
|
});
|
|
20824
20825
|
return {
|
|
20825
20826
|
v: null
|
|
@@ -20954,7 +20955,7 @@
|
|
|
20954
20955
|
if (_typeof(unsupported2) !== 'object') {
|
|
20955
20956
|
return !!unsupported2;
|
|
20956
20957
|
}
|
|
20957
|
-
return !
|
|
20958
|
+
return !matches_default2(node, unsupported2.exceptions);
|
|
20958
20959
|
});
|
|
20959
20960
|
if (unsupportedAttrs.length) {
|
|
20960
20961
|
this.data(unsupportedAttrs);
|
|
@@ -21121,7 +21122,7 @@
|
|
|
21121
21122
|
var accText;
|
|
21122
21123
|
try {
|
|
21123
21124
|
label3 = sanitize_default(label_text_default(virtualNode)).toLowerCase();
|
|
21124
|
-
accText = sanitize_default(
|
|
21125
|
+
accText = sanitize_default(_accessibleTextVirtual(virtualNode)).toLowerCase();
|
|
21125
21126
|
} catch (e) {
|
|
21126
21127
|
return void 0;
|
|
21127
21128
|
}
|
|
@@ -21226,8 +21227,11 @@
|
|
|
21226
21227
|
getStackingContext: function getStackingContext() {
|
|
21227
21228
|
return _getStackingContext;
|
|
21228
21229
|
},
|
|
21230
|
+
getStrokeColorsFromShadows: function getStrokeColorsFromShadows() {
|
|
21231
|
+
return _getStrokeColorsFromShadows;
|
|
21232
|
+
},
|
|
21229
21233
|
getTextShadowColors: function getTextShadowColors() {
|
|
21230
|
-
return
|
|
21234
|
+
return _getTextShadowColors;
|
|
21231
21235
|
},
|
|
21232
21236
|
hasValidContrastRatio: function hasValidContrastRatio() {
|
|
21233
21237
|
return has_valid_contrast_ratio_default;
|
|
@@ -21235,6 +21239,9 @@
|
|
|
21235
21239
|
incompleteData: function incompleteData() {
|
|
21236
21240
|
return incomplete_data_default;
|
|
21237
21241
|
},
|
|
21242
|
+
parseTextShadows: function parseTextShadows() {
|
|
21243
|
+
return _parseTextShadows;
|
|
21244
|
+
},
|
|
21238
21245
|
stackingContextToColor: function stackingContextToColor() {
|
|
21239
21246
|
return _stackingContextToColor;
|
|
21240
21247
|
}
|
|
@@ -21453,36 +21460,88 @@
|
|
|
21453
21460
|
}
|
|
21454
21461
|
return true;
|
|
21455
21462
|
}
|
|
21456
|
-
|
|
21457
|
-
|
|
21458
|
-
|
|
21459
|
-
|
|
21460
|
-
|
|
21461
|
-
|
|
21463
|
+
var SHADOW_STROKE_ALPHA = .54;
|
|
21464
|
+
var VISIBLE_SHADOW_MIN_PX = .5;
|
|
21465
|
+
var OPAQUE_STROKE_OFFSET_MIN_PX = 1.5;
|
|
21466
|
+
var edges = [ 'top', 'right', 'bottom', 'left' ];
|
|
21467
|
+
function _getStrokeColorsFromShadows(parsedShadows) {
|
|
21468
|
+
var _ref99 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref99$ignoreEdgeCoun = _ref99.ignoreEdgeCount, ignoreEdgeCount = _ref99$ignoreEdgeCoun === void 0 ? false : _ref99$ignoreEdgeCoun;
|
|
21469
|
+
var shadowMap = getShadowColorsMap(parsedShadows);
|
|
21470
|
+
var shadowsByColor = Object.entries(shadowMap).map(function(_ref100) {
|
|
21471
|
+
var _ref101 = _slicedToArray(_ref100, 2), colorStr = _ref101[0], sides = _ref101[1];
|
|
21472
|
+
var edgeCount = edges.filter(function(side) {
|
|
21473
|
+
return sides[side].length !== 0;
|
|
21474
|
+
}).length;
|
|
21475
|
+
return {
|
|
21476
|
+
colorStr: colorStr,
|
|
21477
|
+
sides: sides,
|
|
21478
|
+
edgeCount: edgeCount
|
|
21479
|
+
};
|
|
21480
|
+
});
|
|
21481
|
+
if (!ignoreEdgeCount && shadowsByColor.some(function(_ref102) {
|
|
21482
|
+
var edgeCount = _ref102.edgeCount;
|
|
21483
|
+
return edgeCount > 1 && edgeCount < 4;
|
|
21484
|
+
})) {
|
|
21485
|
+
return null;
|
|
21462
21486
|
}
|
|
21463
|
-
|
|
21464
|
-
|
|
21465
|
-
|
|
21466
|
-
|
|
21467
|
-
|
|
21468
|
-
|
|
21469
|
-
|
|
21470
|
-
|
|
21471
|
-
|
|
21472
|
-
|
|
21473
|
-
var
|
|
21474
|
-
|
|
21475
|
-
|
|
21476
|
-
|
|
21477
|
-
|
|
21478
|
-
|
|
21479
|
-
}
|
|
21480
|
-
|
|
21487
|
+
return shadowsByColor.map(shadowGroupToColor).filter(function(shadow) {
|
|
21488
|
+
return shadow !== null;
|
|
21489
|
+
});
|
|
21490
|
+
}
|
|
21491
|
+
function getShadowColorsMap(parsedShadows) {
|
|
21492
|
+
var colorMap = {};
|
|
21493
|
+
var _iterator15 = _createForOfIteratorHelper(parsedShadows), _step15;
|
|
21494
|
+
try {
|
|
21495
|
+
for (_iterator15.s(); !(_step15 = _iterator15.n()).done; ) {
|
|
21496
|
+
var _colorMap$colorStr;
|
|
21497
|
+
var _step15$value = _step15.value, colorStr = _step15$value.colorStr, pixels = _step15$value.pixels;
|
|
21498
|
+
(_colorMap$colorStr = colorMap[colorStr]) !== null && _colorMap$colorStr !== void 0 ? _colorMap$colorStr : colorMap[colorStr] = {
|
|
21499
|
+
top: [],
|
|
21500
|
+
right: [],
|
|
21501
|
+
bottom: [],
|
|
21502
|
+
left: []
|
|
21503
|
+
};
|
|
21504
|
+
var borders = colorMap[colorStr];
|
|
21505
|
+
var _pixels = _slicedToArray(pixels, 2), offsetX = _pixels[0], offsetY = _pixels[1];
|
|
21506
|
+
if (offsetX > VISIBLE_SHADOW_MIN_PX) {
|
|
21507
|
+
borders.right.push(offsetX);
|
|
21508
|
+
} else if (-offsetX > VISIBLE_SHADOW_MIN_PX) {
|
|
21509
|
+
borders.left.push(-offsetX);
|
|
21510
|
+
}
|
|
21511
|
+
if (offsetY > VISIBLE_SHADOW_MIN_PX) {
|
|
21512
|
+
borders.bottom.push(offsetY);
|
|
21513
|
+
} else if (-offsetY > VISIBLE_SHADOW_MIN_PX) {
|
|
21514
|
+
borders.top.push(-offsetY);
|
|
21515
|
+
}
|
|
21481
21516
|
}
|
|
21517
|
+
} catch (err) {
|
|
21518
|
+
_iterator15.e(err);
|
|
21519
|
+
} finally {
|
|
21520
|
+
_iterator15.f();
|
|
21521
|
+
}
|
|
21522
|
+
return colorMap;
|
|
21523
|
+
}
|
|
21524
|
+
function shadowGroupToColor(_ref103) {
|
|
21525
|
+
var colorStr = _ref103.colorStr, sides = _ref103.sides, edgeCount = _ref103.edgeCount;
|
|
21526
|
+
if (edgeCount !== 4) {
|
|
21527
|
+
return null;
|
|
21528
|
+
}
|
|
21529
|
+
var strokeColor = new color_default();
|
|
21530
|
+
strokeColor.parseString(colorStr);
|
|
21531
|
+
var density = 0;
|
|
21532
|
+
var isSolid = true;
|
|
21533
|
+
edges.forEach(function(edge) {
|
|
21534
|
+
density += sides[edge].length / 4;
|
|
21535
|
+
isSolid && (isSolid = sides[edge].every(function(offset) {
|
|
21536
|
+
return offset > OPAQUE_STROKE_OFFSET_MIN_PX;
|
|
21537
|
+
}));
|
|
21482
21538
|
});
|
|
21483
|
-
|
|
21539
|
+
if (!isSolid) {
|
|
21540
|
+
strokeColor.alpha = 1 - Math.pow(SHADOW_STROKE_ALPHA, density);
|
|
21541
|
+
}
|
|
21542
|
+
return strokeColor;
|
|
21484
21543
|
}
|
|
21485
|
-
function
|
|
21544
|
+
function _parseTextShadows(textShadow) {
|
|
21486
21545
|
var current = {
|
|
21487
21546
|
pixels: []
|
|
21488
21547
|
};
|
|
@@ -21514,10 +21573,80 @@
|
|
|
21514
21573
|
throw new Error('Unable to process text-shadows: '.concat(textShadow));
|
|
21515
21574
|
}
|
|
21516
21575
|
}
|
|
21517
|
-
|
|
21576
|
+
shadows.forEach(function(_ref104) {
|
|
21577
|
+
var pixels = _ref104.pixels;
|
|
21578
|
+
if (pixels.length === 2) {
|
|
21579
|
+
pixels.push(0);
|
|
21580
|
+
}
|
|
21581
|
+
});
|
|
21582
|
+
return shadows;
|
|
21518
21583
|
}
|
|
21519
|
-
function
|
|
21520
|
-
var
|
|
21584
|
+
function _getTextShadowColors(node) {
|
|
21585
|
+
var _ref105 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref105.minRatio, maxRatio = _ref105.maxRatio, ignoreEdgeCount = _ref105.ignoreEdgeCount;
|
|
21586
|
+
var shadowColors = [];
|
|
21587
|
+
var style = window.getComputedStyle(node);
|
|
21588
|
+
var textShadow = style.getPropertyValue('text-shadow');
|
|
21589
|
+
if (textShadow === 'none') {
|
|
21590
|
+
return shadowColors;
|
|
21591
|
+
}
|
|
21592
|
+
var fontSizeStr = style.getPropertyValue('font-size');
|
|
21593
|
+
var fontSize = parseInt(fontSizeStr);
|
|
21594
|
+
assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
|
|
21595
|
+
var thinShadows = [];
|
|
21596
|
+
var shadows = _parseTextShadows(textShadow);
|
|
21597
|
+
var _iterator16 = _createForOfIteratorHelper(shadows), _step16;
|
|
21598
|
+
try {
|
|
21599
|
+
for (_iterator16.s(); !(_step16 = _iterator16.n()).done; ) {
|
|
21600
|
+
var shadow = _step16.value;
|
|
21601
|
+
var colorStr = shadow.colorStr || style.getPropertyValue('color');
|
|
21602
|
+
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$;
|
|
21603
|
+
if (maxRatio && blurRadius >= fontSize * maxRatio) {
|
|
21604
|
+
continue;
|
|
21605
|
+
}
|
|
21606
|
+
if (minRatio && blurRadius < fontSize * minRatio) {
|
|
21607
|
+
thinShadows.push({
|
|
21608
|
+
colorStr: colorStr,
|
|
21609
|
+
pixels: shadow.pixels
|
|
21610
|
+
});
|
|
21611
|
+
continue;
|
|
21612
|
+
}
|
|
21613
|
+
if (thinShadows.length > 0) {
|
|
21614
|
+
var _strokeColors = _getStrokeColorsFromShadows(thinShadows, {
|
|
21615
|
+
ignoreEdgeCount: ignoreEdgeCount
|
|
21616
|
+
});
|
|
21617
|
+
if (_strokeColors === null) {
|
|
21618
|
+
return null;
|
|
21619
|
+
}
|
|
21620
|
+
shadowColors.push.apply(shadowColors, _toConsumableArray(_strokeColors));
|
|
21621
|
+
thinShadows.splice(0, thinShadows.length);
|
|
21622
|
+
}
|
|
21623
|
+
var _color3 = textShadowColor({
|
|
21624
|
+
colorStr: colorStr,
|
|
21625
|
+
offsetX: offsetX,
|
|
21626
|
+
offsetY: offsetY,
|
|
21627
|
+
blurRadius: blurRadius,
|
|
21628
|
+
fontSize: fontSize
|
|
21629
|
+
});
|
|
21630
|
+
shadowColors.push(_color3);
|
|
21631
|
+
}
|
|
21632
|
+
} catch (err) {
|
|
21633
|
+
_iterator16.e(err);
|
|
21634
|
+
} finally {
|
|
21635
|
+
_iterator16.f();
|
|
21636
|
+
}
|
|
21637
|
+
if (thinShadows.length > 0) {
|
|
21638
|
+
var strokeColors = _getStrokeColorsFromShadows(thinShadows, {
|
|
21639
|
+
ignoreEdgeCount: ignoreEdgeCount
|
|
21640
|
+
});
|
|
21641
|
+
if (strokeColors === null) {
|
|
21642
|
+
return null;
|
|
21643
|
+
}
|
|
21644
|
+
shadowColors.push.apply(shadowColors, _toConsumableArray(strokeColors));
|
|
21645
|
+
}
|
|
21646
|
+
return shadowColors;
|
|
21647
|
+
}
|
|
21648
|
+
function textShadowColor(_ref106) {
|
|
21649
|
+
var colorStr = _ref106.colorStr, offsetX = _ref106.offsetX, offsetY = _ref106.offsetY, blurRadius = _ref106.blurRadius, fontSize = _ref106.fontSize;
|
|
21521
21650
|
if (offsetX > blurRadius || offsetY > blurRadius) {
|
|
21522
21651
|
return new color_default(0, 0, 0, 0);
|
|
21523
21652
|
}
|
|
@@ -21533,12 +21662,11 @@
|
|
|
21533
21662
|
var relativeBlur = blurRadius / fontSize;
|
|
21534
21663
|
return .185 / (relativeBlur + .4);
|
|
21535
21664
|
}
|
|
21536
|
-
var get_text_shadow_colors_default = getTextShadowColors;
|
|
21537
21665
|
function _getStackingContext(elm, elmStack) {
|
|
21538
21666
|
var _elmStack;
|
|
21539
|
-
var
|
|
21540
|
-
if (
|
|
21541
|
-
return
|
|
21667
|
+
var virtualNode = get_node_from_tree_default(elm);
|
|
21668
|
+
if (virtualNode._stackingContext) {
|
|
21669
|
+
return virtualNode._stackingContext;
|
|
21542
21670
|
}
|
|
21543
21671
|
var stackingContext = [];
|
|
21544
21672
|
var contextMap = new Map();
|
|
@@ -21547,19 +21675,19 @@
|
|
|
21547
21675
|
var _stackingOrder2;
|
|
21548
21676
|
var bgVNode = get_node_from_tree_default(bgElm);
|
|
21549
21677
|
var bgColor = getOwnBackgroundColor2(bgVNode);
|
|
21550
|
-
var stackingOrder = bgVNode._stackingOrder.filter(function(
|
|
21551
|
-
var
|
|
21552
|
-
return !!
|
|
21678
|
+
var stackingOrder = bgVNode._stackingOrder.filter(function(_ref107) {
|
|
21679
|
+
var vNode = _ref107.vNode;
|
|
21680
|
+
return !!vNode;
|
|
21553
21681
|
});
|
|
21554
|
-
stackingOrder.forEach(function(
|
|
21682
|
+
stackingOrder.forEach(function(_ref108, index) {
|
|
21555
21683
|
var _stackingOrder;
|
|
21556
|
-
var
|
|
21684
|
+
var vNode = _ref108.vNode;
|
|
21557
21685
|
var ancestorVNode2 = (_stackingOrder = stackingOrder[index - 1]) === null || _stackingOrder === void 0 ? void 0 : _stackingOrder.vNode;
|
|
21558
|
-
var context2 = addToStackingContext(contextMap,
|
|
21559
|
-
if (index === 0 && !contextMap.get(
|
|
21686
|
+
var context2 = addToStackingContext(contextMap, vNode, ancestorVNode2);
|
|
21687
|
+
if (index === 0 && !contextMap.get(vNode)) {
|
|
21560
21688
|
stackingContext.unshift(context2);
|
|
21561
21689
|
}
|
|
21562
|
-
contextMap.set(
|
|
21690
|
+
contextMap.set(vNode, context2);
|
|
21563
21691
|
});
|
|
21564
21692
|
var ancestorVNode = (_stackingOrder2 = stackingOrder[stackingOrder.length - 1]) === null || _stackingOrder2 === void 0 ? void 0 : _stackingOrder2.vNode;
|
|
21565
21693
|
var context = addToStackingContext(contextMap, bgVNode, ancestorVNode);
|
|
@@ -21568,7 +21696,7 @@
|
|
|
21568
21696
|
}
|
|
21569
21697
|
context.bgColor = bgColor;
|
|
21570
21698
|
});
|
|
21571
|
-
|
|
21699
|
+
virtualNode._stackingContext = stackingContext;
|
|
21572
21700
|
return stackingContext;
|
|
21573
21701
|
}
|
|
21574
21702
|
function _stackingContextToColor(context) {
|
|
@@ -21581,7 +21709,7 @@
|
|
|
21581
21709
|
blendMode: context.blendMode
|
|
21582
21710
|
};
|
|
21583
21711
|
}
|
|
21584
|
-
var sourceColor = context.descendants.reduce(reduceToColor,
|
|
21712
|
+
var sourceColor = context.descendants.reduce(reduceToColor, createStackingContext2());
|
|
21585
21713
|
var color = flatten_colors_default(sourceColor, context.bgColor, context.descendants[0].blendMode);
|
|
21586
21714
|
color.alpha *= context.opacity;
|
|
21587
21715
|
return {
|
|
@@ -21599,7 +21727,7 @@
|
|
|
21599
21727
|
var sourceColor = _stackingContextToColor(sourceContext).color;
|
|
21600
21728
|
return flatten_colors_default(sourceColor, backdrop, sourceContext.blendMode);
|
|
21601
21729
|
}
|
|
21602
|
-
function
|
|
21730
|
+
function createStackingContext2(vNode, ancestorContext) {
|
|
21603
21731
|
var _vNode$getComputedSty;
|
|
21604
21732
|
return {
|
|
21605
21733
|
vNode: vNode,
|
|
@@ -21616,7 +21744,7 @@
|
|
|
21616
21744
|
function addToStackingContext(contextMap, vNode, ancestorVNode) {
|
|
21617
21745
|
var _contextMap$get;
|
|
21618
21746
|
var ancestorContext = contextMap.get(ancestorVNode);
|
|
21619
|
-
var context = (_contextMap$get = contextMap.get(vNode)) !== null && _contextMap$get !== void 0 ? _contextMap$get :
|
|
21747
|
+
var context = (_contextMap$get = contextMap.get(vNode)) !== null && _contextMap$get !== void 0 ? _contextMap$get : createStackingContext2(vNode, ancestorContext);
|
|
21620
21748
|
if (ancestorContext && ancestorVNode !== vNode && !ancestorContext.descendants.includes(context)) {
|
|
21621
21749
|
ancestorContext.descendants.unshift(context);
|
|
21622
21750
|
}
|
|
@@ -21646,15 +21774,16 @@
|
|
|
21646
21774
|
return bgColor;
|
|
21647
21775
|
}
|
|
21648
21776
|
function _getBackgroundColor(elm, bgElms, shadowOutlineEmMax) {
|
|
21649
|
-
var _bgColors;
|
|
21777
|
+
var _getTextShadowColors2, _bgColors;
|
|
21650
21778
|
var elmStack = _getBackgroundStack(elm);
|
|
21651
21779
|
if (!elmStack) {
|
|
21652
21780
|
return null;
|
|
21653
21781
|
}
|
|
21654
21782
|
var textRects = get_visible_child_text_rects_default(elm);
|
|
21655
|
-
var bgColors =
|
|
21656
|
-
minRatio: shadowOutlineEmMax
|
|
21657
|
-
|
|
21783
|
+
var bgColors = (_getTextShadowColors2 = _getTextShadowColors(elm, {
|
|
21784
|
+
minRatio: shadowOutlineEmMax,
|
|
21785
|
+
ignoreEdgeCount: true
|
|
21786
|
+
})) !== null && _getTextShadowColors2 !== void 0 ? _getTextShadowColors2 : [];
|
|
21658
21787
|
if (bgColors.length) {
|
|
21659
21788
|
bgColors = [ {
|
|
21660
21789
|
color: bgColors.reduce(_flattenShadowColors)
|
|
@@ -21756,7 +21885,7 @@
|
|
|
21756
21885
|
}, function() {
|
|
21757
21886
|
return getTextColor(nodeStyle);
|
|
21758
21887
|
}, function() {
|
|
21759
|
-
return
|
|
21888
|
+
return _getTextShadowColors(node, {
|
|
21760
21889
|
minRatio: 0
|
|
21761
21890
|
});
|
|
21762
21891
|
} ];
|
|
@@ -21788,8 +21917,8 @@
|
|
|
21788
21917
|
function getTextColor(nodeStyle) {
|
|
21789
21918
|
return new color_default().parseString(nodeStyle.getPropertyValue('-webkit-text-fill-color') || nodeStyle.getPropertyValue('color'));
|
|
21790
21919
|
}
|
|
21791
|
-
function getStrokeColor(nodeStyle,
|
|
21792
|
-
var
|
|
21920
|
+
function getStrokeColor(nodeStyle, _ref109) {
|
|
21921
|
+
var _ref109$textStrokeEmM = _ref109.textStrokeEmMin, textStrokeEmMin = _ref109$textStrokeEmM === void 0 ? 0 : _ref109$textStrokeEmM;
|
|
21793
21922
|
var strokeWidth = parseFloat(nodeStyle.getPropertyValue('-webkit-text-stroke-width'));
|
|
21794
21923
|
if (strokeWidth === 0) {
|
|
21795
21924
|
return null;
|
|
@@ -21831,11 +21960,11 @@
|
|
|
21831
21960
|
return fgColor;
|
|
21832
21961
|
}
|
|
21833
21962
|
function findNodeInContexts(contexts, node) {
|
|
21834
|
-
var
|
|
21963
|
+
var _iterator17 = _createForOfIteratorHelper(contexts), _step17;
|
|
21835
21964
|
try {
|
|
21836
|
-
for (
|
|
21965
|
+
for (_iterator17.s(); !(_step17 = _iterator17.n()).done; ) {
|
|
21837
21966
|
var _context$vNode;
|
|
21838
|
-
var context =
|
|
21967
|
+
var context = _step17.value;
|
|
21839
21968
|
if (((_context$vNode = context.vNode) === null || _context$vNode === void 0 ? void 0 : _context$vNode.actualNode) === node) {
|
|
21840
21969
|
return context;
|
|
21841
21970
|
}
|
|
@@ -21845,9 +21974,9 @@
|
|
|
21845
21974
|
}
|
|
21846
21975
|
}
|
|
21847
21976
|
} catch (err) {
|
|
21848
|
-
|
|
21977
|
+
_iterator17.e(err);
|
|
21849
21978
|
} finally {
|
|
21850
|
-
|
|
21979
|
+
_iterator17.f();
|
|
21851
21980
|
}
|
|
21852
21981
|
}
|
|
21853
21982
|
function hasValidContrastRatio(bg, fg, fontSize, isBold) {
|
|
@@ -21882,7 +22011,7 @@
|
|
|
21882
22011
|
var bold = parseFloat(fontWeight) >= boldValue || fontWeight === 'bold';
|
|
21883
22012
|
var ptSize = Math.ceil(fontSize * 72) / 96;
|
|
21884
22013
|
var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
|
|
21885
|
-
var
|
|
22014
|
+
var _ref110 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref110.expected, minThreshold = _ref110.minThreshold, maxThreshold = _ref110.maxThreshold;
|
|
21886
22015
|
var pseudoElm = findPseudoElement(virtualNode, {
|
|
21887
22016
|
ignorePseudo: ignorePseudo,
|
|
21888
22017
|
pseudoSizeThreshold: pseudoSizeThreshold
|
|
@@ -21897,13 +22026,19 @@
|
|
|
21897
22026
|
this.relatedNodes(pseudoElm.actualNode);
|
|
21898
22027
|
return void 0;
|
|
21899
22028
|
}
|
|
21900
|
-
var
|
|
21901
|
-
var bgColor = _getBackgroundColor2(node, bgNodes, shadowOutlineEmMax);
|
|
21902
|
-
var fgColor = _getForegroundColor(node, false, bgColor, options);
|
|
21903
|
-
var shadowColors = get_text_shadow_colors_default(node, {
|
|
22029
|
+
var shadowColors = _getTextShadowColors(node, {
|
|
21904
22030
|
minRatio: .001,
|
|
21905
22031
|
maxRatio: shadowOutlineEmMax
|
|
21906
22032
|
});
|
|
22033
|
+
if (shadowColors === null) {
|
|
22034
|
+
this.data({
|
|
22035
|
+
messageKey: 'complexTextShadows'
|
|
22036
|
+
});
|
|
22037
|
+
return void 0;
|
|
22038
|
+
}
|
|
22039
|
+
var bgNodes = [];
|
|
22040
|
+
var bgColor = _getBackgroundColor2(node, bgNodes, shadowOutlineEmMax);
|
|
22041
|
+
var fgColor = _getForegroundColor(node, false, bgColor, options);
|
|
21907
22042
|
var contrast2 = null;
|
|
21908
22043
|
var contrastContributor = null;
|
|
21909
22044
|
var shadowColor = null;
|
|
@@ -21961,8 +22096,8 @@
|
|
|
21961
22096
|
}
|
|
21962
22097
|
return isValid;
|
|
21963
22098
|
}
|
|
21964
|
-
function findPseudoElement(vNode,
|
|
21965
|
-
var
|
|
22099
|
+
function findPseudoElement(vNode, _ref111) {
|
|
22100
|
+
var _ref111$pseudoSizeThr = _ref111.pseudoSizeThreshold, pseudoSizeThreshold = _ref111$pseudoSizeThr === void 0 ? .25 : _ref111$pseudoSizeThr, _ref111$ignorePseudo = _ref111.ignorePseudo, ignorePseudo = _ref111$ignorePseudo === void 0 ? false : _ref111$ignorePseudo;
|
|
21966
22101
|
if (ignorePseudo) {
|
|
21967
22102
|
return;
|
|
21968
22103
|
}
|
|
@@ -22004,7 +22139,7 @@
|
|
|
22004
22139
|
}
|
|
22005
22140
|
function parseUnit(str) {
|
|
22006
22141
|
var unitRegex = /^([0-9.]+)([a-z]+)$/i;
|
|
22007
|
-
var
|
|
22142
|
+
var _ref112 = str.match(unitRegex) || [], _ref113 = _slicedToArray(_ref112, 3), _ref113$ = _ref113[1], value = _ref113$ === void 0 ? '' : _ref113$, _ref113$2 = _ref113[2], unit = _ref113$2 === void 0 ? '' : _ref113$2;
|
|
22008
22143
|
return {
|
|
22009
22144
|
value: parseFloat(value),
|
|
22010
22145
|
unit: unit.toLowerCase()
|
|
@@ -22248,7 +22383,7 @@
|
|
|
22248
22383
|
}
|
|
22249
22384
|
}
|
|
22250
22385
|
function matchesDefinitionEvaluate(_, options, virtualNode) {
|
|
22251
|
-
return
|
|
22386
|
+
return matches_default2(virtualNode, options.matcher);
|
|
22252
22387
|
}
|
|
22253
22388
|
var matches_definition_evaluate_default = matchesDefinitionEvaluate;
|
|
22254
22389
|
function pageNoDuplicateAfter(results) {
|
|
@@ -22367,8 +22502,8 @@
|
|
|
22367
22502
|
}
|
|
22368
22503
|
var focusable_element_evaluate_default = focusableElementEvaluate;
|
|
22369
22504
|
function focusableModalOpenEvaluate(node, options, virtualNode) {
|
|
22370
|
-
var tabbableElements = virtualNode.tabbableElements.map(function(
|
|
22371
|
-
var actualNode =
|
|
22505
|
+
var tabbableElements = virtualNode.tabbableElements.map(function(_ref114) {
|
|
22506
|
+
var actualNode = _ref114.actualNode;
|
|
22372
22507
|
return actualNode;
|
|
22373
22508
|
});
|
|
22374
22509
|
if (!tabbableElements || !tabbableElements.length) {
|
|
@@ -22388,7 +22523,7 @@
|
|
|
22388
22523
|
return false;
|
|
22389
22524
|
}
|
|
22390
22525
|
try {
|
|
22391
|
-
return !
|
|
22526
|
+
return !_accessibleTextVirtual(virtualNode);
|
|
22392
22527
|
} catch (e) {
|
|
22393
22528
|
return void 0;
|
|
22394
22529
|
}
|
|
@@ -22530,7 +22665,7 @@
|
|
|
22530
22665
|
if (visibleText === '') {
|
|
22531
22666
|
return false;
|
|
22532
22667
|
}
|
|
22533
|
-
return visibleText ===
|
|
22668
|
+
return visibleText === _accessibleTextVirtual(virtualNode).toLowerCase();
|
|
22534
22669
|
}
|
|
22535
22670
|
var duplicate_img_label_evaluate_default = duplicateImgLabelEvaluate;
|
|
22536
22671
|
function explicitEvaluate(node, options, virtualNode) {
|
|
@@ -22596,7 +22731,7 @@
|
|
|
22596
22731
|
if (label3 && !_isVisibleToScreenReaders(label3)) {
|
|
22597
22732
|
var name;
|
|
22598
22733
|
try {
|
|
22599
|
-
name =
|
|
22734
|
+
name = _accessibleTextVirtual(virtualNode).trim();
|
|
22600
22735
|
} catch (e) {
|
|
22601
22736
|
return void 0;
|
|
22602
22737
|
}
|
|
@@ -22611,7 +22746,7 @@
|
|
|
22611
22746
|
try {
|
|
22612
22747
|
var label3 = closest_default(virtualNode, 'label');
|
|
22613
22748
|
if (label3) {
|
|
22614
|
-
var implicitLabel = sanitize_default(
|
|
22749
|
+
var implicitLabel = sanitize_default(_accessibleTextVirtual(label3, {
|
|
22615
22750
|
inControlContext: true,
|
|
22616
22751
|
startNode: virtualNode
|
|
22617
22752
|
}));
|
|
@@ -22729,7 +22864,7 @@
|
|
|
22729
22864
|
var landmark_is_unique_after_default = landmarkIsUniqueAfter;
|
|
22730
22865
|
function landmarkIsUniqueEvaluate(node, options, virtualNode) {
|
|
22731
22866
|
var role = get_role_default(node);
|
|
22732
|
-
var accessibleText2 =
|
|
22867
|
+
var accessibleText2 = _accessibleTextVirtual(virtualNode);
|
|
22733
22868
|
accessibleText2 = accessibleText2 ? accessibleText2.toLowerCase() : null;
|
|
22734
22869
|
this.data({
|
|
22735
22870
|
role: role,
|
|
@@ -22849,8 +22984,8 @@
|
|
|
22849
22984
|
this.relatedNodes(relatedNodes);
|
|
22850
22985
|
return true;
|
|
22851
22986
|
}
|
|
22852
|
-
function getInvalidSelector(vChild, nested,
|
|
22853
|
-
var
|
|
22987
|
+
function getInvalidSelector(vChild, nested, _ref115) {
|
|
22988
|
+
var _ref115$validRoles = _ref115.validRoles, validRoles = _ref115$validRoles === void 0 ? [] : _ref115$validRoles, _ref115$validNodeName = _ref115.validNodeNames, validNodeNames = _ref115$validNodeName === void 0 ? [] : _ref115$validNodeName;
|
|
22854
22989
|
var _vChild$props = vChild.props, nodeName2 = _vChild$props.nodeName, nodeType = _vChild$props.nodeType, nodeValue = _vChild$props.nodeValue;
|
|
22855
22990
|
var selector = nested ? 'div > ' : '';
|
|
22856
22991
|
if (nodeType === 3 && nodeValue.trim() !== '') {
|
|
@@ -22902,12 +23037,12 @@
|
|
|
22902
23037
|
badNodes: [],
|
|
22903
23038
|
hasNonEmptyTextNode: false
|
|
22904
23039
|
};
|
|
22905
|
-
var content = virtualNode.children.reduce(function(
|
|
23040
|
+
var content = virtualNode.children.reduce(function(vNodes, child) {
|
|
22906
23041
|
var actualNode = child.actualNode;
|
|
22907
23042
|
if (actualNode.nodeName.toUpperCase() === 'DIV' && get_role_default(actualNode) === null) {
|
|
22908
|
-
return
|
|
23043
|
+
return vNodes.concat(child.children);
|
|
22909
23044
|
}
|
|
22910
|
-
return
|
|
23045
|
+
return vNodes.concat(child);
|
|
22911
23046
|
}, []);
|
|
22912
23047
|
var result = content.reduce(function(out, childNode) {
|
|
22913
23048
|
var actualNode = childNode.actualNode;
|
|
@@ -22929,7 +23064,6 @@
|
|
|
22929
23064
|
}
|
|
22930
23065
|
return !!result.badNodes.length || result.hasNonEmptyTextNode;
|
|
22931
23066
|
}
|
|
22932
|
-
var only_dlitems_evaluate_default = onlyDlitemsEvaluate;
|
|
22933
23067
|
function onlyListitemsEvaluate(node, options, virtualNode) {
|
|
22934
23068
|
var hasNonEmptyTextNode = false;
|
|
22935
23069
|
var atLeastOneListitem = false;
|
|
@@ -23083,8 +23217,8 @@
|
|
|
23083
23217
|
}
|
|
23084
23218
|
var no_autoplay_audio_evaluate_default = noAutoplayAudioEvaluate;
|
|
23085
23219
|
function cssOrientationLockEvaluate(node, options, virtualNode, context) {
|
|
23086
|
-
var
|
|
23087
|
-
var
|
|
23220
|
+
var _ref116 = context || {}, _ref116$cssom = _ref116.cssom, cssom = _ref116$cssom === void 0 ? void 0 : _ref116$cssom;
|
|
23221
|
+
var _ref117 = options || {}, _ref117$degreeThresho = _ref117.degreeThreshold, degreeThreshold = _ref117$degreeThresho === void 0 ? 0 : _ref117$degreeThresho;
|
|
23088
23222
|
if (!cssom || !cssom.length) {
|
|
23089
23223
|
return void 0;
|
|
23090
23224
|
}
|
|
@@ -23098,8 +23232,8 @@
|
|
|
23098
23232
|
if (!orientationRules.length) {
|
|
23099
23233
|
return 'continue';
|
|
23100
23234
|
}
|
|
23101
|
-
orientationRules.forEach(function(
|
|
23102
|
-
var cssRules =
|
|
23235
|
+
orientationRules.forEach(function(_ref118) {
|
|
23236
|
+
var cssRules = _ref118.cssRules;
|
|
23103
23237
|
Array.from(cssRules).forEach(function(cssRule) {
|
|
23104
23238
|
var locked = getIsOrientationLocked(cssRule);
|
|
23105
23239
|
if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
|
|
@@ -23124,8 +23258,8 @@
|
|
|
23124
23258
|
}
|
|
23125
23259
|
return false;
|
|
23126
23260
|
function groupCssomByDocument(cssObjectModel) {
|
|
23127
|
-
return cssObjectModel.reduce(function(out,
|
|
23128
|
-
var sheet =
|
|
23261
|
+
return cssObjectModel.reduce(function(out, _ref119) {
|
|
23262
|
+
var sheet = _ref119.sheet, root = _ref119.root, shadowId = _ref119.shadowId;
|
|
23129
23263
|
var key = shadowId ? shadowId : 'topDocument';
|
|
23130
23264
|
if (!out[key]) {
|
|
23131
23265
|
out[key] = {
|
|
@@ -23141,15 +23275,15 @@
|
|
|
23141
23275
|
return out;
|
|
23142
23276
|
}, {});
|
|
23143
23277
|
}
|
|
23144
|
-
function isMediaRuleWithOrientation(
|
|
23145
|
-
var type2 =
|
|
23278
|
+
function isMediaRuleWithOrientation(_ref120) {
|
|
23279
|
+
var type2 = _ref120.type, cssText = _ref120.cssText;
|
|
23146
23280
|
if (type2 !== 4) {
|
|
23147
23281
|
return false;
|
|
23148
23282
|
}
|
|
23149
23283
|
return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
|
|
23150
23284
|
}
|
|
23151
|
-
function getIsOrientationLocked(
|
|
23152
|
-
var selectorText =
|
|
23285
|
+
function getIsOrientationLocked(_ref121) {
|
|
23286
|
+
var selectorText = _ref121.selectorText, style = _ref121.style;
|
|
23153
23287
|
if (!selectorText || style.length <= 0) {
|
|
23154
23288
|
return false;
|
|
23155
23289
|
}
|
|
@@ -23177,7 +23311,7 @@
|
|
|
23177
23311
|
if (!matches4) {
|
|
23178
23312
|
return 0;
|
|
23179
23313
|
}
|
|
23180
|
-
var
|
|
23314
|
+
var _matches2 = _slicedToArray(matches4, 3), transformFn = _matches2[1], transformFnValue = _matches2[2];
|
|
23181
23315
|
return getRotationInDegrees(transformFn, transformFnValue);
|
|
23182
23316
|
}
|
|
23183
23317
|
function getRotationInDegrees(transformFunction, transformFnValue) {
|
|
@@ -23204,7 +23338,7 @@
|
|
|
23204
23338
|
}
|
|
23205
23339
|
}
|
|
23206
23340
|
function getAngleInDegrees(angleWithUnit) {
|
|
23207
|
-
var
|
|
23341
|
+
var _ref122 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref123 = _slicedToArray(_ref122, 1), unit = _ref123[0];
|
|
23208
23342
|
if (!unit) {
|
|
23209
23343
|
return 0;
|
|
23210
23344
|
}
|
|
@@ -23253,7 +23387,7 @@
|
|
|
23253
23387
|
}
|
|
23254
23388
|
var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
|
|
23255
23389
|
function metaViewportScaleEvaluate(node, options, virtualNode) {
|
|
23256
|
-
var
|
|
23390
|
+
var _ref124 = options || {}, _ref124$scaleMinimum = _ref124.scaleMinimum, scaleMinimum = _ref124$scaleMinimum === void 0 ? 2 : _ref124$scaleMinimum, _ref124$lowerBound = _ref124.lowerBound, lowerBound = _ref124$lowerBound === void 0 ? false : _ref124$lowerBound;
|
|
23257
23391
|
var content = virtualNode.attr('content') || '';
|
|
23258
23392
|
if (!content) {
|
|
23259
23393
|
return true;
|
|
@@ -23302,10 +23436,10 @@
|
|
|
23302
23436
|
var minOffset = (options === null || options === void 0 ? void 0 : options.minOffset) || 24;
|
|
23303
23437
|
var closeNeighbors = [];
|
|
23304
23438
|
var closestOffset = minOffset;
|
|
23305
|
-
var
|
|
23439
|
+
var _iterator18 = _createForOfIteratorHelper(_findNearbyElms(vNode, minOffset)), _step18;
|
|
23306
23440
|
try {
|
|
23307
|
-
for (
|
|
23308
|
-
var vNeighbor =
|
|
23441
|
+
for (_iterator18.s(); !(_step18 = _iterator18.n()).done; ) {
|
|
23442
|
+
var vNeighbor = _step18.value;
|
|
23309
23443
|
if (get_role_type_default(vNeighbor) !== 'widget' || !_isFocusable(vNeighbor)) {
|
|
23310
23444
|
continue;
|
|
23311
23445
|
}
|
|
@@ -23317,9 +23451,9 @@
|
|
|
23317
23451
|
closeNeighbors.push(vNeighbor);
|
|
23318
23452
|
}
|
|
23319
23453
|
} catch (err) {
|
|
23320
|
-
|
|
23454
|
+
_iterator18.e(err);
|
|
23321
23455
|
} finally {
|
|
23322
|
-
|
|
23456
|
+
_iterator18.f();
|
|
23323
23457
|
}
|
|
23324
23458
|
if (closeNeighbors.length === 0) {
|
|
23325
23459
|
this.data({
|
|
@@ -23328,8 +23462,8 @@
|
|
|
23328
23462
|
});
|
|
23329
23463
|
return true;
|
|
23330
23464
|
}
|
|
23331
|
-
this.relatedNodes(closeNeighbors.map(function(
|
|
23332
|
-
var actualNode =
|
|
23465
|
+
this.relatedNodes(closeNeighbors.map(function(_ref125) {
|
|
23466
|
+
var actualNode = _ref125.actualNode;
|
|
23333
23467
|
return actualNode;
|
|
23334
23468
|
}));
|
|
23335
23469
|
if (!closeNeighbors.some(_isInTabOrder)) {
|
|
@@ -23407,10 +23541,10 @@
|
|
|
23407
23541
|
function filterByElmsOverlap(vNode, nearbyElms) {
|
|
23408
23542
|
var fullyObscuringElms = [];
|
|
23409
23543
|
var partialObscuringElms = [];
|
|
23410
|
-
var
|
|
23544
|
+
var _iterator19 = _createForOfIteratorHelper(nearbyElms), _step19;
|
|
23411
23545
|
try {
|
|
23412
|
-
for (
|
|
23413
|
-
var vNeighbor =
|
|
23546
|
+
for (_iterator19.s(); !(_step19 = _iterator19.n()).done; ) {
|
|
23547
|
+
var vNeighbor = _step19.value;
|
|
23414
23548
|
if (!isDescendantNotInTabOrder(vNode, vNeighbor) && _hasVisualOverlap(vNode, vNeighbor) && getCssPointerEvents(vNeighbor) !== 'none') {
|
|
23415
23549
|
if (isEnclosedRect(vNode, vNeighbor)) {
|
|
23416
23550
|
fullyObscuringElms.push(vNeighbor);
|
|
@@ -23420,9 +23554,9 @@
|
|
|
23420
23554
|
}
|
|
23421
23555
|
}
|
|
23422
23556
|
} catch (err) {
|
|
23423
|
-
|
|
23557
|
+
_iterator19.e(err);
|
|
23424
23558
|
} finally {
|
|
23425
|
-
|
|
23559
|
+
_iterator19.f();
|
|
23426
23560
|
}
|
|
23427
23561
|
return {
|
|
23428
23562
|
fullyObscuringElms: fullyObscuringElms,
|
|
@@ -23434,8 +23568,8 @@
|
|
|
23434
23568
|
if (obscuredNodes.length === 0) {
|
|
23435
23569
|
return null;
|
|
23436
23570
|
}
|
|
23437
|
-
var obscuringRects = obscuredNodes.map(function(
|
|
23438
|
-
var rect =
|
|
23571
|
+
var obscuringRects = obscuredNodes.map(function(_ref126) {
|
|
23572
|
+
var rect = _ref126.boundingClientRect;
|
|
23439
23573
|
return rect;
|
|
23440
23574
|
});
|
|
23441
23575
|
var unobscuredRects = _splitRects(nodeRect, obscuringRects);
|
|
@@ -23475,13 +23609,13 @@
|
|
|
23475
23609
|
function isDescendantNotInTabOrder(vAncestor, vNode) {
|
|
23476
23610
|
return vAncestor.actualNode.contains(vNode.actualNode) && !_isInTabOrder(vNode);
|
|
23477
23611
|
}
|
|
23478
|
-
function rectHasMinimumSize(minSize,
|
|
23479
|
-
var width =
|
|
23612
|
+
function rectHasMinimumSize(minSize, _ref127) {
|
|
23613
|
+
var width = _ref127.width, height = _ref127.height;
|
|
23480
23614
|
return width + roundingMargin2 >= minSize && height + roundingMargin2 >= minSize;
|
|
23481
23615
|
}
|
|
23482
23616
|
function mapActualNodes(vNodes) {
|
|
23483
|
-
return vNodes.map(function(
|
|
23484
|
-
var actualNode =
|
|
23617
|
+
return vNodes.map(function(_ref128) {
|
|
23618
|
+
var actualNode = _ref128.actualNode;
|
|
23485
23619
|
return actualNode;
|
|
23486
23620
|
});
|
|
23487
23621
|
}
|
|
@@ -23507,14 +23641,14 @@
|
|
|
23507
23641
|
}
|
|
23508
23642
|
function getHeadingOrder(results) {
|
|
23509
23643
|
results = _toConsumableArray(results);
|
|
23510
|
-
results.sort(function(
|
|
23511
|
-
var nodeA =
|
|
23512
|
-
var nodeB =
|
|
23644
|
+
results.sort(function(_ref129, _ref130) {
|
|
23645
|
+
var nodeA = _ref129.node;
|
|
23646
|
+
var nodeB = _ref130.node;
|
|
23513
23647
|
return nodeA.ancestry.length - nodeB.ancestry.length;
|
|
23514
23648
|
});
|
|
23515
23649
|
var headingOrder = results.reduce(mergeHeadingOrder, []);
|
|
23516
|
-
return headingOrder.filter(function(
|
|
23517
|
-
var level =
|
|
23650
|
+
return headingOrder.filter(function(_ref131) {
|
|
23651
|
+
var level = _ref131.level;
|
|
23518
23652
|
return level !== -1;
|
|
23519
23653
|
});
|
|
23520
23654
|
}
|
|
@@ -23548,7 +23682,7 @@
|
|
|
23548
23682
|
}
|
|
23549
23683
|
function findHeadingOrderIndex(headingOrder, ancestry) {
|
|
23550
23684
|
return headingOrder.findIndex(function(heading) {
|
|
23551
|
-
return
|
|
23685
|
+
return _matchAncestry(heading.ancestry, ancestry);
|
|
23552
23686
|
});
|
|
23553
23687
|
}
|
|
23554
23688
|
function addFrameToHeadingAncestry(heading, frameAncestry) {
|
|
@@ -23565,7 +23699,7 @@
|
|
|
23565
23699
|
var headingRole = role && role.includes('heading');
|
|
23566
23700
|
var ariaHeadingLevel = vNode.attr('aria-level');
|
|
23567
23701
|
var ariaLevel = parseInt(ariaHeadingLevel, 10);
|
|
23568
|
-
var
|
|
23702
|
+
var _ref132 = vNode.props.nodeName.match(/h(\d)/) || [], _ref133 = _slicedToArray(_ref132, 2), headingLevel = _ref133[1];
|
|
23569
23703
|
if (!headingRole) {
|
|
23570
23704
|
return -1;
|
|
23571
23705
|
}
|
|
@@ -23629,8 +23763,8 @@
|
|
|
23629
23763
|
if (results.length < 2) {
|
|
23630
23764
|
return results;
|
|
23631
23765
|
}
|
|
23632
|
-
var incompleteResults = results.filter(function(
|
|
23633
|
-
var result =
|
|
23766
|
+
var incompleteResults = results.filter(function(_ref134) {
|
|
23767
|
+
var result = _ref134.result;
|
|
23634
23768
|
return result !== void 0;
|
|
23635
23769
|
});
|
|
23636
23770
|
var uniqueResults = [];
|
|
@@ -23642,12 +23776,12 @@
|
|
|
23642
23776
|
if (nameMap[name]) {
|
|
23643
23777
|
return 'continue';
|
|
23644
23778
|
}
|
|
23645
|
-
var sameNameResults = incompleteResults.filter(function(
|
|
23646
|
-
var data =
|
|
23779
|
+
var sameNameResults = incompleteResults.filter(function(_ref135, resultNum) {
|
|
23780
|
+
var data = _ref135.data;
|
|
23647
23781
|
return data.name === name && resultNum !== index;
|
|
23648
23782
|
});
|
|
23649
|
-
var isSameUrl = sameNameResults.every(function(
|
|
23650
|
-
var data =
|
|
23783
|
+
var isSameUrl = sameNameResults.every(function(_ref136) {
|
|
23784
|
+
var data = _ref136.data;
|
|
23651
23785
|
return isIdenticalObject(data.urlProps, urlProps);
|
|
23652
23786
|
});
|
|
23653
23787
|
if (sameNameResults.length && !isSameUrl) {
|
|
@@ -23684,7 +23818,7 @@
|
|
|
23684
23818
|
return forms_exports;
|
|
23685
23819
|
},
|
|
23686
23820
|
matches: function matches() {
|
|
23687
|
-
return
|
|
23821
|
+
return matches_default2;
|
|
23688
23822
|
},
|
|
23689
23823
|
math: function math() {
|
|
23690
23824
|
return math_exports;
|
|
@@ -23759,7 +23893,7 @@
|
|
|
23759
23893
|
return get_headers_default;
|
|
23760
23894
|
},
|
|
23761
23895
|
getScope: function getScope() {
|
|
23762
|
-
return
|
|
23896
|
+
return _getScope;
|
|
23763
23897
|
},
|
|
23764
23898
|
isColumnHeader: function isColumnHeader() {
|
|
23765
23899
|
return is_column_header_default;
|
|
@@ -24066,7 +24200,7 @@
|
|
|
24066
24200
|
var separatorRegex = /[;,\s]/;
|
|
24067
24201
|
var validRedirectNumRegex = /^[0-9.]+$/;
|
|
24068
24202
|
function metaRefreshEvaluate(node, options, virtualNode) {
|
|
24069
|
-
var
|
|
24203
|
+
var _ref137 = options || {}, minDelay = _ref137.minDelay, maxDelay = _ref137.maxDelay;
|
|
24070
24204
|
var content = (virtualNode.attr('content') || '').trim();
|
|
24071
24205
|
var _content$split = content.split(separatorRegex), _content$split2 = _slicedToArray(_content$split, 1), redirectStr = _content$split2[0];
|
|
24072
24206
|
if (!redirectStr.match(validRedirectNumRegex)) {
|
|
@@ -24178,19 +24312,19 @@
|
|
|
24178
24312
|
return;
|
|
24179
24313
|
}
|
|
24180
24314
|
var frameAncestry = r.node.ancestry.slice(0, -1);
|
|
24181
|
-
var
|
|
24315
|
+
var _iterator20 = _createForOfIteratorHelper(iframeResults), _step20;
|
|
24182
24316
|
try {
|
|
24183
|
-
for (
|
|
24184
|
-
var iframeResult =
|
|
24185
|
-
if (
|
|
24317
|
+
for (_iterator20.s(); !(_step20 = _iterator20.n()).done; ) {
|
|
24318
|
+
var iframeResult = _step20.value;
|
|
24319
|
+
if (_matchAncestry(frameAncestry, iframeResult.node.ancestry)) {
|
|
24186
24320
|
r.result = iframeResult.result;
|
|
24187
24321
|
break;
|
|
24188
24322
|
}
|
|
24189
24323
|
}
|
|
24190
24324
|
} catch (err) {
|
|
24191
|
-
|
|
24325
|
+
_iterator20.e(err);
|
|
24192
24326
|
} finally {
|
|
24193
|
-
|
|
24327
|
+
_iterator20.f();
|
|
24194
24328
|
}
|
|
24195
24329
|
});
|
|
24196
24330
|
iframeResults.forEach(function(r) {
|
|
@@ -24237,8 +24371,8 @@
|
|
|
24237
24371
|
} else if (node !== document.body && has_content_default(node, true)) {
|
|
24238
24372
|
return [ virtualNode ];
|
|
24239
24373
|
} else {
|
|
24240
|
-
return virtualNode.children.filter(function(
|
|
24241
|
-
var actualNode =
|
|
24374
|
+
return virtualNode.children.filter(function(_ref138) {
|
|
24375
|
+
var actualNode = _ref138.actualNode;
|
|
24242
24376
|
return actualNode.nodeType === 1;
|
|
24243
24377
|
}).map(function(vNode) {
|
|
24244
24378
|
return findRegionlessElms(vNode, options);
|
|
@@ -24258,7 +24392,7 @@
|
|
|
24258
24392
|
if (landmarkRoles2.includes(role)) {
|
|
24259
24393
|
return true;
|
|
24260
24394
|
}
|
|
24261
|
-
if (options.regionMatcher &&
|
|
24395
|
+
if (options.regionMatcher && matches_default2(virtualNode, options.regionMatcher)) {
|
|
24262
24396
|
return true;
|
|
24263
24397
|
}
|
|
24264
24398
|
return false;
|
|
@@ -24392,8 +24526,8 @@
|
|
|
24392
24526
|
}
|
|
24393
24527
|
return false;
|
|
24394
24528
|
}
|
|
24395
|
-
function getNumberValue(domNode,
|
|
24396
|
-
var cssProperty =
|
|
24529
|
+
function getNumberValue(domNode, _ref139) {
|
|
24530
|
+
var cssProperty = _ref139.cssProperty, absoluteValues = _ref139.absoluteValues, normalValue = _ref139.normalValue;
|
|
24397
24531
|
var computedStyle = window.getComputedStyle(domNode);
|
|
24398
24532
|
var cssPropValue = computedStyle.getPropertyValue(cssProperty);
|
|
24399
24533
|
if (cssPropValue === 'normal') {
|
|
@@ -24470,8 +24604,8 @@
|
|
|
24470
24604
|
if (!virtualNode.children) {
|
|
24471
24605
|
return void 0;
|
|
24472
24606
|
}
|
|
24473
|
-
var titleNode = virtualNode.children.find(function(
|
|
24474
|
-
var props =
|
|
24607
|
+
var titleNode = virtualNode.children.find(function(_ref140) {
|
|
24608
|
+
var props = _ref140.props;
|
|
24475
24609
|
return props.nodeName === 'title';
|
|
24476
24610
|
});
|
|
24477
24611
|
if (!titleNode) {
|
|
@@ -24566,12 +24700,11 @@
|
|
|
24566
24700
|
cells.push(row.cells[cellIndex]);
|
|
24567
24701
|
}
|
|
24568
24702
|
}
|
|
24569
|
-
var ids = cells.
|
|
24570
|
-
|
|
24571
|
-
|
|
24572
|
-
|
|
24573
|
-
|
|
24574
|
-
}, []);
|
|
24703
|
+
var ids = cells.filter(function(cell) {
|
|
24704
|
+
return cell.getAttribute('id');
|
|
24705
|
+
}).map(function(cell) {
|
|
24706
|
+
return cell.getAttribute('id');
|
|
24707
|
+
});
|
|
24575
24708
|
cells.forEach(function(cell) {
|
|
24576
24709
|
var isSelf = false;
|
|
24577
24710
|
var notOfTable = false;
|
|
@@ -24605,7 +24738,6 @@
|
|
|
24605
24738
|
}
|
|
24606
24739
|
return true;
|
|
24607
24740
|
}
|
|
24608
|
-
var td_headers_attr_evaluate_default = tdHeadersAttrEvaluate;
|
|
24609
24741
|
function thHasDataCellsEvaluate(node) {
|
|
24610
24742
|
var cells = get_all_cells_default(node);
|
|
24611
24743
|
var checkResult = this;
|
|
@@ -24861,7 +24993,7 @@
|
|
|
24861
24993
|
return false;
|
|
24862
24994
|
}
|
|
24863
24995
|
return virtualNode.children.some(function(vChild) {
|
|
24864
|
-
return vChild.props.nodeName === '#text' && !
|
|
24996
|
+
return vChild.props.nodeName === '#text' && !_isIconLigature(vChild);
|
|
24865
24997
|
});
|
|
24866
24998
|
}
|
|
24867
24999
|
function dataTableLargeMatches(node) {
|
|
@@ -24932,7 +25064,7 @@
|
|
|
24932
25064
|
}
|
|
24933
25065
|
var html_namespace_matches_default = htmlNamespaceMatches;
|
|
24934
25066
|
function identicalLinksSamePurposeMatches(node, virtualNode) {
|
|
24935
|
-
var hasAccName = !!
|
|
25067
|
+
var hasAccName = !!_accessibleTextVirtual(virtualNode);
|
|
24936
25068
|
if (!hasAccName) {
|
|
24937
25069
|
return false;
|
|
24938
25070
|
}
|
|
@@ -24989,31 +25121,29 @@
|
|
|
24989
25121
|
return node.hasAttribute('role') || !find_up_virtual_default(virtualNode, nativeScopeFilter);
|
|
24990
25122
|
}
|
|
24991
25123
|
var landmark_has_body_context_matches_default = landmarkHasBodyContextMatches;
|
|
25124
|
+
var excludedParentsForHeaderFooterLandmarks = [ 'article', 'aside', 'main', 'nav', 'section' ].join(',');
|
|
24992
25125
|
function landmarkUniqueMatches(node, virtualNode) {
|
|
24993
|
-
|
|
24994
|
-
|
|
24995
|
-
|
|
24996
|
-
|
|
24997
|
-
|
|
24998
|
-
|
|
24999
|
-
|
|
25000
|
-
|
|
25001
|
-
|
|
25002
|
-
|
|
25003
|
-
|
|
25004
|
-
|
|
25005
|
-
|
|
25006
|
-
|
|
25007
|
-
|
|
25008
|
-
if (nodeName2 === 'SECTION' || nodeName2 === 'FORM') {
|
|
25009
|
-
var accessibleText2 = accessible_text_virtual_default(virtualNode2);
|
|
25010
|
-
return !!accessibleText2;
|
|
25011
|
-
}
|
|
25012
|
-
return landmarkRoles2.indexOf(role) >= 0 || role === 'region';
|
|
25126
|
+
return isLandmarkVirtual(virtualNode) && _isVisibleToScreenReaders(virtualNode);
|
|
25127
|
+
}
|
|
25128
|
+
function isLandmarkVirtual(vNode) {
|
|
25129
|
+
var landmarkRoles2 = get_aria_roles_by_type_default('landmark');
|
|
25130
|
+
var role = get_role_default(vNode);
|
|
25131
|
+
if (!role) {
|
|
25132
|
+
return false;
|
|
25133
|
+
}
|
|
25134
|
+
var nodeName2 = vNode.props.nodeName;
|
|
25135
|
+
if (nodeName2 === 'header' || nodeName2 === 'footer') {
|
|
25136
|
+
return isHeaderFooterLandmark(vNode);
|
|
25137
|
+
}
|
|
25138
|
+
if (nodeName2 === 'section' || nodeName2 === 'form') {
|
|
25139
|
+
var accessibleText2 = _accessibleTextVirtual(vNode);
|
|
25140
|
+
return !!accessibleText2;
|
|
25013
25141
|
}
|
|
25014
|
-
return
|
|
25142
|
+
return landmarkRoles2.indexOf(role) >= 0 || role === 'region';
|
|
25143
|
+
}
|
|
25144
|
+
function isHeaderFooterLandmark(headerFooterElement) {
|
|
25145
|
+
return !closest_default(headerFooterElement, excludedParentsForHeaderFooterLandmarks);
|
|
25015
25146
|
}
|
|
25016
|
-
var landmark_unique_matches_default = landmarkUniqueMatches;
|
|
25017
25147
|
function dataTableMatches2(node) {
|
|
25018
25148
|
return !is_data_table_default(node) && !_isFocusable(node);
|
|
25019
25149
|
}
|
|
@@ -25066,7 +25196,7 @@
|
|
|
25066
25196
|
if (!role || [ 'none', 'presentation' ].includes(role)) {
|
|
25067
25197
|
return true;
|
|
25068
25198
|
}
|
|
25069
|
-
var
|
|
25199
|
+
var _ref141 = aria_roles_default[role] || {}, accessibleNameRequired = _ref141.accessibleNameRequired;
|
|
25070
25200
|
if (accessibleNameRequired || _isFocusable(virtualNode)) {
|
|
25071
25201
|
return true;
|
|
25072
25202
|
}
|
|
@@ -25210,7 +25340,7 @@
|
|
|
25210
25340
|
'aria-conditional-attr-evaluate': ariaConditionalAttrEvaluate,
|
|
25211
25341
|
'aria-conditional-checkbox-attr-evaluate': ariaConditionalCheckboxAttr,
|
|
25212
25342
|
'aria-conditional-row-attr-evaluate': ariaConditionalRowAttr,
|
|
25213
|
-
'aria-errormessage-evaluate':
|
|
25343
|
+
'aria-errormessage-evaluate': ariaErrormessageEvaluate,
|
|
25214
25344
|
'aria-has-attr-matches': aria_has_attr_matches_default,
|
|
25215
25345
|
'aria-hidden-body-evaluate': aria_hidden_body_evaluate_default,
|
|
25216
25346
|
'aria-hidden-focus-matches': aria_hidden_focus_matches_default,
|
|
@@ -25300,7 +25430,7 @@
|
|
|
25300
25430
|
'landmark-is-top-level-evaluate': landmark_is_top_level_evaluate_default,
|
|
25301
25431
|
'landmark-is-unique-after': landmark_is_unique_after_default,
|
|
25302
25432
|
'landmark-is-unique-evaluate': landmark_is_unique_evaluate_default,
|
|
25303
|
-
'landmark-unique-matches':
|
|
25433
|
+
'landmark-unique-matches': landmarkUniqueMatches,
|
|
25304
25434
|
'layout-table-matches': layout_table_matches_default,
|
|
25305
25435
|
'link-in-text-block-evaluate': link_in_text_block_evaluate_default,
|
|
25306
25436
|
'link-in-text-block-matches': link_in_text_block_matches_default,
|
|
@@ -25323,7 +25453,7 @@
|
|
|
25323
25453
|
'non-empty-if-present-evaluate': non_empty_if_present_evaluate_default,
|
|
25324
25454
|
'not-html-matches': not_html_matches_default,
|
|
25325
25455
|
'object-is-loaded-matches': object_is_loaded_matches_default,
|
|
25326
|
-
'only-dlitems-evaluate':
|
|
25456
|
+
'only-dlitems-evaluate': onlyDlitemsEvaluate,
|
|
25327
25457
|
'only-listitems-evaluate': only_listitems_evaluate_default,
|
|
25328
25458
|
'p-as-heading-evaluate': p_as_heading_evaluate_default,
|
|
25329
25459
|
'p-as-heading-matches': p_as_heading_matches_default,
|
|
@@ -25346,7 +25476,7 @@
|
|
|
25346
25476
|
'target-offset-evaluate': targetOffsetEvaluate,
|
|
25347
25477
|
'target-size-evaluate': targetSize,
|
|
25348
25478
|
'td-has-header-evaluate': td_has_header_evaluate_default,
|
|
25349
|
-
'td-headers-attr-evaluate':
|
|
25479
|
+
'td-headers-attr-evaluate': tdHeadersAttrEvaluate,
|
|
25350
25480
|
'th-has-data-cells-evaluate': th_has_data_cells_evaluate_default,
|
|
25351
25481
|
'title-only-evaluate': title_only_evaluate_default,
|
|
25352
25482
|
'unique-frame-title-after': unique_frame_title_after_default,
|
|
@@ -25627,8 +25757,8 @@
|
|
|
25627
25757
|
});
|
|
25628
25758
|
});
|
|
25629
25759
|
});
|
|
25630
|
-
q.defer(function(
|
|
25631
|
-
return setTimeout(
|
|
25760
|
+
q.defer(function(res) {
|
|
25761
|
+
return setTimeout(res, 0);
|
|
25632
25762
|
});
|
|
25633
25763
|
if (options.performanceTimer) {
|
|
25634
25764
|
this._logRulePerformance();
|
|
@@ -25709,8 +25839,8 @@
|
|
|
25709
25839
|
var hasResults = false;
|
|
25710
25840
|
var result = {};
|
|
25711
25841
|
results.forEach(function(r) {
|
|
25712
|
-
var res = r.results.filter(function(
|
|
25713
|
-
return
|
|
25842
|
+
var res = r.results.filter(function(_result) {
|
|
25843
|
+
return _result;
|
|
25714
25844
|
});
|
|
25715
25845
|
result[r.type] = res;
|
|
25716
25846
|
if (res.length) {
|
|
@@ -25852,89 +25982,8 @@
|
|
|
25852
25982
|
this.impact = spec.impact;
|
|
25853
25983
|
}
|
|
25854
25984
|
};
|
|
25855
|
-
var rule_default = Rule;
|
|
25856
25985
|
var import_dot2 = __toModule(require_doT());
|
|
25857
25986
|
var dotRegex = /\{\{.+?\}\}/g;
|
|
25858
|
-
function getDefaultOrigin() {
|
|
25859
|
-
if (window.origin && window.origin !== 'null') {
|
|
25860
|
-
return window.origin;
|
|
25861
|
-
}
|
|
25862
|
-
if (window.location && window.location.origin && window.location.origin !== 'null') {
|
|
25863
|
-
return window.location.origin;
|
|
25864
|
-
}
|
|
25865
|
-
}
|
|
25866
|
-
function getDefaultConfiguration(audit) {
|
|
25867
|
-
var config;
|
|
25868
|
-
if (audit) {
|
|
25869
|
-
config = clone_default(audit);
|
|
25870
|
-
config.commons = audit.commons;
|
|
25871
|
-
} else {
|
|
25872
|
-
config = {};
|
|
25873
|
-
}
|
|
25874
|
-
config.reporter = config.reporter || null;
|
|
25875
|
-
config.noHtml = config.noHtml || false;
|
|
25876
|
-
if (!config.allowedOrigins) {
|
|
25877
|
-
var defaultOrigin = getDefaultOrigin();
|
|
25878
|
-
config.allowedOrigins = defaultOrigin ? [ defaultOrigin ] : [];
|
|
25879
|
-
}
|
|
25880
|
-
config.rules = config.rules || [];
|
|
25881
|
-
config.checks = config.checks || [];
|
|
25882
|
-
config.data = _extends({
|
|
25883
|
-
checks: {},
|
|
25884
|
-
rules: {}
|
|
25885
|
-
}, config.data);
|
|
25886
|
-
return config;
|
|
25887
|
-
}
|
|
25888
|
-
function unpackToObject(collection, audit, method) {
|
|
25889
|
-
var i, l;
|
|
25890
|
-
for (i = 0, l = collection.length; i < l; i++) {
|
|
25891
|
-
audit[method](collection[i]);
|
|
25892
|
-
}
|
|
25893
|
-
}
|
|
25894
|
-
var mergeCheckLocale = function mergeCheckLocale(a2, b2) {
|
|
25895
|
-
var pass = b2.pass, fail = b2.fail;
|
|
25896
|
-
if (typeof pass === 'string' && dotRegex.test(pass)) {
|
|
25897
|
-
pass = import_dot2['default'].compile(pass);
|
|
25898
|
-
}
|
|
25899
|
-
if (typeof fail === 'string' && dotRegex.test(fail)) {
|
|
25900
|
-
fail = import_dot2['default'].compile(fail);
|
|
25901
|
-
}
|
|
25902
|
-
return _extends({}, a2, {
|
|
25903
|
-
messages: {
|
|
25904
|
-
pass: pass || a2.messages.pass,
|
|
25905
|
-
fail: fail || a2.messages.fail,
|
|
25906
|
-
incomplete: _typeof(a2.messages.incomplete) === 'object' ? _extends({}, a2.messages.incomplete, b2.incomplete) : b2.incomplete
|
|
25907
|
-
}
|
|
25908
|
-
});
|
|
25909
|
-
};
|
|
25910
|
-
var mergeRuleLocale = function mergeRuleLocale(a2, b2) {
|
|
25911
|
-
var help = b2.help, description = b2.description;
|
|
25912
|
-
if (typeof help === 'string' && dotRegex.test(help)) {
|
|
25913
|
-
help = import_dot2['default'].compile(help);
|
|
25914
|
-
}
|
|
25915
|
-
if (typeof description === 'string' && dotRegex.test(description)) {
|
|
25916
|
-
description = import_dot2['default'].compile(description);
|
|
25917
|
-
}
|
|
25918
|
-
return _extends({}, a2, {
|
|
25919
|
-
help: help || a2.help,
|
|
25920
|
-
description: description || a2.description
|
|
25921
|
-
});
|
|
25922
|
-
};
|
|
25923
|
-
var mergeFailureMessage = function mergeFailureMessage(a2, b2) {
|
|
25924
|
-
var failureMessage = b2.failureMessage;
|
|
25925
|
-
if (typeof failureMessage === 'string' && dotRegex.test(failureMessage)) {
|
|
25926
|
-
failureMessage = import_dot2['default'].compile(failureMessage);
|
|
25927
|
-
}
|
|
25928
|
-
return _extends({}, a2, {
|
|
25929
|
-
failureMessage: failureMessage || a2.failureMessage
|
|
25930
|
-
});
|
|
25931
|
-
};
|
|
25932
|
-
var mergeFallbackMessage = function mergeFallbackMessage(a2, b2) {
|
|
25933
|
-
if (typeof b2 === 'string' && dotRegex.test(b2)) {
|
|
25934
|
-
b2 = import_dot2['default'].compile(b2);
|
|
25935
|
-
}
|
|
25936
|
-
return b2 || a2;
|
|
25937
|
-
};
|
|
25938
25987
|
var Audit = function() {
|
|
25939
25988
|
function Audit(audit) {
|
|
25940
25989
|
_classCallCheck(this, Audit);
|
|
@@ -26060,10 +26109,10 @@
|
|
|
26060
26109
|
value: function setAllowedOrigins(allowedOrigins) {
|
|
26061
26110
|
var defaultOrigin = getDefaultOrigin();
|
|
26062
26111
|
this.allowedOrigins = [];
|
|
26063
|
-
var
|
|
26112
|
+
var _iterator21 = _createForOfIteratorHelper(allowedOrigins), _step21;
|
|
26064
26113
|
try {
|
|
26065
|
-
for (
|
|
26066
|
-
var origin =
|
|
26114
|
+
for (_iterator21.s(); !(_step21 = _iterator21.n()).done; ) {
|
|
26115
|
+
var origin = _step21.value;
|
|
26067
26116
|
if (origin === constants_default.allOrigins) {
|
|
26068
26117
|
this.allowedOrigins = [ '*' ];
|
|
26069
26118
|
return;
|
|
@@ -26074,9 +26123,9 @@
|
|
|
26074
26123
|
}
|
|
26075
26124
|
}
|
|
26076
26125
|
} catch (err) {
|
|
26077
|
-
|
|
26126
|
+
_iterator21.e(err);
|
|
26078
26127
|
} finally {
|
|
26079
|
-
|
|
26128
|
+
_iterator21.f();
|
|
26080
26129
|
}
|
|
26081
26130
|
}
|
|
26082
26131
|
}, {
|
|
@@ -26117,7 +26166,7 @@
|
|
|
26117
26166
|
if (rule) {
|
|
26118
26167
|
rule.configure(spec);
|
|
26119
26168
|
} else {
|
|
26120
|
-
this.rules.push(new
|
|
26169
|
+
this.rules.push(new Rule(spec, this));
|
|
26121
26170
|
}
|
|
26122
26171
|
}
|
|
26123
26172
|
}, {
|
|
@@ -26156,12 +26205,12 @@
|
|
|
26156
26205
|
});
|
|
26157
26206
|
var preloaderQueue = queue_default();
|
|
26158
26207
|
if (runLaterRules.length) {
|
|
26159
|
-
preloaderQueue.defer(function(
|
|
26160
|
-
|
|
26161
|
-
return
|
|
26208
|
+
preloaderQueue.defer(function(res) {
|
|
26209
|
+
_preload(options).then(function(assets) {
|
|
26210
|
+
return res(assets);
|
|
26162
26211
|
})['catch'](function(err2) {
|
|
26163
26212
|
console.warn('Couldn\'t load preload assets: ', err2);
|
|
26164
|
-
|
|
26213
|
+
res(void 0);
|
|
26165
26214
|
});
|
|
26166
26215
|
});
|
|
26167
26216
|
}
|
|
@@ -26335,6 +26384,87 @@
|
|
|
26335
26384
|
} ]);
|
|
26336
26385
|
return Audit;
|
|
26337
26386
|
}();
|
|
26387
|
+
var audit_default = Audit;
|
|
26388
|
+
function getDefaultOrigin() {
|
|
26389
|
+
if (window.origin && window.origin !== 'null') {
|
|
26390
|
+
return window.origin;
|
|
26391
|
+
}
|
|
26392
|
+
if (window.location && window.location.origin && window.location.origin !== 'null') {
|
|
26393
|
+
return window.location.origin;
|
|
26394
|
+
}
|
|
26395
|
+
}
|
|
26396
|
+
function getDefaultConfiguration(audit) {
|
|
26397
|
+
var config;
|
|
26398
|
+
if (audit) {
|
|
26399
|
+
config = _clone(audit);
|
|
26400
|
+
config.commons = audit.commons;
|
|
26401
|
+
} else {
|
|
26402
|
+
config = {};
|
|
26403
|
+
}
|
|
26404
|
+
config.reporter = config.reporter || null;
|
|
26405
|
+
config.noHtml = config.noHtml || false;
|
|
26406
|
+
if (!config.allowedOrigins) {
|
|
26407
|
+
var defaultOrigin = getDefaultOrigin();
|
|
26408
|
+
config.allowedOrigins = defaultOrigin ? [ defaultOrigin ] : [];
|
|
26409
|
+
}
|
|
26410
|
+
config.rules = config.rules || [];
|
|
26411
|
+
config.checks = config.checks || [];
|
|
26412
|
+
config.data = _extends({
|
|
26413
|
+
checks: {},
|
|
26414
|
+
rules: {}
|
|
26415
|
+
}, config.data);
|
|
26416
|
+
return config;
|
|
26417
|
+
}
|
|
26418
|
+
function unpackToObject(collection, audit, method) {
|
|
26419
|
+
var i, l;
|
|
26420
|
+
for (i = 0, l = collection.length; i < l; i++) {
|
|
26421
|
+
audit[method](collection[i]);
|
|
26422
|
+
}
|
|
26423
|
+
}
|
|
26424
|
+
var mergeCheckLocale = function mergeCheckLocale(a2, b2) {
|
|
26425
|
+
var pass = b2.pass, fail = b2.fail;
|
|
26426
|
+
if (typeof pass === 'string' && dotRegex.test(pass)) {
|
|
26427
|
+
pass = import_dot2['default'].compile(pass);
|
|
26428
|
+
}
|
|
26429
|
+
if (typeof fail === 'string' && dotRegex.test(fail)) {
|
|
26430
|
+
fail = import_dot2['default'].compile(fail);
|
|
26431
|
+
}
|
|
26432
|
+
return _extends({}, a2, {
|
|
26433
|
+
messages: {
|
|
26434
|
+
pass: pass || a2.messages.pass,
|
|
26435
|
+
fail: fail || a2.messages.fail,
|
|
26436
|
+
incomplete: _typeof(a2.messages.incomplete) === 'object' ? _extends({}, a2.messages.incomplete, b2.incomplete) : b2.incomplete
|
|
26437
|
+
}
|
|
26438
|
+
});
|
|
26439
|
+
};
|
|
26440
|
+
var mergeRuleLocale = function mergeRuleLocale(a2, b2) {
|
|
26441
|
+
var help = b2.help, description = b2.description;
|
|
26442
|
+
if (typeof help === 'string' && dotRegex.test(help)) {
|
|
26443
|
+
help = import_dot2['default'].compile(help);
|
|
26444
|
+
}
|
|
26445
|
+
if (typeof description === 'string' && dotRegex.test(description)) {
|
|
26446
|
+
description = import_dot2['default'].compile(description);
|
|
26447
|
+
}
|
|
26448
|
+
return _extends({}, a2, {
|
|
26449
|
+
help: help || a2.help,
|
|
26450
|
+
description: description || a2.description
|
|
26451
|
+
});
|
|
26452
|
+
};
|
|
26453
|
+
var mergeFailureMessage = function mergeFailureMessage(a2, b2) {
|
|
26454
|
+
var failureMessage = b2.failureMessage;
|
|
26455
|
+
if (typeof failureMessage === 'string' && dotRegex.test(failureMessage)) {
|
|
26456
|
+
failureMessage = import_dot2['default'].compile(failureMessage);
|
|
26457
|
+
}
|
|
26458
|
+
return _extends({}, a2, {
|
|
26459
|
+
failureMessage: failureMessage || a2.failureMessage
|
|
26460
|
+
});
|
|
26461
|
+
};
|
|
26462
|
+
var mergeFallbackMessage = function mergeFallbackMessage(a2, b2) {
|
|
26463
|
+
if (typeof b2 === 'string' && dotRegex.test(b2)) {
|
|
26464
|
+
b2 = import_dot2['default'].compile(b2);
|
|
26465
|
+
}
|
|
26466
|
+
return b2 || a2;
|
|
26467
|
+
};
|
|
26338
26468
|
function getRulesToRun(rules, context, options) {
|
|
26339
26469
|
var base = {
|
|
26340
26470
|
now: [],
|
|
@@ -26377,11 +26507,10 @@
|
|
|
26377
26507
|
});
|
|
26378
26508
|
};
|
|
26379
26509
|
}
|
|
26380
|
-
function getHelpUrl(
|
|
26381
|
-
var brand =
|
|
26510
|
+
function getHelpUrl(_ref142, ruleId, version) {
|
|
26511
|
+
var brand = _ref142.brand, application = _ref142.application, lang = _ref142.lang;
|
|
26382
26512
|
return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
|
|
26383
26513
|
}
|
|
26384
|
-
var audit_default = Audit;
|
|
26385
26514
|
function setupGlobals(context) {
|
|
26386
26515
|
var hasWindow = window && 'Node' in window && 'NodeList' in window;
|
|
26387
26516
|
var hasDoc = !!document;
|
|
@@ -26448,15 +26577,15 @@
|
|
|
26448
26577
|
if (options.performanceTimer) {
|
|
26449
26578
|
performance_timer_default.auditEnd();
|
|
26450
26579
|
}
|
|
26451
|
-
var results = merge_results_default(data.map(function(
|
|
26580
|
+
var results = merge_results_default(data.map(function(res) {
|
|
26452
26581
|
return {
|
|
26453
|
-
results:
|
|
26582
|
+
results: res
|
|
26454
26583
|
};
|
|
26455
26584
|
}));
|
|
26456
26585
|
if (context.initiator) {
|
|
26457
26586
|
results = audit.after(results, options);
|
|
26458
|
-
results.forEach(
|
|
26459
|
-
results = results.map(
|
|
26587
|
+
results.forEach(_publishMetaData);
|
|
26588
|
+
results = results.map(_finalizeRuleResult);
|
|
26460
26589
|
}
|
|
26461
26590
|
try {
|
|
26462
26591
|
resolve(results, teardown_default);
|
|
@@ -26473,7 +26602,9 @@
|
|
|
26473
26602
|
reject(e);
|
|
26474
26603
|
});
|
|
26475
26604
|
}
|
|
26476
|
-
|
|
26605
|
+
function load(audit) {
|
|
26606
|
+
axe._audit = new audit_default(audit);
|
|
26607
|
+
}
|
|
26477
26608
|
function runCommand(data, keepalive, callback) {
|
|
26478
26609
|
var resolve = callback;
|
|
26479
26610
|
var reject = function reject2(err2) {
|
|
@@ -26489,9 +26620,9 @@
|
|
|
26489
26620
|
var options = data && data.options || {};
|
|
26490
26621
|
switch (data.command) {
|
|
26491
26622
|
case 'rules':
|
|
26492
|
-
return
|
|
26623
|
+
return runRules(context, options, function(results, cleanupFn) {
|
|
26493
26624
|
resolve(results);
|
|
26494
|
-
|
|
26625
|
+
cleanupFn();
|
|
26495
26626
|
}, reject);
|
|
26496
26627
|
|
|
26497
26628
|
case 'cleanup-plugin':
|
|
@@ -26511,10 +26642,6 @@
|
|
|
26511
26642
|
});
|
|
26512
26643
|
});
|
|
26513
26644
|
}
|
|
26514
|
-
function load(audit) {
|
|
26515
|
-
axe._audit = new audit_default(audit);
|
|
26516
|
-
}
|
|
26517
|
-
var load_default = load;
|
|
26518
26645
|
function Plugin(spec) {
|
|
26519
26646
|
this._run = spec.run;
|
|
26520
26647
|
this._collect = spec.collect;
|
|
@@ -26562,7 +26689,7 @@
|
|
|
26562
26689
|
if (!(vNode instanceof abstract_virtual_node_default)) {
|
|
26563
26690
|
vNode = new serial_virtual_node_default(vNode);
|
|
26564
26691
|
}
|
|
26565
|
-
var rule =
|
|
26692
|
+
var rule = _getRule(ruleId);
|
|
26566
26693
|
if (!rule) {
|
|
26567
26694
|
throw new Error('unknown rule `' + ruleId + '`');
|
|
26568
26695
|
}
|
|
@@ -26582,8 +26709,8 @@
|
|
|
26582
26709
|
flatTree: []
|
|
26583
26710
|
};
|
|
26584
26711
|
var rawResults = rule.runSync(context, options);
|
|
26585
|
-
|
|
26586
|
-
|
|
26712
|
+
_publishMetaData(rawResults);
|
|
26713
|
+
_finalizeRuleResult(rawResults);
|
|
26587
26714
|
var results = aggregate_result_default([ rawResults ]);
|
|
26588
26715
|
results.violations.forEach(function(result) {
|
|
26589
26716
|
return result.nodes.forEach(function(nodeResult) {
|
|
@@ -26594,9 +26721,9 @@
|
|
|
26594
26721
|
toolOptions: options
|
|
26595
26722
|
});
|
|
26596
26723
|
}
|
|
26597
|
-
function normalizeRunParams(
|
|
26598
|
-
var
|
|
26599
|
-
var
|
|
26724
|
+
function normalizeRunParams(_ref143) {
|
|
26725
|
+
var _ref145, _options$reporter, _axe$_audit;
|
|
26726
|
+
var _ref144 = _slicedToArray(_ref143, 3), context = _ref144[0], options = _ref144[1], callback = _ref144[2];
|
|
26600
26727
|
var typeErr = new TypeError('axe.run arguments are invalid');
|
|
26601
26728
|
if (!isContextSpec(context)) {
|
|
26602
26729
|
if (callback !== void 0) {
|
|
@@ -26616,8 +26743,8 @@
|
|
|
26616
26743
|
if (typeof callback !== 'function' && callback !== void 0) {
|
|
26617
26744
|
throw typeErr;
|
|
26618
26745
|
}
|
|
26619
|
-
options =
|
|
26620
|
-
options.reporter = (
|
|
26746
|
+
options = _clone(options);
|
|
26747
|
+
options.reporter = (_ref145 = (_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 && _ref145 !== void 0 ? _ref145 : 'v1';
|
|
26621
26748
|
return {
|
|
26622
26749
|
context: context,
|
|
26623
26750
|
options: options,
|
|
@@ -26722,14 +26849,14 @@
|
|
|
26722
26849
|
return new Promise(function(res, rej) {
|
|
26723
26850
|
axe._audit.run(contextObj, options, res, rej);
|
|
26724
26851
|
}).then(function(results) {
|
|
26725
|
-
results = results.map(function(
|
|
26726
|
-
var nodes =
|
|
26852
|
+
results = results.map(function(_ref146) {
|
|
26853
|
+
var nodes = _ref146.nodes, result = _objectWithoutProperties(_ref146, _excluded13);
|
|
26727
26854
|
return _extends({
|
|
26728
26855
|
nodes: nodes.map(serializeNode)
|
|
26729
26856
|
}, result);
|
|
26730
26857
|
});
|
|
26731
|
-
var frames = contextObj.frames.map(function(
|
|
26732
|
-
var node =
|
|
26858
|
+
var frames = contextObj.frames.map(function(_ref147) {
|
|
26859
|
+
var node = _ref147.node;
|
|
26733
26860
|
return new dq_element_default(node, options).toJSON();
|
|
26734
26861
|
});
|
|
26735
26862
|
var environmentData;
|
|
@@ -26749,16 +26876,16 @@
|
|
|
26749
26876
|
return Promise.reject(err2);
|
|
26750
26877
|
});
|
|
26751
26878
|
}
|
|
26752
|
-
function serializeNode(
|
|
26753
|
-
var node =
|
|
26879
|
+
function serializeNode(_ref148) {
|
|
26880
|
+
var node = _ref148.node, nodeResult = _objectWithoutProperties(_ref148, _excluded14);
|
|
26754
26881
|
nodeResult.node = node.toJSON();
|
|
26755
26882
|
for (var _i44 = 0, _arr4 = [ 'any', 'all', 'none' ]; _i44 < _arr4.length; _i44++) {
|
|
26756
26883
|
var type2 = _arr4[_i44];
|
|
26757
|
-
nodeResult[type2] = nodeResult[type2].map(function(
|
|
26758
|
-
var relatedNodes =
|
|
26884
|
+
nodeResult[type2] = nodeResult[type2].map(function(_ref149) {
|
|
26885
|
+
var relatedNodes = _ref149.relatedNodes, checkResult = _objectWithoutProperties(_ref149, _excluded15);
|
|
26759
26886
|
return _extends({}, checkResult, {
|
|
26760
|
-
relatedNodes: relatedNodes.map(function(
|
|
26761
|
-
return
|
|
26887
|
+
relatedNodes: relatedNodes.map(function(relatedNode) {
|
|
26888
|
+
return relatedNode.toJSON();
|
|
26762
26889
|
})
|
|
26763
26890
|
});
|
|
26764
26891
|
});
|
|
@@ -26766,29 +26893,29 @@
|
|
|
26766
26893
|
return nodeResult;
|
|
26767
26894
|
}
|
|
26768
26895
|
function finishRun(partialResults) {
|
|
26769
|
-
var
|
|
26896
|
+
var _ref151, _options$reporter2, _axe$_audit2;
|
|
26770
26897
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
26771
|
-
options =
|
|
26772
|
-
var
|
|
26898
|
+
options = _clone(options);
|
|
26899
|
+
var _ref150 = partialResults.find(function(r) {
|
|
26773
26900
|
return r.environmentData;
|
|
26774
|
-
}) || {}, environmentData =
|
|
26901
|
+
}) || {}, environmentData = _ref150.environmentData;
|
|
26775
26902
|
axe._audit.normalizeOptions(options);
|
|
26776
|
-
options.reporter = (
|
|
26903
|
+
options.reporter = (_ref151 = (_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 && _ref151 !== void 0 ? _ref151 : 'v1';
|
|
26777
26904
|
setFrameSpec(partialResults);
|
|
26778
26905
|
var results = merge_results_default(partialResults);
|
|
26779
26906
|
results = axe._audit.after(results, options);
|
|
26780
|
-
results.forEach(
|
|
26781
|
-
results = results.map(
|
|
26907
|
+
results.forEach(_publishMetaData);
|
|
26908
|
+
results = results.map(_finalizeRuleResult);
|
|
26782
26909
|
return createReport2(results, _extends({
|
|
26783
26910
|
environmentData: environmentData
|
|
26784
26911
|
}, options));
|
|
26785
26912
|
}
|
|
26786
26913
|
function setFrameSpec(partialResults) {
|
|
26787
26914
|
var frameStack = [];
|
|
26788
|
-
var
|
|
26915
|
+
var _iterator22 = _createForOfIteratorHelper(partialResults), _step22;
|
|
26789
26916
|
try {
|
|
26790
|
-
for (
|
|
26791
|
-
var partialResult =
|
|
26917
|
+
for (_iterator22.s(); !(_step22 = _iterator22.n()).done; ) {
|
|
26918
|
+
var partialResult = _step22.value;
|
|
26792
26919
|
var frameSpec = frameStack.shift();
|
|
26793
26920
|
if (!partialResult) {
|
|
26794
26921
|
continue;
|
|
@@ -26798,13 +26925,13 @@
|
|
|
26798
26925
|
frameStack.unshift.apply(frameStack, _toConsumableArray(frameSpecs));
|
|
26799
26926
|
}
|
|
26800
26927
|
} catch (err) {
|
|
26801
|
-
|
|
26928
|
+
_iterator22.e(err);
|
|
26802
26929
|
} finally {
|
|
26803
|
-
|
|
26930
|
+
_iterator22.f();
|
|
26804
26931
|
}
|
|
26805
26932
|
}
|
|
26806
|
-
function getMergedFrameSpecs(
|
|
26807
|
-
var childFrameSpecs =
|
|
26933
|
+
function getMergedFrameSpecs(_ref152) {
|
|
26934
|
+
var childFrameSpecs = _ref152.frames, parentFrameSpec = _ref152.frameSpec;
|
|
26808
26935
|
if (!parentFrameSpec) {
|
|
26809
26936
|
return childFrameSpecs;
|
|
26810
26937
|
}
|
|
@@ -26822,7 +26949,7 @@
|
|
|
26822
26949
|
if (axe._tree) {
|
|
26823
26950
|
throw new Error('Axe is already setup. Call `axe.teardown()` before calling `axe.setup` again.');
|
|
26824
26951
|
}
|
|
26825
|
-
axe._tree =
|
|
26952
|
+
axe._tree = _getFlattenedTree(node);
|
|
26826
26953
|
axe._selectorData = _getSelectorData(axe._tree);
|
|
26827
26954
|
return axe._tree[0];
|
|
26828
26955
|
}
|
|
@@ -26836,7 +26963,7 @@
|
|
|
26836
26963
|
var _options3 = options, environmentData = _options3.environmentData, toolOptions = _objectWithoutProperties(_options3, _excluded16);
|
|
26837
26964
|
callback(_extends({}, _getEnvironmentData(environmentData), {
|
|
26838
26965
|
toolOptions: toolOptions
|
|
26839
|
-
},
|
|
26966
|
+
}, processAggregate(results, options)));
|
|
26840
26967
|
};
|
|
26841
26968
|
var na_default = naReporter;
|
|
26842
26969
|
var noPassesReporter = function noPassesReporter(results, options, callback) {
|
|
@@ -26846,7 +26973,7 @@
|
|
|
26846
26973
|
}
|
|
26847
26974
|
var _options4 = options, environmentData = _options4.environmentData, toolOptions = _objectWithoutProperties(_options4, _excluded17);
|
|
26848
26975
|
options.resultTypes = [ 'violations' ];
|
|
26849
|
-
var
|
|
26976
|
+
var _processAggregate = processAggregate(results, options), violations = _processAggregate.violations;
|
|
26850
26977
|
callback(_extends({}, _getEnvironmentData(environmentData), {
|
|
26851
26978
|
toolOptions: toolOptions,
|
|
26852
26979
|
violations: violations
|
|
@@ -26867,9 +26994,9 @@
|
|
|
26867
26994
|
for (var _i45 = 0, _types = types; _i45 < _types.length; _i45++) {
|
|
26868
26995
|
var type2 = _types[_i45];
|
|
26869
26996
|
if (transformedResult[type2] && Array.isArray(transformedResult[type2])) {
|
|
26870
|
-
transformedResult[type2] = transformedResult[type2].map(function(
|
|
26997
|
+
transformedResult[type2] = transformedResult[type2].map(function(_ref153) {
|
|
26871
26998
|
var _node;
|
|
26872
|
-
var node =
|
|
26999
|
+
var node = _ref153.node, typeResult = _objectWithoutProperties(_ref153, _excluded18);
|
|
26873
27000
|
node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
|
|
26874
27001
|
return _extends({
|
|
26875
27002
|
node: node
|
|
@@ -26903,7 +27030,7 @@
|
|
|
26903
27030
|
options = {};
|
|
26904
27031
|
}
|
|
26905
27032
|
var _options6 = options, environmentData = _options6.environmentData, toolOptions = _objectWithoutProperties(_options6, _excluded20);
|
|
26906
|
-
var out =
|
|
27033
|
+
var out = processAggregate(results, options);
|
|
26907
27034
|
var addFailureSummaries = function addFailureSummaries(result) {
|
|
26908
27035
|
result.nodes.forEach(function(nodeResult) {
|
|
26909
27036
|
nodeResult.failureSummary = failure_summary_default(nodeResult);
|
|
@@ -26922,7 +27049,7 @@
|
|
|
26922
27049
|
options = {};
|
|
26923
27050
|
}
|
|
26924
27051
|
var _options7 = options, environmentData = _options7.environmentData, toolOptions = _objectWithoutProperties(_options7, _excluded21);
|
|
26925
|
-
var out =
|
|
27052
|
+
var out = processAggregate(results, options);
|
|
26926
27053
|
callback(_extends({}, _getEnvironmentData(environmentData), {
|
|
26927
27054
|
toolOptions: toolOptions
|
|
26928
27055
|
}, out));
|
|
@@ -26935,7 +27062,7 @@
|
|
|
26935
27062
|
Check: check_default,
|
|
26936
27063
|
Context: Context,
|
|
26937
27064
|
RuleResult: rule_result_default,
|
|
26938
|
-
Rule:
|
|
27065
|
+
Rule: Rule,
|
|
26939
27066
|
metadataFunctionMap: metadata_function_map_default
|
|
26940
27067
|
},
|
|
26941
27068
|
public: {
|
|
@@ -26944,7 +27071,7 @@
|
|
|
26944
27071
|
helpers: {
|
|
26945
27072
|
failureSummary: failure_summary_default,
|
|
26946
27073
|
incompleteFallbackMessage: incompleteFallbackMessage,
|
|
26947
|
-
processAggregate:
|
|
27074
|
+
processAggregate: processAggregate
|
|
26948
27075
|
},
|
|
26949
27076
|
utils: {
|
|
26950
27077
|
setDefaultFrameMessenger: setDefaultFrameMessenger,
|
|
@@ -26981,14 +27108,14 @@
|
|
|
26981
27108
|
axe.configure = configure_default;
|
|
26982
27109
|
axe.frameMessenger = frameMessenger2;
|
|
26983
27110
|
axe.getRules = get_rules_default;
|
|
26984
|
-
axe._load =
|
|
27111
|
+
axe._load = load;
|
|
26985
27112
|
axe.plugins = {};
|
|
26986
27113
|
axe.registerPlugin = plugins_default;
|
|
26987
27114
|
axe.hasReporter = hasReporter;
|
|
26988
27115
|
axe.getReporter = getReporter;
|
|
26989
27116
|
axe.addReporter = addReporter;
|
|
26990
27117
|
axe.reset = reset_default;
|
|
26991
|
-
axe._runRules =
|
|
27118
|
+
axe._runRules = runRules;
|
|
26992
27119
|
axe.runVirtualRule = runVirtualRule;
|
|
26993
27120
|
axe.run = run4;
|
|
26994
27121
|
axe.setup = setup_default;
|
|
@@ -27029,6 +27156,10 @@
|
|
|
27029
27156
|
description: 'Ensures every ARIA button, link and menuitem has an accessible name',
|
|
27030
27157
|
help: 'ARIA commands must have an accessible name'
|
|
27031
27158
|
},
|
|
27159
|
+
'aria-deprecated-role': {
|
|
27160
|
+
description: 'Ensures elements do not use deprecated roles',
|
|
27161
|
+
help: 'Deprecated ARIA roles must not be used'
|
|
27162
|
+
},
|
|
27032
27163
|
'aria-dialog-name': {
|
|
27033
27164
|
description: 'Ensures every ARIA dialog and alertdialog node has an accessible name',
|
|
27034
27165
|
help: 'ARIA dialog and alertdialog nodes should have an accessible name'
|
|
@@ -27699,6 +27830,7 @@
|
|
|
27699
27830
|
bgGradient: 'Element\'s background color could not be determined due to a background gradient',
|
|
27700
27831
|
imgNode: 'Element\'s background color could not be determined because element contains an image node',
|
|
27701
27832
|
bgOverlap: 'Element\'s background color could not be determined because it is overlapped by another element',
|
|
27833
|
+
complexTextShadows: 'Element\'s contrast could not be determined because it uses complex text shadows',
|
|
27702
27834
|
fgAlpha: 'Element\'s foreground color could not be determined because of alpha transparency',
|
|
27703
27835
|
elmPartiallyObscured: 'Element\'s background color could not be determined because it\'s partially obscured by another element',
|
|
27704
27836
|
elmPartiallyObscuring: 'Element\'s background color could not be determined because it partially overlaps other elements',
|
|
@@ -28534,6 +28666,16 @@
|
|
|
28534
28666
|
id: 'non-empty-title'
|
|
28535
28667
|
} ],
|
|
28536
28668
|
none: []
|
|
28669
|
+
}, {
|
|
28670
|
+
id: 'aria-deprecated-role',
|
|
28671
|
+
selector: '[role]',
|
|
28672
|
+
matches: 'no-empty-role-matches',
|
|
28673
|
+
tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'EN-301-549', 'EN-9.4.1.2' ],
|
|
28674
|
+
impact: 'minor',
|
|
28675
|
+
actIds: [ '674b10' ],
|
|
28676
|
+
all: [],
|
|
28677
|
+
any: [],
|
|
28678
|
+
none: [ 'deprecatedrole' ]
|
|
28537
28679
|
}, {
|
|
28538
28680
|
id: 'aria-dialog-name',
|
|
28539
28681
|
selector: '[role="dialog"], [role="alertdialog"]',
|
|
@@ -28663,7 +28805,7 @@
|
|
|
28663
28805
|
actIds: [ '674b10' ],
|
|
28664
28806
|
all: [],
|
|
28665
28807
|
any: [],
|
|
28666
|
-
none: [ 'invalidrole', 'abstractrole', 'unsupportedrole'
|
|
28808
|
+
none: [ 'invalidrole', 'abstractrole', 'unsupportedrole' ]
|
|
28667
28809
|
}, {
|
|
28668
28810
|
id: 'aria-text',
|
|
28669
28811
|
selector: '[role=text]',
|
|
@@ -28953,7 +29095,8 @@
|
|
|
28953
29095
|
selector: '[id]',
|
|
28954
29096
|
matches: 'duplicate-id-aria-matches',
|
|
28955
29097
|
excludeHidden: false,
|
|
28956
|
-
tags: [ 'cat.parsing', 'wcag2a', '
|
|
29098
|
+
tags: [ 'cat.parsing', 'wcag2a', 'wcag412', 'EN-301-549', 'EN-9.4.1.2' ],
|
|
29099
|
+
reviewOnFail: true,
|
|
28957
29100
|
actIds: [ '3ea0c8' ],
|
|
28958
29101
|
all: [],
|
|
28959
29102
|
any: [ 'duplicate-id-aria' ],
|