axe-core 4.14.0-canary.f86d978 → 4.14.1
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 +90 -52
- package/axe.min.js +2 -2
- package/package.json +2 -2
- package/sri-history.json +4 -0
package/axe.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! axe v4.14.
|
|
1
|
+
/*! axe v4.14.1
|
|
2
2
|
* Copyright (c) 2015 - 2026 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(o);
|
|
23
23
|
}
|
|
24
24
|
var axe = axe || {};
|
|
25
|
-
axe.version = '4.14.
|
|
25
|
+
axe.version = '4.14.1';
|
|
26
26
|
if (typeof define === 'function' && define.amd) {
|
|
27
27
|
define('axe-core', [], function() {
|
|
28
28
|
return axe;
|
|
@@ -2101,10 +2101,10 @@
|
|
|
2101
2101
|
var SHARED = '__core-js_shared__';
|
|
2102
2102
|
var store = module.exports = globalThis2[SHARED] || defineGlobalProperty(SHARED, {});
|
|
2103
2103
|
(store.versions || (store.versions = [])).push({
|
|
2104
|
-
version: '3.
|
|
2104
|
+
version: '3.51.0',
|
|
2105
2105
|
mode: IS_PURE ? 'pure' : 'global',
|
|
2106
2106
|
copyright: '\xa9 2013\u20132025 Denis Pushkarev (zloirock.ru), 2025\u20132026 CoreJS Company (core-js.io). All rights reserved.',
|
|
2107
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
2107
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.51.0/LICENSE',
|
|
2108
2108
|
source: 'https://github.com/zloirock/core-js'
|
|
2109
2109
|
});
|
|
2110
2110
|
});
|
|
@@ -15597,6 +15597,51 @@
|
|
|
15597
15597
|
return _matchesExpression(vNode, expression);
|
|
15598
15598
|
});
|
|
15599
15599
|
}
|
|
15600
|
+
function _convertSelector(selector) {
|
|
15601
|
+
var expressions = css_parser_default.parse(selector);
|
|
15602
|
+
expressions = expressions.selectors ? expressions.selectors : [ expressions ];
|
|
15603
|
+
return convertExpressions(expressions);
|
|
15604
|
+
}
|
|
15605
|
+
function _matchesExpression(vNode, expressions) {
|
|
15606
|
+
expressions = Array.isArray(expressions) ? expressions : [ expressions ];
|
|
15607
|
+
var index = expressions.length - 1;
|
|
15608
|
+
if (!matchExpression(vNode, expressions[index])) {
|
|
15609
|
+
return false;
|
|
15610
|
+
}
|
|
15611
|
+
var lastDescendantMatch = {
|
|
15612
|
+
index: index,
|
|
15613
|
+
vNode: vNode
|
|
15614
|
+
};
|
|
15615
|
+
index--;
|
|
15616
|
+
vNode = vNode.parent;
|
|
15617
|
+
while (index >= 0 && index < expressions.length - 1 && vNode) {
|
|
15618
|
+
var expression = expressions[index];
|
|
15619
|
+
var combinator = expressions[index + 1].combinator;
|
|
15620
|
+
var matched = matchExpression(vNode, expression);
|
|
15621
|
+
if (matched) {
|
|
15622
|
+
if (combinator === ' ') {
|
|
15623
|
+
lastDescendantMatch.index = index;
|
|
15624
|
+
lastDescendantMatch.vNode = vNode;
|
|
15625
|
+
}
|
|
15626
|
+
index--;
|
|
15627
|
+
vNode = vNode.parent;
|
|
15628
|
+
continue;
|
|
15629
|
+
}
|
|
15630
|
+
if ([ ' ', '>' ].includes(combinator) === false) {
|
|
15631
|
+
throw new Error('axe.commons.dom.query does not support the combinator: ' + combinator);
|
|
15632
|
+
}
|
|
15633
|
+
if (combinator === ' ') {
|
|
15634
|
+
vNode = vNode.parent;
|
|
15635
|
+
} else {
|
|
15636
|
+
index = lastDescendantMatch.index;
|
|
15637
|
+
vNode = lastDescendantMatch.vNode.parent;
|
|
15638
|
+
}
|
|
15639
|
+
}
|
|
15640
|
+
return index < 0;
|
|
15641
|
+
}
|
|
15642
|
+
function matchExpression(vNode, expression) {
|
|
15643
|
+
return matchesTag(vNode, expression) && matchesClasses(vNode, expression) && matchesAttributes(vNode, expression) && matchesId(vNode, expression) && matchesPseudos(vNode, expression);
|
|
15644
|
+
}
|
|
15600
15645
|
function matchesTag(vNode, exp2) {
|
|
15601
15646
|
return vNode.props.nodeType === 1 && (exp2.tag === '*' || vNode.props.nodeName === exp2.tag);
|
|
15602
15647
|
}
|
|
@@ -15631,9 +15676,6 @@
|
|
|
15631
15676
|
}
|
|
15632
15677
|
return false;
|
|
15633
15678
|
}
|
|
15634
|
-
function matchExpression(vNode, expression) {
|
|
15635
|
-
return matchesTag(vNode, expression) && matchesClasses(vNode, expression) && matchesAttributes(vNode, expression) && matchesId(vNode, expression) && matchesPseudos(vNode, expression);
|
|
15636
|
-
}
|
|
15637
15679
|
var escapeRegExp = function() {
|
|
15638
15680
|
var from = /(?=[\-\[\]{}()*+?.\\\^$|,#\s])/g;
|
|
15639
15681
|
var to2 = '\\';
|
|
@@ -15756,33 +15798,6 @@
|
|
|
15756
15798
|
return newExp;
|
|
15757
15799
|
});
|
|
15758
15800
|
}
|
|
15759
|
-
function _convertSelector(selector) {
|
|
15760
|
-
var expressions = css_parser_default.parse(selector);
|
|
15761
|
-
expressions = expressions.selectors ? expressions.selectors : [ expressions ];
|
|
15762
|
-
return convertExpressions(expressions);
|
|
15763
|
-
}
|
|
15764
|
-
function optimizedMatchesExpression(vNode, expressions, index, matchAnyParent) {
|
|
15765
|
-
if (!vNode) {
|
|
15766
|
-
return false;
|
|
15767
|
-
}
|
|
15768
|
-
var isArray = Array.isArray(expressions);
|
|
15769
|
-
var expression = isArray ? expressions[index] : expressions;
|
|
15770
|
-
var machedExpression = matchExpression(vNode, expression);
|
|
15771
|
-
while (!machedExpression && matchAnyParent && vNode.parent) {
|
|
15772
|
-
vNode = vNode.parent;
|
|
15773
|
-
machedExpression = matchExpression(vNode, expression);
|
|
15774
|
-
}
|
|
15775
|
-
if (index > 0) {
|
|
15776
|
-
if ([ ' ', '>' ].includes(expression.combinator) === false) {
|
|
15777
|
-
throw new Error('axe.utils.matchesExpression does not support the combinator: ' + expression.combinator);
|
|
15778
|
-
}
|
|
15779
|
-
machedExpression = machedExpression && optimizedMatchesExpression(vNode.parent, expressions, index - 1, expression.combinator === ' ');
|
|
15780
|
-
}
|
|
15781
|
-
return machedExpression;
|
|
15782
|
-
}
|
|
15783
|
-
function _matchesExpression(vNode, expressions, matchAnyParent) {
|
|
15784
|
-
return optimizedMatchesExpression(vNode, expressions, expressions.length - 1, matchAnyParent);
|
|
15785
|
-
}
|
|
15786
15801
|
function closest(vNode, selector) {
|
|
15787
15802
|
while (vNode) {
|
|
15788
15803
|
if (_matches(vNode, selector)) {
|
|
@@ -19762,11 +19777,17 @@
|
|
|
19762
19777
|
}
|
|
19763
19778
|
var getGrid = memoize_default(function getGridMemoized(vNode) {
|
|
19764
19779
|
var _ref69, _anchor$_subGrid;
|
|
19780
|
+
var position = vNode.getComputedStylePropertyValue('position');
|
|
19781
|
+
if (position === 'fixed') {
|
|
19782
|
+
return cache_default.get('fixedGrid', function() {
|
|
19783
|
+
return new Grid(get_node_from_tree_default(document.documentElement));
|
|
19784
|
+
});
|
|
19785
|
+
}
|
|
19765
19786
|
var anchor = getParent(vNode);
|
|
19766
19787
|
if (!anchor) {
|
|
19767
19788
|
return null;
|
|
19768
19789
|
}
|
|
19769
|
-
if (
|
|
19790
|
+
if (position === 'absolute') {
|
|
19770
19791
|
anchor = getContainingBlock(anchor);
|
|
19771
19792
|
}
|
|
19772
19793
|
return (_ref69 = (_anchor$_subGrid = anchor._subGrid) !== null && _anchor$_subGrid !== void 0 ? _anchor$_subGrid : anchor._grid) !== null && _ref69 !== void 0 ? _ref69 : getGrid(anchor);
|
|
@@ -19934,7 +19955,6 @@
|
|
|
19934
19955
|
return [];
|
|
19935
19956
|
}
|
|
19936
19957
|
var rect = vNode.boundingClientRect;
|
|
19937
|
-
var selfIsFixed = _isFixedPosition(vNode);
|
|
19938
19958
|
var gridPosition = grid.getGridPositionOfRect(rect, margin);
|
|
19939
19959
|
var marginRect = withinMargin ? new window.DOMRect(rect.left - margin, rect.top - margin, rect.width + margin * 2, rect.height + margin * 2) : null;
|
|
19940
19960
|
var neighbors = [];
|
|
@@ -19943,7 +19963,7 @@
|
|
|
19943
19963
|
try {
|
|
19944
19964
|
for (_iterator13.s(); !(_step13 = _iterator13.n()).done; ) {
|
|
19945
19965
|
var vNeighbor = _step13.value;
|
|
19946
|
-
if (vNeighbor && vNeighbor !== vNode && (!marginRect || _getIntersectionRect(marginRect, vNeighbor.boundingClientRect)) && !neighbors.includes(vNeighbor)
|
|
19966
|
+
if (vNeighbor && vNeighbor !== vNode && (!marginRect || _getIntersectionRect(marginRect, vNeighbor.boundingClientRect)) && !neighbors.includes(vNeighbor)) {
|
|
19947
19967
|
neighbors.push(vNeighbor);
|
|
19948
19968
|
}
|
|
19949
19969
|
}
|
|
@@ -20895,16 +20915,13 @@
|
|
|
20895
20915
|
}
|
|
20896
20916
|
return matcher === someString;
|
|
20897
20917
|
}
|
|
20898
|
-
function fromPrimative(someString, matcher) {
|
|
20899
|
-
return fromPrimitive(someString, matcher);
|
|
20900
|
-
}
|
|
20901
20918
|
function fromFunction(getValue, matcher) {
|
|
20902
20919
|
var matcherType = _typeof(matcher);
|
|
20903
20920
|
if (matcherType !== 'object' || Array.isArray(matcher) || matcher instanceof RegExp) {
|
|
20904
20921
|
throw new Error('Expect matcher to be an object');
|
|
20905
20922
|
}
|
|
20906
20923
|
return Object.keys(matcher).every(function(propName) {
|
|
20907
|
-
return
|
|
20924
|
+
return fromPrimitive(getValue(propName), matcher[propName]);
|
|
20908
20925
|
});
|
|
20909
20926
|
}
|
|
20910
20927
|
var from_function_default = fromFunction;
|
|
@@ -20919,11 +20936,11 @@
|
|
|
20919
20936
|
return !!matcher(arg);
|
|
20920
20937
|
}
|
|
20921
20938
|
function explicitRole(vNode, matcher) {
|
|
20922
|
-
return
|
|
20939
|
+
return fromPrimitive(get_explicit_role_default(vNode), matcher);
|
|
20923
20940
|
}
|
|
20924
20941
|
var explicit_role_default = explicitRole;
|
|
20925
20942
|
function hasAccessibleName2(vNode, matcher) {
|
|
20926
|
-
return
|
|
20943
|
+
return fromPrimitive(!!_accessibleTextVirtual(vNode), matcher);
|
|
20927
20944
|
}
|
|
20928
20945
|
var has_accessible_name_default = hasAccessibleName2;
|
|
20929
20946
|
function hasChild(vNode, selector) {
|
|
@@ -20932,7 +20949,7 @@
|
|
|
20932
20949
|
});
|
|
20933
20950
|
}
|
|
20934
20951
|
function implicitRole(vNode, matcher) {
|
|
20935
|
-
return
|
|
20952
|
+
return fromPrimitive(implicit_role_default(vNode), matcher);
|
|
20936
20953
|
}
|
|
20937
20954
|
var implicit_role_default2 = implicitRole;
|
|
20938
20955
|
var sectioningRoles = [ 'article', 'complementary', 'main', 'navigation', 'region' ];
|
|
@@ -20955,30 +20972,30 @@
|
|
|
20955
20972
|
role = vNode.elementInternals.role;
|
|
20956
20973
|
}
|
|
20957
20974
|
if (!role && sectioningElms.includes(nodeName2) || sectioningRoles.includes(role)) {
|
|
20958
|
-
return
|
|
20975
|
+
return fromPrimitive(true, matcher);
|
|
20959
20976
|
}
|
|
20960
20977
|
if (typeof vNode.parent === 'undefined') {
|
|
20961
20978
|
throw new TypeError('Cannot resolve parent for non-DOM nodes');
|
|
20962
20979
|
}
|
|
20963
20980
|
vNode = vNode.parent;
|
|
20964
20981
|
}
|
|
20965
|
-
return
|
|
20982
|
+
return fromPrimitive(false, matcher);
|
|
20966
20983
|
}
|
|
20967
20984
|
function isSummaryForDetails(vNode, matcher) {
|
|
20968
20985
|
if (typeof vNode.parent === 'undefined') {
|
|
20969
20986
|
throw new TypeError('Cannot resolve parent for non-DOM nodes');
|
|
20970
20987
|
}
|
|
20971
20988
|
if (!vNode.parent || vNode.parent.props.nodeName !== 'details') {
|
|
20972
|
-
return
|
|
20989
|
+
return fromPrimitive(false, matcher);
|
|
20973
20990
|
}
|
|
20974
20991
|
var firstMatch = vNode.parent.children.find(function(node) {
|
|
20975
20992
|
return node.props.nodeName === 'summary';
|
|
20976
20993
|
});
|
|
20977
|
-
return
|
|
20994
|
+
return fromPrimitive(firstMatch === vNode, matcher);
|
|
20978
20995
|
}
|
|
20979
20996
|
function nodeName(vNode, matcher) {
|
|
20980
20997
|
vNode = _nodeLookup(vNode).vNode;
|
|
20981
|
-
return
|
|
20998
|
+
return fromPrimitive(vNode.props.nodeName, matcher);
|
|
20982
20999
|
}
|
|
20983
21000
|
var node_name_default = nodeName;
|
|
20984
21001
|
function properties(vNode, matcher) {
|
|
@@ -20989,7 +21006,7 @@
|
|
|
20989
21006
|
}
|
|
20990
21007
|
var properties_default = properties;
|
|
20991
21008
|
function semanticRole(vNode, matcher) {
|
|
20992
|
-
return
|
|
21009
|
+
return fromPrimitive(get_role_default(vNode), matcher);
|
|
20993
21010
|
}
|
|
20994
21011
|
var semantic_role_default = semanticRole;
|
|
20995
21012
|
var matchers = {
|
|
@@ -21025,6 +21042,9 @@
|
|
|
21025
21042
|
});
|
|
21026
21043
|
}
|
|
21027
21044
|
var from_definition_default = fromDefinition;
|
|
21045
|
+
function fromPrimative(someString, matcher) {
|
|
21046
|
+
return fromPrimitive(someString, matcher);
|
|
21047
|
+
}
|
|
21028
21048
|
function matches2(vNode, definition) {
|
|
21029
21049
|
return from_definition_default(vNode, definition);
|
|
21030
21050
|
}
|
|
@@ -22685,7 +22705,26 @@
|
|
|
22685
22705
|
}
|
|
22686
22706
|
var is_opaque_default = isOpaque;
|
|
22687
22707
|
function _isSeparateTarget(vNode, vOther) {
|
|
22688
|
-
return get_role_type_default(vOther) === 'widget' && _isFocusable(vOther) && !_hasSameDestination(vNode, vOther);
|
|
22708
|
+
return get_role_type_default(vOther) === 'widget' && _isFocusable(vOther) && !_hasSameDestination(vNode, vOther) && !isOnlyDescendantOfWidget(vNode, vOther);
|
|
22709
|
+
}
|
|
22710
|
+
function isOnlyDescendantOfWidget(vNode, vOther) {
|
|
22711
|
+
var ancestor = _contains(vNode, vOther) ? vNode : _contains(vOther, vNode) ? vOther : null;
|
|
22712
|
+
var widgetDescendant = ancestor === vNode ? vOther : vNode;
|
|
22713
|
+
if (!ancestor) {
|
|
22714
|
+
return false;
|
|
22715
|
+
}
|
|
22716
|
+
var descendant = ancestor;
|
|
22717
|
+
while (descendant !== widgetDescendant) {
|
|
22718
|
+
var children = descendant.children.filter(function(node) {
|
|
22719
|
+
var _node$props$nodeValue;
|
|
22720
|
+
return node.props.type === 1 || ((_node$props$nodeValue = node.props.nodeValue) === null || _node$props$nodeValue === void 0 ? void 0 : _node$props$nodeValue.trim()) !== '';
|
|
22721
|
+
});
|
|
22722
|
+
if (children.length !== 1) {
|
|
22723
|
+
return false;
|
|
22724
|
+
}
|
|
22725
|
+
descendant = children[0];
|
|
22726
|
+
}
|
|
22727
|
+
return true;
|
|
22689
22728
|
}
|
|
22690
22729
|
function _isSkipLink(element) {
|
|
22691
22730
|
if (!element.href) {
|
|
@@ -29152,7 +29191,6 @@
|
|
|
29152
29191
|
}
|
|
29153
29192
|
function _getBackgroundStack(node) {
|
|
29154
29193
|
var stacks = get_text_element_stack_default(node).map(function(stack) {
|
|
29155
|
-
stack = reduce_to_elements_below_floating_default(stack, node);
|
|
29156
29194
|
stack = sortPageBackground(stack);
|
|
29157
29195
|
return stack;
|
|
29158
29196
|
});
|