axe-core 4.6.2-canary.fd3010f → 4.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/axe.js +190 -206
- package/axe.min.js +2 -2
- package/package.json +1 -1
- package/sri-history.json +341 -341
package/axe.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! axe v4.6.
|
|
1
|
+
/*! axe v4.6.3
|
|
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.6.
|
|
25
|
+
axe.version = '4.6.3';
|
|
26
26
|
if (typeof define === 'function' && define.amd) {
|
|
27
27
|
define('axe-core', [], function() {
|
|
28
28
|
return axe;
|
|
@@ -7128,9 +7128,6 @@
|
|
|
7128
7128
|
isInTextBlock: function isInTextBlock() {
|
|
7129
7129
|
return is_in_text_block_default;
|
|
7130
7130
|
},
|
|
7131
|
-
isInert: function isInert() {
|
|
7132
|
-
return _isInert;
|
|
7133
|
-
},
|
|
7134
7131
|
isModalOpen: function isModalOpen() {
|
|
7135
7132
|
return is_modal_open_default;
|
|
7136
7133
|
},
|
|
@@ -7844,32 +7841,13 @@
|
|
|
7844
7841
|
}
|
|
7845
7842
|
return hasFixedPosition(vNode.parent);
|
|
7846
7843
|
});
|
|
7847
|
-
function _isInert(vNode) {
|
|
7848
|
-
var _ref17 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, skipAncestors = _ref17.skipAncestors;
|
|
7849
|
-
if (skipAncestors) {
|
|
7850
|
-
return isInertSelf(vNode);
|
|
7851
|
-
}
|
|
7852
|
-
return isInertAncestors(vNode);
|
|
7853
|
-
}
|
|
7854
|
-
var isInertSelf = memoize_default(function isInertSelfMemoized(vNode) {
|
|
7855
|
-
return vNode.hasAttr('inert');
|
|
7856
|
-
});
|
|
7857
|
-
var isInertAncestors = memoize_default(function isInertAncestorsMemoized(vNode) {
|
|
7858
|
-
if (isInertSelf(vNode)) {
|
|
7859
|
-
return true;
|
|
7860
|
-
}
|
|
7861
|
-
if (!vNode.parent) {
|
|
7862
|
-
return false;
|
|
7863
|
-
}
|
|
7864
|
-
return isInertAncestors(vNode.parent);
|
|
7865
|
-
});
|
|
7866
7844
|
var allowedDisabledNodeNames = [ 'button', 'command', 'fieldset', 'keygen', 'optgroup', 'option', 'select', 'textarea', 'input' ];
|
|
7867
7845
|
function isDisabledAttrAllowed(nodeName2) {
|
|
7868
7846
|
return allowedDisabledNodeNames.includes(nodeName2);
|
|
7869
7847
|
}
|
|
7870
7848
|
function focusDisabled(el) {
|
|
7871
7849
|
var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
|
|
7872
|
-
if (isDisabledAttrAllowed(vNode.props.nodeName) && vNode.hasAttr('disabled')
|
|
7850
|
+
if (isDisabledAttrAllowed(vNode.props.nodeName) && vNode.hasAttr('disabled')) {
|
|
7873
7851
|
return true;
|
|
7874
7852
|
}
|
|
7875
7853
|
var parentNode = vNode.parent;
|
|
@@ -8083,8 +8061,8 @@
|
|
|
8083
8061
|
function getFarthestPoint(rectA, rectB) {
|
|
8084
8062
|
var dimensionProps = [ [ 'x', 'left', 'right', 'width' ], [ 'y', 'top', 'bottom', 'height' ] ];
|
|
8085
8063
|
var farthestPoint = {};
|
|
8086
|
-
dimensionProps.forEach(function(
|
|
8087
|
-
var
|
|
8064
|
+
dimensionProps.forEach(function(_ref17) {
|
|
8065
|
+
var _ref18 = _slicedToArray(_ref17, 4), axis = _ref18[0], start = _ref18[1], end = _ref18[2], diameter = _ref18[3];
|
|
8088
8066
|
if (rectB[start] < rectA[start] && rectB[end] > rectA[end]) {
|
|
8089
8067
|
farthestPoint[axis] = rectA[start] + rectA[diameter] / 2;
|
|
8090
8068
|
return;
|
|
@@ -8100,8 +8078,8 @@
|
|
|
8100
8078
|
});
|
|
8101
8079
|
return farthestPoint;
|
|
8102
8080
|
}
|
|
8103
|
-
function getClosestPoint(
|
|
8104
|
-
var x =
|
|
8081
|
+
function getClosestPoint(_ref19, ownRect, adjacentRect) {
|
|
8082
|
+
var x = _ref19.x, y = _ref19.y;
|
|
8105
8083
|
if (pointInRect({
|
|
8106
8084
|
x: x,
|
|
8107
8085
|
y: y
|
|
@@ -8156,12 +8134,12 @@
|
|
|
8156
8134
|
}
|
|
8157
8135
|
return Math.sqrt(Math.pow(xDistance, 2) + Math.pow(yDistance, 2));
|
|
8158
8136
|
}
|
|
8159
|
-
function pointInRect(
|
|
8160
|
-
var x =
|
|
8137
|
+
function pointInRect(_ref20, rect) {
|
|
8138
|
+
var x = _ref20.x, y = _ref20.y;
|
|
8161
8139
|
return y >= rect.top && x <= rect.right && y <= rect.bottom && x >= rect.left;
|
|
8162
8140
|
}
|
|
8163
|
-
function getCornerInAdjacentRect(
|
|
8164
|
-
var x =
|
|
8141
|
+
function getCornerInAdjacentRect(_ref21, ownRect, adjacentRect) {
|
|
8142
|
+
var x = _ref21.x, y = _ref21.y;
|
|
8165
8143
|
var closestX, closestY;
|
|
8166
8144
|
if (x === ownRect.left && ownRect.right < adjacentRect.right) {
|
|
8167
8145
|
closestX = ownRect.right;
|
|
@@ -8198,8 +8176,8 @@
|
|
|
8198
8176
|
};
|
|
8199
8177
|
}
|
|
8200
8178
|
}
|
|
8201
|
-
function _getRectCenter(
|
|
8202
|
-
var left =
|
|
8179
|
+
function _getRectCenter(_ref22) {
|
|
8180
|
+
var left = _ref22.left, top = _ref22.top, width = _ref22.width, height = _ref22.height;
|
|
8203
8181
|
return new window.DOMPoint(left + width / 2, top + height / 2);
|
|
8204
8182
|
}
|
|
8205
8183
|
function _hasVisualOverlap(vNodeA, vNodeB) {
|
|
@@ -8919,13 +8897,13 @@
|
|
|
8919
8897
|
},
|
|
8920
8898
|
menu: {
|
|
8921
8899
|
type: 'composite',
|
|
8922
|
-
requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox', 'menu' ],
|
|
8900
|
+
requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox', 'menu', 'separator' ],
|
|
8923
8901
|
allowedAttrs: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
|
|
8924
8902
|
superclassRole: [ 'select' ]
|
|
8925
8903
|
},
|
|
8926
8904
|
menubar: {
|
|
8927
8905
|
type: 'composite',
|
|
8928
|
-
requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox', 'menu' ],
|
|
8906
|
+
requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox', 'menu', 'separator' ],
|
|
8929
8907
|
allowedAttrs: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
|
|
8930
8908
|
superclassRole: [ 'menu' ]
|
|
8931
8909
|
},
|
|
@@ -10361,7 +10339,7 @@
|
|
|
10361
10339
|
}
|
|
10362
10340
|
var is_unsupported_role_default = isUnsupportedRole;
|
|
10363
10341
|
function isValidRole(role) {
|
|
10364
|
-
var
|
|
10342
|
+
var _ref23 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, allowAbstract = _ref23.allowAbstract, _ref23$flagUnsupporte = _ref23.flagUnsupported, flagUnsupported = _ref23$flagUnsupporte === void 0 ? false : _ref23$flagUnsupporte;
|
|
10365
10343
|
var roleDefinition = standards_default.ariaRoles[role];
|
|
10366
10344
|
var isRoleUnsupported = is_unsupported_role_default(role);
|
|
10367
10345
|
if (!roleDefinition || flagUnsupported && isRoleUnsupported) {
|
|
@@ -10371,7 +10349,7 @@
|
|
|
10371
10349
|
}
|
|
10372
10350
|
var is_valid_role_default = isValidRole;
|
|
10373
10351
|
function getExplicitRole(vNode) {
|
|
10374
|
-
var
|
|
10352
|
+
var _ref24 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, fallback = _ref24.fallback, abstracts = _ref24.abstracts, dpub = _ref24.dpub;
|
|
10375
10353
|
vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
|
|
10376
10354
|
if (vNode.props.nodeType !== 1) {
|
|
10377
10355
|
return null;
|
|
@@ -10809,7 +10787,7 @@
|
|
|
10809
10787
|
matches_default2.semanticRole = semantic_role_default;
|
|
10810
10788
|
var matches_default3 = matches_default2;
|
|
10811
10789
|
function getElementSpec(vNode) {
|
|
10812
|
-
var
|
|
10790
|
+
var _ref25 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref25$noMatchAccessi = _ref25.noMatchAccessibleName, noMatchAccessibleName = _ref25$noMatchAccessi === void 0 ? false : _ref25$noMatchAccessi;
|
|
10813
10791
|
var standard = standards_default.htmlElms[vNode.props.nodeName];
|
|
10814
10792
|
if (!standard) {
|
|
10815
10793
|
return {};
|
|
@@ -10846,7 +10824,7 @@
|
|
|
10846
10824
|
}
|
|
10847
10825
|
var get_element_spec_default = getElementSpec;
|
|
10848
10826
|
function implicitRole2(node) {
|
|
10849
|
-
var
|
|
10827
|
+
var _ref26 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref26.chromium;
|
|
10850
10828
|
var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
|
|
10851
10829
|
node = vNode.actualNode;
|
|
10852
10830
|
if (!vNode) {
|
|
@@ -10899,8 +10877,8 @@
|
|
|
10899
10877
|
}
|
|
10900
10878
|
return getInheritedRole(vNode.parent, explicitRoleOptions);
|
|
10901
10879
|
}
|
|
10902
|
-
function resolveImplicitRole(vNode,
|
|
10903
|
-
var chromium =
|
|
10880
|
+
function resolveImplicitRole(vNode, _ref27) {
|
|
10881
|
+
var chromium = _ref27.chromium, explicitRoleOptions = _objectWithoutProperties(_ref27, _excluded4);
|
|
10904
10882
|
var implicitRole3 = implicit_role_default(vNode, {
|
|
10905
10883
|
chromium: chromium
|
|
10906
10884
|
});
|
|
@@ -10920,8 +10898,8 @@
|
|
|
10920
10898
|
return hasGlobalAria || _isFocusable(vNode);
|
|
10921
10899
|
}
|
|
10922
10900
|
function resolveRole(node) {
|
|
10923
|
-
var
|
|
10924
|
-
var noImplicit =
|
|
10901
|
+
var _ref28 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
10902
|
+
var noImplicit = _ref28.noImplicit, roleOptions = _objectWithoutProperties(_ref28, _excluded5);
|
|
10925
10903
|
var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
|
|
10926
10904
|
if (vNode.props.nodeType !== 1) {
|
|
10927
10905
|
return null;
|
|
@@ -10939,8 +10917,8 @@
|
|
|
10939
10917
|
return explicitRole2;
|
|
10940
10918
|
}
|
|
10941
10919
|
function getRole(node) {
|
|
10942
|
-
var
|
|
10943
|
-
var noPresentational =
|
|
10920
|
+
var _ref29 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
10921
|
+
var noPresentational = _ref29.noPresentational, options = _objectWithoutProperties(_ref29, _excluded6);
|
|
10944
10922
|
var role = resolveRole(node, options);
|
|
10945
10923
|
if (noPresentational && [ 'presentation', 'none' ].includes(role)) {
|
|
10946
10924
|
return null;
|
|
@@ -10961,7 +10939,7 @@
|
|
|
10961
10939
|
}
|
|
10962
10940
|
var title_text_default = titleText;
|
|
10963
10941
|
function namedFromContents(vNode) {
|
|
10964
|
-
var
|
|
10942
|
+
var _ref30 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref30.strict;
|
|
10965
10943
|
vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
|
|
10966
10944
|
if (vNode.props.nodeType !== 1) {
|
|
10967
10945
|
return false;
|
|
@@ -11086,12 +11064,12 @@
|
|
|
11086
11064
|
button: ''
|
|
11087
11065
|
};
|
|
11088
11066
|
var nativeTextMethods = {
|
|
11089
|
-
valueText: function valueText(
|
|
11090
|
-
var actualNode =
|
|
11067
|
+
valueText: function valueText(_ref31) {
|
|
11068
|
+
var actualNode = _ref31.actualNode;
|
|
11091
11069
|
return actualNode.value || '';
|
|
11092
11070
|
},
|
|
11093
|
-
buttonDefaultText: function buttonDefaultText(
|
|
11094
|
-
var actualNode =
|
|
11071
|
+
buttonDefaultText: function buttonDefaultText(_ref32) {
|
|
11072
|
+
var actualNode = _ref32.actualNode;
|
|
11095
11073
|
return defaultButtonValues[actualNode.type] || '';
|
|
11096
11074
|
},
|
|
11097
11075
|
tableCaptionText: descendantText.bind(null, 'caption'),
|
|
@@ -11111,8 +11089,8 @@
|
|
|
11111
11089
|
function attrText(attr, vNode) {
|
|
11112
11090
|
return vNode.attr(attr) || '';
|
|
11113
11091
|
}
|
|
11114
|
-
function descendantText(nodeName2,
|
|
11115
|
-
var actualNode =
|
|
11092
|
+
function descendantText(nodeName2, _ref33, context) {
|
|
11093
|
+
var actualNode = _ref33.actualNode;
|
|
11116
11094
|
nodeName2 = nodeName2.toLowerCase();
|
|
11117
11095
|
var nodeNames2 = [ nodeName2, actualNode.nodeName.toLowerCase() ].join(',');
|
|
11118
11096
|
var candidate = actualNode.querySelector(nodeNames2);
|
|
@@ -11156,9 +11134,7 @@
|
|
|
11156
11134
|
return isVisibleToScreenReadersVirtual(vNode);
|
|
11157
11135
|
}
|
|
11158
11136
|
var isVisibleToScreenReadersVirtual = memoize_default(function isVisibleToScreenReadersMemoized(vNode, isAncestor) {
|
|
11159
|
-
if (ariaHidden(vNode)
|
|
11160
|
-
skipAncestors: true
|
|
11161
|
-
})) {
|
|
11137
|
+
if (ariaHidden(vNode)) {
|
|
11162
11138
|
return false;
|
|
11163
11139
|
}
|
|
11164
11140
|
if (vNode.actualNode && vNode.props.nodeName === 'area') {
|
|
@@ -11543,7 +11519,7 @@
|
|
|
11543
11519
|
locations: [ 'billing', 'shipping' ]
|
|
11544
11520
|
};
|
|
11545
11521
|
function isValidAutocomplete(autocompleteValue) {
|
|
11546
|
-
var
|
|
11522
|
+
var _ref34 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref34$looseTyped = _ref34.looseTyped, looseTyped = _ref34$looseTyped === void 0 ? false : _ref34$looseTyped, _ref34$stateTerms = _ref34.stateTerms, stateTerms = _ref34$stateTerms === void 0 ? [] : _ref34$stateTerms, _ref34$locations = _ref34.locations, locations = _ref34$locations === void 0 ? [] : _ref34$locations, _ref34$qualifiers = _ref34.qualifiers, qualifiers = _ref34$qualifiers === void 0 ? [] : _ref34$qualifiers, _ref34$standaloneTerm = _ref34.standaloneTerms, standaloneTerms = _ref34$standaloneTerm === void 0 ? [] : _ref34$standaloneTerm, _ref34$qualifiedTerms = _ref34.qualifiedTerms, qualifiedTerms = _ref34$qualifiedTerms === void 0 ? [] : _ref34$qualifiedTerms;
|
|
11547
11523
|
autocompleteValue = autocompleteValue.toLowerCase().trim();
|
|
11548
11524
|
stateTerms = stateTerms.concat(_autocomplete.stateTerms);
|
|
11549
11525
|
if (stateTerms.includes(autocompleteValue) || autocompleteValue === '') {
|
|
@@ -11808,8 +11784,8 @@
|
|
|
11808
11784
|
if (hiddenTextElms.includes(elm.props.nodeName)) {
|
|
11809
11785
|
return false;
|
|
11810
11786
|
}
|
|
11811
|
-
return elm.children.some(function(
|
|
11812
|
-
var props =
|
|
11787
|
+
return elm.children.some(function(_ref35) {
|
|
11788
|
+
var props = _ref35.props;
|
|
11813
11789
|
return props.nodeType === 3 && props.nodeValue.trim();
|
|
11814
11790
|
});
|
|
11815
11791
|
}
|
|
@@ -12121,8 +12097,8 @@
|
|
|
12121
12097
|
}
|
|
12122
12098
|
return parseFloat(value);
|
|
12123
12099
|
}
|
|
12124
|
-
function hslToRgb(
|
|
12125
|
-
var
|
|
12100
|
+
function hslToRgb(_ref36) {
|
|
12101
|
+
var _ref37 = _slicedToArray(_ref36, 4), hue = _ref37[0], saturation = _ref37[1], lightness = _ref37[2], alpha = _ref37[3];
|
|
12126
12102
|
saturation /= 255;
|
|
12127
12103
|
lightness /= 255;
|
|
12128
12104
|
var high = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
@@ -12171,7 +12147,7 @@
|
|
|
12171
12147
|
var colorFnRegex = /^((?:rgb|hsl)a?)\s*\(([^\)]*)\)/i;
|
|
12172
12148
|
this.parseString = function parseString(colorString) {
|
|
12173
12149
|
if (standards_default.cssColors[colorString] || colorString === 'transparent') {
|
|
12174
|
-
var
|
|
12150
|
+
var _ref38 = standards_default.cssColors[colorString] || [ 0, 0, 0 ], _ref39 = _slicedToArray(_ref38, 3), red2 = _ref39[0], green2 = _ref39[1], blue2 = _ref39[2];
|
|
12175
12151
|
this.red = red2;
|
|
12176
12152
|
this.green = green2;
|
|
12177
12153
|
this.blue = blue2;
|
|
@@ -12221,7 +12197,7 @@
|
|
|
12221
12197
|
}
|
|
12222
12198
|
};
|
|
12223
12199
|
this.parseColorFnString = function parseColorFnString(colorString) {
|
|
12224
|
-
var
|
|
12200
|
+
var _ref40 = colorString.match(colorFnRegex) || [], _ref41 = _slicedToArray(_ref40, 3), colorFunc = _ref41[1], colorValStr = _ref41[2];
|
|
12225
12201
|
if (!colorFunc || !colorValStr) {
|
|
12226
12202
|
return;
|
|
12227
12203
|
}
|
|
@@ -12331,8 +12307,8 @@
|
|
|
12331
12307
|
if (!refs || !refs.length) {
|
|
12332
12308
|
return false;
|
|
12333
12309
|
}
|
|
12334
|
-
return refs.some(function(
|
|
12335
|
-
var actualNode =
|
|
12310
|
+
return refs.some(function(_ref42) {
|
|
12311
|
+
var actualNode = _ref42.actualNode;
|
|
12336
12312
|
return isVisible(actualNode, screenReader, recursed);
|
|
12337
12313
|
});
|
|
12338
12314
|
}
|
|
@@ -12344,7 +12320,7 @@
|
|
|
12344
12320
|
var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
|
|
12345
12321
|
el = vNode ? vNode.actualNode : el;
|
|
12346
12322
|
var cacheName = '_isVisible' + (screenReader ? 'ScreenReader' : '');
|
|
12347
|
-
var
|
|
12323
|
+
var _ref43 = (_window$Node2 = window.Node) !== null && _window$Node2 !== void 0 ? _window$Node2 : {}, DOCUMENT_NODE = _ref43.DOCUMENT_NODE, DOCUMENT_FRAGMENT_NODE = _ref43.DOCUMENT_FRAGMENT_NODE;
|
|
12348
12324
|
var nodeType = vNode ? vNode.props.nodeType : el.nodeType;
|
|
12349
12325
|
var nodeName2 = vNode ? vNode.props.nodeName : el.nodeName.toLowerCase();
|
|
12350
12326
|
if (vNode && typeof vNode[cacheName] !== 'undefined') {
|
|
@@ -13155,7 +13131,7 @@
|
|
|
13155
13131
|
return {};
|
|
13156
13132
|
}
|
|
13157
13133
|
var navigator = win.navigator, innerHeight = win.innerHeight, innerWidth = win.innerWidth;
|
|
13158
|
-
var
|
|
13134
|
+
var _ref44 = getOrientation(win) || {}, angle = _ref44.angle, type = _ref44.type;
|
|
13159
13135
|
return {
|
|
13160
13136
|
userAgent: navigator.userAgent,
|
|
13161
13137
|
windowWidth: innerWidth,
|
|
@@ -13164,12 +13140,12 @@
|
|
|
13164
13140
|
orientationType: type
|
|
13165
13141
|
};
|
|
13166
13142
|
}
|
|
13167
|
-
function getOrientation(
|
|
13168
|
-
var screen =
|
|
13143
|
+
function getOrientation(_ref45) {
|
|
13144
|
+
var screen = _ref45.screen;
|
|
13169
13145
|
return screen.orientation || screen.msOrientation || screen.mozOrientation;
|
|
13170
13146
|
}
|
|
13171
|
-
function createFrameContext(frame,
|
|
13172
|
-
var focusable =
|
|
13147
|
+
function createFrameContext(frame, _ref46) {
|
|
13148
|
+
var focusable = _ref46.focusable, page = _ref46.page;
|
|
13173
13149
|
return {
|
|
13174
13150
|
node: frame,
|
|
13175
13151
|
include: [],
|
|
@@ -13408,8 +13384,8 @@
|
|
|
13408
13384
|
}
|
|
13409
13385
|
context.frames.push(createFrameContext(frame, context));
|
|
13410
13386
|
}
|
|
13411
|
-
function isPageContext(
|
|
13412
|
-
var include =
|
|
13387
|
+
function isPageContext(_ref47) {
|
|
13388
|
+
var include = _ref47.include;
|
|
13413
13389
|
return include.length === 1 && include[0].actualNode === document.documentElement;
|
|
13414
13390
|
}
|
|
13415
13391
|
function validateContext(context) {
|
|
@@ -13418,8 +13394,8 @@
|
|
|
13418
13394
|
throw new Error('No elements found for include in ' + env + ' Context');
|
|
13419
13395
|
}
|
|
13420
13396
|
}
|
|
13421
|
-
function getRootNode2(
|
|
13422
|
-
var include =
|
|
13397
|
+
function getRootNode2(_ref48) {
|
|
13398
|
+
var include = _ref48.include, exclude = _ref48.exclude;
|
|
13423
13399
|
var selectors = Array.from(include).concat(Array.from(exclude));
|
|
13424
13400
|
for (var _i13 = 0; _i13 < selectors.length; _i13++) {
|
|
13425
13401
|
var item = selectors[_i13];
|
|
@@ -13438,8 +13414,8 @@
|
|
|
13438
13414
|
return [];
|
|
13439
13415
|
}
|
|
13440
13416
|
var _Context = new Context(context), frames = _Context.frames;
|
|
13441
|
-
return frames.map(function(
|
|
13442
|
-
var node =
|
|
13417
|
+
return frames.map(function(_ref49) {
|
|
13418
|
+
var node = _ref49.node, frameContext = _objectWithoutProperties(_ref49, _excluded7);
|
|
13443
13419
|
frameContext.initiator = false;
|
|
13444
13420
|
var frameSelector = _getAncestry(node);
|
|
13445
13421
|
return {
|
|
@@ -13588,8 +13564,8 @@
|
|
|
13588
13564
|
return !!standards_default.htmlElms[nodeName2];
|
|
13589
13565
|
}
|
|
13590
13566
|
var is_html_element_default = isHtmlElement;
|
|
13591
|
-
function _isNodeInContext(node,
|
|
13592
|
-
var
|
|
13567
|
+
function _isNodeInContext(node, _ref50) {
|
|
13568
|
+
var _ref50$include = _ref50.include, include = _ref50$include === void 0 ? [] : _ref50$include, _ref50$exclude = _ref50.exclude, exclude = _ref50$exclude === void 0 ? [] : _ref50$exclude;
|
|
13593
13569
|
var filterInclude = include.filter(function(candidate) {
|
|
13594
13570
|
return _contains(candidate, node);
|
|
13595
13571
|
});
|
|
@@ -14142,8 +14118,8 @@
|
|
|
14142
14118
|
return matchExpressions(domTree, expressions, filter);
|
|
14143
14119
|
}
|
|
14144
14120
|
var query_selector_all_filter_default = querySelectorAllFilter;
|
|
14145
|
-
function preloadCssom(
|
|
14146
|
-
var
|
|
14121
|
+
function preloadCssom(_ref51) {
|
|
14122
|
+
var _ref51$treeRoot = _ref51.treeRoot, treeRoot = _ref51$treeRoot === void 0 ? axe._tree[0] : _ref51$treeRoot;
|
|
14147
14123
|
var rootNodes = getAllRootNodesInTree(treeRoot);
|
|
14148
14124
|
if (!rootNodes.length) {
|
|
14149
14125
|
return Promise.resolve();
|
|
@@ -14173,8 +14149,8 @@
|
|
|
14173
14149
|
}
|
|
14174
14150
|
function getCssomForAllRootNodes(rootNodes, convertDataToStylesheet) {
|
|
14175
14151
|
var promises = [];
|
|
14176
|
-
rootNodes.forEach(function(
|
|
14177
|
-
var rootNode =
|
|
14152
|
+
rootNodes.forEach(function(_ref52, index) {
|
|
14153
|
+
var rootNode = _ref52.rootNode, shadowId = _ref52.shadowId;
|
|
14178
14154
|
var sheets = getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet);
|
|
14179
14155
|
if (!sheets) {
|
|
14180
14156
|
return Promise.all(promises);
|
|
@@ -14258,10 +14234,10 @@
|
|
|
14258
14234
|
return true;
|
|
14259
14235
|
});
|
|
14260
14236
|
}
|
|
14261
|
-
function preloadMedia(
|
|
14262
|
-
var
|
|
14263
|
-
var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(
|
|
14264
|
-
var actualNode =
|
|
14237
|
+
function preloadMedia(_ref53) {
|
|
14238
|
+
var _ref53$treeRoot = _ref53.treeRoot, treeRoot = _ref53$treeRoot === void 0 ? axe._tree[0] : _ref53$treeRoot;
|
|
14239
|
+
var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(_ref54) {
|
|
14240
|
+
var actualNode = _ref54.actualNode;
|
|
14265
14241
|
if (actualNode.hasAttribute('src')) {
|
|
14266
14242
|
return !!actualNode.getAttribute('src');
|
|
14267
14243
|
}
|
|
@@ -14273,8 +14249,8 @@
|
|
|
14273
14249
|
}
|
|
14274
14250
|
return true;
|
|
14275
14251
|
});
|
|
14276
|
-
return Promise.all(mediaVirtualNodes.map(function(
|
|
14277
|
-
var actualNode =
|
|
14252
|
+
return Promise.all(mediaVirtualNodes.map(function(_ref55) {
|
|
14253
|
+
var actualNode = _ref55.actualNode;
|
|
14278
14254
|
return isMediaElementReady(actualNode);
|
|
14279
14255
|
}));
|
|
14280
14256
|
}
|
|
@@ -14579,8 +14555,8 @@
|
|
|
14579
14555
|
}
|
|
14580
14556
|
}
|
|
14581
14557
|
function setScrollState(scrollState) {
|
|
14582
|
-
scrollState.forEach(function(
|
|
14583
|
-
var elm =
|
|
14558
|
+
scrollState.forEach(function(_ref57) {
|
|
14559
|
+
var elm = _ref57.elm, top = _ref57.top, left = _ref57.left;
|
|
14584
14560
|
return setScroll(elm, top, left);
|
|
14585
14561
|
});
|
|
14586
14562
|
}
|
|
@@ -14608,8 +14584,8 @@
|
|
|
14608
14584
|
}
|
|
14609
14585
|
return selectAllRecursive(selectorArr, doc);
|
|
14610
14586
|
}
|
|
14611
|
-
function selectAllRecursive(
|
|
14612
|
-
var
|
|
14587
|
+
function selectAllRecursive(_ref58, doc) {
|
|
14588
|
+
var _ref59 = _toArray(_ref58), selectorStr = _ref59[0], restSelector = _ref59.slice(1);
|
|
14613
14589
|
var elms = doc.querySelectorAll(selectorStr);
|
|
14614
14590
|
if (restSelector.length === 0) {
|
|
14615
14591
|
return Array.from(elms);
|
|
@@ -14713,9 +14689,9 @@
|
|
|
14713
14689
|
nodeTypeToName[nodeNamesToTypes[nodeName2]] = nodeName2;
|
|
14714
14690
|
});
|
|
14715
14691
|
function normaliseProps(serialNode) {
|
|
14716
|
-
var _serialNode$nodeName,
|
|
14692
|
+
var _serialNode$nodeName, _ref60, _serialNode$nodeType;
|
|
14717
14693
|
var nodeName2 = (_serialNode$nodeName = serialNode.nodeName) !== null && _serialNode$nodeName !== void 0 ? _serialNode$nodeName : nodeTypeToName[serialNode.nodeType];
|
|
14718
|
-
var nodeType = (
|
|
14694
|
+
var nodeType = (_ref60 = (_serialNode$nodeType = serialNode.nodeType) !== null && _serialNode$nodeType !== void 0 ? _serialNode$nodeType : nodeNamesToTypes[serialNode.nodeName]) !== null && _ref60 !== void 0 ? _ref60 : 1;
|
|
14719
14695
|
assert_default(typeof nodeType === 'number', 'nodeType has to be a number, got \''.concat(nodeType, '\''));
|
|
14720
14696
|
assert_default(typeof nodeName2 === 'string', 'nodeName has to be a string, got \''.concat(nodeName2, '\''));
|
|
14721
14697
|
nodeName2 = nodeName2.toLowerCase();
|
|
@@ -14736,8 +14712,8 @@
|
|
|
14736
14712
|
delete props.attributes;
|
|
14737
14713
|
return Object.freeze(props);
|
|
14738
14714
|
}
|
|
14739
|
-
function normaliseAttrs(
|
|
14740
|
-
var
|
|
14715
|
+
function normaliseAttrs(_ref61) {
|
|
14716
|
+
var _ref61$attributes = _ref61.attributes, attributes2 = _ref61$attributes === void 0 ? {} : _ref61$attributes;
|
|
14741
14717
|
var attrMap = {
|
|
14742
14718
|
htmlFor: 'for',
|
|
14743
14719
|
className: 'class'
|
|
@@ -16925,8 +16901,8 @@
|
|
|
16925
16901
|
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' ]
|
|
16926
16902
|
} ];
|
|
16927
16903
|
lookupTable.evaluateRoleForElement = {
|
|
16928
|
-
A: function A(
|
|
16929
|
-
var node =
|
|
16904
|
+
A: function A(_ref62) {
|
|
16905
|
+
var node = _ref62.node, out = _ref62.out;
|
|
16930
16906
|
if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
|
|
16931
16907
|
return true;
|
|
16932
16908
|
}
|
|
@@ -16935,19 +16911,19 @@
|
|
|
16935
16911
|
}
|
|
16936
16912
|
return true;
|
|
16937
16913
|
},
|
|
16938
|
-
AREA: function AREA(
|
|
16939
|
-
var node =
|
|
16914
|
+
AREA: function AREA(_ref63) {
|
|
16915
|
+
var node = _ref63.node;
|
|
16940
16916
|
return !node.href;
|
|
16941
16917
|
},
|
|
16942
|
-
BUTTON: function BUTTON(
|
|
16943
|
-
var node =
|
|
16918
|
+
BUTTON: function BUTTON(_ref64) {
|
|
16919
|
+
var node = _ref64.node, role = _ref64.role, out = _ref64.out;
|
|
16944
16920
|
if (node.getAttribute('type') === 'menu') {
|
|
16945
16921
|
return role === 'menuitem';
|
|
16946
16922
|
}
|
|
16947
16923
|
return out;
|
|
16948
16924
|
},
|
|
16949
|
-
IMG: function IMG(
|
|
16950
|
-
var node =
|
|
16925
|
+
IMG: function IMG(_ref65) {
|
|
16926
|
+
var node = _ref65.node, role = _ref65.role, out = _ref65.out;
|
|
16951
16927
|
switch (node.alt) {
|
|
16952
16928
|
case null:
|
|
16953
16929
|
return out;
|
|
@@ -16959,8 +16935,8 @@
|
|
|
16959
16935
|
return role !== 'presentation' && role !== 'none';
|
|
16960
16936
|
}
|
|
16961
16937
|
},
|
|
16962
|
-
INPUT: function INPUT(
|
|
16963
|
-
var node =
|
|
16938
|
+
INPUT: function INPUT(_ref66) {
|
|
16939
|
+
var node = _ref66.node, role = _ref66.role, out = _ref66.out;
|
|
16964
16940
|
switch (node.type) {
|
|
16965
16941
|
case 'button':
|
|
16966
16942
|
case 'image':
|
|
@@ -16990,32 +16966,32 @@
|
|
|
16990
16966
|
return false;
|
|
16991
16967
|
}
|
|
16992
16968
|
},
|
|
16993
|
-
LI: function LI(
|
|
16994
|
-
var node =
|
|
16969
|
+
LI: function LI(_ref67) {
|
|
16970
|
+
var node = _ref67.node, out = _ref67.out;
|
|
16995
16971
|
var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
|
|
16996
16972
|
if (hasImplicitListitemRole) {
|
|
16997
16973
|
return out;
|
|
16998
16974
|
}
|
|
16999
16975
|
return true;
|
|
17000
16976
|
},
|
|
17001
|
-
MENU: function MENU(
|
|
17002
|
-
var node =
|
|
16977
|
+
MENU: function MENU(_ref68) {
|
|
16978
|
+
var node = _ref68.node;
|
|
17003
16979
|
if (node.getAttribute('type') === 'context') {
|
|
17004
16980
|
return false;
|
|
17005
16981
|
}
|
|
17006
16982
|
return true;
|
|
17007
16983
|
},
|
|
17008
|
-
OPTION: function OPTION(
|
|
17009
|
-
var node =
|
|
16984
|
+
OPTION: function OPTION(_ref69) {
|
|
16985
|
+
var node = _ref69.node;
|
|
17010
16986
|
var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
|
|
17011
16987
|
return !withinOptionList;
|
|
17012
16988
|
},
|
|
17013
|
-
SELECT: function SELECT(
|
|
17014
|
-
var node =
|
|
16989
|
+
SELECT: function SELECT(_ref70) {
|
|
16990
|
+
var node = _ref70.node, role = _ref70.role;
|
|
17015
16991
|
return !node.multiple && node.size <= 1 && role === 'menu';
|
|
17016
16992
|
},
|
|
17017
|
-
SVG: function SVG(
|
|
17018
|
-
var node =
|
|
16993
|
+
SVG: function SVG(_ref71) {
|
|
16994
|
+
var node = _ref71.node, out = _ref71.out;
|
|
17019
16995
|
if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
|
|
17020
16996
|
return true;
|
|
17021
16997
|
}
|
|
@@ -17424,13 +17400,13 @@
|
|
|
17424
17400
|
return true;
|
|
17425
17401
|
}
|
|
17426
17402
|
var ownedRoles = getOwnedRoles(virtualNode, required);
|
|
17427
|
-
var unallowed = ownedRoles.filter(function(
|
|
17428
|
-
var role2 =
|
|
17403
|
+
var unallowed = ownedRoles.filter(function(_ref72) {
|
|
17404
|
+
var role2 = _ref72.role;
|
|
17429
17405
|
return !required.includes(role2);
|
|
17430
17406
|
});
|
|
17431
17407
|
if (unallowed.length) {
|
|
17432
|
-
this.relatedNodes(unallowed.map(function(
|
|
17433
|
-
var ownedElement =
|
|
17408
|
+
this.relatedNodes(unallowed.map(function(_ref73) {
|
|
17409
|
+
var ownedElement = _ref73.ownedElement;
|
|
17434
17410
|
return ownedElement;
|
|
17435
17411
|
}));
|
|
17436
17412
|
this.data({
|
|
@@ -18032,7 +18008,7 @@
|
|
|
18032
18008
|
return true;
|
|
18033
18009
|
}
|
|
18034
18010
|
function getTextShadowColors(node) {
|
|
18035
|
-
var
|
|
18011
|
+
var _ref74 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref74.minRatio, maxRatio = _ref74.maxRatio;
|
|
18036
18012
|
var style = window.getComputedStyle(node);
|
|
18037
18013
|
var textShadow = style.getPropertyValue('text-shadow');
|
|
18038
18014
|
if (textShadow === 'none') {
|
|
@@ -18043,8 +18019,8 @@
|
|
|
18043
18019
|
assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
|
|
18044
18020
|
var shadowColors = [];
|
|
18045
18021
|
var shadows = parseTextShadows(textShadow);
|
|
18046
|
-
shadows.forEach(function(
|
|
18047
|
-
var colorStr =
|
|
18022
|
+
shadows.forEach(function(_ref75) {
|
|
18023
|
+
var colorStr = _ref75.colorStr, pixels = _ref75.pixels;
|
|
18048
18024
|
colorStr = colorStr || style.getPropertyValue('color');
|
|
18049
18025
|
var _pixels = _slicedToArray(pixels, 3), offsetY = _pixels[0], offsetX = _pixels[1], _pixels$ = _pixels[2], blurRadius = _pixels$ === void 0 ? 0 : _pixels$;
|
|
18050
18026
|
if ((!minRatio || blurRadius >= fontSize * minRatio) && (!maxRatio || blurRadius < fontSize * maxRatio)) {
|
|
@@ -18094,8 +18070,8 @@
|
|
|
18094
18070
|
}
|
|
18095
18071
|
return shadows;
|
|
18096
18072
|
}
|
|
18097
|
-
function textShadowColor(
|
|
18098
|
-
var colorStr =
|
|
18073
|
+
function textShadowColor(_ref76) {
|
|
18074
|
+
var colorStr = _ref76.colorStr, offsetX = _ref76.offsetX, offsetY = _ref76.offsetY, blurRadius = _ref76.blurRadius, fontSize = _ref76.fontSize;
|
|
18099
18075
|
if (offsetX > blurRadius || offsetY > blurRadius) {
|
|
18100
18076
|
return new color_default(0, 0, 0, 0);
|
|
18101
18077
|
}
|
|
@@ -18272,8 +18248,8 @@
|
|
|
18272
18248
|
function getTextColor(nodeStyle) {
|
|
18273
18249
|
return new color_default().parseString(nodeStyle.getPropertyValue('-webkit-text-fill-color') || nodeStyle.getPropertyValue('color'));
|
|
18274
18250
|
}
|
|
18275
|
-
function getStrokeColor(nodeStyle,
|
|
18276
|
-
var
|
|
18251
|
+
function getStrokeColor(nodeStyle, _ref77) {
|
|
18252
|
+
var _ref77$textStrokeEmMi = _ref77.textStrokeEmMin, textStrokeEmMin = _ref77$textStrokeEmMi === void 0 ? 0 : _ref77$textStrokeEmMi;
|
|
18277
18253
|
var strokeWidth = parseFloat(nodeStyle.getPropertyValue('-webkit-text-stroke-width'));
|
|
18278
18254
|
if (strokeWidth === 0) {
|
|
18279
18255
|
return null;
|
|
@@ -18335,7 +18311,7 @@
|
|
|
18335
18311
|
var bold = parseFloat(fontWeight) >= boldValue || fontWeight === 'bold';
|
|
18336
18312
|
var ptSize = Math.ceil(fontSize * 72) / 96;
|
|
18337
18313
|
var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
|
|
18338
|
-
var
|
|
18314
|
+
var _ref78 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref78.expected, minThreshold = _ref78.minThreshold, maxThreshold = _ref78.maxThreshold;
|
|
18339
18315
|
var pseudoElm = findPseudoElement(virtualNode, {
|
|
18340
18316
|
ignorePseudo: ignorePseudo,
|
|
18341
18317
|
pseudoSizeThreshold: pseudoSizeThreshold
|
|
@@ -18414,8 +18390,8 @@
|
|
|
18414
18390
|
}
|
|
18415
18391
|
return isValid;
|
|
18416
18392
|
}
|
|
18417
|
-
function findPseudoElement(vNode,
|
|
18418
|
-
var
|
|
18393
|
+
function findPseudoElement(vNode, _ref79) {
|
|
18394
|
+
var _ref79$pseudoSizeThre = _ref79.pseudoSizeThreshold, pseudoSizeThreshold = _ref79$pseudoSizeThre === void 0 ? .25 : _ref79$pseudoSizeThre, _ref79$ignorePseudo = _ref79.ignorePseudo, ignorePseudo = _ref79$ignorePseudo === void 0 ? false : _ref79$ignorePseudo;
|
|
18419
18395
|
if (ignorePseudo) {
|
|
18420
18396
|
return;
|
|
18421
18397
|
}
|
|
@@ -18457,7 +18433,7 @@
|
|
|
18457
18433
|
}
|
|
18458
18434
|
function parseUnit(str) {
|
|
18459
18435
|
var unitRegex = /^([0-9.]+)([a-z]+)$/i;
|
|
18460
|
-
var
|
|
18436
|
+
var _ref80 = str.match(unitRegex) || [], _ref81 = _slicedToArray(_ref80, 3), _ref81$ = _ref81[1], value = _ref81$ === void 0 ? '' : _ref81$, _ref81$2 = _ref81[2], unit = _ref81$2 === void 0 ? '' : _ref81$2;
|
|
18461
18437
|
return {
|
|
18462
18438
|
value: parseFloat(value),
|
|
18463
18439
|
unit: unit.toLowerCase()
|
|
@@ -18801,8 +18777,8 @@
|
|
|
18801
18777
|
}
|
|
18802
18778
|
var focusable_element_evaluate_default = focusableElementEvaluate;
|
|
18803
18779
|
function focusableModalOpenEvaluate(node, options, virtualNode) {
|
|
18804
|
-
var tabbableElements = virtualNode.tabbableElements.map(function(
|
|
18805
|
-
var actualNode =
|
|
18780
|
+
var tabbableElements = virtualNode.tabbableElements.map(function(_ref82) {
|
|
18781
|
+
var actualNode = _ref82.actualNode;
|
|
18806
18782
|
return actualNode;
|
|
18807
18783
|
});
|
|
18808
18784
|
if (!tabbableElements || !tabbableElements.length) {
|
|
@@ -19283,8 +19259,8 @@
|
|
|
19283
19259
|
this.relatedNodes(relatedNodes);
|
|
19284
19260
|
return true;
|
|
19285
19261
|
}
|
|
19286
|
-
function getInvalidSelector(vChild, nested,
|
|
19287
|
-
var
|
|
19262
|
+
function getInvalidSelector(vChild, nested, _ref83) {
|
|
19263
|
+
var _ref83$validRoles = _ref83.validRoles, validRoles = _ref83$validRoles === void 0 ? [] : _ref83$validRoles, _ref83$validNodeNames = _ref83.validNodeNames, validNodeNames = _ref83$validNodeNames === void 0 ? [] : _ref83$validNodeNames;
|
|
19288
19264
|
var _vChild$props = vChild.props, nodeName2 = _vChild$props.nodeName, nodeType = _vChild$props.nodeType, nodeValue = _vChild$props.nodeValue;
|
|
19289
19265
|
var selector = nested ? 'div > ' : '';
|
|
19290
19266
|
if (nodeType === 3 && nodeValue.trim() !== '') {
|
|
@@ -19517,8 +19493,8 @@
|
|
|
19517
19493
|
}
|
|
19518
19494
|
var no_autoplay_audio_evaluate_default = noAutoplayAudioEvaluate;
|
|
19519
19495
|
function cssOrientationLockEvaluate(node, options, virtualNode, context) {
|
|
19520
|
-
var
|
|
19521
|
-
var
|
|
19496
|
+
var _ref84 = context || {}, _ref84$cssom = _ref84.cssom, cssom = _ref84$cssom === void 0 ? void 0 : _ref84$cssom;
|
|
19497
|
+
var _ref85 = options || {}, _ref85$degreeThreshol = _ref85.degreeThreshold, degreeThreshold = _ref85$degreeThreshol === void 0 ? 0 : _ref85$degreeThreshol;
|
|
19522
19498
|
if (!cssom || !cssom.length) {
|
|
19523
19499
|
return void 0;
|
|
19524
19500
|
}
|
|
@@ -19532,8 +19508,8 @@
|
|
|
19532
19508
|
if (!orientationRules.length) {
|
|
19533
19509
|
return 'continue';
|
|
19534
19510
|
}
|
|
19535
|
-
orientationRules.forEach(function(
|
|
19536
|
-
var cssRules =
|
|
19511
|
+
orientationRules.forEach(function(_ref86) {
|
|
19512
|
+
var cssRules = _ref86.cssRules;
|
|
19537
19513
|
Array.from(cssRules).forEach(function(cssRule) {
|
|
19538
19514
|
var locked = getIsOrientationLocked(cssRule);
|
|
19539
19515
|
if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
|
|
@@ -19558,8 +19534,8 @@
|
|
|
19558
19534
|
}
|
|
19559
19535
|
return false;
|
|
19560
19536
|
function groupCssomByDocument(cssObjectModel) {
|
|
19561
|
-
return cssObjectModel.reduce(function(out,
|
|
19562
|
-
var sheet =
|
|
19537
|
+
return cssObjectModel.reduce(function(out, _ref87) {
|
|
19538
|
+
var sheet = _ref87.sheet, root = _ref87.root, shadowId = _ref87.shadowId;
|
|
19563
19539
|
var key = shadowId ? shadowId : 'topDocument';
|
|
19564
19540
|
if (!out[key]) {
|
|
19565
19541
|
out[key] = {
|
|
@@ -19575,15 +19551,15 @@
|
|
|
19575
19551
|
return out;
|
|
19576
19552
|
}, {});
|
|
19577
19553
|
}
|
|
19578
|
-
function isMediaRuleWithOrientation(
|
|
19579
|
-
var type =
|
|
19554
|
+
function isMediaRuleWithOrientation(_ref88) {
|
|
19555
|
+
var type = _ref88.type, cssText = _ref88.cssText;
|
|
19580
19556
|
if (type !== 4) {
|
|
19581
19557
|
return false;
|
|
19582
19558
|
}
|
|
19583
19559
|
return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
|
|
19584
19560
|
}
|
|
19585
|
-
function getIsOrientationLocked(
|
|
19586
|
-
var selectorText =
|
|
19561
|
+
function getIsOrientationLocked(_ref89) {
|
|
19562
|
+
var selectorText = _ref89.selectorText, style = _ref89.style;
|
|
19587
19563
|
if (!selectorText || style.length <= 0) {
|
|
19588
19564
|
return false;
|
|
19589
19565
|
}
|
|
@@ -19630,7 +19606,7 @@
|
|
|
19630
19606
|
}
|
|
19631
19607
|
}
|
|
19632
19608
|
function getAngleInDegrees(angleWithUnit) {
|
|
19633
|
-
var
|
|
19609
|
+
var _ref90 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref91 = _slicedToArray(_ref90, 1), unit = _ref91[0];
|
|
19634
19610
|
if (!unit) {
|
|
19635
19611
|
return;
|
|
19636
19612
|
}
|
|
@@ -19679,7 +19655,7 @@
|
|
|
19679
19655
|
}
|
|
19680
19656
|
var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
|
|
19681
19657
|
function metaViewportScaleEvaluate(node, options, virtualNode) {
|
|
19682
|
-
var
|
|
19658
|
+
var _ref92 = options || {}, _ref92$scaleMinimum = _ref92.scaleMinimum, scaleMinimum = _ref92$scaleMinimum === void 0 ? 2 : _ref92$scaleMinimum, _ref92$lowerBound = _ref92.lowerBound, lowerBound = _ref92$lowerBound === void 0 ? false : _ref92$lowerBound;
|
|
19683
19659
|
var content = virtualNode.attr('content') || '';
|
|
19684
19660
|
if (!content) {
|
|
19685
19661
|
return true;
|
|
@@ -19754,8 +19730,8 @@
|
|
|
19754
19730
|
});
|
|
19755
19731
|
return true;
|
|
19756
19732
|
}
|
|
19757
|
-
this.relatedNodes(closeNeighbors.map(function(
|
|
19758
|
-
var actualNode =
|
|
19733
|
+
this.relatedNodes(closeNeighbors.map(function(_ref93) {
|
|
19734
|
+
var actualNode = _ref93.actualNode;
|
|
19759
19735
|
return actualNode;
|
|
19760
19736
|
}));
|
|
19761
19737
|
if (!closeNeighbors.some(_isInTabOrder)) {
|
|
@@ -19860,8 +19836,8 @@
|
|
|
19860
19836
|
if (obscuredNodes.length === 0) {
|
|
19861
19837
|
return null;
|
|
19862
19838
|
}
|
|
19863
|
-
var obscuringRects = obscuredNodes.map(function(
|
|
19864
|
-
var rect =
|
|
19839
|
+
var obscuringRects = obscuredNodes.map(function(_ref94) {
|
|
19840
|
+
var rect = _ref94.boundingClientRect;
|
|
19865
19841
|
return rect;
|
|
19866
19842
|
});
|
|
19867
19843
|
var unobscuredRects = _splitRects(nodeRect, obscuringRects);
|
|
@@ -19901,13 +19877,13 @@
|
|
|
19901
19877
|
function isDescendantNotInTabOrder(vAncestor, vNode) {
|
|
19902
19878
|
return vAncestor.actualNode.contains(vNode.actualNode) && !_isInTabOrder(vNode);
|
|
19903
19879
|
}
|
|
19904
|
-
function rectHasMinimumSize(minSize,
|
|
19905
|
-
var width =
|
|
19880
|
+
function rectHasMinimumSize(minSize, _ref95) {
|
|
19881
|
+
var width = _ref95.width, height = _ref95.height;
|
|
19906
19882
|
return width + roundingMargin2 >= minSize && height + roundingMargin2 >= minSize;
|
|
19907
19883
|
}
|
|
19908
19884
|
function mapActualNodes(vNodes) {
|
|
19909
|
-
return vNodes.map(function(
|
|
19910
|
-
var actualNode =
|
|
19885
|
+
return vNodes.map(function(_ref96) {
|
|
19886
|
+
var actualNode = _ref96.actualNode;
|
|
19911
19887
|
return actualNode;
|
|
19912
19888
|
});
|
|
19913
19889
|
}
|
|
@@ -19933,14 +19909,14 @@
|
|
|
19933
19909
|
}
|
|
19934
19910
|
function getHeadingOrder(results) {
|
|
19935
19911
|
results = _toConsumableArray(results);
|
|
19936
|
-
results.sort(function(
|
|
19937
|
-
var nodeA =
|
|
19938
|
-
var nodeB =
|
|
19912
|
+
results.sort(function(_ref97, _ref98) {
|
|
19913
|
+
var nodeA = _ref97.node;
|
|
19914
|
+
var nodeB = _ref98.node;
|
|
19939
19915
|
return nodeA.ancestry.length - nodeB.ancestry.length;
|
|
19940
19916
|
});
|
|
19941
19917
|
var headingOrder = results.reduce(mergeHeadingOrder, []);
|
|
19942
|
-
return headingOrder.filter(function(
|
|
19943
|
-
var level =
|
|
19918
|
+
return headingOrder.filter(function(_ref99) {
|
|
19919
|
+
var level = _ref99.level;
|
|
19944
19920
|
return level !== -1;
|
|
19945
19921
|
});
|
|
19946
19922
|
}
|
|
@@ -19991,7 +19967,7 @@
|
|
|
19991
19967
|
var headingRole = role && role.includes('heading');
|
|
19992
19968
|
var ariaHeadingLevel = vNode.attr('aria-level');
|
|
19993
19969
|
var ariaLevel = parseInt(ariaHeadingLevel, 10);
|
|
19994
|
-
var
|
|
19970
|
+
var _ref100 = vNode.props.nodeName.match(/h(\d)/) || [], _ref101 = _slicedToArray(_ref100, 2), headingLevel = _ref101[1];
|
|
19995
19971
|
if (!headingRole) {
|
|
19996
19972
|
return -1;
|
|
19997
19973
|
}
|
|
@@ -20055,8 +20031,8 @@
|
|
|
20055
20031
|
if (results.length < 2) {
|
|
20056
20032
|
return results;
|
|
20057
20033
|
}
|
|
20058
|
-
var incompleteResults = results.filter(function(
|
|
20059
|
-
var result =
|
|
20034
|
+
var incompleteResults = results.filter(function(_ref102) {
|
|
20035
|
+
var result = _ref102.result;
|
|
20060
20036
|
return result !== void 0;
|
|
20061
20037
|
});
|
|
20062
20038
|
var uniqueResults = [];
|
|
@@ -20068,12 +20044,12 @@
|
|
|
20068
20044
|
if (nameMap[name]) {
|
|
20069
20045
|
return 'continue';
|
|
20070
20046
|
}
|
|
20071
|
-
var sameNameResults = incompleteResults.filter(function(
|
|
20072
|
-
var data2 =
|
|
20047
|
+
var sameNameResults = incompleteResults.filter(function(_ref103, resultNum) {
|
|
20048
|
+
var data2 = _ref103.data;
|
|
20073
20049
|
return data2.name === name && resultNum !== index;
|
|
20074
20050
|
});
|
|
20075
|
-
var isSameUrl = sameNameResults.every(function(
|
|
20076
|
-
var data2 =
|
|
20051
|
+
var isSameUrl = sameNameResults.every(function(_ref104) {
|
|
20052
|
+
var data2 = _ref104.data;
|
|
20077
20053
|
return isIdenticalObject(data2.urlProps, urlProps);
|
|
20078
20054
|
});
|
|
20079
20055
|
if (sameNameResults.length && !isSameUrl) {
|
|
@@ -20492,7 +20468,7 @@
|
|
|
20492
20468
|
var separatorRegex = /[;,\s]/;
|
|
20493
20469
|
var validRedirectNumRegex = /^[0-9.]+$/;
|
|
20494
20470
|
function metaRefreshEvaluate(node, options, virtualNode) {
|
|
20495
|
-
var
|
|
20471
|
+
var _ref105 = options || {}, minDelay = _ref105.minDelay, maxDelay = _ref105.maxDelay;
|
|
20496
20472
|
var content = (virtualNode.attr('content') || '').trim();
|
|
20497
20473
|
var _content$split = content.split(separatorRegex), _content$split2 = _slicedToArray(_content$split, 1), redirectStr = _content$split2[0];
|
|
20498
20474
|
if (!redirectStr.match(validRedirectNumRegex)) {
|
|
@@ -20664,8 +20640,8 @@
|
|
|
20664
20640
|
} else if (node !== document.body && has_content_default(node, true)) {
|
|
20665
20641
|
return [ virtualNode ];
|
|
20666
20642
|
} else {
|
|
20667
|
-
return virtualNode.children.filter(function(
|
|
20668
|
-
var actualNode =
|
|
20643
|
+
return virtualNode.children.filter(function(_ref106) {
|
|
20644
|
+
var actualNode = _ref106.actualNode;
|
|
20669
20645
|
return actualNode.nodeType === 1;
|
|
20670
20646
|
}).map(function(vNode) {
|
|
20671
20647
|
return findRegionlessElms(vNode, options);
|
|
@@ -20818,8 +20794,8 @@
|
|
|
20818
20794
|
}
|
|
20819
20795
|
return false;
|
|
20820
20796
|
}
|
|
20821
|
-
function getNumberValue(domNode,
|
|
20822
|
-
var cssProperty =
|
|
20797
|
+
function getNumberValue(domNode, _ref107) {
|
|
20798
|
+
var cssProperty = _ref107.cssProperty, absoluteValues = _ref107.absoluteValues, normalValue = _ref107.normalValue;
|
|
20823
20799
|
var computedStyle = window.getComputedStyle(domNode);
|
|
20824
20800
|
var cssPropValue = computedStyle.getPropertyValue(cssProperty);
|
|
20825
20801
|
if (cssPropValue === 'normal') {
|
|
@@ -20896,8 +20872,8 @@
|
|
|
20896
20872
|
if (!virtualNode.children) {
|
|
20897
20873
|
return void 0;
|
|
20898
20874
|
}
|
|
20899
|
-
var titleNode = virtualNode.children.find(function(
|
|
20900
|
-
var props =
|
|
20875
|
+
var titleNode = virtualNode.children.find(function(_ref108) {
|
|
20876
|
+
var props = _ref108.props;
|
|
20901
20877
|
return props.nodeName === 'title';
|
|
20902
20878
|
});
|
|
20903
20879
|
if (!titleNode) {
|
|
@@ -21256,13 +21232,7 @@
|
|
|
21256
21232
|
if (ariaLabelledbyControls.length > 0 && ariaLabelledbyControls.every(is_disabled_default)) {
|
|
21257
21233
|
return false;
|
|
21258
21234
|
}
|
|
21259
|
-
|
|
21260
|
-
var removeUnicodeOptions = {
|
|
21261
|
-
emoji: true,
|
|
21262
|
-
nonBmp: false,
|
|
21263
|
-
punctuations: true
|
|
21264
|
-
};
|
|
21265
|
-
if (!visibleText || !remove_unicode_default(visibleText, removeUnicodeOptions)) {
|
|
21235
|
+
if (!hasRealTextChildren(virtualNode)) {
|
|
21266
21236
|
return false;
|
|
21267
21237
|
}
|
|
21268
21238
|
var range = document.createRange();
|
|
@@ -21282,6 +21252,20 @@
|
|
|
21282
21252
|
return false;
|
|
21283
21253
|
}
|
|
21284
21254
|
var color_contrast_matches_default = colorContrastMatches;
|
|
21255
|
+
var removeUnicodeOptions = {
|
|
21256
|
+
emoji: true,
|
|
21257
|
+
nonBmp: false,
|
|
21258
|
+
punctuations: true
|
|
21259
|
+
};
|
|
21260
|
+
function hasRealTextChildren(virtualNode) {
|
|
21261
|
+
var visibleText = visible_virtual_default(virtualNode, false, true);
|
|
21262
|
+
if (visibleText === '' || remove_unicode_default(visibleText, removeUnicodeOptions) === '') {
|
|
21263
|
+
return false;
|
|
21264
|
+
}
|
|
21265
|
+
return virtualNode.children.some(function(vChild) {
|
|
21266
|
+
return vChild.props.nodeName === '#text' && !is_icon_ligature_default(vChild);
|
|
21267
|
+
});
|
|
21268
|
+
}
|
|
21285
21269
|
function dataTableLargeMatches(node) {
|
|
21286
21270
|
if (is_data_table_default(node)) {
|
|
21287
21271
|
var tableArray = to_grid_default(node);
|
|
@@ -21484,7 +21468,7 @@
|
|
|
21484
21468
|
if (!role || [ 'none', 'presentation' ].includes(role)) {
|
|
21485
21469
|
return true;
|
|
21486
21470
|
}
|
|
21487
|
-
var
|
|
21471
|
+
var _ref109 = aria_roles_default[role] || {}, accessibleNameRequired = _ref109.accessibleNameRequired;
|
|
21488
21472
|
if (accessibleNameRequired || _isFocusable(virtualNode)) {
|
|
21489
21473
|
return true;
|
|
21490
21474
|
}
|
|
@@ -22811,8 +22795,8 @@
|
|
|
22811
22795
|
});
|
|
22812
22796
|
};
|
|
22813
22797
|
}
|
|
22814
|
-
function getHelpUrl(
|
|
22815
|
-
var brand =
|
|
22798
|
+
function getHelpUrl(_ref110, ruleId, version) {
|
|
22799
|
+
var brand = _ref110.brand, application = _ref110.application, lang = _ref110.lang;
|
|
22816
22800
|
return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
|
|
22817
22801
|
}
|
|
22818
22802
|
var audit_default = Audit;
|
|
@@ -23028,9 +23012,9 @@
|
|
|
23028
23012
|
toolOptions: options
|
|
23029
23013
|
});
|
|
23030
23014
|
}
|
|
23031
|
-
function normalizeRunParams(
|
|
23032
|
-
var
|
|
23033
|
-
var
|
|
23015
|
+
function normalizeRunParams(_ref111) {
|
|
23016
|
+
var _ref113, _options$reporter, _axe$_audit;
|
|
23017
|
+
var _ref112 = _slicedToArray(_ref111, 3), context = _ref112[0], options = _ref112[1], callback = _ref112[2];
|
|
23034
23018
|
var typeErr = new TypeError('axe.run arguments are invalid');
|
|
23035
23019
|
if (!isContextSpec(context)) {
|
|
23036
23020
|
if (callback !== void 0) {
|
|
@@ -23051,7 +23035,7 @@
|
|
|
23051
23035
|
throw typeErr;
|
|
23052
23036
|
}
|
|
23053
23037
|
options = clone_default(options);
|
|
23054
|
-
options.reporter = (
|
|
23038
|
+
options.reporter = (_ref113 = (_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 && _ref113 !== void 0 ? _ref113 : 'v1';
|
|
23055
23039
|
return {
|
|
23056
23040
|
context: context,
|
|
23057
23041
|
options: options,
|
|
@@ -23156,14 +23140,14 @@
|
|
|
23156
23140
|
return new Promise(function(res, rej) {
|
|
23157
23141
|
axe._audit.run(contextObj, options, res, rej);
|
|
23158
23142
|
}).then(function(results) {
|
|
23159
|
-
results = results.map(function(
|
|
23160
|
-
var nodes =
|
|
23143
|
+
results = results.map(function(_ref114) {
|
|
23144
|
+
var nodes = _ref114.nodes, result = _objectWithoutProperties(_ref114, _excluded8);
|
|
23161
23145
|
return _extends({
|
|
23162
23146
|
nodes: nodes.map(serializeNode)
|
|
23163
23147
|
}, result);
|
|
23164
23148
|
});
|
|
23165
|
-
var frames = contextObj.frames.map(function(
|
|
23166
|
-
var node =
|
|
23149
|
+
var frames = contextObj.frames.map(function(_ref115) {
|
|
23150
|
+
var node = _ref115.node;
|
|
23167
23151
|
return new dq_element_default(node, options).toJSON();
|
|
23168
23152
|
});
|
|
23169
23153
|
var environmentData;
|
|
@@ -23183,13 +23167,13 @@
|
|
|
23183
23167
|
return Promise.reject(err2);
|
|
23184
23168
|
});
|
|
23185
23169
|
}
|
|
23186
|
-
function serializeNode(
|
|
23187
|
-
var node =
|
|
23170
|
+
function serializeNode(_ref116) {
|
|
23171
|
+
var node = _ref116.node, nodeResult = _objectWithoutProperties(_ref116, _excluded9);
|
|
23188
23172
|
nodeResult.node = node.toJSON();
|
|
23189
23173
|
for (var _i33 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i33 < _arr2.length; _i33++) {
|
|
23190
23174
|
var type = _arr2[_i33];
|
|
23191
|
-
nodeResult[type] = nodeResult[type].map(function(
|
|
23192
|
-
var relatedNodes =
|
|
23175
|
+
nodeResult[type] = nodeResult[type].map(function(_ref117) {
|
|
23176
|
+
var relatedNodes = _ref117.relatedNodes, checkResult = _objectWithoutProperties(_ref117, _excluded10);
|
|
23193
23177
|
return _extends({}, checkResult, {
|
|
23194
23178
|
relatedNodes: relatedNodes.map(function(node2) {
|
|
23195
23179
|
return node2.toJSON();
|
|
@@ -23200,14 +23184,14 @@
|
|
|
23200
23184
|
return nodeResult;
|
|
23201
23185
|
}
|
|
23202
23186
|
function finishRun(partialResults) {
|
|
23203
|
-
var
|
|
23187
|
+
var _ref119, _options$reporter2, _axe$_audit2;
|
|
23204
23188
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
23205
23189
|
options = clone_default(options);
|
|
23206
|
-
var
|
|
23190
|
+
var _ref118 = partialResults.find(function(r) {
|
|
23207
23191
|
return r.environmentData;
|
|
23208
|
-
}) || {}, environmentData =
|
|
23192
|
+
}) || {}, environmentData = _ref118.environmentData;
|
|
23209
23193
|
axe._audit.normalizeOptions(options);
|
|
23210
|
-
options.reporter = (
|
|
23194
|
+
options.reporter = (_ref119 = (_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 && _ref119 !== void 0 ? _ref119 : 'v1';
|
|
23211
23195
|
setFrameSpec(partialResults);
|
|
23212
23196
|
var results = merge_results_default(partialResults);
|
|
23213
23197
|
results = axe._audit.after(results, options);
|
|
@@ -23237,8 +23221,8 @@
|
|
|
23237
23221
|
_iterator12.f();
|
|
23238
23222
|
}
|
|
23239
23223
|
}
|
|
23240
|
-
function getMergedFrameSpecs(
|
|
23241
|
-
var childFrameSpecs =
|
|
23224
|
+
function getMergedFrameSpecs(_ref120) {
|
|
23225
|
+
var childFrameSpecs = _ref120.frames, parentFrameSpec = _ref120.frameSpec;
|
|
23242
23226
|
if (!parentFrameSpec) {
|
|
23243
23227
|
return childFrameSpecs;
|
|
23244
23228
|
}
|
|
@@ -23301,9 +23285,9 @@
|
|
|
23301
23285
|
for (var _i34 = 0, _types = types; _i34 < _types.length; _i34++) {
|
|
23302
23286
|
var type = _types[_i34];
|
|
23303
23287
|
if (transformedResult[type] && Array.isArray(transformedResult[type])) {
|
|
23304
|
-
transformedResult[type] = transformedResult[type].map(function(
|
|
23288
|
+
transformedResult[type] = transformedResult[type].map(function(_ref121) {
|
|
23305
23289
|
var _node;
|
|
23306
|
-
var node =
|
|
23290
|
+
var node = _ref121.node, typeResult = _objectWithoutProperties(_ref121, _excluded13);
|
|
23307
23291
|
node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
|
|
23308
23292
|
return _extends({
|
|
23309
23293
|
node: node
|