axe-core 4.6.3-canary.cef96be → 4.6.3-canary.d4522cd
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 +388 -292
- package/axe.min.js +2 -2
- package/package.json +1 -1
- package/sri-history.json +3 -3
package/axe.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! axe v4.6.3-canary.
|
|
1
|
+
/*! axe v4.6.3-canary.d4522cd
|
|
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.3-canary.
|
|
25
|
+
axe.version = '4.6.3-canary.d4522cd';
|
|
26
26
|
if (typeof define === 'function' && define.amd) {
|
|
27
27
|
define('axe-core', [], function() {
|
|
28
28
|
return axe;
|
|
@@ -7071,6 +7071,9 @@
|
|
|
7071
7071
|
getElementStack: function getElementStack() {
|
|
7072
7072
|
return get_element_stack_default;
|
|
7073
7073
|
},
|
|
7074
|
+
getModalDialog: function getModalDialog() {
|
|
7075
|
+
return get_modal_dialog_default;
|
|
7076
|
+
},
|
|
7074
7077
|
getOverflowHiddenAncestors: function getOverflowHiddenAncestors() {
|
|
7075
7078
|
return get_overflow_hidden_ancestors_default;
|
|
7076
7079
|
},
|
|
@@ -7848,24 +7851,106 @@
|
|
|
7848
7851
|
}
|
|
7849
7852
|
return hasFixedPosition(vNode.parent);
|
|
7850
7853
|
});
|
|
7854
|
+
function _getIntersectionRect(rect1, rect2) {
|
|
7855
|
+
var leftX = Math.max(rect1.left, rect2.left);
|
|
7856
|
+
var rightX = Math.min(rect1.right, rect2.right);
|
|
7857
|
+
var topY = Math.max(rect1.top, rect2.top);
|
|
7858
|
+
var bottomY = Math.min(rect1.bottom, rect2.bottom);
|
|
7859
|
+
if (leftX >= rightX || topY >= bottomY) {
|
|
7860
|
+
return null;
|
|
7861
|
+
}
|
|
7862
|
+
return new window.DOMRect(leftX, topY, rightX - leftX, bottomY - topY);
|
|
7863
|
+
}
|
|
7864
|
+
var getModalDialog = memoize_default(function getModalDialogMemoized() {
|
|
7865
|
+
var _dialogs$find;
|
|
7866
|
+
if (!axe._tree) {
|
|
7867
|
+
return null;
|
|
7868
|
+
}
|
|
7869
|
+
var dialogs = query_selector_all_filter_default(axe._tree[0], 'dialog[open]', function(vNode) {
|
|
7870
|
+
var rect = vNode.boundingClientRect;
|
|
7871
|
+
var stack = document.elementsFromPoint(rect.left + 1, rect.top + 1);
|
|
7872
|
+
return stack.includes(vNode.actualNode) && _isVisibleOnScreen(vNode);
|
|
7873
|
+
});
|
|
7874
|
+
if (!dialogs.length) {
|
|
7875
|
+
return null;
|
|
7876
|
+
}
|
|
7877
|
+
var modalDialog = dialogs.find(function(dialog) {
|
|
7878
|
+
var rect = dialog.boundingClientRect;
|
|
7879
|
+
var stack = document.elementsFromPoint(rect.left - 10, rect.top - 10);
|
|
7880
|
+
return stack.includes(dialog.actualNode);
|
|
7881
|
+
});
|
|
7882
|
+
if (modalDialog) {
|
|
7883
|
+
return modalDialog;
|
|
7884
|
+
}
|
|
7885
|
+
return (_dialogs$find = dialogs.find(function(dialog) {
|
|
7886
|
+
var _getNodeFromGrid;
|
|
7887
|
+
var _ref17 = (_getNodeFromGrid = getNodeFromGrid(dialog)) !== null && _getNodeFromGrid !== void 0 ? _getNodeFromGrid : {}, vNode = _ref17.vNode, rect = _ref17.rect;
|
|
7888
|
+
if (!vNode) {
|
|
7889
|
+
return false;
|
|
7890
|
+
}
|
|
7891
|
+
var stack = document.elementsFromPoint(rect.left + 1, rect.top + 1);
|
|
7892
|
+
return !stack.includes(vNode.actualNode);
|
|
7893
|
+
})) !== null && _dialogs$find !== void 0 ? _dialogs$find : null;
|
|
7894
|
+
});
|
|
7895
|
+
var get_modal_dialog_default = getModalDialog;
|
|
7896
|
+
function getNodeFromGrid(dialog) {
|
|
7897
|
+
_createGrid();
|
|
7898
|
+
var grid = axe._tree[0]._grid;
|
|
7899
|
+
var viewRect = new window.DOMRect(0, 0, window.innerWidth, window.innerHeight);
|
|
7900
|
+
if (!grid) {
|
|
7901
|
+
return;
|
|
7902
|
+
}
|
|
7903
|
+
for (var row = 0; row < grid.cells.length; row++) {
|
|
7904
|
+
var cols = grid.cells[row];
|
|
7905
|
+
if (!cols) {
|
|
7906
|
+
continue;
|
|
7907
|
+
}
|
|
7908
|
+
for (var col = 0; col < cols.length; col++) {
|
|
7909
|
+
var cells = cols[col];
|
|
7910
|
+
if (!cells) {
|
|
7911
|
+
continue;
|
|
7912
|
+
}
|
|
7913
|
+
for (var _i6 = 0; _i6 < cells.length; _i6++) {
|
|
7914
|
+
var vNode = cells[_i6];
|
|
7915
|
+
var rect = vNode.boundingClientRect;
|
|
7916
|
+
var intersection = _getIntersectionRect(rect, viewRect);
|
|
7917
|
+
if (vNode.props.nodeName !== 'html' && vNode !== dialog && vNode.getComputedStylePropertyValue('pointer-events') !== 'none' && intersection) {
|
|
7918
|
+
return {
|
|
7919
|
+
vNode: vNode,
|
|
7920
|
+
rect: intersection
|
|
7921
|
+
};
|
|
7922
|
+
}
|
|
7923
|
+
}
|
|
7924
|
+
}
|
|
7925
|
+
}
|
|
7926
|
+
}
|
|
7851
7927
|
function _isInert(vNode) {
|
|
7852
|
-
var
|
|
7928
|
+
var _ref18 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, skipAncestors = _ref18.skipAncestors, isAncestor = _ref18.isAncestor;
|
|
7853
7929
|
if (skipAncestors) {
|
|
7854
|
-
return isInertSelf(vNode);
|
|
7930
|
+
return isInertSelf(vNode, isAncestor);
|
|
7855
7931
|
}
|
|
7856
|
-
return isInertAncestors(vNode);
|
|
7932
|
+
return isInertAncestors(vNode, isAncestor);
|
|
7857
7933
|
}
|
|
7858
|
-
var isInertSelf = memoize_default(function isInertSelfMemoized(vNode) {
|
|
7859
|
-
|
|
7934
|
+
var isInertSelf = memoize_default(function isInertSelfMemoized(vNode, isAncestor) {
|
|
7935
|
+
if (vNode.hasAttr('inert')) {
|
|
7936
|
+
return true;
|
|
7937
|
+
}
|
|
7938
|
+
if (!isAncestor && vNode.actualNode) {
|
|
7939
|
+
var modalDialog = get_modal_dialog_default();
|
|
7940
|
+
if (modalDialog && !_contains(modalDialog, vNode)) {
|
|
7941
|
+
return true;
|
|
7942
|
+
}
|
|
7943
|
+
}
|
|
7944
|
+
return false;
|
|
7860
7945
|
});
|
|
7861
|
-
var isInertAncestors = memoize_default(function isInertAncestorsMemoized(vNode) {
|
|
7862
|
-
if (isInertSelf(vNode)) {
|
|
7946
|
+
var isInertAncestors = memoize_default(function isInertAncestorsMemoized(vNode, isAncestor) {
|
|
7947
|
+
if (isInertSelf(vNode, isAncestor)) {
|
|
7863
7948
|
return true;
|
|
7864
7949
|
}
|
|
7865
7950
|
if (!vNode.parent) {
|
|
7866
7951
|
return false;
|
|
7867
7952
|
}
|
|
7868
|
-
return isInertAncestors(vNode.parent);
|
|
7953
|
+
return isInertAncestors(vNode.parent, true);
|
|
7869
7954
|
});
|
|
7870
7955
|
var allowedDisabledNodeNames = [ 'button', 'command', 'fieldset', 'keygen', 'optgroup', 'option', 'select', 'textarea', 'input' ];
|
|
7871
7956
|
function isDisabledAttrAllowed(nodeName2) {
|
|
@@ -7968,16 +8053,16 @@
|
|
|
7968
8053
|
function _visuallySort(a, b) {
|
|
7969
8054
|
_createGrid();
|
|
7970
8055
|
var length = Math.max(a._stackingOrder.length, b._stackingOrder.length);
|
|
7971
|
-
for (var
|
|
7972
|
-
if (typeof b._stackingOrder[
|
|
8056
|
+
for (var _i7 = 0; _i7 < length; _i7++) {
|
|
8057
|
+
if (typeof b._stackingOrder[_i7] === 'undefined') {
|
|
7973
8058
|
return -1;
|
|
7974
|
-
} else if (typeof a._stackingOrder[
|
|
8059
|
+
} else if (typeof a._stackingOrder[_i7] === 'undefined') {
|
|
7975
8060
|
return 1;
|
|
7976
8061
|
}
|
|
7977
|
-
if (b._stackingOrder[
|
|
8062
|
+
if (b._stackingOrder[_i7] > a._stackingOrder[_i7]) {
|
|
7978
8063
|
return 1;
|
|
7979
8064
|
}
|
|
7980
|
-
if (b._stackingOrder[
|
|
8065
|
+
if (b._stackingOrder[_i7] < a._stackingOrder[_i7]) {
|
|
7981
8066
|
return -1;
|
|
7982
8067
|
}
|
|
7983
8068
|
}
|
|
@@ -8067,16 +8152,6 @@
|
|
|
8067
8152
|
return _splitRects;
|
|
8068
8153
|
}
|
|
8069
8154
|
});
|
|
8070
|
-
function _getIntersectionRect(rect1, rect2) {
|
|
8071
|
-
var leftX = Math.max(rect1.left, rect2.left);
|
|
8072
|
-
var rightX = Math.min(rect1.right, rect2.right);
|
|
8073
|
-
var topY = Math.max(rect1.top, rect2.top);
|
|
8074
|
-
var bottomY = Math.min(rect1.bottom, rect2.bottom);
|
|
8075
|
-
if (leftX >= rightX || topY >= bottomY) {
|
|
8076
|
-
return null;
|
|
8077
|
-
}
|
|
8078
|
-
return new window.DOMRect(leftX, topY, rightX - leftX, bottomY - topY);
|
|
8079
|
-
}
|
|
8080
8155
|
function _getOffset(vNodeA, vNodeB) {
|
|
8081
8156
|
var rectA = vNodeA.boundingClientRect;
|
|
8082
8157
|
var rectB = vNodeB.boundingClientRect;
|
|
@@ -8087,8 +8162,8 @@
|
|
|
8087
8162
|
function getFarthestPoint(rectA, rectB) {
|
|
8088
8163
|
var dimensionProps = [ [ 'x', 'left', 'right', 'width' ], [ 'y', 'top', 'bottom', 'height' ] ];
|
|
8089
8164
|
var farthestPoint = {};
|
|
8090
|
-
dimensionProps.forEach(function(
|
|
8091
|
-
var
|
|
8165
|
+
dimensionProps.forEach(function(_ref19) {
|
|
8166
|
+
var _ref20 = _slicedToArray(_ref19, 4), axis = _ref20[0], start = _ref20[1], end = _ref20[2], diameter = _ref20[3];
|
|
8092
8167
|
if (rectB[start] < rectA[start] && rectB[end] > rectA[end]) {
|
|
8093
8168
|
farthestPoint[axis] = rectA[start] + rectA[diameter] / 2;
|
|
8094
8169
|
return;
|
|
@@ -8104,8 +8179,8 @@
|
|
|
8104
8179
|
});
|
|
8105
8180
|
return farthestPoint;
|
|
8106
8181
|
}
|
|
8107
|
-
function getClosestPoint(
|
|
8108
|
-
var x =
|
|
8182
|
+
function getClosestPoint(_ref21, ownRect, adjacentRect) {
|
|
8183
|
+
var x = _ref21.x, y = _ref21.y;
|
|
8109
8184
|
if (pointInRect({
|
|
8110
8185
|
x: x,
|
|
8111
8186
|
y: y
|
|
@@ -8160,12 +8235,12 @@
|
|
|
8160
8235
|
}
|
|
8161
8236
|
return Math.sqrt(Math.pow(xDistance, 2) + Math.pow(yDistance, 2));
|
|
8162
8237
|
}
|
|
8163
|
-
function pointInRect(
|
|
8164
|
-
var x =
|
|
8238
|
+
function pointInRect(_ref22, rect) {
|
|
8239
|
+
var x = _ref22.x, y = _ref22.y;
|
|
8165
8240
|
return y >= rect.top && x <= rect.right && y <= rect.bottom && x >= rect.left;
|
|
8166
8241
|
}
|
|
8167
|
-
function getCornerInAdjacentRect(
|
|
8168
|
-
var x =
|
|
8242
|
+
function getCornerInAdjacentRect(_ref23, ownRect, adjacentRect) {
|
|
8243
|
+
var x = _ref23.x, y = _ref23.y;
|
|
8169
8244
|
var closestX, closestY;
|
|
8170
8245
|
if (x === ownRect.left && ownRect.right < adjacentRect.right) {
|
|
8171
8246
|
closestX = ownRect.right;
|
|
@@ -8202,8 +8277,8 @@
|
|
|
8202
8277
|
};
|
|
8203
8278
|
}
|
|
8204
8279
|
}
|
|
8205
|
-
function _getRectCenter(
|
|
8206
|
-
var left =
|
|
8280
|
+
function _getRectCenter(_ref24) {
|
|
8281
|
+
var left = _ref24.left, top = _ref24.top, width = _ref24.width, height = _ref24.height;
|
|
8207
8282
|
return new window.DOMPoint(left + width / 2, top + height / 2);
|
|
8208
8283
|
}
|
|
8209
8284
|
function _hasVisualOverlap(vNodeA, vNodeB) {
|
|
@@ -10365,7 +10440,7 @@
|
|
|
10365
10440
|
}
|
|
10366
10441
|
var is_unsupported_role_default = isUnsupportedRole;
|
|
10367
10442
|
function isValidRole(role) {
|
|
10368
|
-
var
|
|
10443
|
+
var _ref25 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, allowAbstract = _ref25.allowAbstract, _ref25$flagUnsupporte = _ref25.flagUnsupported, flagUnsupported = _ref25$flagUnsupporte === void 0 ? false : _ref25$flagUnsupporte;
|
|
10369
10444
|
var roleDefinition = standards_default.ariaRoles[role];
|
|
10370
10445
|
var isRoleUnsupported = is_unsupported_role_default(role);
|
|
10371
10446
|
if (!roleDefinition || flagUnsupported && isRoleUnsupported) {
|
|
@@ -10375,7 +10450,7 @@
|
|
|
10375
10450
|
}
|
|
10376
10451
|
var is_valid_role_default = isValidRole;
|
|
10377
10452
|
function getExplicitRole(vNode) {
|
|
10378
|
-
var
|
|
10453
|
+
var _ref26 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, fallback = _ref26.fallback, abstracts = _ref26.abstracts, dpub = _ref26.dpub;
|
|
10379
10454
|
vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
|
|
10380
10455
|
if (vNode.props.nodeType !== 1) {
|
|
10381
10456
|
return null;
|
|
@@ -10813,7 +10888,7 @@
|
|
|
10813
10888
|
matches_default2.semanticRole = semantic_role_default;
|
|
10814
10889
|
var matches_default3 = matches_default2;
|
|
10815
10890
|
function getElementSpec(vNode) {
|
|
10816
|
-
var
|
|
10891
|
+
var _ref27 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref27$noMatchAccessi = _ref27.noMatchAccessibleName, noMatchAccessibleName = _ref27$noMatchAccessi === void 0 ? false : _ref27$noMatchAccessi;
|
|
10817
10892
|
var standard = standards_default.htmlElms[vNode.props.nodeName];
|
|
10818
10893
|
if (!standard) {
|
|
10819
10894
|
return {};
|
|
@@ -10828,8 +10903,8 @@
|
|
|
10828
10903
|
}
|
|
10829
10904
|
var _variant$variantName = variant[variantName], matches4 = _variant$variantName.matches, props = _objectWithoutProperties(_variant$variantName, _excluded3);
|
|
10830
10905
|
var matchProperties = Array.isArray(matches4) ? matches4 : [ matches4 ];
|
|
10831
|
-
for (var
|
|
10832
|
-
if (matchProperties[
|
|
10906
|
+
for (var _i8 = 0; _i8 < matchProperties.length && noMatchAccessibleName; _i8++) {
|
|
10907
|
+
if (matchProperties[_i8].hasOwnProperty('hasAccessibleName')) {
|
|
10833
10908
|
return standard;
|
|
10834
10909
|
}
|
|
10835
10910
|
}
|
|
@@ -10850,7 +10925,7 @@
|
|
|
10850
10925
|
}
|
|
10851
10926
|
var get_element_spec_default = getElementSpec;
|
|
10852
10927
|
function implicitRole2(node) {
|
|
10853
|
-
var
|
|
10928
|
+
var _ref28 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref28.chromium;
|
|
10854
10929
|
var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
|
|
10855
10930
|
node = vNode.actualNode;
|
|
10856
10931
|
if (!vNode) {
|
|
@@ -10903,8 +10978,8 @@
|
|
|
10903
10978
|
}
|
|
10904
10979
|
return getInheritedRole(vNode.parent, explicitRoleOptions);
|
|
10905
10980
|
}
|
|
10906
|
-
function resolveImplicitRole(vNode,
|
|
10907
|
-
var chromium =
|
|
10981
|
+
function resolveImplicitRole(vNode, _ref29) {
|
|
10982
|
+
var chromium = _ref29.chromium, explicitRoleOptions = _objectWithoutProperties(_ref29, _excluded4);
|
|
10908
10983
|
var implicitRole3 = implicit_role_default(vNode, {
|
|
10909
10984
|
chromium: chromium
|
|
10910
10985
|
});
|
|
@@ -10924,8 +10999,8 @@
|
|
|
10924
10999
|
return hasGlobalAria || _isFocusable(vNode);
|
|
10925
11000
|
}
|
|
10926
11001
|
function resolveRole(node) {
|
|
10927
|
-
var
|
|
10928
|
-
var noImplicit =
|
|
11002
|
+
var _ref30 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11003
|
+
var noImplicit = _ref30.noImplicit, roleOptions = _objectWithoutProperties(_ref30, _excluded5);
|
|
10929
11004
|
var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
|
|
10930
11005
|
if (vNode.props.nodeType !== 1) {
|
|
10931
11006
|
return null;
|
|
@@ -10943,8 +11018,8 @@
|
|
|
10943
11018
|
return explicitRole2;
|
|
10944
11019
|
}
|
|
10945
11020
|
function getRole(node) {
|
|
10946
|
-
var
|
|
10947
|
-
var noPresentational =
|
|
11021
|
+
var _ref31 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11022
|
+
var noPresentational = _ref31.noPresentational, options = _objectWithoutProperties(_ref31, _excluded6);
|
|
10948
11023
|
var role = resolveRole(node, options);
|
|
10949
11024
|
if (noPresentational && [ 'presentation', 'none' ].includes(role)) {
|
|
10950
11025
|
return null;
|
|
@@ -10965,7 +11040,7 @@
|
|
|
10965
11040
|
}
|
|
10966
11041
|
var title_text_default = titleText;
|
|
10967
11042
|
function namedFromContents(vNode) {
|
|
10968
|
-
var
|
|
11043
|
+
var _ref32 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref32.strict;
|
|
10969
11044
|
vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
|
|
10970
11045
|
if (vNode.props.nodeType !== 1) {
|
|
10971
11046
|
return false;
|
|
@@ -11090,12 +11165,12 @@
|
|
|
11090
11165
|
button: ''
|
|
11091
11166
|
};
|
|
11092
11167
|
var nativeTextMethods = {
|
|
11093
|
-
valueText: function valueText(
|
|
11094
|
-
var actualNode =
|
|
11168
|
+
valueText: function valueText(_ref33) {
|
|
11169
|
+
var actualNode = _ref33.actualNode;
|
|
11095
11170
|
return actualNode.value || '';
|
|
11096
11171
|
},
|
|
11097
|
-
buttonDefaultText: function buttonDefaultText(
|
|
11098
|
-
var actualNode =
|
|
11172
|
+
buttonDefaultText: function buttonDefaultText(_ref34) {
|
|
11173
|
+
var actualNode = _ref34.actualNode;
|
|
11099
11174
|
return defaultButtonValues[actualNode.type] || '';
|
|
11100
11175
|
},
|
|
11101
11176
|
tableCaptionText: descendantText.bind(null, 'caption'),
|
|
@@ -11115,8 +11190,8 @@
|
|
|
11115
11190
|
function attrText(attr, vNode) {
|
|
11116
11191
|
return vNode.attr(attr) || '';
|
|
11117
11192
|
}
|
|
11118
|
-
function descendantText(nodeName2,
|
|
11119
|
-
var actualNode =
|
|
11193
|
+
function descendantText(nodeName2, _ref35, context) {
|
|
11194
|
+
var actualNode = _ref35.actualNode;
|
|
11120
11195
|
nodeName2 = nodeName2.toLowerCase();
|
|
11121
11196
|
var nodeNames2 = [ nodeName2, actualNode.nodeName.toLowerCase() ].join(',');
|
|
11122
11197
|
var candidate = actualNode.querySelector(nodeNames2);
|
|
@@ -11161,7 +11236,8 @@
|
|
|
11161
11236
|
}
|
|
11162
11237
|
var isVisibleToScreenReadersVirtual = memoize_default(function isVisibleToScreenReadersMemoized(vNode, isAncestor) {
|
|
11163
11238
|
if (ariaHidden(vNode) || _isInert(vNode, {
|
|
11164
|
-
skipAncestors: true
|
|
11239
|
+
skipAncestors: true,
|
|
11240
|
+
isAncestor: isAncestor
|
|
11165
11241
|
})) {
|
|
11166
11242
|
return false;
|
|
11167
11243
|
}
|
|
@@ -11547,7 +11623,7 @@
|
|
|
11547
11623
|
locations: [ 'billing', 'shipping' ]
|
|
11548
11624
|
};
|
|
11549
11625
|
function isValidAutocomplete(autocompleteValue) {
|
|
11550
|
-
var
|
|
11626
|
+
var _ref36 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref36$looseTyped = _ref36.looseTyped, looseTyped = _ref36$looseTyped === void 0 ? false : _ref36$looseTyped, _ref36$stateTerms = _ref36.stateTerms, stateTerms = _ref36$stateTerms === void 0 ? [] : _ref36$stateTerms, _ref36$locations = _ref36.locations, locations = _ref36$locations === void 0 ? [] : _ref36$locations, _ref36$qualifiers = _ref36.qualifiers, qualifiers = _ref36$qualifiers === void 0 ? [] : _ref36$qualifiers, _ref36$standaloneTerm = _ref36.standaloneTerms, standaloneTerms = _ref36$standaloneTerm === void 0 ? [] : _ref36$standaloneTerm, _ref36$qualifiedTerms = _ref36.qualifiedTerms, qualifiedTerms = _ref36$qualifiedTerms === void 0 ? [] : _ref36$qualifiedTerms;
|
|
11551
11627
|
autocompleteValue = autocompleteValue.toLowerCase().trim();
|
|
11552
11628
|
stateTerms = stateTerms.concat(_autocomplete.stateTerms);
|
|
11553
11629
|
if (stateTerms.includes(autocompleteValue) || autocompleteValue === '') {
|
|
@@ -11812,8 +11888,8 @@
|
|
|
11812
11888
|
if (hiddenTextElms.includes(elm.props.nodeName)) {
|
|
11813
11889
|
return false;
|
|
11814
11890
|
}
|
|
11815
|
-
return elm.children.some(function(
|
|
11816
|
-
var props =
|
|
11891
|
+
return elm.children.some(function(_ref37) {
|
|
11892
|
+
var props = _ref37.props;
|
|
11817
11893
|
return props.nodeType === 3 && props.nodeValue.trim();
|
|
11818
11894
|
});
|
|
11819
11895
|
}
|
|
@@ -12014,8 +12090,8 @@
|
|
|
12014
12090
|
var stacks = points.map(function(point) {
|
|
12015
12091
|
return Array.from(document.elementsFromPoint(point.x, point.y));
|
|
12016
12092
|
});
|
|
12017
|
-
var _loop4 = function _loop4(
|
|
12018
|
-
var modalElement = stacks[
|
|
12093
|
+
var _loop4 = function _loop4(_i9) {
|
|
12094
|
+
var modalElement = stacks[_i9].find(function(elm) {
|
|
12019
12095
|
var style = window.getComputedStyle(elm);
|
|
12020
12096
|
return parseInt(style.width, 10) >= percentWidth && parseInt(style.height, 10) >= percentHeight && style.getPropertyValue('pointer-events') !== 'none' && (style.position === 'absolute' || style.position === 'fixed');
|
|
12021
12097
|
});
|
|
@@ -12028,8 +12104,8 @@
|
|
|
12028
12104
|
};
|
|
12029
12105
|
}
|
|
12030
12106
|
};
|
|
12031
|
-
for (var
|
|
12032
|
-
var _ret = _loop4(
|
|
12107
|
+
for (var _i9 = 0; _i9 < stacks.length; _i9++) {
|
|
12108
|
+
var _ret = _loop4(_i9);
|
|
12033
12109
|
if (_typeof(_ret) === 'object') {
|
|
12034
12110
|
return _ret.v;
|
|
12035
12111
|
}
|
|
@@ -12125,8 +12201,8 @@
|
|
|
12125
12201
|
}
|
|
12126
12202
|
return parseFloat(value);
|
|
12127
12203
|
}
|
|
12128
|
-
function hslToRgb(
|
|
12129
|
-
var
|
|
12204
|
+
function hslToRgb(_ref38) {
|
|
12205
|
+
var _ref39 = _slicedToArray(_ref38, 4), hue = _ref39[0], saturation = _ref39[1], lightness = _ref39[2], alpha = _ref39[3];
|
|
12130
12206
|
saturation /= 255;
|
|
12131
12207
|
lightness /= 255;
|
|
12132
12208
|
var high = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
@@ -12175,7 +12251,7 @@
|
|
|
12175
12251
|
var colorFnRegex = /^((?:rgb|hsl)a?)\s*\(([^\)]*)\)/i;
|
|
12176
12252
|
this.parseString = function parseString(colorString) {
|
|
12177
12253
|
if (standards_default.cssColors[colorString] || colorString === 'transparent') {
|
|
12178
|
-
var
|
|
12254
|
+
var _ref40 = standards_default.cssColors[colorString] || [ 0, 0, 0 ], _ref41 = _slicedToArray(_ref40, 3), red2 = _ref41[0], green2 = _ref41[1], blue2 = _ref41[2];
|
|
12179
12255
|
this.red = red2;
|
|
12180
12256
|
this.green = green2;
|
|
12181
12257
|
this.blue = blue2;
|
|
@@ -12225,7 +12301,7 @@
|
|
|
12225
12301
|
}
|
|
12226
12302
|
};
|
|
12227
12303
|
this.parseColorFnString = function parseColorFnString(colorString) {
|
|
12228
|
-
var
|
|
12304
|
+
var _ref42 = colorString.match(colorFnRegex) || [], _ref43 = _slicedToArray(_ref42, 3), colorFunc = _ref43[1], colorValStr = _ref43[2];
|
|
12229
12305
|
if (!colorFunc || !colorValStr) {
|
|
12230
12306
|
return;
|
|
12231
12307
|
}
|
|
@@ -12335,8 +12411,8 @@
|
|
|
12335
12411
|
if (!refs || !refs.length) {
|
|
12336
12412
|
return false;
|
|
12337
12413
|
}
|
|
12338
|
-
return refs.some(function(
|
|
12339
|
-
var actualNode =
|
|
12414
|
+
return refs.some(function(_ref44) {
|
|
12415
|
+
var actualNode = _ref44.actualNode;
|
|
12340
12416
|
return isVisible(actualNode, screenReader, recursed);
|
|
12341
12417
|
});
|
|
12342
12418
|
}
|
|
@@ -12348,7 +12424,7 @@
|
|
|
12348
12424
|
var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
|
|
12349
12425
|
el = vNode ? vNode.actualNode : el;
|
|
12350
12426
|
var cacheName = '_isVisible' + (screenReader ? 'ScreenReader' : '');
|
|
12351
|
-
var
|
|
12427
|
+
var _ref45 = (_window$Node2 = window.Node) !== null && _window$Node2 !== void 0 ? _window$Node2 : {}, DOCUMENT_NODE = _ref45.DOCUMENT_NODE, DOCUMENT_FRAGMENT_NODE = _ref45.DOCUMENT_FRAGMENT_NODE;
|
|
12352
12428
|
var nodeType = vNode ? vNode.props.nodeType : el.nodeType;
|
|
12353
12429
|
var nodeName2 = vNode ? vNode.props.nodeName : el.nodeName.toLowerCase();
|
|
12354
12430
|
if (vNode && typeof vNode[cacheName] !== 'undefined') {
|
|
@@ -12739,8 +12815,8 @@
|
|
|
12739
12815
|
return;
|
|
12740
12816
|
}
|
|
12741
12817
|
var shadowId = domTree[0].shadowId;
|
|
12742
|
-
for (var
|
|
12743
|
-
if (expressions[
|
|
12818
|
+
for (var _i10 = 0; _i10 < expressions.length; _i10++) {
|
|
12819
|
+
if (expressions[_i10].length > 1 && expressions[_i10].some(function(expression) {
|
|
12744
12820
|
return isGlobalSelector(expression);
|
|
12745
12821
|
})) {
|
|
12746
12822
|
return;
|
|
@@ -12801,9 +12877,9 @@
|
|
|
12801
12877
|
nodes = nodes ? getSharedValues(_cachedNodes, nodes) : _cachedNodes;
|
|
12802
12878
|
}
|
|
12803
12879
|
if (exp.attributes) {
|
|
12804
|
-
for (var
|
|
12880
|
+
for (var _i11 = 0; _i11 < exp.attributes.length; _i11++) {
|
|
12805
12881
|
var _selectorMap;
|
|
12806
|
-
var attr = exp.attributes[
|
|
12882
|
+
var attr = exp.attributes[_i11];
|
|
12807
12883
|
if (attr.type === 'attrValue') {
|
|
12808
12884
|
isComplexSelector = true;
|
|
12809
12885
|
}
|
|
@@ -13159,7 +13235,7 @@
|
|
|
13159
13235
|
return {};
|
|
13160
13236
|
}
|
|
13161
13237
|
var navigator = win.navigator, innerHeight = win.innerHeight, innerWidth = win.innerWidth;
|
|
13162
|
-
var
|
|
13238
|
+
var _ref46 = getOrientation(win) || {}, angle = _ref46.angle, type = _ref46.type;
|
|
13163
13239
|
return {
|
|
13164
13240
|
userAgent: navigator.userAgent,
|
|
13165
13241
|
windowWidth: innerWidth,
|
|
@@ -13168,12 +13244,12 @@
|
|
|
13168
13244
|
orientationType: type
|
|
13169
13245
|
};
|
|
13170
13246
|
}
|
|
13171
|
-
function getOrientation(
|
|
13172
|
-
var screen =
|
|
13247
|
+
function getOrientation(_ref47) {
|
|
13248
|
+
var screen = _ref47.screen;
|
|
13173
13249
|
return screen.orientation || screen.msOrientation || screen.mozOrientation;
|
|
13174
13250
|
}
|
|
13175
|
-
function createFrameContext(frame,
|
|
13176
|
-
var focusable =
|
|
13251
|
+
function createFrameContext(frame, _ref48) {
|
|
13252
|
+
var focusable = _ref48.focusable, page = _ref48.page;
|
|
13177
13253
|
return {
|
|
13178
13254
|
node: frame,
|
|
13179
13255
|
include: [],
|
|
@@ -13240,8 +13316,8 @@
|
|
|
13240
13316
|
if (!isArrayLike(selectorList)) {
|
|
13241
13317
|
selectorList = [ selectorList ];
|
|
13242
13318
|
}
|
|
13243
|
-
for (var
|
|
13244
|
-
var normalizedSelector = normalizeContextSelector(selectorList[
|
|
13319
|
+
for (var _i12 = 0; _i12 < selectorList.length; _i12++) {
|
|
13320
|
+
var normalizedSelector = normalizeContextSelector(selectorList[_i12]);
|
|
13245
13321
|
if (normalizedSelector) {
|
|
13246
13322
|
normalizedList.push(normalizedSelector);
|
|
13247
13323
|
}
|
|
@@ -13337,8 +13413,8 @@
|
|
|
13337
13413
|
}
|
|
13338
13414
|
function parseSelectorArray(context, type) {
|
|
13339
13415
|
var result = [];
|
|
13340
|
-
for (var
|
|
13341
|
-
var item = context[type][
|
|
13416
|
+
for (var _i13 = 0, l = context[type].length; _i13 < l; _i13++) {
|
|
13417
|
+
var item = context[type][_i13];
|
|
13342
13418
|
if (item instanceof window.Node) {
|
|
13343
13419
|
if (item.documentElement instanceof window.Node) {
|
|
13344
13420
|
result.push(context.flatTree[0]);
|
|
@@ -13412,8 +13488,8 @@
|
|
|
13412
13488
|
}
|
|
13413
13489
|
context.frames.push(createFrameContext(frame, context));
|
|
13414
13490
|
}
|
|
13415
|
-
function isPageContext(
|
|
13416
|
-
var include =
|
|
13491
|
+
function isPageContext(_ref49) {
|
|
13492
|
+
var include = _ref49.include;
|
|
13417
13493
|
return include.length === 1 && include[0].actualNode === document.documentElement;
|
|
13418
13494
|
}
|
|
13419
13495
|
function validateContext(context) {
|
|
@@ -13422,11 +13498,11 @@
|
|
|
13422
13498
|
throw new Error('No elements found for include in ' + env + ' Context');
|
|
13423
13499
|
}
|
|
13424
13500
|
}
|
|
13425
|
-
function getRootNode2(
|
|
13426
|
-
var include =
|
|
13501
|
+
function getRootNode2(_ref50) {
|
|
13502
|
+
var include = _ref50.include, exclude = _ref50.exclude;
|
|
13427
13503
|
var selectors = Array.from(include).concat(Array.from(exclude));
|
|
13428
|
-
for (var
|
|
13429
|
-
var item = selectors[
|
|
13504
|
+
for (var _i14 = 0; _i14 < selectors.length; _i14++) {
|
|
13505
|
+
var item = selectors[_i14];
|
|
13430
13506
|
if (item instanceof window.Element) {
|
|
13431
13507
|
return item.ownerDocument.documentElement;
|
|
13432
13508
|
}
|
|
@@ -13442,8 +13518,8 @@
|
|
|
13442
13518
|
return [];
|
|
13443
13519
|
}
|
|
13444
13520
|
var _Context = new Context(context), frames = _Context.frames;
|
|
13445
|
-
return frames.map(function(
|
|
13446
|
-
var node =
|
|
13521
|
+
return frames.map(function(_ref51) {
|
|
13522
|
+
var node = _ref51.node, frameContext = _objectWithoutProperties(_ref51, _excluded7);
|
|
13447
13523
|
frameContext.initiator = false;
|
|
13448
13524
|
var frameSelector = _getAncestry(node);
|
|
13449
13525
|
return {
|
|
@@ -13592,8 +13668,8 @@
|
|
|
13592
13668
|
return !!standards_default.htmlElms[nodeName2];
|
|
13593
13669
|
}
|
|
13594
13670
|
var is_html_element_default = isHtmlElement;
|
|
13595
|
-
function _isNodeInContext(node,
|
|
13596
|
-
var
|
|
13671
|
+
function _isNodeInContext(node, _ref52) {
|
|
13672
|
+
var _ref52$include = _ref52.include, include = _ref52$include === void 0 ? [] : _ref52$include, _ref52$exclude = _ref52.exclude, exclude = _ref52$exclude === void 0 ? [] : _ref52$exclude;
|
|
13597
13673
|
var filterInclude = include.filter(function(candidate) {
|
|
13598
13674
|
return _contains(candidate, node);
|
|
13599
13675
|
});
|
|
@@ -14100,9 +14176,9 @@
|
|
|
14100
14176
|
var childAny = null;
|
|
14101
14177
|
var combinedLength = (((_currentLevel$anyLeve = currentLevel.anyLevel) === null || _currentLevel$anyLeve === void 0 ? void 0 : _currentLevel$anyLeve.length) || 0) + (((_currentLevel$thisLev = currentLevel.thisLevel) === null || _currentLevel$thisLev === void 0 ? void 0 : _currentLevel$thisLev.length) || 0);
|
|
14102
14178
|
var added = false;
|
|
14103
|
-
for (var
|
|
14179
|
+
for (var _i15 = 0; _i15 < combinedLength; _i15++) {
|
|
14104
14180
|
var _currentLevel$anyLeve2, _currentLevel$anyLeve3, _currentLevel$anyLeve4;
|
|
14105
|
-
var exp =
|
|
14181
|
+
var exp = _i15 < (((_currentLevel$anyLeve2 = currentLevel.anyLevel) === null || _currentLevel$anyLeve2 === void 0 ? void 0 : _currentLevel$anyLeve2.length) || 0) ? currentLevel.anyLevel[_i15] : currentLevel.thisLevel[_i15 - (((_currentLevel$anyLeve3 = currentLevel.anyLevel) === null || _currentLevel$anyLeve3 === void 0 ? void 0 : _currentLevel$anyLeve3.length) || 0)];
|
|
14106
14182
|
if ((!exp[0].id || vNode.shadowId === currentLevel.parentShadowId) && _matchesExpression(vNode, exp[0])) {
|
|
14107
14183
|
if (exp.length === 1) {
|
|
14108
14184
|
if (!added && (!filter || filter(vNode))) {
|
|
@@ -14146,8 +14222,8 @@
|
|
|
14146
14222
|
return matchExpressions(domTree, expressions, filter);
|
|
14147
14223
|
}
|
|
14148
14224
|
var query_selector_all_filter_default = querySelectorAllFilter;
|
|
14149
|
-
function preloadCssom(
|
|
14150
|
-
var
|
|
14225
|
+
function preloadCssom(_ref53) {
|
|
14226
|
+
var _ref53$treeRoot = _ref53.treeRoot, treeRoot = _ref53$treeRoot === void 0 ? axe._tree[0] : _ref53$treeRoot;
|
|
14151
14227
|
var rootNodes = getAllRootNodesInTree(treeRoot);
|
|
14152
14228
|
if (!rootNodes.length) {
|
|
14153
14229
|
return Promise.resolve();
|
|
@@ -14177,8 +14253,8 @@
|
|
|
14177
14253
|
}
|
|
14178
14254
|
function getCssomForAllRootNodes(rootNodes, convertDataToStylesheet) {
|
|
14179
14255
|
var promises = [];
|
|
14180
|
-
rootNodes.forEach(function(
|
|
14181
|
-
var rootNode =
|
|
14256
|
+
rootNodes.forEach(function(_ref54, index) {
|
|
14257
|
+
var rootNode = _ref54.rootNode, shadowId = _ref54.shadowId;
|
|
14182
14258
|
var sheets = getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet);
|
|
14183
14259
|
if (!sheets) {
|
|
14184
14260
|
return Promise.all(promises);
|
|
@@ -14262,10 +14338,10 @@
|
|
|
14262
14338
|
return true;
|
|
14263
14339
|
});
|
|
14264
14340
|
}
|
|
14265
|
-
function preloadMedia(
|
|
14266
|
-
var
|
|
14267
|
-
var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(
|
|
14268
|
-
var actualNode =
|
|
14341
|
+
function preloadMedia(_ref55) {
|
|
14342
|
+
var _ref55$treeRoot = _ref55.treeRoot, treeRoot = _ref55$treeRoot === void 0 ? axe._tree[0] : _ref55$treeRoot;
|
|
14343
|
+
var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(_ref56) {
|
|
14344
|
+
var actualNode = _ref56.actualNode;
|
|
14269
14345
|
if (actualNode.hasAttribute('src')) {
|
|
14270
14346
|
return !!actualNode.getAttribute('src');
|
|
14271
14347
|
}
|
|
@@ -14277,8 +14353,8 @@
|
|
|
14277
14353
|
}
|
|
14278
14354
|
return true;
|
|
14279
14355
|
});
|
|
14280
|
-
return Promise.all(mediaVirtualNodes.map(function(
|
|
14281
|
-
var actualNode =
|
|
14356
|
+
return Promise.all(mediaVirtualNodes.map(function(_ref57) {
|
|
14357
|
+
var actualNode = _ref57.actualNode;
|
|
14282
14358
|
return isMediaElementReady(actualNode);
|
|
14283
14359
|
}));
|
|
14284
14360
|
}
|
|
@@ -14529,8 +14605,8 @@
|
|
|
14529
14605
|
}
|
|
14530
14606
|
var outerIncludes = getOuterIncludes(context.include);
|
|
14531
14607
|
var isInContext = getContextFilter(context);
|
|
14532
|
-
for (var
|
|
14533
|
-
candidate = outerIncludes[
|
|
14608
|
+
for (var _i16 = 0; _i16 < outerIncludes.length; _i16++) {
|
|
14609
|
+
candidate = outerIncludes[_i16];
|
|
14534
14610
|
var nodes = query_selector_all_filter_default(candidate, selector, isInContext);
|
|
14535
14611
|
result = mergeArrayUniques(result, nodes);
|
|
14536
14612
|
}
|
|
@@ -14567,9 +14643,9 @@
|
|
|
14567
14643
|
arr1 = arr2;
|
|
14568
14644
|
arr2 = temp;
|
|
14569
14645
|
}
|
|
14570
|
-
for (var
|
|
14571
|
-
if (!arr1.includes(arr2[
|
|
14572
|
-
arr1.push(arr2[
|
|
14646
|
+
for (var _i17 = 0, l = arr2.length; _i17 < l; _i17++) {
|
|
14647
|
+
if (!arr1.includes(arr2[_i17])) {
|
|
14648
|
+
arr1.push(arr2[_i17]);
|
|
14573
14649
|
}
|
|
14574
14650
|
}
|
|
14575
14651
|
return arr1;
|
|
@@ -14583,8 +14659,8 @@
|
|
|
14583
14659
|
}
|
|
14584
14660
|
}
|
|
14585
14661
|
function setScrollState(scrollState) {
|
|
14586
|
-
scrollState.forEach(function(
|
|
14587
|
-
var elm =
|
|
14662
|
+
scrollState.forEach(function(_ref59) {
|
|
14663
|
+
var elm = _ref59.elm, top = _ref59.top, left = _ref59.left;
|
|
14588
14664
|
return setScroll(elm, top, left);
|
|
14589
14665
|
});
|
|
14590
14666
|
}
|
|
@@ -14612,8 +14688,8 @@
|
|
|
14612
14688
|
}
|
|
14613
14689
|
return selectAllRecursive(selectorArr, doc);
|
|
14614
14690
|
}
|
|
14615
|
-
function selectAllRecursive(
|
|
14616
|
-
var
|
|
14691
|
+
function selectAllRecursive(_ref60, doc) {
|
|
14692
|
+
var _ref61 = _toArray(_ref60), selectorStr = _ref61[0], restSelector = _ref61.slice(1);
|
|
14617
14693
|
var elms = doc.querySelectorAll(selectorStr);
|
|
14618
14694
|
if (restSelector.length === 0) {
|
|
14619
14695
|
return Array.from(elms);
|
|
@@ -14644,8 +14720,8 @@
|
|
|
14644
14720
|
while (lang.length < 3) {
|
|
14645
14721
|
lang += '`';
|
|
14646
14722
|
}
|
|
14647
|
-
for (var
|
|
14648
|
-
var index = lang.charCodeAt(
|
|
14723
|
+
for (var _i18 = 0; _i18 <= lang.length - 1; _i18++) {
|
|
14724
|
+
var index = lang.charCodeAt(_i18) - 96;
|
|
14649
14725
|
array = array[index];
|
|
14650
14726
|
if (!array) {
|
|
14651
14727
|
return false;
|
|
@@ -14717,9 +14793,9 @@
|
|
|
14717
14793
|
nodeTypeToName[nodeNamesToTypes[nodeName2]] = nodeName2;
|
|
14718
14794
|
});
|
|
14719
14795
|
function normaliseProps(serialNode) {
|
|
14720
|
-
var _serialNode$nodeName,
|
|
14796
|
+
var _serialNode$nodeName, _ref62, _serialNode$nodeType;
|
|
14721
14797
|
var nodeName2 = (_serialNode$nodeName = serialNode.nodeName) !== null && _serialNode$nodeName !== void 0 ? _serialNode$nodeName : nodeTypeToName[serialNode.nodeType];
|
|
14722
|
-
var nodeType = (
|
|
14798
|
+
var nodeType = (_ref62 = (_serialNode$nodeType = serialNode.nodeType) !== null && _serialNode$nodeType !== void 0 ? _serialNode$nodeType : nodeNamesToTypes[serialNode.nodeName]) !== null && _ref62 !== void 0 ? _ref62 : 1;
|
|
14723
14799
|
assert_default(typeof nodeType === 'number', 'nodeType has to be a number, got \''.concat(nodeType, '\''));
|
|
14724
14800
|
assert_default(typeof nodeName2 === 'string', 'nodeName has to be a string, got \''.concat(nodeName2, '\''));
|
|
14725
14801
|
nodeName2 = nodeName2.toLowerCase();
|
|
@@ -14740,8 +14816,8 @@
|
|
|
14740
14816
|
delete props.attributes;
|
|
14741
14817
|
return Object.freeze(props);
|
|
14742
14818
|
}
|
|
14743
|
-
function normaliseAttrs(
|
|
14744
|
-
var
|
|
14819
|
+
function normaliseAttrs(_ref63) {
|
|
14820
|
+
var _ref63$attributes = _ref63.attributes, attributes2 = _ref63$attributes === void 0 ? {} : _ref63$attributes;
|
|
14745
14821
|
var attrMap = {
|
|
14746
14822
|
htmlFor: 'for',
|
|
14747
14823
|
className: 'class'
|
|
@@ -15010,6 +15086,9 @@
|
|
|
15010
15086
|
isAriaRoleAllowedOnElement: function isAriaRoleAllowedOnElement() {
|
|
15011
15087
|
return is_aria_role_allowed_on_element_default;
|
|
15012
15088
|
},
|
|
15089
|
+
isComboboxPopup: function isComboboxPopup() {
|
|
15090
|
+
return _isComboboxPopup;
|
|
15091
|
+
},
|
|
15013
15092
|
isUnsupportedRole: function isUnsupportedRole() {
|
|
15014
15093
|
return is_unsupported_role_default;
|
|
15015
15094
|
},
|
|
@@ -15067,8 +15146,8 @@
|
|
|
15067
15146
|
idRefs[id] = idRefs[id] || [];
|
|
15068
15147
|
idRefs[id].push(node);
|
|
15069
15148
|
}
|
|
15070
|
-
for (var
|
|
15071
|
-
var attr = refAttrs[
|
|
15149
|
+
for (var _i19 = 0; _i19 < refAttrs.length; ++_i19) {
|
|
15150
|
+
var attr = refAttrs[_i19];
|
|
15072
15151
|
var attrValue = sanitize_default(node.getAttribute(attr) || '');
|
|
15073
15152
|
if (!attrValue) {
|
|
15074
15153
|
continue;
|
|
@@ -15080,9 +15159,9 @@
|
|
|
15080
15159
|
}
|
|
15081
15160
|
}
|
|
15082
15161
|
}
|
|
15083
|
-
for (var
|
|
15084
|
-
if (node.childNodes[
|
|
15085
|
-
cacheIdRefs(node.childNodes[
|
|
15162
|
+
for (var _i20 = 0; _i20 < node.childNodes.length; _i20++) {
|
|
15163
|
+
if (node.childNodes[_i20].nodeType === 1) {
|
|
15164
|
+
cacheIdRefs(node.childNodes[_i20], idRefs, refAttrs);
|
|
15086
15165
|
}
|
|
15087
15166
|
}
|
|
15088
15167
|
}
|
|
@@ -16929,8 +17008,8 @@
|
|
|
16929
17008
|
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' ]
|
|
16930
17009
|
} ];
|
|
16931
17010
|
lookupTable.evaluateRoleForElement = {
|
|
16932
|
-
A: function A(
|
|
16933
|
-
var node =
|
|
17011
|
+
A: function A(_ref64) {
|
|
17012
|
+
var node = _ref64.node, out = _ref64.out;
|
|
16934
17013
|
if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
|
|
16935
17014
|
return true;
|
|
16936
17015
|
}
|
|
@@ -16939,19 +17018,19 @@
|
|
|
16939
17018
|
}
|
|
16940
17019
|
return true;
|
|
16941
17020
|
},
|
|
16942
|
-
AREA: function AREA(
|
|
16943
|
-
var node =
|
|
17021
|
+
AREA: function AREA(_ref65) {
|
|
17022
|
+
var node = _ref65.node;
|
|
16944
17023
|
return !node.href;
|
|
16945
17024
|
},
|
|
16946
|
-
BUTTON: function BUTTON(
|
|
16947
|
-
var node =
|
|
17025
|
+
BUTTON: function BUTTON(_ref66) {
|
|
17026
|
+
var node = _ref66.node, role = _ref66.role, out = _ref66.out;
|
|
16948
17027
|
if (node.getAttribute('type') === 'menu') {
|
|
16949
17028
|
return role === 'menuitem';
|
|
16950
17029
|
}
|
|
16951
17030
|
return out;
|
|
16952
17031
|
},
|
|
16953
|
-
IMG: function IMG(
|
|
16954
|
-
var node =
|
|
17032
|
+
IMG: function IMG(_ref67) {
|
|
17033
|
+
var node = _ref67.node, role = _ref67.role, out = _ref67.out;
|
|
16955
17034
|
switch (node.alt) {
|
|
16956
17035
|
case null:
|
|
16957
17036
|
return out;
|
|
@@ -16963,8 +17042,8 @@
|
|
|
16963
17042
|
return role !== 'presentation' && role !== 'none';
|
|
16964
17043
|
}
|
|
16965
17044
|
},
|
|
16966
|
-
INPUT: function INPUT(
|
|
16967
|
-
var node =
|
|
17045
|
+
INPUT: function INPUT(_ref68) {
|
|
17046
|
+
var node = _ref68.node, role = _ref68.role, out = _ref68.out;
|
|
16968
17047
|
switch (node.type) {
|
|
16969
17048
|
case 'button':
|
|
16970
17049
|
case 'image':
|
|
@@ -16994,32 +17073,32 @@
|
|
|
16994
17073
|
return false;
|
|
16995
17074
|
}
|
|
16996
17075
|
},
|
|
16997
|
-
LI: function LI(
|
|
16998
|
-
var node =
|
|
17076
|
+
LI: function LI(_ref69) {
|
|
17077
|
+
var node = _ref69.node, out = _ref69.out;
|
|
16999
17078
|
var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
|
|
17000
17079
|
if (hasImplicitListitemRole) {
|
|
17001
17080
|
return out;
|
|
17002
17081
|
}
|
|
17003
17082
|
return true;
|
|
17004
17083
|
},
|
|
17005
|
-
MENU: function MENU(
|
|
17006
|
-
var node =
|
|
17084
|
+
MENU: function MENU(_ref70) {
|
|
17085
|
+
var node = _ref70.node;
|
|
17007
17086
|
if (node.getAttribute('type') === 'context') {
|
|
17008
17087
|
return false;
|
|
17009
17088
|
}
|
|
17010
17089
|
return true;
|
|
17011
17090
|
},
|
|
17012
|
-
OPTION: function OPTION(
|
|
17013
|
-
var node =
|
|
17091
|
+
OPTION: function OPTION(_ref71) {
|
|
17092
|
+
var node = _ref71.node;
|
|
17014
17093
|
var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
|
|
17015
17094
|
return !withinOptionList;
|
|
17016
17095
|
},
|
|
17017
|
-
SELECT: function SELECT(
|
|
17018
|
-
var node =
|
|
17096
|
+
SELECT: function SELECT(_ref72) {
|
|
17097
|
+
var node = _ref72.node, role = _ref72.role;
|
|
17019
17098
|
return !node.multiple && node.size <= 1 && role === 'menu';
|
|
17020
17099
|
},
|
|
17021
|
-
SVG: function SVG(
|
|
17022
|
-
var node =
|
|
17100
|
+
SVG: function SVG(_ref73) {
|
|
17101
|
+
var node = _ref73.node, out = _ref73.out;
|
|
17023
17102
|
if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
|
|
17024
17103
|
return true;
|
|
17025
17104
|
}
|
|
@@ -17043,6 +17122,42 @@
|
|
|
17043
17122
|
return !!get_accessible_refs_default(node).length;
|
|
17044
17123
|
}
|
|
17045
17124
|
var is_accessible_ref_default = isAccessibleRef;
|
|
17125
|
+
function _isComboboxPopup(virtualNode) {
|
|
17126
|
+
var _popupRoles;
|
|
17127
|
+
var _ref74 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, popupRoles = _ref74.popupRoles;
|
|
17128
|
+
var role = get_role_default(virtualNode);
|
|
17129
|
+
(_popupRoles = popupRoles) !== null && _popupRoles !== void 0 ? _popupRoles : popupRoles = aria_attrs_default['aria-haspopup'].values;
|
|
17130
|
+
if (!popupRoles.includes(role)) {
|
|
17131
|
+
return false;
|
|
17132
|
+
}
|
|
17133
|
+
var vParent = nearestParentWithRole(virtualNode);
|
|
17134
|
+
if (isCombobox(vParent)) {
|
|
17135
|
+
return true;
|
|
17136
|
+
}
|
|
17137
|
+
var id = virtualNode.props.id;
|
|
17138
|
+
if (!id) {
|
|
17139
|
+
return false;
|
|
17140
|
+
}
|
|
17141
|
+
if (!virtualNode.actualNode) {
|
|
17142
|
+
throw new Error('Unable to determine combobox popup without an actualNode');
|
|
17143
|
+
}
|
|
17144
|
+
var root = get_root_node_default(virtualNode.actualNode);
|
|
17145
|
+
var ownedCombobox = root.querySelectorAll('[aria-owns~="'.concat(id, '"][role~="combobox"]:not(select),\n [aria-controls~="').concat(id, '"][role~="combobox"]:not(select)'));
|
|
17146
|
+
return Array.from(ownedCombobox).some(isCombobox);
|
|
17147
|
+
}
|
|
17148
|
+
var isCombobox = function isCombobox(node) {
|
|
17149
|
+
return node && get_role_default(node) === 'combobox';
|
|
17150
|
+
};
|
|
17151
|
+
function nearestParentWithRole(vNode) {
|
|
17152
|
+
while (vNode = vNode.parent) {
|
|
17153
|
+
if (get_role_default(vNode, {
|
|
17154
|
+
noPresentational: true
|
|
17155
|
+
}) !== null) {
|
|
17156
|
+
return vNode;
|
|
17157
|
+
}
|
|
17158
|
+
}
|
|
17159
|
+
return null;
|
|
17160
|
+
}
|
|
17046
17161
|
function label2(node) {
|
|
17047
17162
|
node = get_node_from_tree_default(node);
|
|
17048
17163
|
return label_virtual_default(node);
|
|
@@ -17169,9 +17284,9 @@
|
|
|
17169
17284
|
preChecks[attr] = validateRowAttrs;
|
|
17170
17285
|
});
|
|
17171
17286
|
if (allowed) {
|
|
17172
|
-
for (var
|
|
17287
|
+
for (var _i21 = 0; _i21 < attrs.length; _i21++) {
|
|
17173
17288
|
var _preChecks$attrName;
|
|
17174
|
-
var attrName = attrs[
|
|
17289
|
+
var attrName = attrs[_i21];
|
|
17175
17290
|
if (validate_attr_default(attrName) && (_preChecks$attrName = preChecks[attrName]) !== null && _preChecks$attrName !== void 0 && _preChecks$attrName.call(preChecks)) {
|
|
17176
17291
|
invalid.push(attrName + '="' + virtualNode.attr(attrName) + '"');
|
|
17177
17292
|
} else if (validate_attr_default(attrName) && !allowed.includes(attrName)) {
|
|
@@ -17370,8 +17485,8 @@
|
|
|
17370
17485
|
function getOwnedRoles(virtualNode, required) {
|
|
17371
17486
|
var ownedRoles = [];
|
|
17372
17487
|
var ownedElements = get_owned_virtual_default(virtualNode);
|
|
17373
|
-
var _loop5 = function _loop5(
|
|
17374
|
-
var ownedElement = ownedElements[
|
|
17488
|
+
var _loop5 = function _loop5(_i22) {
|
|
17489
|
+
var ownedElement = ownedElements[_i22];
|
|
17375
17490
|
var role = get_role_default(ownedElement, {
|
|
17376
17491
|
noPresentational: true
|
|
17377
17492
|
});
|
|
@@ -17390,14 +17505,14 @@
|
|
|
17390
17505
|
});
|
|
17391
17506
|
}
|
|
17392
17507
|
};
|
|
17393
|
-
for (var
|
|
17394
|
-
_loop5(
|
|
17508
|
+
for (var _i22 = 0; _i22 < ownedElements.length; _i22++) {
|
|
17509
|
+
_loop5(_i22);
|
|
17395
17510
|
}
|
|
17396
17511
|
return ownedRoles;
|
|
17397
17512
|
}
|
|
17398
17513
|
function missingRequiredChildren(virtualNode, role, required, ownedRoles) {
|
|
17399
|
-
var _loop6 = function _loop6(
|
|
17400
|
-
var role2 = ownedRoles[
|
|
17514
|
+
var _loop6 = function _loop6(_i23) {
|
|
17515
|
+
var role2 = ownedRoles[_i23].role;
|
|
17401
17516
|
if (required.includes(role2)) {
|
|
17402
17517
|
required = required.filter(function(requiredRole) {
|
|
17403
17518
|
return requiredRole !== role2;
|
|
@@ -17407,8 +17522,8 @@
|
|
|
17407
17522
|
};
|
|
17408
17523
|
}
|
|
17409
17524
|
};
|
|
17410
|
-
for (var
|
|
17411
|
-
var _ret2 = _loop6(
|
|
17525
|
+
for (var _i23 = 0; _i23 < ownedRoles.length; _i23++) {
|
|
17526
|
+
var _ret2 = _loop6(_i23);
|
|
17412
17527
|
if (_typeof(_ret2) === 'object') {
|
|
17413
17528
|
return _ret2.v;
|
|
17414
17529
|
}
|
|
@@ -17428,13 +17543,13 @@
|
|
|
17428
17543
|
return true;
|
|
17429
17544
|
}
|
|
17430
17545
|
var ownedRoles = getOwnedRoles(virtualNode, required);
|
|
17431
|
-
var unallowed = ownedRoles.filter(function(
|
|
17432
|
-
var role2 =
|
|
17546
|
+
var unallowed = ownedRoles.filter(function(_ref75) {
|
|
17547
|
+
var role2 = _ref75.role;
|
|
17433
17548
|
return !required.includes(role2);
|
|
17434
17549
|
});
|
|
17435
17550
|
if (unallowed.length) {
|
|
17436
|
-
this.relatedNodes(unallowed.map(function(
|
|
17437
|
-
var ownedElement =
|
|
17551
|
+
this.relatedNodes(unallowed.map(function(_ref76) {
|
|
17552
|
+
var ownedElement = _ref76.ownedElement;
|
|
17438
17553
|
return ownedElement;
|
|
17439
17554
|
}));
|
|
17440
17555
|
this.data({
|
|
@@ -17508,8 +17623,8 @@
|
|
|
17508
17623
|
}
|
|
17509
17624
|
var owners = getAriaOwners(node);
|
|
17510
17625
|
if (owners) {
|
|
17511
|
-
for (var
|
|
17512
|
-
missingParents = getMissingContext(get_node_from_tree_default(owners[
|
|
17626
|
+
for (var _i24 = 0, l = owners.length; _i24 < l; _i24++) {
|
|
17627
|
+
missingParents = getMissingContext(get_node_from_tree_default(owners[_i24]), ownGroupRoles, missingParents, true);
|
|
17513
17628
|
if (!missingParents) {
|
|
17514
17629
|
return true;
|
|
17515
17630
|
}
|
|
@@ -18036,7 +18151,7 @@
|
|
|
18036
18151
|
return true;
|
|
18037
18152
|
}
|
|
18038
18153
|
function getTextShadowColors(node) {
|
|
18039
|
-
var
|
|
18154
|
+
var _ref77 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref77.minRatio, maxRatio = _ref77.maxRatio;
|
|
18040
18155
|
var style = window.getComputedStyle(node);
|
|
18041
18156
|
var textShadow = style.getPropertyValue('text-shadow');
|
|
18042
18157
|
if (textShadow === 'none') {
|
|
@@ -18047,8 +18162,8 @@
|
|
|
18047
18162
|
assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
|
|
18048
18163
|
var shadowColors = [];
|
|
18049
18164
|
var shadows = parseTextShadows(textShadow);
|
|
18050
|
-
shadows.forEach(function(
|
|
18051
|
-
var colorStr =
|
|
18165
|
+
shadows.forEach(function(_ref78) {
|
|
18166
|
+
var colorStr = _ref78.colorStr, pixels = _ref78.pixels;
|
|
18052
18167
|
colorStr = colorStr || style.getPropertyValue('color');
|
|
18053
18168
|
var _pixels = _slicedToArray(pixels, 3), offsetY = _pixels[0], offsetX = _pixels[1], _pixels$ = _pixels[2], blurRadius = _pixels$ === void 0 ? 0 : _pixels$;
|
|
18054
18169
|
if ((!minRatio || blurRadius >= fontSize * minRatio) && (!maxRatio || blurRadius < fontSize * maxRatio)) {
|
|
@@ -18098,8 +18213,8 @@
|
|
|
18098
18213
|
}
|
|
18099
18214
|
return shadows;
|
|
18100
18215
|
}
|
|
18101
|
-
function textShadowColor(
|
|
18102
|
-
var colorStr =
|
|
18216
|
+
function textShadowColor(_ref79) {
|
|
18217
|
+
var colorStr = _ref79.colorStr, offsetX = _ref79.offsetX, offsetY = _ref79.offsetY, blurRadius = _ref79.blurRadius, fontSize = _ref79.fontSize;
|
|
18103
18218
|
if (offsetX > blurRadius || offsetY > blurRadius) {
|
|
18104
18219
|
return new color_default(0, 0, 0, 0);
|
|
18105
18220
|
}
|
|
@@ -18276,8 +18391,8 @@
|
|
|
18276
18391
|
function getTextColor(nodeStyle) {
|
|
18277
18392
|
return new color_default().parseString(nodeStyle.getPropertyValue('-webkit-text-fill-color') || nodeStyle.getPropertyValue('color'));
|
|
18278
18393
|
}
|
|
18279
|
-
function getStrokeColor(nodeStyle,
|
|
18280
|
-
var
|
|
18394
|
+
function getStrokeColor(nodeStyle, _ref80) {
|
|
18395
|
+
var _ref80$textStrokeEmMi = _ref80.textStrokeEmMin, textStrokeEmMin = _ref80$textStrokeEmMi === void 0 ? 0 : _ref80$textStrokeEmMi;
|
|
18281
18396
|
var strokeWidth = parseFloat(nodeStyle.getPropertyValue('-webkit-text-stroke-width'));
|
|
18282
18397
|
if (strokeWidth === 0) {
|
|
18283
18398
|
return null;
|
|
@@ -18339,7 +18454,7 @@
|
|
|
18339
18454
|
var bold = parseFloat(fontWeight) >= boldValue || fontWeight === 'bold';
|
|
18340
18455
|
var ptSize = Math.ceil(fontSize * 72) / 96;
|
|
18341
18456
|
var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
|
|
18342
|
-
var
|
|
18457
|
+
var _ref81 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref81.expected, minThreshold = _ref81.minThreshold, maxThreshold = _ref81.maxThreshold;
|
|
18343
18458
|
var pseudoElm = findPseudoElement(virtualNode, {
|
|
18344
18459
|
ignorePseudo: ignorePseudo,
|
|
18345
18460
|
pseudoSizeThreshold: pseudoSizeThreshold
|
|
@@ -18418,8 +18533,8 @@
|
|
|
18418
18533
|
}
|
|
18419
18534
|
return isValid;
|
|
18420
18535
|
}
|
|
18421
|
-
function findPseudoElement(vNode,
|
|
18422
|
-
var
|
|
18536
|
+
function findPseudoElement(vNode, _ref82) {
|
|
18537
|
+
var _ref82$pseudoSizeThre = _ref82.pseudoSizeThreshold, pseudoSizeThreshold = _ref82$pseudoSizeThre === void 0 ? .25 : _ref82$pseudoSizeThre, _ref82$ignorePseudo = _ref82.ignorePseudo, ignorePseudo = _ref82$ignorePseudo === void 0 ? false : _ref82$ignorePseudo;
|
|
18423
18538
|
if (ignorePseudo) {
|
|
18424
18539
|
return;
|
|
18425
18540
|
}
|
|
@@ -18461,7 +18576,7 @@
|
|
|
18461
18576
|
}
|
|
18462
18577
|
function parseUnit(str) {
|
|
18463
18578
|
var unitRegex = /^([0-9.]+)([a-z]+)$/i;
|
|
18464
|
-
var
|
|
18579
|
+
var _ref83 = str.match(unitRegex) || [], _ref84 = _slicedToArray(_ref83, 3), _ref84$ = _ref84[1], value = _ref84$ === void 0 ? '' : _ref84$, _ref84$2 = _ref84[2], unit = _ref84$2 === void 0 ? '' : _ref84$2;
|
|
18465
18580
|
return {
|
|
18466
18581
|
value: parseFloat(value),
|
|
18467
18582
|
unit: unit.toLowerCase()
|
|
@@ -18805,8 +18920,8 @@
|
|
|
18805
18920
|
}
|
|
18806
18921
|
var focusable_element_evaluate_default = focusableElementEvaluate;
|
|
18807
18922
|
function focusableModalOpenEvaluate(node, options, virtualNode) {
|
|
18808
|
-
var tabbableElements = virtualNode.tabbableElements.map(function(
|
|
18809
|
-
var actualNode =
|
|
18923
|
+
var tabbableElements = virtualNode.tabbableElements.map(function(_ref85) {
|
|
18924
|
+
var actualNode = _ref85.actualNode;
|
|
18810
18925
|
return actualNode;
|
|
18811
18926
|
});
|
|
18812
18927
|
if (!tabbableElements || !tabbableElements.length) {
|
|
@@ -19287,8 +19402,8 @@
|
|
|
19287
19402
|
this.relatedNodes(relatedNodes);
|
|
19288
19403
|
return true;
|
|
19289
19404
|
}
|
|
19290
|
-
function getInvalidSelector(vChild, nested,
|
|
19291
|
-
var
|
|
19405
|
+
function getInvalidSelector(vChild, nested, _ref86) {
|
|
19406
|
+
var _ref86$validRoles = _ref86.validRoles, validRoles = _ref86$validRoles === void 0 ? [] : _ref86$validRoles, _ref86$validNodeNames = _ref86.validNodeNames, validNodeNames = _ref86$validNodeNames === void 0 ? [] : _ref86$validNodeNames;
|
|
19292
19407
|
var _vChild$props = vChild.props, nodeName2 = _vChild$props.nodeName, nodeType = _vChild$props.nodeType, nodeValue = _vChild$props.nodeValue;
|
|
19293
19408
|
var selector = nested ? 'div > ' : '';
|
|
19294
19409
|
if (nodeType === 3 && nodeValue.trim() !== '') {
|
|
@@ -19521,8 +19636,8 @@
|
|
|
19521
19636
|
}
|
|
19522
19637
|
var no_autoplay_audio_evaluate_default = noAutoplayAudioEvaluate;
|
|
19523
19638
|
function cssOrientationLockEvaluate(node, options, virtualNode, context) {
|
|
19524
|
-
var
|
|
19525
|
-
var
|
|
19639
|
+
var _ref87 = context || {}, _ref87$cssom = _ref87.cssom, cssom = _ref87$cssom === void 0 ? void 0 : _ref87$cssom;
|
|
19640
|
+
var _ref88 = options || {}, _ref88$degreeThreshol = _ref88.degreeThreshold, degreeThreshold = _ref88$degreeThreshol === void 0 ? 0 : _ref88$degreeThreshol;
|
|
19526
19641
|
if (!cssom || !cssom.length) {
|
|
19527
19642
|
return void 0;
|
|
19528
19643
|
}
|
|
@@ -19530,14 +19645,14 @@
|
|
|
19530
19645
|
var relatedElements = [];
|
|
19531
19646
|
var rulesGroupByDocumentFragment = groupCssomByDocument(cssom);
|
|
19532
19647
|
var _loop7 = function _loop7() {
|
|
19533
|
-
var key = _Object$keys2[
|
|
19648
|
+
var key = _Object$keys2[_i25];
|
|
19534
19649
|
var _rulesGroupByDocument = rulesGroupByDocumentFragment[key], root = _rulesGroupByDocument.root, rules = _rulesGroupByDocument.rules;
|
|
19535
19650
|
var orientationRules = rules.filter(isMediaRuleWithOrientation);
|
|
19536
19651
|
if (!orientationRules.length) {
|
|
19537
19652
|
return 'continue';
|
|
19538
19653
|
}
|
|
19539
|
-
orientationRules.forEach(function(
|
|
19540
|
-
var cssRules =
|
|
19654
|
+
orientationRules.forEach(function(_ref89) {
|
|
19655
|
+
var cssRules = _ref89.cssRules;
|
|
19541
19656
|
Array.from(cssRules).forEach(function(cssRule) {
|
|
19542
19657
|
var locked = getIsOrientationLocked(cssRule);
|
|
19543
19658
|
if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
|
|
@@ -19548,7 +19663,7 @@
|
|
|
19548
19663
|
});
|
|
19549
19664
|
});
|
|
19550
19665
|
};
|
|
19551
|
-
for (var
|
|
19666
|
+
for (var _i25 = 0, _Object$keys2 = Object.keys(rulesGroupByDocumentFragment); _i25 < _Object$keys2.length; _i25++) {
|
|
19552
19667
|
var _ret3 = _loop7();
|
|
19553
19668
|
if (_ret3 === 'continue') {
|
|
19554
19669
|
continue;
|
|
@@ -19562,8 +19677,8 @@
|
|
|
19562
19677
|
}
|
|
19563
19678
|
return false;
|
|
19564
19679
|
function groupCssomByDocument(cssObjectModel) {
|
|
19565
|
-
return cssObjectModel.reduce(function(out,
|
|
19566
|
-
var sheet =
|
|
19680
|
+
return cssObjectModel.reduce(function(out, _ref90) {
|
|
19681
|
+
var sheet = _ref90.sheet, root = _ref90.root, shadowId = _ref90.shadowId;
|
|
19567
19682
|
var key = shadowId ? shadowId : 'topDocument';
|
|
19568
19683
|
if (!out[key]) {
|
|
19569
19684
|
out[key] = {
|
|
@@ -19579,15 +19694,15 @@
|
|
|
19579
19694
|
return out;
|
|
19580
19695
|
}, {});
|
|
19581
19696
|
}
|
|
19582
|
-
function isMediaRuleWithOrientation(
|
|
19583
|
-
var type =
|
|
19697
|
+
function isMediaRuleWithOrientation(_ref91) {
|
|
19698
|
+
var type = _ref91.type, cssText = _ref91.cssText;
|
|
19584
19699
|
if (type !== 4) {
|
|
19585
19700
|
return false;
|
|
19586
19701
|
}
|
|
19587
19702
|
return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
|
|
19588
19703
|
}
|
|
19589
|
-
function getIsOrientationLocked(
|
|
19590
|
-
var selectorText =
|
|
19704
|
+
function getIsOrientationLocked(_ref92) {
|
|
19705
|
+
var selectorText = _ref92.selectorText, style = _ref92.style;
|
|
19591
19706
|
if (!selectorText || style.length <= 0) {
|
|
19592
19707
|
return false;
|
|
19593
19708
|
}
|
|
@@ -19634,7 +19749,7 @@
|
|
|
19634
19749
|
}
|
|
19635
19750
|
}
|
|
19636
19751
|
function getAngleInDegrees(angleWithUnit) {
|
|
19637
|
-
var
|
|
19752
|
+
var _ref93 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref94 = _slicedToArray(_ref93, 1), unit = _ref94[0];
|
|
19638
19753
|
if (!unit) {
|
|
19639
19754
|
return;
|
|
19640
19755
|
}
|
|
@@ -19683,7 +19798,7 @@
|
|
|
19683
19798
|
}
|
|
19684
19799
|
var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
|
|
19685
19800
|
function metaViewportScaleEvaluate(node, options, virtualNode) {
|
|
19686
|
-
var
|
|
19801
|
+
var _ref95 = options || {}, _ref95$scaleMinimum = _ref95.scaleMinimum, scaleMinimum = _ref95$scaleMinimum === void 0 ? 2 : _ref95$scaleMinimum, _ref95$lowerBound = _ref95.lowerBound, lowerBound = _ref95$lowerBound === void 0 ? false : _ref95$lowerBound;
|
|
19687
19802
|
var content = virtualNode.attr('content') || '';
|
|
19688
19803
|
if (!content) {
|
|
19689
19804
|
return true;
|
|
@@ -19758,8 +19873,8 @@
|
|
|
19758
19873
|
});
|
|
19759
19874
|
return true;
|
|
19760
19875
|
}
|
|
19761
|
-
this.relatedNodes(closeNeighbors.map(function(
|
|
19762
|
-
var actualNode =
|
|
19876
|
+
this.relatedNodes(closeNeighbors.map(function(_ref96) {
|
|
19877
|
+
var actualNode = _ref96.actualNode;
|
|
19763
19878
|
return actualNode;
|
|
19764
19879
|
}));
|
|
19765
19880
|
if (!closeNeighbors.some(_isInTabOrder)) {
|
|
@@ -19864,8 +19979,8 @@
|
|
|
19864
19979
|
if (obscuredNodes.length === 0) {
|
|
19865
19980
|
return null;
|
|
19866
19981
|
}
|
|
19867
|
-
var obscuringRects = obscuredNodes.map(function(
|
|
19868
|
-
var rect =
|
|
19982
|
+
var obscuringRects = obscuredNodes.map(function(_ref97) {
|
|
19983
|
+
var rect = _ref97.boundingClientRect;
|
|
19869
19984
|
return rect;
|
|
19870
19985
|
});
|
|
19871
19986
|
var unobscuredRects = _splitRects(nodeRect, obscuringRects);
|
|
@@ -19905,13 +20020,13 @@
|
|
|
19905
20020
|
function isDescendantNotInTabOrder(vAncestor, vNode) {
|
|
19906
20021
|
return vAncestor.actualNode.contains(vNode.actualNode) && !_isInTabOrder(vNode);
|
|
19907
20022
|
}
|
|
19908
|
-
function rectHasMinimumSize(minSize,
|
|
19909
|
-
var width =
|
|
20023
|
+
function rectHasMinimumSize(minSize, _ref98) {
|
|
20024
|
+
var width = _ref98.width, height = _ref98.height;
|
|
19910
20025
|
return width + roundingMargin2 >= minSize && height + roundingMargin2 >= minSize;
|
|
19911
20026
|
}
|
|
19912
20027
|
function mapActualNodes(vNodes) {
|
|
19913
|
-
return vNodes.map(function(
|
|
19914
|
-
var actualNode =
|
|
20028
|
+
return vNodes.map(function(_ref99) {
|
|
20029
|
+
var actualNode = _ref99.actualNode;
|
|
19915
20030
|
return actualNode;
|
|
19916
20031
|
});
|
|
19917
20032
|
}
|
|
@@ -19937,14 +20052,14 @@
|
|
|
19937
20052
|
}
|
|
19938
20053
|
function getHeadingOrder(results) {
|
|
19939
20054
|
results = _toConsumableArray(results);
|
|
19940
|
-
results.sort(function(
|
|
19941
|
-
var nodeA =
|
|
19942
|
-
var nodeB =
|
|
20055
|
+
results.sort(function(_ref100, _ref101) {
|
|
20056
|
+
var nodeA = _ref100.node;
|
|
20057
|
+
var nodeB = _ref101.node;
|
|
19943
20058
|
return nodeA.ancestry.length - nodeB.ancestry.length;
|
|
19944
20059
|
});
|
|
19945
20060
|
var headingOrder = results.reduce(mergeHeadingOrder, []);
|
|
19946
|
-
return headingOrder.filter(function(
|
|
19947
|
-
var level =
|
|
20061
|
+
return headingOrder.filter(function(_ref102) {
|
|
20062
|
+
var level = _ref102.level;
|
|
19948
20063
|
return level !== -1;
|
|
19949
20064
|
});
|
|
19950
20065
|
}
|
|
@@ -19995,7 +20110,7 @@
|
|
|
19995
20110
|
var headingRole = role && role.includes('heading');
|
|
19996
20111
|
var ariaHeadingLevel = vNode.attr('aria-level');
|
|
19997
20112
|
var ariaLevel = parseInt(ariaHeadingLevel, 10);
|
|
19998
|
-
var
|
|
20113
|
+
var _ref103 = vNode.props.nodeName.match(/h(\d)/) || [], _ref104 = _slicedToArray(_ref103, 2), headingLevel = _ref104[1];
|
|
19999
20114
|
if (!headingRole) {
|
|
20000
20115
|
return -1;
|
|
20001
20116
|
}
|
|
@@ -20059,8 +20174,8 @@
|
|
|
20059
20174
|
if (results.length < 2) {
|
|
20060
20175
|
return results;
|
|
20061
20176
|
}
|
|
20062
|
-
var incompleteResults = results.filter(function(
|
|
20063
|
-
var result =
|
|
20177
|
+
var incompleteResults = results.filter(function(_ref105) {
|
|
20178
|
+
var result = _ref105.result;
|
|
20064
20179
|
return result !== void 0;
|
|
20065
20180
|
});
|
|
20066
20181
|
var uniqueResults = [];
|
|
@@ -20072,12 +20187,12 @@
|
|
|
20072
20187
|
if (nameMap[name]) {
|
|
20073
20188
|
return 'continue';
|
|
20074
20189
|
}
|
|
20075
|
-
var sameNameResults = incompleteResults.filter(function(
|
|
20076
|
-
var data2 =
|
|
20190
|
+
var sameNameResults = incompleteResults.filter(function(_ref106, resultNum) {
|
|
20191
|
+
var data2 = _ref106.data;
|
|
20077
20192
|
return data2.name === name && resultNum !== index;
|
|
20078
20193
|
});
|
|
20079
|
-
var isSameUrl = sameNameResults.every(function(
|
|
20080
|
-
var data2 =
|
|
20194
|
+
var isSameUrl = sameNameResults.every(function(_ref107) {
|
|
20195
|
+
var data2 = _ref107.data;
|
|
20081
20196
|
return isIdenticalObject(data2.urlProps, urlProps);
|
|
20082
20197
|
});
|
|
20083
20198
|
if (sameNameResults.length && !isSameUrl) {
|
|
@@ -20496,7 +20611,7 @@
|
|
|
20496
20611
|
var separatorRegex = /[;,\s]/;
|
|
20497
20612
|
var validRedirectNumRegex = /^[0-9.]+$/;
|
|
20498
20613
|
function metaRefreshEvaluate(node, options, virtualNode) {
|
|
20499
|
-
var
|
|
20614
|
+
var _ref108 = options || {}, minDelay = _ref108.minDelay, maxDelay = _ref108.maxDelay;
|
|
20500
20615
|
var content = (virtualNode.attr('content') || '').trim();
|
|
20501
20616
|
var _content$split = content.split(separatorRegex), _content$split2 = _slicedToArray(_content$split, 1), redirectStr = _content$split2[0];
|
|
20502
20617
|
if (!redirectStr.match(validRedirectNumRegex)) {
|
|
@@ -20536,16 +20651,16 @@
|
|
|
20536
20651
|
var outerText = elm.textContent.trim();
|
|
20537
20652
|
var innerText = outerText;
|
|
20538
20653
|
while (innerText === outerText && nextNode !== void 0) {
|
|
20539
|
-
var
|
|
20654
|
+
var _i26 = -1;
|
|
20540
20655
|
elm = nextNode;
|
|
20541
20656
|
if (elm.children.length === 0) {
|
|
20542
20657
|
return elm;
|
|
20543
20658
|
}
|
|
20544
20659
|
do {
|
|
20545
|
-
|
|
20546
|
-
innerText = elm.children[
|
|
20547
|
-
} while (innerText === '' &&
|
|
20548
|
-
nextNode = elm.children[
|
|
20660
|
+
_i26++;
|
|
20661
|
+
innerText = elm.children[_i26].textContent.trim();
|
|
20662
|
+
} while (innerText === '' && _i26 + 1 < elm.children.length);
|
|
20663
|
+
nextNode = elm.children[_i26];
|
|
20549
20664
|
}
|
|
20550
20665
|
return elm;
|
|
20551
20666
|
}
|
|
@@ -20668,8 +20783,8 @@
|
|
|
20668
20783
|
} else if (node !== document.body && has_content_default(node, true)) {
|
|
20669
20784
|
return [ virtualNode ];
|
|
20670
20785
|
} else {
|
|
20671
|
-
return virtualNode.children.filter(function(
|
|
20672
|
-
var actualNode =
|
|
20786
|
+
return virtualNode.children.filter(function(_ref109) {
|
|
20787
|
+
var actualNode = _ref109.actualNode;
|
|
20673
20788
|
return actualNode.nodeType === 1;
|
|
20674
20789
|
}).map(function(vNode) {
|
|
20675
20790
|
return findRegionlessElms(vNode, options);
|
|
@@ -20822,8 +20937,8 @@
|
|
|
20822
20937
|
}
|
|
20823
20938
|
return false;
|
|
20824
20939
|
}
|
|
20825
|
-
function getNumberValue(domNode,
|
|
20826
|
-
var cssProperty =
|
|
20940
|
+
function getNumberValue(domNode, _ref110) {
|
|
20941
|
+
var cssProperty = _ref110.cssProperty, absoluteValues = _ref110.absoluteValues, normalValue = _ref110.normalValue;
|
|
20827
20942
|
var computedStyle = window.getComputedStyle(domNode);
|
|
20828
20943
|
var cssPropValue = computedStyle.getPropertyValue(cssProperty);
|
|
20829
20944
|
if (cssPropValue === 'normal') {
|
|
@@ -20900,8 +21015,8 @@
|
|
|
20900
21015
|
if (!virtualNode.children) {
|
|
20901
21016
|
return void 0;
|
|
20902
21017
|
}
|
|
20903
|
-
var titleNode = virtualNode.children.find(function(
|
|
20904
|
-
var props =
|
|
21018
|
+
var titleNode = virtualNode.children.find(function(_ref111) {
|
|
21019
|
+
var props = _ref111.props;
|
|
20905
21020
|
return props.nodeName === 'title';
|
|
20906
21021
|
});
|
|
20907
21022
|
if (!titleNode) {
|
|
@@ -21103,8 +21218,8 @@
|
|
|
21103
21218
|
var aria = /^aria-/;
|
|
21104
21219
|
var attrs = virtualNode.attrNames;
|
|
21105
21220
|
if (attrs.length) {
|
|
21106
|
-
for (var
|
|
21107
|
-
if (aria.test(attrs[
|
|
21221
|
+
for (var _i27 = 0, l = attrs.length; _i27 < l; _i27++) {
|
|
21222
|
+
if (aria.test(attrs[_i27])) {
|
|
21108
21223
|
return true;
|
|
21109
21224
|
}
|
|
21110
21225
|
}
|
|
@@ -21205,7 +21320,7 @@
|
|
|
21205
21320
|
if (nodeName2 === 'input' && nonTextInput.includes(inputType)) {
|
|
21206
21321
|
return false;
|
|
21207
21322
|
}
|
|
21208
|
-
if (is_disabled_default(virtualNode)) {
|
|
21323
|
+
if (is_disabled_default(virtualNode) || _isInert(virtualNode)) {
|
|
21209
21324
|
return false;
|
|
21210
21325
|
}
|
|
21211
21326
|
var formElements = [ 'input', 'select', 'textarea' ];
|
|
@@ -21496,7 +21611,7 @@
|
|
|
21496
21611
|
if (!role || [ 'none', 'presentation' ].includes(role)) {
|
|
21497
21612
|
return true;
|
|
21498
21613
|
}
|
|
21499
|
-
var
|
|
21614
|
+
var _ref112 = aria_roles_default[role] || {}, accessibleNameRequired = _ref112.accessibleNameRequired;
|
|
21500
21615
|
if (accessibleNameRequired || _isFocusable(virtualNode)) {
|
|
21501
21616
|
return true;
|
|
21502
21617
|
}
|
|
@@ -21511,6 +21626,11 @@
|
|
|
21511
21626
|
if (get_explicit_role_default(virtualNode) === 'combobox' && query_selector_all_default(virtualNode, 'input:not([type="hidden"])').length) {
|
|
21512
21627
|
return false;
|
|
21513
21628
|
}
|
|
21629
|
+
if (_isComboboxPopup(virtualNode, {
|
|
21630
|
+
popupRoles: [ 'listbox' ]
|
|
21631
|
+
})) {
|
|
21632
|
+
return false;
|
|
21633
|
+
}
|
|
21514
21634
|
return true;
|
|
21515
21635
|
}
|
|
21516
21636
|
var no_naming_method_matches_default = noNamingMethodMatches;
|
|
@@ -21562,37 +21682,13 @@
|
|
|
21562
21682
|
}
|
|
21563
21683
|
var presentation_role_conflict_matches_default = presentationRoleConflictMatches;
|
|
21564
21684
|
function scrollableRegionFocusableMatches(node, virtualNode) {
|
|
21565
|
-
|
|
21566
|
-
|
|
21567
|
-
|
|
21568
|
-
|
|
21569
|
-
if (aria_attrs_default['aria-haspopup'].values.includes(role)) {
|
|
21570
|
-
if (closest_default(virtualNode, '[role~="combobox"]')) {
|
|
21571
|
-
return false;
|
|
21572
|
-
}
|
|
21573
|
-
var id = virtualNode.attr('id');
|
|
21574
|
-
if (id) {
|
|
21575
|
-
var doc = get_root_node_default(node);
|
|
21576
|
-
var owned = Array.from(doc.querySelectorAll('[aria-owns~="'.concat(id, '"], [aria-controls~="').concat(id, '"]')));
|
|
21577
|
-
var comboboxOwned = owned.some(function(el) {
|
|
21578
|
-
var roles = token_list_default(el.getAttribute('role'));
|
|
21579
|
-
return roles.includes('combobox');
|
|
21580
|
-
});
|
|
21581
|
-
if (comboboxOwned) {
|
|
21582
|
-
return false;
|
|
21583
|
-
}
|
|
21584
|
-
}
|
|
21585
|
-
}
|
|
21586
|
-
var nodeAndDescendents = query_selector_all_default(virtualNode, '*');
|
|
21587
|
-
var hasVisibleChildren = nodeAndDescendents.some(function(elm) {
|
|
21685
|
+
return _getScroll(node, 13) !== void 0 && _isComboboxPopup(virtualNode) === false && isNoneEmptyElement(virtualNode);
|
|
21686
|
+
}
|
|
21687
|
+
function isNoneEmptyElement(vNode) {
|
|
21688
|
+
return query_selector_all_default(vNode, '*').some(function(elm) {
|
|
21588
21689
|
return has_content_virtual_default(elm, true, true);
|
|
21589
21690
|
});
|
|
21590
|
-
if (!hasVisibleChildren) {
|
|
21591
|
-
return false;
|
|
21592
|
-
}
|
|
21593
|
-
return true;
|
|
21594
21691
|
}
|
|
21595
|
-
var scrollable_region_focusable_matches_default = scrollableRegionFocusableMatches;
|
|
21596
21692
|
function skipLinkMatches(node) {
|
|
21597
21693
|
return _isSkipLink(node) && is_offscreen_default(node);
|
|
21598
21694
|
}
|
|
@@ -21781,7 +21877,7 @@
|
|
|
21781
21877
|
'region-evaluate': regionEvaluate,
|
|
21782
21878
|
'same-caption-summary-evaluate': same_caption_summary_evaluate_default,
|
|
21783
21879
|
'scope-value-evaluate': scope_value_evaluate_default,
|
|
21784
|
-
'scrollable-region-focusable-matches':
|
|
21880
|
+
'scrollable-region-focusable-matches': scrollableRegionFocusableMatches,
|
|
21785
21881
|
'skip-link-evaluate': skip_link_evaluate_default,
|
|
21786
21882
|
'skip-link-matches': skip_link_matches_default,
|
|
21787
21883
|
'structured-dlitems-evaluate': structured_dlitems_evaluate_default,
|
|
@@ -22404,8 +22500,8 @@
|
|
|
22404
22500
|
lang: this.lang
|
|
22405
22501
|
};
|
|
22406
22502
|
var checkIDs = Object.keys(this.data.checks);
|
|
22407
|
-
for (var
|
|
22408
|
-
var id = checkIDs[
|
|
22503
|
+
for (var _i28 = 0; _i28 < checkIDs.length; _i28++) {
|
|
22504
|
+
var id = checkIDs[_i28];
|
|
22409
22505
|
var check = this.data.checks[id];
|
|
22410
22506
|
var _check$messages = check.messages, pass = _check$messages.pass, fail = _check$messages.fail, incomplete = _check$messages.incomplete;
|
|
22411
22507
|
locale.checks[id] = {
|
|
@@ -22415,8 +22511,8 @@
|
|
|
22415
22511
|
};
|
|
22416
22512
|
}
|
|
22417
22513
|
var ruleIDs = Object.keys(this.data.rules);
|
|
22418
|
-
for (var
|
|
22419
|
-
var _id = ruleIDs[
|
|
22514
|
+
for (var _i29 = 0; _i29 < ruleIDs.length; _i29++) {
|
|
22515
|
+
var _id = ruleIDs[_i29];
|
|
22420
22516
|
var rule = this.data.rules[_id];
|
|
22421
22517
|
var description = rule.description, help = rule.help;
|
|
22422
22518
|
locale.rules[_id] = {
|
|
@@ -22425,8 +22521,8 @@
|
|
|
22425
22521
|
};
|
|
22426
22522
|
}
|
|
22427
22523
|
var failureSummaries = Object.keys(this.data.failureSummaries);
|
|
22428
|
-
for (var
|
|
22429
|
-
var type = failureSummaries[
|
|
22524
|
+
for (var _i30 = 0; _i30 < failureSummaries.length; _i30++) {
|
|
22525
|
+
var type = failureSummaries[_i30];
|
|
22430
22526
|
var failureSummary2 = this.data.failureSummaries[type];
|
|
22431
22527
|
var failureMessage = failureSummary2.failureMessage;
|
|
22432
22528
|
locale.failureSummaries[type] = {
|
|
@@ -22449,8 +22545,8 @@
|
|
|
22449
22545
|
key: '_applyCheckLocale',
|
|
22450
22546
|
value: function _applyCheckLocale(checks) {
|
|
22451
22547
|
var keys = Object.keys(checks);
|
|
22452
|
-
for (var
|
|
22453
|
-
var id = keys[
|
|
22548
|
+
for (var _i31 = 0; _i31 < keys.length; _i31++) {
|
|
22549
|
+
var id = keys[_i31];
|
|
22454
22550
|
if (!this.data.checks[id]) {
|
|
22455
22551
|
throw new Error('Locale provided for unknown check: "'.concat(id, '"'));
|
|
22456
22552
|
}
|
|
@@ -22461,8 +22557,8 @@
|
|
|
22461
22557
|
key: '_applyRuleLocale',
|
|
22462
22558
|
value: function _applyRuleLocale(rules) {
|
|
22463
22559
|
var keys = Object.keys(rules);
|
|
22464
|
-
for (var
|
|
22465
|
-
var id = keys[
|
|
22560
|
+
for (var _i32 = 0; _i32 < keys.length; _i32++) {
|
|
22561
|
+
var id = keys[_i32];
|
|
22466
22562
|
if (!this.data.rules[id]) {
|
|
22467
22563
|
throw new Error('Locale provided for unknown rule: "'.concat(id, '"'));
|
|
22468
22564
|
}
|
|
@@ -22473,8 +22569,8 @@
|
|
|
22473
22569
|
key: '_applyFailureSummaries',
|
|
22474
22570
|
value: function _applyFailureSummaries(messages) {
|
|
22475
22571
|
var keys = Object.keys(messages);
|
|
22476
|
-
for (var
|
|
22477
|
-
var key = keys[
|
|
22572
|
+
for (var _i33 = 0; _i33 < keys.length; _i33++) {
|
|
22573
|
+
var key = keys[_i33];
|
|
22478
22574
|
if (!this.data.failureSummaries[key]) {
|
|
22479
22575
|
throw new Error('Locale provided for unknown failureMessage: "'.concat(key, '"'));
|
|
22480
22576
|
}
|
|
@@ -22823,8 +22919,8 @@
|
|
|
22823
22919
|
});
|
|
22824
22920
|
};
|
|
22825
22921
|
}
|
|
22826
|
-
function getHelpUrl(
|
|
22827
|
-
var brand =
|
|
22922
|
+
function getHelpUrl(_ref113, ruleId, version) {
|
|
22923
|
+
var brand = _ref113.brand, application = _ref113.application, lang = _ref113.lang;
|
|
22828
22924
|
return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
|
|
22829
22925
|
}
|
|
22830
22926
|
var audit_default = Audit;
|
|
@@ -23040,9 +23136,9 @@
|
|
|
23040
23136
|
toolOptions: options
|
|
23041
23137
|
});
|
|
23042
23138
|
}
|
|
23043
|
-
function normalizeRunParams(
|
|
23044
|
-
var
|
|
23045
|
-
var
|
|
23139
|
+
function normalizeRunParams(_ref114) {
|
|
23140
|
+
var _ref116, _options$reporter, _axe$_audit;
|
|
23141
|
+
var _ref115 = _slicedToArray(_ref114, 3), context = _ref115[0], options = _ref115[1], callback = _ref115[2];
|
|
23046
23142
|
var typeErr = new TypeError('axe.run arguments are invalid');
|
|
23047
23143
|
if (!isContextSpec(context)) {
|
|
23048
23144
|
if (callback !== void 0) {
|
|
@@ -23063,7 +23159,7 @@
|
|
|
23063
23159
|
throw typeErr;
|
|
23064
23160
|
}
|
|
23065
23161
|
options = clone_default(options);
|
|
23066
|
-
options.reporter = (
|
|
23162
|
+
options.reporter = (_ref116 = (_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 && _ref116 !== void 0 ? _ref116 : 'v1';
|
|
23067
23163
|
return {
|
|
23068
23164
|
context: context,
|
|
23069
23165
|
options: options,
|
|
@@ -23168,14 +23264,14 @@
|
|
|
23168
23264
|
return new Promise(function(res, rej) {
|
|
23169
23265
|
axe._audit.run(contextObj, options, res, rej);
|
|
23170
23266
|
}).then(function(results) {
|
|
23171
|
-
results = results.map(function(
|
|
23172
|
-
var nodes =
|
|
23267
|
+
results = results.map(function(_ref117) {
|
|
23268
|
+
var nodes = _ref117.nodes, result = _objectWithoutProperties(_ref117, _excluded8);
|
|
23173
23269
|
return _extends({
|
|
23174
23270
|
nodes: nodes.map(serializeNode)
|
|
23175
23271
|
}, result);
|
|
23176
23272
|
});
|
|
23177
|
-
var frames = contextObj.frames.map(function(
|
|
23178
|
-
var node =
|
|
23273
|
+
var frames = contextObj.frames.map(function(_ref118) {
|
|
23274
|
+
var node = _ref118.node;
|
|
23179
23275
|
return new dq_element_default(node, options).toJSON();
|
|
23180
23276
|
});
|
|
23181
23277
|
var environmentData;
|
|
@@ -23195,13 +23291,13 @@
|
|
|
23195
23291
|
return Promise.reject(err2);
|
|
23196
23292
|
});
|
|
23197
23293
|
}
|
|
23198
|
-
function serializeNode(
|
|
23199
|
-
var node =
|
|
23294
|
+
function serializeNode(_ref119) {
|
|
23295
|
+
var node = _ref119.node, nodeResult = _objectWithoutProperties(_ref119, _excluded9);
|
|
23200
23296
|
nodeResult.node = node.toJSON();
|
|
23201
|
-
for (var
|
|
23202
|
-
var type = _arr2[
|
|
23203
|
-
nodeResult[type] = nodeResult[type].map(function(
|
|
23204
|
-
var relatedNodes =
|
|
23297
|
+
for (var _i34 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i34 < _arr2.length; _i34++) {
|
|
23298
|
+
var type = _arr2[_i34];
|
|
23299
|
+
nodeResult[type] = nodeResult[type].map(function(_ref120) {
|
|
23300
|
+
var relatedNodes = _ref120.relatedNodes, checkResult = _objectWithoutProperties(_ref120, _excluded10);
|
|
23205
23301
|
return _extends({}, checkResult, {
|
|
23206
23302
|
relatedNodes: relatedNodes.map(function(node2) {
|
|
23207
23303
|
return node2.toJSON();
|
|
@@ -23212,14 +23308,14 @@
|
|
|
23212
23308
|
return nodeResult;
|
|
23213
23309
|
}
|
|
23214
23310
|
function finishRun(partialResults) {
|
|
23215
|
-
var
|
|
23311
|
+
var _ref122, _options$reporter2, _axe$_audit2;
|
|
23216
23312
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
23217
23313
|
options = clone_default(options);
|
|
23218
|
-
var
|
|
23314
|
+
var _ref121 = partialResults.find(function(r) {
|
|
23219
23315
|
return r.environmentData;
|
|
23220
|
-
}) || {}, environmentData =
|
|
23316
|
+
}) || {}, environmentData = _ref121.environmentData;
|
|
23221
23317
|
axe._audit.normalizeOptions(options);
|
|
23222
|
-
options.reporter = (
|
|
23318
|
+
options.reporter = (_ref122 = (_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 && _ref122 !== void 0 ? _ref122 : 'v1';
|
|
23223
23319
|
setFrameSpec(partialResults);
|
|
23224
23320
|
var results = merge_results_default(partialResults);
|
|
23225
23321
|
results = axe._audit.after(results, options);
|
|
@@ -23249,8 +23345,8 @@
|
|
|
23249
23345
|
_iterator12.f();
|
|
23250
23346
|
}
|
|
23251
23347
|
}
|
|
23252
|
-
function getMergedFrameSpecs(
|
|
23253
|
-
var childFrameSpecs =
|
|
23348
|
+
function getMergedFrameSpecs(_ref123) {
|
|
23349
|
+
var childFrameSpecs = _ref123.frames, parentFrameSpec = _ref123.frameSpec;
|
|
23254
23350
|
if (!parentFrameSpec) {
|
|
23255
23351
|
return childFrameSpecs;
|
|
23256
23352
|
}
|
|
@@ -23310,12 +23406,12 @@
|
|
|
23310
23406
|
var transformedResults = results.map(function(result) {
|
|
23311
23407
|
var transformedResult = _extends({}, result);
|
|
23312
23408
|
var types = [ 'passes', 'violations', 'incomplete', 'inapplicable' ];
|
|
23313
|
-
for (var
|
|
23314
|
-
var type = _types[
|
|
23409
|
+
for (var _i35 = 0, _types = types; _i35 < _types.length; _i35++) {
|
|
23410
|
+
var type = _types[_i35];
|
|
23315
23411
|
if (transformedResult[type] && Array.isArray(transformedResult[type])) {
|
|
23316
|
-
transformedResult[type] = transformedResult[type].map(function(
|
|
23412
|
+
transformedResult[type] = transformedResult[type].map(function(_ref124) {
|
|
23317
23413
|
var _node;
|
|
23318
|
-
var node =
|
|
23414
|
+
var node = _ref124.node, typeResult = _objectWithoutProperties(_ref124, _excluded13);
|
|
23319
23415
|
node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
|
|
23320
23416
|
return _extends({
|
|
23321
23417
|
node: node
|