axe-core 4.3.4 → 4.3.5-canary.006a681
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/axe.js +258 -169
- package/axe.min.js +2 -2
- package/locales/ko.json +596 -377
- package/package.json +10 -8
- package/sri-history.json +301 -293
- package/CHANGELOG.md +0 -1445
package/axe.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! axe v4.3.
|
|
1
|
+
/*! axe v4.3.5-canary.006a681
|
|
2
2
|
* Copyright (c) 2021 Deque Systems, Inc.
|
|
3
3
|
*
|
|
4
4
|
* Your use of this Source Code Form is subject to the terms of the Mozilla Public
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
return _typeof(obj);
|
|
28
28
|
}
|
|
29
29
|
var axe = axe || {};
|
|
30
|
-
axe.version = '4.3.
|
|
30
|
+
axe.version = '4.3.5-canary.006a681';
|
|
31
31
|
if (typeof define === 'function' && define.amd) {
|
|
32
32
|
define('axe-core', [], function() {
|
|
33
33
|
return axe;
|
|
@@ -5945,23 +5945,23 @@
|
|
|
5945
5945
|
var xhtml;
|
|
5946
5946
|
var ignoredAttributes = [ 'class', 'style', 'id', 'selected', 'checked', 'disabled', 'tabindex', 'aria-checked', 'aria-selected', 'aria-invalid', 'aria-activedescendant', 'aria-busy', 'aria-disabled', 'aria-expanded', 'aria-grabbed', 'aria-pressed', 'aria-valuenow' ];
|
|
5947
5947
|
var MAXATTRIBUTELENGTH = 31;
|
|
5948
|
+
var attrCharsRegex = /([\\"])/g;
|
|
5949
|
+
var newlineChars = /(\r\n|\r|\n)/g;
|
|
5950
|
+
function escapeAttribute(str) {
|
|
5951
|
+
return str.replace(attrCharsRegex, '\\$1').replace(newlineChars, '\\a ');
|
|
5952
|
+
}
|
|
5948
5953
|
function getAttributeNameValue(node, at) {
|
|
5949
5954
|
var name = at.name;
|
|
5950
5955
|
var atnv;
|
|
5951
5956
|
if (name.indexOf('href') !== -1 || name.indexOf('src') !== -1) {
|
|
5952
5957
|
var friendly = get_friendly_uri_end_default(node.getAttribute(name));
|
|
5953
5958
|
if (friendly) {
|
|
5954
|
-
|
|
5955
|
-
if (value) {
|
|
5956
|
-
atnv = escape_selector_default(at.name) + '$="' + escape_selector_default(value) + '"';
|
|
5957
|
-
} else {
|
|
5958
|
-
return;
|
|
5959
|
-
}
|
|
5959
|
+
atnv = escape_selector_default(at.name) + '$="' + escapeAttribute(friendly) + '"';
|
|
5960
5960
|
} else {
|
|
5961
|
-
atnv = escape_selector_default(at.name) + '="' +
|
|
5961
|
+
atnv = escape_selector_default(at.name) + '="' + escapeAttribute(node.getAttribute(name)) + '"';
|
|
5962
5962
|
}
|
|
5963
5963
|
} else {
|
|
5964
|
-
atnv = escape_selector_default(name) + '="' +
|
|
5964
|
+
atnv = escape_selector_default(name) + '="' + escapeAttribute(at.value) + '"';
|
|
5965
5965
|
}
|
|
5966
5966
|
return atnv;
|
|
5967
5967
|
}
|
|
@@ -8474,6 +8474,11 @@
|
|
|
8474
8474
|
allowedAttrs: [ 'aria-expanded' ],
|
|
8475
8475
|
superclassRole: [ 'landmark' ]
|
|
8476
8476
|
},
|
|
8477
|
+
comment: {
|
|
8478
|
+
type: 'structure',
|
|
8479
|
+
allowedAttrs: [ 'aria-level', 'aria-posinset', 'aria-setsize' ],
|
|
8480
|
+
superclassRole: [ 'article' ]
|
|
8481
|
+
},
|
|
8477
8482
|
definition: {
|
|
8478
8483
|
type: 'structure',
|
|
8479
8484
|
allowedAttrs: [ 'aria-expanded' ],
|
|
@@ -8664,6 +8669,11 @@
|
|
|
8664
8669
|
accessibleNameRequired: true,
|
|
8665
8670
|
childrenPresentational: true
|
|
8666
8671
|
},
|
|
8672
|
+
mark: {
|
|
8673
|
+
type: 'structure',
|
|
8674
|
+
superclassRole: [ 'section' ],
|
|
8675
|
+
prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
|
|
8676
|
+
},
|
|
8667
8677
|
navigation: {
|
|
8668
8678
|
type: 'landmark',
|
|
8669
8679
|
allowedAttrs: [ 'aria-expanded' ],
|
|
@@ -8843,6 +8853,12 @@
|
|
|
8843
8853
|
nameFromContent: true,
|
|
8844
8854
|
childrenPresentational: true
|
|
8845
8855
|
},
|
|
8856
|
+
suggestion: {
|
|
8857
|
+
type: 'structure',
|
|
8858
|
+
requiredOwned: [ 'insertion', 'deletion' ],
|
|
8859
|
+
superclassRole: [ 'section' ],
|
|
8860
|
+
prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
|
|
8861
|
+
},
|
|
8846
8862
|
tab: {
|
|
8847
8863
|
type: 'widget',
|
|
8848
8864
|
requiredContext: [ 'tablist' ],
|
|
@@ -9432,11 +9448,13 @@
|
|
|
9432
9448
|
img: {
|
|
9433
9449
|
variant: {
|
|
9434
9450
|
nonEmptyAlt: {
|
|
9435
|
-
matches: {
|
|
9451
|
+
matches: [ {
|
|
9436
9452
|
attributes: {
|
|
9437
9453
|
alt: '/.+/'
|
|
9438
9454
|
}
|
|
9439
|
-
},
|
|
9455
|
+
}, {
|
|
9456
|
+
hasAccessibleName: true
|
|
9457
|
+
} ],
|
|
9440
9458
|
allowedRoles: [ 'button', 'checkbox', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'scrollbar', 'separator', 'slider', 'switch', 'tab', 'treeitem', 'doc-cover' ]
|
|
9441
9459
|
},
|
|
9442
9460
|
usemap: {
|
|
@@ -9717,7 +9735,7 @@
|
|
|
9717
9735
|
},
|
|
9718
9736
|
section: {
|
|
9719
9737
|
contentTypes: [ 'sectioning', 'flow' ],
|
|
9720
|
-
allowedRoles: [ 'alert', 'alertdialog', 'application', 'banner', 'complementary', 'contentinfo', 'dialog', 'document', 'feed', 'log', 'main', 'marquee', 'navigation', 'none', 'note', 'presentation', 'search', 'status', 'tabpanel', 'doc-abstract', 'doc-acknowledgments', 'doc-afterword', 'doc-appendix', 'doc-bibliography', 'doc-chapter', 'doc-colophon', 'doc-conclusion', 'doc-credit', 'doc-credits', 'doc-dedication', 'doc-endnotes', 'doc-epigraph', 'doc-epilogue', 'doc-errata', 'doc-example', 'doc-foreword', 'doc-glossary', 'doc-index', 'doc-introduction', 'doc-notice', 'doc-pagelist', 'doc-part', 'doc-preface', 'doc-prologue', 'doc-pullquote', 'doc-qna', 'doc-toc' ],
|
|
9738
|
+
allowedRoles: [ 'alert', 'alertdialog', 'application', 'banner', 'complementary', 'contentinfo', 'dialog', 'document', 'feed', 'group', 'log', 'main', 'marquee', 'navigation', 'none', 'note', 'presentation', 'search', 'status', 'tabpanel', 'doc-abstract', 'doc-acknowledgments', 'doc-afterword', 'doc-appendix', 'doc-bibliography', 'doc-chapter', 'doc-colophon', 'doc-conclusion', 'doc-credit', 'doc-credits', 'doc-dedication', 'doc-endnotes', 'doc-epigraph', 'doc-epilogue', 'doc-errata', 'doc-example', 'doc-foreword', 'doc-glossary', 'doc-index', 'doc-introduction', 'doc-notice', 'doc-pagelist', 'doc-part', 'doc-preface', 'doc-prologue', 'doc-pullquote', 'doc-qna', 'doc-toc' ],
|
|
9721
9739
|
shadowRoot: true
|
|
9722
9740
|
},
|
|
9723
9741
|
select: {
|
|
@@ -12687,6 +12705,10 @@
|
|
|
12687
12705
|
return matcher === someString;
|
|
12688
12706
|
}
|
|
12689
12707
|
var from_primative_default = fromPrimative;
|
|
12708
|
+
function hasAccessibleName2(vNode, matcher) {
|
|
12709
|
+
return from_primative_default(!!accessible_text_virtual_default(vNode), matcher);
|
|
12710
|
+
}
|
|
12711
|
+
var has_accessible_name_default = hasAccessibleName2;
|
|
12690
12712
|
function fromFunction(getValue, matcher) {
|
|
12691
12713
|
var matcherType = _typeof(matcher);
|
|
12692
12714
|
if (matcherType !== 'object' || Array.isArray(matcher) || matcher instanceof RegExp) {
|
|
@@ -12739,6 +12761,7 @@
|
|
|
12739
12761
|
}
|
|
12740
12762
|
var semantic_role_default = semanticRole;
|
|
12741
12763
|
var matchers = {
|
|
12764
|
+
hasAccessibleName: has_accessible_name_default,
|
|
12742
12765
|
attributes: attributes_default,
|
|
12743
12766
|
condition: condition_default,
|
|
12744
12767
|
explicitRole: explicit_role_default,
|
|
@@ -12773,6 +12796,7 @@
|
|
|
12773
12796
|
return from_definition_default(vNode, definition);
|
|
12774
12797
|
}
|
|
12775
12798
|
var matches_default2 = matches5;
|
|
12799
|
+
matches_default2.hasAccessibleName = has_accessible_name_default;
|
|
12776
12800
|
matches_default2.attributes = attributes_default;
|
|
12777
12801
|
matches_default2.condition = condition_default;
|
|
12778
12802
|
matches_default2.explicitRole = explicit_role_default;
|
|
@@ -12785,6 +12809,7 @@
|
|
|
12785
12809
|
matches_default2.semanticRole = semantic_role_default;
|
|
12786
12810
|
var matches_default3 = matches_default2;
|
|
12787
12811
|
function getElementSpec(vNode) {
|
|
12812
|
+
var _ref34 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref34$noMatchAccessi = _ref34.noMatchAccessibleName, noMatchAccessibleName = _ref34$noMatchAccessi === void 0 ? false : _ref34$noMatchAccessi;
|
|
12788
12813
|
var standard = standards_default.htmlElms[vNode.props.nodeName];
|
|
12789
12814
|
if (!standard) {
|
|
12790
12815
|
return {};
|
|
@@ -12798,6 +12823,12 @@
|
|
|
12798
12823
|
continue;
|
|
12799
12824
|
}
|
|
12800
12825
|
var _variant$variantName = variant[variantName], matches14 = _variant$variantName.matches, props = _objectWithoutProperties(_variant$variantName, _excluded4);
|
|
12826
|
+
var matchProperties = Array.isArray(matches14) ? matches14 : [ matches14 ];
|
|
12827
|
+
for (var _i12 = 0; _i12 < matchProperties.length && noMatchAccessibleName; _i12++) {
|
|
12828
|
+
if (matchProperties[_i12].hasOwnProperty('hasAccessibleName')) {
|
|
12829
|
+
return standard;
|
|
12830
|
+
}
|
|
12831
|
+
}
|
|
12801
12832
|
if (matches_default3(vNode, matches14)) {
|
|
12802
12833
|
for (var propName in props) {
|
|
12803
12834
|
if (props.hasOwnProperty(propName)) {
|
|
@@ -12815,7 +12846,7 @@
|
|
|
12815
12846
|
}
|
|
12816
12847
|
var get_element_spec_default = getElementSpec;
|
|
12817
12848
|
function implicitRole2(node) {
|
|
12818
|
-
var
|
|
12849
|
+
var _ref35 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref35.chromium;
|
|
12819
12850
|
var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
|
|
12820
12851
|
node = vNode.actualNode;
|
|
12821
12852
|
if (!vNode) {
|
|
@@ -12865,8 +12896,8 @@
|
|
|
12865
12896
|
}
|
|
12866
12897
|
return getInheritedRole(vNode.parent, explicitRoleOptions);
|
|
12867
12898
|
}
|
|
12868
|
-
function resolveImplicitRole(vNode,
|
|
12869
|
-
var chromium =
|
|
12899
|
+
function resolveImplicitRole(vNode, _ref36) {
|
|
12900
|
+
var chromium = _ref36.chromium, explicitRoleOptions = _objectWithoutProperties(_ref36, _excluded5);
|
|
12870
12901
|
var implicitRole3 = implicit_role_default(vNode, {
|
|
12871
12902
|
chromium: chromium
|
|
12872
12903
|
});
|
|
@@ -12886,8 +12917,8 @@
|
|
|
12886
12917
|
return hasGlobalAria || is_focusable_default(vNode);
|
|
12887
12918
|
}
|
|
12888
12919
|
function resolveRole(node) {
|
|
12889
|
-
var
|
|
12890
|
-
var noImplicit =
|
|
12920
|
+
var _ref37 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12921
|
+
var noImplicit = _ref37.noImplicit, roleOptions = _objectWithoutProperties(_ref37, _excluded6);
|
|
12891
12922
|
var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
|
|
12892
12923
|
if (vNode.props.nodeType !== 1) {
|
|
12893
12924
|
return null;
|
|
@@ -12905,8 +12936,8 @@
|
|
|
12905
12936
|
return explicitRole2;
|
|
12906
12937
|
}
|
|
12907
12938
|
function getRole(node) {
|
|
12908
|
-
var
|
|
12909
|
-
var noPresentational =
|
|
12939
|
+
var _ref38 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12940
|
+
var noPresentational = _ref38.noPresentational, options = _objectWithoutProperties(_ref38, _excluded7);
|
|
12910
12941
|
var role = resolveRole(node, options);
|
|
12911
12942
|
if (noPresentational && [ 'presentation', 'none' ].includes(role)) {
|
|
12912
12943
|
return null;
|
|
@@ -12927,7 +12958,7 @@
|
|
|
12927
12958
|
}
|
|
12928
12959
|
var title_text_default = titleText;
|
|
12929
12960
|
function namedFromContents(vNode) {
|
|
12930
|
-
var
|
|
12961
|
+
var _ref39 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref39.strict;
|
|
12931
12962
|
vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
|
|
12932
12963
|
if (vNode.props.nodeType !== 1) {
|
|
12933
12964
|
return false;
|
|
@@ -12964,7 +12995,9 @@
|
|
|
12964
12995
|
var alreadyProcessed2 = accessible_text_virtual_default.alreadyProcessed;
|
|
12965
12996
|
context5.startNode = context5.startNode || virtualNode;
|
|
12966
12997
|
var _context = context5, strict = _context.strict, inControlContext = _context.inControlContext, inLabelledByContext = _context.inLabelledByContext;
|
|
12967
|
-
var _get_element_spec_def2 = get_element_spec_default(virtualNode
|
|
12998
|
+
var _get_element_spec_def2 = get_element_spec_default(virtualNode, {
|
|
12999
|
+
noMatchAccessibleName: true
|
|
13000
|
+
}), contentTypes = _get_element_spec_def2.contentTypes;
|
|
12968
13001
|
if (alreadyProcessed2(virtualNode, context5) || virtualNode.props.nodeType !== 1 || contentTypes !== null && contentTypes !== void 0 && contentTypes.includes('embedded')) {
|
|
12969
13002
|
return '';
|
|
12970
13003
|
}
|
|
@@ -13050,12 +13083,12 @@
|
|
|
13050
13083
|
button: ''
|
|
13051
13084
|
};
|
|
13052
13085
|
var nativeTextMethods = {
|
|
13053
|
-
valueText: function valueText(
|
|
13054
|
-
var actualNode =
|
|
13086
|
+
valueText: function valueText(_ref40) {
|
|
13087
|
+
var actualNode = _ref40.actualNode;
|
|
13055
13088
|
return actualNode.value || '';
|
|
13056
13089
|
},
|
|
13057
|
-
buttonDefaultText: function buttonDefaultText(
|
|
13058
|
-
var actualNode =
|
|
13090
|
+
buttonDefaultText: function buttonDefaultText(_ref41) {
|
|
13091
|
+
var actualNode = _ref41.actualNode;
|
|
13059
13092
|
return defaultButtonValues[actualNode.type] || '';
|
|
13060
13093
|
},
|
|
13061
13094
|
tableCaptionText: descendantText.bind(null, 'caption'),
|
|
@@ -13075,8 +13108,8 @@
|
|
|
13075
13108
|
function attrText(attr, vNode) {
|
|
13076
13109
|
return vNode.attr(attr) || '';
|
|
13077
13110
|
}
|
|
13078
|
-
function descendantText(nodeName2,
|
|
13079
|
-
var actualNode =
|
|
13111
|
+
function descendantText(nodeName2, _ref42, context5) {
|
|
13112
|
+
var actualNode = _ref42.actualNode;
|
|
13080
13113
|
nodeName2 = nodeName2.toLowerCase();
|
|
13081
13114
|
var nodeNames2 = [ nodeName2, actualNode.nodeName.toLowerCase() ].join(',');
|
|
13082
13115
|
var candidate = actualNode.querySelector(nodeNames2);
|
|
@@ -13102,7 +13135,9 @@
|
|
|
13102
13135
|
return accName;
|
|
13103
13136
|
}
|
|
13104
13137
|
function findTextMethods(virtualNode) {
|
|
13105
|
-
var elmSpec = get_element_spec_default(virtualNode
|
|
13138
|
+
var elmSpec = get_element_spec_default(virtualNode, {
|
|
13139
|
+
noMatchAccessibleName: true
|
|
13140
|
+
});
|
|
13106
13141
|
var methods = elmSpec.namingMethods || [];
|
|
13107
13142
|
return methods.map(function(methodName) {
|
|
13108
13143
|
return native_text_methods_default[methodName];
|
|
@@ -13270,8 +13305,8 @@
|
|
|
13270
13305
|
}
|
|
13271
13306
|
return virtualNode.props.nodeValue;
|
|
13272
13307
|
}
|
|
13273
|
-
function shouldIgnoreHidden(
|
|
13274
|
-
var actualNode =
|
|
13308
|
+
function shouldIgnoreHidden(_ref43, context5) {
|
|
13309
|
+
var actualNode = _ref43.actualNode;
|
|
13275
13310
|
if (!actualNode) {
|
|
13276
13311
|
return false;
|
|
13277
13312
|
}
|
|
@@ -13562,7 +13597,7 @@
|
|
|
13562
13597
|
locations: [ 'billing', 'shipping' ]
|
|
13563
13598
|
};
|
|
13564
13599
|
function isValidAutocomplete(autocompleteValue) {
|
|
13565
|
-
var
|
|
13600
|
+
var _ref44 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref44$looseTyped = _ref44.looseTyped, looseTyped = _ref44$looseTyped === void 0 ? false : _ref44$looseTyped, _ref44$stateTerms = _ref44.stateTerms, stateTerms = _ref44$stateTerms === void 0 ? [] : _ref44$stateTerms, _ref44$locations = _ref44.locations, locations = _ref44$locations === void 0 ? [] : _ref44$locations, _ref44$qualifiers = _ref44.qualifiers, qualifiers = _ref44$qualifiers === void 0 ? [] : _ref44$qualifiers, _ref44$standaloneTerm = _ref44.standaloneTerms, standaloneTerms = _ref44$standaloneTerm === void 0 ? [] : _ref44$standaloneTerm, _ref44$qualifiedTerms = _ref44.qualifiedTerms, qualifiedTerms = _ref44$qualifiedTerms === void 0 ? [] : _ref44$qualifiedTerms;
|
|
13566
13601
|
autocompleteValue = autocompleteValue.toLowerCase().trim();
|
|
13567
13602
|
stateTerms = stateTerms.concat(_autocomplete.stateTerms);
|
|
13568
13603
|
if (stateTerms.includes(autocompleteValue) || autocompleteValue === '') {
|
|
@@ -13713,8 +13748,8 @@
|
|
|
13713
13748
|
idRefs[id] = idRefs[id] || [];
|
|
13714
13749
|
idRefs[id].push(node);
|
|
13715
13750
|
}
|
|
13716
|
-
for (var
|
|
13717
|
-
var attr = refAttrs[
|
|
13751
|
+
for (var _i13 = 0; _i13 < refAttrs.length; ++_i13) {
|
|
13752
|
+
var attr = refAttrs[_i13];
|
|
13718
13753
|
var attrValue = sanitize_default(node.getAttribute(attr) || '');
|
|
13719
13754
|
if (!attrValue) {
|
|
13720
13755
|
continue;
|
|
@@ -13726,8 +13761,8 @@
|
|
|
13726
13761
|
}
|
|
13727
13762
|
}
|
|
13728
13763
|
}
|
|
13729
|
-
for (var
|
|
13730
|
-
cacheIdRefs(node.children[
|
|
13764
|
+
for (var _i14 = 0; _i14 < node.children.length; _i14++) {
|
|
13765
|
+
cacheIdRefs(node.children[_i14], idRefs, refAttrs);
|
|
13731
13766
|
}
|
|
13732
13767
|
}
|
|
13733
13768
|
function getAccessibleRefs(node) {
|
|
@@ -15587,8 +15622,8 @@
|
|
|
15587
15622
|
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' ]
|
|
15588
15623
|
} ];
|
|
15589
15624
|
lookupTable.evaluateRoleForElement = {
|
|
15590
|
-
A: function A(
|
|
15591
|
-
var node =
|
|
15625
|
+
A: function A(_ref45) {
|
|
15626
|
+
var node = _ref45.node, out = _ref45.out;
|
|
15592
15627
|
if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
|
|
15593
15628
|
return true;
|
|
15594
15629
|
}
|
|
@@ -15597,19 +15632,19 @@
|
|
|
15597
15632
|
}
|
|
15598
15633
|
return true;
|
|
15599
15634
|
},
|
|
15600
|
-
AREA: function AREA(
|
|
15601
|
-
var node =
|
|
15635
|
+
AREA: function AREA(_ref46) {
|
|
15636
|
+
var node = _ref46.node;
|
|
15602
15637
|
return !node.href;
|
|
15603
15638
|
},
|
|
15604
|
-
BUTTON: function BUTTON(
|
|
15605
|
-
var node =
|
|
15639
|
+
BUTTON: function BUTTON(_ref47) {
|
|
15640
|
+
var node = _ref47.node, role = _ref47.role, out = _ref47.out;
|
|
15606
15641
|
if (node.getAttribute('type') === 'menu') {
|
|
15607
15642
|
return role === 'menuitem';
|
|
15608
15643
|
}
|
|
15609
15644
|
return out;
|
|
15610
15645
|
},
|
|
15611
|
-
IMG: function IMG(
|
|
15612
|
-
var node =
|
|
15646
|
+
IMG: function IMG(_ref48) {
|
|
15647
|
+
var node = _ref48.node, role = _ref48.role, out = _ref48.out;
|
|
15613
15648
|
switch (node.alt) {
|
|
15614
15649
|
case null:
|
|
15615
15650
|
return out;
|
|
@@ -15621,8 +15656,8 @@
|
|
|
15621
15656
|
return role !== 'presentation' && role !== 'none';
|
|
15622
15657
|
}
|
|
15623
15658
|
},
|
|
15624
|
-
INPUT: function INPUT(
|
|
15625
|
-
var node =
|
|
15659
|
+
INPUT: function INPUT(_ref49) {
|
|
15660
|
+
var node = _ref49.node, role = _ref49.role, out = _ref49.out;
|
|
15626
15661
|
switch (node.type) {
|
|
15627
15662
|
case 'button':
|
|
15628
15663
|
case 'image':
|
|
@@ -15652,32 +15687,32 @@
|
|
|
15652
15687
|
return false;
|
|
15653
15688
|
}
|
|
15654
15689
|
},
|
|
15655
|
-
LI: function LI(
|
|
15656
|
-
var node =
|
|
15690
|
+
LI: function LI(_ref50) {
|
|
15691
|
+
var node = _ref50.node, out = _ref50.out;
|
|
15657
15692
|
var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
|
|
15658
15693
|
if (hasImplicitListitemRole) {
|
|
15659
15694
|
return out;
|
|
15660
15695
|
}
|
|
15661
15696
|
return true;
|
|
15662
15697
|
},
|
|
15663
|
-
MENU: function MENU(
|
|
15664
|
-
var node =
|
|
15698
|
+
MENU: function MENU(_ref51) {
|
|
15699
|
+
var node = _ref51.node;
|
|
15665
15700
|
if (node.getAttribute('type') === 'context') {
|
|
15666
15701
|
return false;
|
|
15667
15702
|
}
|
|
15668
15703
|
return true;
|
|
15669
15704
|
},
|
|
15670
|
-
OPTION: function OPTION(
|
|
15671
|
-
var node =
|
|
15705
|
+
OPTION: function OPTION(_ref52) {
|
|
15706
|
+
var node = _ref52.node;
|
|
15672
15707
|
var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
|
|
15673
15708
|
return !withinOptionList;
|
|
15674
15709
|
},
|
|
15675
|
-
SELECT: function SELECT(
|
|
15676
|
-
var node =
|
|
15710
|
+
SELECT: function SELECT(_ref53) {
|
|
15711
|
+
var node = _ref53.node, role = _ref53.role;
|
|
15677
15712
|
return !node.multiple && node.size <= 1 && role === 'menu';
|
|
15678
15713
|
},
|
|
15679
|
-
SVG: function SVG(
|
|
15680
|
-
var node =
|
|
15714
|
+
SVG: function SVG(_ref54) {
|
|
15715
|
+
var node = _ref54.node, out = _ref54.out;
|
|
15681
15716
|
if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
|
|
15682
15717
|
return true;
|
|
15683
15718
|
}
|
|
@@ -15828,10 +15863,10 @@
|
|
|
15828
15863
|
ariaAttr.forEach(function(attr) {
|
|
15829
15864
|
preChecks[attr] = validateRowAttrs;
|
|
15830
15865
|
});
|
|
15831
|
-
if (allowed) {
|
|
15832
|
-
for (var
|
|
15866
|
+
if (role && allowed) {
|
|
15867
|
+
for (var _i15 = 0; _i15 < attrs.length; _i15++) {
|
|
15833
15868
|
var _preChecks$attrName;
|
|
15834
|
-
var attrName = attrs[
|
|
15869
|
+
var attrName = attrs[_i15];
|
|
15835
15870
|
if (validate_attr_default(attrName) && (_preChecks$attrName = preChecks[attrName]) !== null && _preChecks$attrName !== void 0 && _preChecks$attrName.call(preChecks)) {
|
|
15836
15871
|
invalid.push(attrName + '="' + virtualNode.attr(attrName) + '"');
|
|
15837
15872
|
} else if (validate_attr_default(attrName) && !allowed.includes(attrName)) {
|
|
@@ -15989,8 +16024,8 @@
|
|
|
15989
16024
|
required = unique_array_default(options[role], required);
|
|
15990
16025
|
}
|
|
15991
16026
|
if (role && required) {
|
|
15992
|
-
for (var
|
|
15993
|
-
var attr = required[
|
|
16027
|
+
for (var _i16 = 0, l = required.length; _i16 < l; _i16++) {
|
|
16028
|
+
var attr = required[_i16];
|
|
15994
16029
|
if (!virtualNode.attr(attr) && !(elmSpec.implicitAttrs && typeof elmSpec.implicitAttrs[attr] !== 'undefined')) {
|
|
15995
16030
|
missing.push(attr);
|
|
15996
16031
|
}
|
|
@@ -16011,8 +16046,8 @@
|
|
|
16011
16046
|
function getOwnedRoles(virtualNode, required) {
|
|
16012
16047
|
var ownedRoles = [];
|
|
16013
16048
|
var ownedElements = get_owned_virtual_default(virtualNode);
|
|
16014
|
-
var _loop4 = function _loop4(
|
|
16015
|
-
var ownedElement = ownedElements[
|
|
16049
|
+
var _loop4 = function _loop4(_i17) {
|
|
16050
|
+
var ownedElement = ownedElements[_i17];
|
|
16016
16051
|
var role = get_role_default(ownedElement, {
|
|
16017
16052
|
noPresentational: true
|
|
16018
16053
|
});
|
|
@@ -16024,14 +16059,14 @@
|
|
|
16024
16059
|
ownedRoles.push(role);
|
|
16025
16060
|
}
|
|
16026
16061
|
};
|
|
16027
|
-
for (var
|
|
16028
|
-
_loop4(
|
|
16062
|
+
for (var _i17 = 0; _i17 < ownedElements.length; _i17++) {
|
|
16063
|
+
_loop4(_i17);
|
|
16029
16064
|
}
|
|
16030
16065
|
return ownedRoles;
|
|
16031
16066
|
}
|
|
16032
16067
|
function missingRequiredChildren(virtualNode, role, required, ownedRoles) {
|
|
16033
|
-
for (var
|
|
16034
|
-
var ownedRole = ownedRoles[
|
|
16068
|
+
for (var _i18 = 0; _i18 < ownedRoles.length; _i18++) {
|
|
16069
|
+
var ownedRole = ownedRoles[_i18];
|
|
16035
16070
|
if (required.includes(ownedRole)) {
|
|
16036
16071
|
required = required.filter(function(requiredRole) {
|
|
16037
16072
|
return requiredRole !== ownedRole;
|
|
@@ -16118,8 +16153,8 @@
|
|
|
16118
16153
|
}
|
|
16119
16154
|
var owners = getAriaOwners(node);
|
|
16120
16155
|
if (owners) {
|
|
16121
|
-
for (var
|
|
16122
|
-
missingParents = getMissingContext(get_node_from_tree_default(owners[
|
|
16156
|
+
for (var _i19 = 0, l = owners.length; _i19 < l; _i19++) {
|
|
16157
|
+
missingParents = getMissingContext(get_node_from_tree_default(owners[_i19]), ownGroupRoles, missingParents, true);
|
|
16123
16158
|
if (!missingParents) {
|
|
16124
16159
|
return true;
|
|
16125
16160
|
}
|
|
@@ -17031,7 +17066,7 @@
|
|
|
17031
17066
|
}
|
|
17032
17067
|
var get_background_stack_default = getBackgroundStack;
|
|
17033
17068
|
function getTextShadowColors(node) {
|
|
17034
|
-
var
|
|
17069
|
+
var _ref55 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref55.minRatio, maxRatio = _ref55.maxRatio;
|
|
17035
17070
|
var style = window.getComputedStyle(node);
|
|
17036
17071
|
var textShadow = style.getPropertyValue('text-shadow');
|
|
17037
17072
|
if (textShadow === 'none') {
|
|
@@ -17042,8 +17077,8 @@
|
|
|
17042
17077
|
assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
|
|
17043
17078
|
var shadowColors = [];
|
|
17044
17079
|
var shadows = parseTextShadows(textShadow);
|
|
17045
|
-
shadows.forEach(function(
|
|
17046
|
-
var colorStr =
|
|
17080
|
+
shadows.forEach(function(_ref56) {
|
|
17081
|
+
var colorStr = _ref56.colorStr, pixels = _ref56.pixels;
|
|
17047
17082
|
colorStr = colorStr || style.getPropertyValue('color');
|
|
17048
17083
|
var _pixels = _slicedToArray(pixels, 3), offsetY = _pixels[0], offsetX = _pixels[1], _pixels$ = _pixels[2], blurRadius = _pixels$ === void 0 ? 0 : _pixels$;
|
|
17049
17084
|
if ((!minRatio || blurRadius >= fontSize * minRatio) && (!maxRatio || blurRadius < fontSize * maxRatio)) {
|
|
@@ -17093,8 +17128,8 @@
|
|
|
17093
17128
|
}
|
|
17094
17129
|
return shadows;
|
|
17095
17130
|
}
|
|
17096
|
-
function textShadowColor(
|
|
17097
|
-
var colorStr =
|
|
17131
|
+
function textShadowColor(_ref57) {
|
|
17132
|
+
var colorStr = _ref57.colorStr, offsetX = _ref57.offsetX, offsetY = _ref57.offsetY, blurRadius = _ref57.blurRadius, fontSize = _ref57.fontSize;
|
|
17098
17133
|
if (offsetX > blurRadius || offsetY > blurRadius) {
|
|
17099
17134
|
return new color_default(0, 0, 0, 0);
|
|
17100
17135
|
}
|
|
@@ -17288,7 +17323,7 @@
|
|
|
17288
17323
|
}
|
|
17289
17324
|
var ptSize = Math.ceil(fontSize * 72) / 96;
|
|
17290
17325
|
var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
|
|
17291
|
-
var
|
|
17326
|
+
var _ref58 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref58.expected, minThreshold = _ref58.minThreshold, maxThreshold = _ref58.maxThreshold;
|
|
17292
17327
|
var isValid = contrast > expected;
|
|
17293
17328
|
if (typeof minThreshold === 'number' && contrast < minThreshold || typeof maxThreshold === 'number' && contrast > maxThreshold) {
|
|
17294
17329
|
return true;
|
|
@@ -17328,8 +17363,8 @@
|
|
|
17328
17363
|
}
|
|
17329
17364
|
return isValid;
|
|
17330
17365
|
}
|
|
17331
|
-
function findPseudoElement(vNode,
|
|
17332
|
-
var
|
|
17366
|
+
function findPseudoElement(vNode, _ref59) {
|
|
17367
|
+
var _ref59$pseudoSizeThre = _ref59.pseudoSizeThreshold, pseudoSizeThreshold = _ref59$pseudoSizeThre === void 0 ? .25 : _ref59$pseudoSizeThre, _ref59$ignorePseudo = _ref59.ignorePseudo, ignorePseudo = _ref59$ignorePseudo === void 0 ? false : _ref59$ignorePseudo;
|
|
17333
17368
|
if (ignorePseudo) {
|
|
17334
17369
|
return;
|
|
17335
17370
|
}
|
|
@@ -17371,7 +17406,7 @@
|
|
|
17371
17406
|
}
|
|
17372
17407
|
function parseUnit(str) {
|
|
17373
17408
|
var unitRegex = /^([0-9.]+)([a-z]+)$/i;
|
|
17374
|
-
var
|
|
17409
|
+
var _ref60 = str.match(unitRegex) || [], _ref61 = _slicedToArray(_ref60, 3), _ref61$ = _ref61[1], value = _ref61$ === void 0 ? '' : _ref61$, _ref61$2 = _ref61[2], unit = _ref61$2 === void 0 ? '' : _ref61$2;
|
|
17375
17410
|
return {
|
|
17376
17411
|
value: parseFloat(value),
|
|
17377
17412
|
unit: unit.toLowerCase()
|
|
@@ -17614,14 +17649,14 @@
|
|
|
17614
17649
|
}
|
|
17615
17650
|
function getHeadingOrder(results) {
|
|
17616
17651
|
results = _toConsumableArray(results);
|
|
17617
|
-
results.sort(function(
|
|
17618
|
-
var nodeA =
|
|
17619
|
-
var nodeB =
|
|
17652
|
+
results.sort(function(_ref62, _ref63) {
|
|
17653
|
+
var nodeA = _ref62.node;
|
|
17654
|
+
var nodeB = _ref63.node;
|
|
17620
17655
|
return nodeA.ancestry.length - nodeB.ancestry.length;
|
|
17621
17656
|
});
|
|
17622
17657
|
var headingOrder = results.reduce(mergeHeadingOrder, []);
|
|
17623
|
-
return headingOrder.filter(function(
|
|
17624
|
-
var level =
|
|
17658
|
+
return headingOrder.filter(function(_ref64) {
|
|
17659
|
+
var level = _ref64.level;
|
|
17625
17660
|
return level !== -1;
|
|
17626
17661
|
});
|
|
17627
17662
|
}
|
|
@@ -17672,7 +17707,7 @@
|
|
|
17672
17707
|
var headingRole = role && role.includes('heading');
|
|
17673
17708
|
var ariaHeadingLevel = vNode.attr('aria-level');
|
|
17674
17709
|
var ariaLevel = parseInt(ariaHeadingLevel, 10);
|
|
17675
|
-
var
|
|
17710
|
+
var _ref65 = vNode.props.nodeName.match(/h(\d)/) || [], _ref66 = _slicedToArray(_ref65, 2), headingLevel = _ref66[1];
|
|
17676
17711
|
if (!headingRole) {
|
|
17677
17712
|
return -1;
|
|
17678
17713
|
}
|
|
@@ -17738,8 +17773,8 @@
|
|
|
17738
17773
|
if (results.length < 2) {
|
|
17739
17774
|
return results;
|
|
17740
17775
|
}
|
|
17741
|
-
var incompleteResults = results.filter(function(
|
|
17742
|
-
var result =
|
|
17776
|
+
var incompleteResults = results.filter(function(_ref67) {
|
|
17777
|
+
var result = _ref67.result;
|
|
17743
17778
|
return result !== void 0;
|
|
17744
17779
|
});
|
|
17745
17780
|
var uniqueResults = [];
|
|
@@ -17751,12 +17786,12 @@
|
|
|
17751
17786
|
if (nameMap[name]) {
|
|
17752
17787
|
return 'continue';
|
|
17753
17788
|
}
|
|
17754
|
-
var sameNameResults = incompleteResults.filter(function(
|
|
17755
|
-
var data2 =
|
|
17789
|
+
var sameNameResults = incompleteResults.filter(function(_ref68, resultNum) {
|
|
17790
|
+
var data2 = _ref68.data;
|
|
17756
17791
|
return data2.name === name && resultNum !== index;
|
|
17757
17792
|
});
|
|
17758
|
-
var isSameUrl = sameNameResults.every(function(
|
|
17759
|
-
var data2 =
|
|
17793
|
+
var isSameUrl = sameNameResults.every(function(_ref69) {
|
|
17794
|
+
var data2 = _ref69.data;
|
|
17760
17795
|
return isIdenticalObject(data2.urlProps, urlProps);
|
|
17761
17796
|
});
|
|
17762
17797
|
if (sameNameResults.length && !isSameUrl) {
|
|
@@ -17886,7 +17921,7 @@
|
|
|
17886
17921
|
function internalLinkPresentEvaluate(node, options, virtualNode) {
|
|
17887
17922
|
var links = query_selector_all_default(virtualNode, 'a[href]');
|
|
17888
17923
|
return links.some(function(vLink) {
|
|
17889
|
-
return /^#[^/!]/.test(vLink.
|
|
17924
|
+
return /^#[^/!]/.test(vLink.attr('href'));
|
|
17890
17925
|
});
|
|
17891
17926
|
}
|
|
17892
17927
|
var internal_link_present_evaluate_default = internalLinkPresentEvaluate;
|
|
@@ -17917,16 +17952,16 @@
|
|
|
17917
17952
|
var outerText = elm.textContent.trim();
|
|
17918
17953
|
var innerText = outerText;
|
|
17919
17954
|
while (innerText === outerText && nextNode !== void 0) {
|
|
17920
|
-
var
|
|
17955
|
+
var _i20 = -1;
|
|
17921
17956
|
elm = nextNode;
|
|
17922
17957
|
if (elm.children.length === 0) {
|
|
17923
17958
|
return elm;
|
|
17924
17959
|
}
|
|
17925
17960
|
do {
|
|
17926
|
-
|
|
17927
|
-
innerText = elm.children[
|
|
17928
|
-
} while (innerText === '' &&
|
|
17929
|
-
nextNode = elm.children[
|
|
17961
|
+
_i20++;
|
|
17962
|
+
innerText = elm.children[_i20].textContent.trim();
|
|
17963
|
+
} while (innerText === '' && _i20 + 1 < elm.children.length);
|
|
17964
|
+
nextNode = elm.children[_i20];
|
|
17930
17965
|
}
|
|
17931
17966
|
return elm;
|
|
17932
17967
|
}
|
|
@@ -18012,8 +18047,8 @@
|
|
|
18012
18047
|
} else if (node !== document.body && has_content_default(node, true)) {
|
|
18013
18048
|
return [ virtualNode ];
|
|
18014
18049
|
} else {
|
|
18015
|
-
return virtualNode.children.filter(function(
|
|
18016
|
-
var actualNode =
|
|
18050
|
+
return virtualNode.children.filter(function(_ref70) {
|
|
18051
|
+
var actualNode = _ref70.actualNode;
|
|
18017
18052
|
return actualNode.nodeType === 1;
|
|
18018
18053
|
}).map(function(vNode) {
|
|
18019
18054
|
return findRegionlessElms(vNode, options);
|
|
@@ -18196,8 +18231,8 @@
|
|
|
18196
18231
|
if (!virtualNode.children) {
|
|
18197
18232
|
return void 0;
|
|
18198
18233
|
}
|
|
18199
|
-
var titleNode = virtualNode.children.find(function(
|
|
18200
|
-
var props =
|
|
18234
|
+
var titleNode = virtualNode.children.find(function(_ref71) {
|
|
18235
|
+
var props = _ref71.props;
|
|
18201
18236
|
return props.nodeName === 'title';
|
|
18202
18237
|
});
|
|
18203
18238
|
if (!titleNode) {
|
|
@@ -18220,8 +18255,8 @@
|
|
|
18220
18255
|
}
|
|
18221
18256
|
var svg_non_empty_title_evaluate_default = svgNonEmptyTitleEvaluate;
|
|
18222
18257
|
function cssOrientationLockEvaluate(node, options, virtualNode, context5) {
|
|
18223
|
-
var
|
|
18224
|
-
var
|
|
18258
|
+
var _ref72 = context5 || {}, _ref72$cssom = _ref72.cssom, cssom = _ref72$cssom === void 0 ? void 0 : _ref72$cssom;
|
|
18259
|
+
var _ref73 = options || {}, _ref73$degreeThreshol = _ref73.degreeThreshold, degreeThreshold = _ref73$degreeThreshol === void 0 ? 0 : _ref73$degreeThreshol;
|
|
18225
18260
|
if (!cssom || !cssom.length) {
|
|
18226
18261
|
return void 0;
|
|
18227
18262
|
}
|
|
@@ -18229,14 +18264,14 @@
|
|
|
18229
18264
|
var relatedElements = [];
|
|
18230
18265
|
var rulesGroupByDocumentFragment = groupCssomByDocument(cssom);
|
|
18231
18266
|
var _loop6 = function _loop6() {
|
|
18232
|
-
var key = _Object$keys2[
|
|
18267
|
+
var key = _Object$keys2[_i21];
|
|
18233
18268
|
var _rulesGroupByDocument = rulesGroupByDocumentFragment[key], root = _rulesGroupByDocument.root, rules = _rulesGroupByDocument.rules;
|
|
18234
18269
|
var orientationRules = rules.filter(isMediaRuleWithOrientation);
|
|
18235
18270
|
if (!orientationRules.length) {
|
|
18236
18271
|
return 'continue';
|
|
18237
18272
|
}
|
|
18238
|
-
orientationRules.forEach(function(
|
|
18239
|
-
var cssRules =
|
|
18273
|
+
orientationRules.forEach(function(_ref74) {
|
|
18274
|
+
var cssRules = _ref74.cssRules;
|
|
18240
18275
|
Array.from(cssRules).forEach(function(cssRule) {
|
|
18241
18276
|
var locked = getIsOrientationLocked(cssRule);
|
|
18242
18277
|
if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
|
|
@@ -18247,7 +18282,7 @@
|
|
|
18247
18282
|
});
|
|
18248
18283
|
});
|
|
18249
18284
|
};
|
|
18250
|
-
for (var
|
|
18285
|
+
for (var _i21 = 0, _Object$keys2 = Object.keys(rulesGroupByDocumentFragment); _i21 < _Object$keys2.length; _i21++) {
|
|
18251
18286
|
var _ret3 = _loop6();
|
|
18252
18287
|
if (_ret3 === 'continue') {
|
|
18253
18288
|
continue;
|
|
@@ -18261,8 +18296,8 @@
|
|
|
18261
18296
|
}
|
|
18262
18297
|
return false;
|
|
18263
18298
|
function groupCssomByDocument(cssObjectModel) {
|
|
18264
|
-
return cssObjectModel.reduce(function(out,
|
|
18265
|
-
var sheet =
|
|
18299
|
+
return cssObjectModel.reduce(function(out, _ref75) {
|
|
18300
|
+
var sheet = _ref75.sheet, root = _ref75.root, shadowId = _ref75.shadowId;
|
|
18266
18301
|
var key = shadowId ? shadowId : 'topDocument';
|
|
18267
18302
|
if (!out[key]) {
|
|
18268
18303
|
out[key] = {
|
|
@@ -18278,15 +18313,15 @@
|
|
|
18278
18313
|
return out;
|
|
18279
18314
|
}, {});
|
|
18280
18315
|
}
|
|
18281
|
-
function isMediaRuleWithOrientation(
|
|
18282
|
-
var type =
|
|
18316
|
+
function isMediaRuleWithOrientation(_ref76) {
|
|
18317
|
+
var type = _ref76.type, cssText = _ref76.cssText;
|
|
18283
18318
|
if (type !== 4) {
|
|
18284
18319
|
return false;
|
|
18285
18320
|
}
|
|
18286
18321
|
return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
|
|
18287
18322
|
}
|
|
18288
|
-
function getIsOrientationLocked(
|
|
18289
|
-
var selectorText =
|
|
18323
|
+
function getIsOrientationLocked(_ref77) {
|
|
18324
|
+
var selectorText = _ref77.selectorText, style = _ref77.style;
|
|
18290
18325
|
if (!selectorText || style.length <= 0) {
|
|
18291
18326
|
return false;
|
|
18292
18327
|
}
|
|
@@ -18333,7 +18368,7 @@
|
|
|
18333
18368
|
}
|
|
18334
18369
|
}
|
|
18335
18370
|
function getAngleInDegrees(angleWithUnit) {
|
|
18336
|
-
var
|
|
18371
|
+
var _ref78 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref79 = _slicedToArray(_ref78, 1), unit = _ref79[0];
|
|
18337
18372
|
if (!unit) {
|
|
18338
18373
|
return;
|
|
18339
18374
|
}
|
|
@@ -18382,7 +18417,7 @@
|
|
|
18382
18417
|
}
|
|
18383
18418
|
var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
|
|
18384
18419
|
function metaViewportScaleEvaluate(node, options, virtualNode) {
|
|
18385
|
-
var
|
|
18420
|
+
var _ref80 = options || {}, _ref80$scaleMinimum = _ref80.scaleMinimum, scaleMinimum = _ref80$scaleMinimum === void 0 ? 2 : _ref80$scaleMinimum, _ref80$lowerBound = _ref80.lowerBound, lowerBound = _ref80$lowerBound === void 0 ? false : _ref80$lowerBound;
|
|
18386
18421
|
var content = virtualNode.attr('content') || '';
|
|
18387
18422
|
if (!content) {
|
|
18388
18423
|
return true;
|
|
@@ -18498,8 +18533,8 @@
|
|
|
18498
18533
|
if (!tabbableElements || !tabbableElements.length) {
|
|
18499
18534
|
return true;
|
|
18500
18535
|
}
|
|
18501
|
-
var relatedNodes = tabbableElements.reduce(function(out,
|
|
18502
|
-
var el =
|
|
18536
|
+
var relatedNodes = tabbableElements.reduce(function(out, _ref81) {
|
|
18537
|
+
var el = _ref81.actualNode;
|
|
18503
18538
|
var nodeName2 = el.nodeName.toUpperCase();
|
|
18504
18539
|
if (elementsThatCanBeDisabled.includes(nodeName2)) {
|
|
18505
18540
|
out.push(el);
|
|
@@ -18538,8 +18573,8 @@
|
|
|
18538
18573
|
}
|
|
18539
18574
|
var focusable_element_evaluate_default = focusableElementEvaluate;
|
|
18540
18575
|
function focusableModalOpenEvaluate(node, options, virtualNode) {
|
|
18541
|
-
var tabbableElements = virtualNode.tabbableElements.map(function(
|
|
18542
|
-
var actualNode =
|
|
18576
|
+
var tabbableElements = virtualNode.tabbableElements.map(function(_ref82) {
|
|
18577
|
+
var actualNode = _ref82.actualNode;
|
|
18543
18578
|
return actualNode;
|
|
18544
18579
|
});
|
|
18545
18580
|
if (!tabbableElements || !tabbableElements.length) {
|
|
@@ -18571,8 +18606,8 @@
|
|
|
18571
18606
|
if (!tabbableElements || !tabbableElements.length) {
|
|
18572
18607
|
return true;
|
|
18573
18608
|
}
|
|
18574
|
-
var relatedNodes = tabbableElements.reduce(function(out,
|
|
18575
|
-
var el =
|
|
18609
|
+
var relatedNodes = tabbableElements.reduce(function(out, _ref83) {
|
|
18610
|
+
var el = _ref83.actualNode;
|
|
18576
18611
|
var nodeName2 = el.nodeName.toUpperCase();
|
|
18577
18612
|
if (!elementsThatCanBeDisabled.includes(nodeName2)) {
|
|
18578
18613
|
out.push(el);
|
|
@@ -18620,7 +18655,7 @@
|
|
|
18620
18655
|
return focusableDescendants(child);
|
|
18621
18656
|
});
|
|
18622
18657
|
}
|
|
18623
|
-
function
|
|
18658
|
+
function frameFocusableContentEvaluate(node, options, virtualNode) {
|
|
18624
18659
|
if (!virtualNode.children) {
|
|
18625
18660
|
return void 0;
|
|
18626
18661
|
}
|
|
@@ -18632,7 +18667,49 @@
|
|
|
18632
18667
|
return void 0;
|
|
18633
18668
|
}
|
|
18634
18669
|
}
|
|
18635
|
-
var
|
|
18670
|
+
var frame_focusable_content_evaluate_default = frameFocusableContentEvaluate;
|
|
18671
|
+
function getFocusableDescendants(vNode) {
|
|
18672
|
+
if (!vNode.children) {
|
|
18673
|
+
if (vNode.props.nodeType === 1) {
|
|
18674
|
+
throw new Error('Cannot determine children');
|
|
18675
|
+
}
|
|
18676
|
+
return [];
|
|
18677
|
+
}
|
|
18678
|
+
var retVal = [];
|
|
18679
|
+
vNode.children.forEach(function(child) {
|
|
18680
|
+
if (is_focusable_default(child)) {
|
|
18681
|
+
retVal.push(child);
|
|
18682
|
+
} else {
|
|
18683
|
+
retVal.push.apply(retVal, _toConsumableArray(getFocusableDescendants(child)));
|
|
18684
|
+
}
|
|
18685
|
+
});
|
|
18686
|
+
return retVal;
|
|
18687
|
+
}
|
|
18688
|
+
function usesUnreliableHidingStrategy(vNode) {
|
|
18689
|
+
var tabIndex = parseInt(vNode.attr('tabindex'), 10);
|
|
18690
|
+
return !isNaN(tabIndex) && tabIndex < 0;
|
|
18691
|
+
}
|
|
18692
|
+
function noFocusableContentEvaluate(node, options, virtualNode) {
|
|
18693
|
+
if (!virtualNode.children) {
|
|
18694
|
+
return void 0;
|
|
18695
|
+
}
|
|
18696
|
+
try {
|
|
18697
|
+
var focusableDescendants2 = getFocusableDescendants(virtualNode);
|
|
18698
|
+
if (focusableDescendants2.length > 0) {
|
|
18699
|
+
var notHiddenElements = focusableDescendants2.filter(usesUnreliableHidingStrategy);
|
|
18700
|
+
if (notHiddenElements.length > 0) {
|
|
18701
|
+
this.data({
|
|
18702
|
+
messageKey: 'notHidden'
|
|
18703
|
+
});
|
|
18704
|
+
this.relatedNodes(notHiddenElements);
|
|
18705
|
+
}
|
|
18706
|
+
}
|
|
18707
|
+
return focusableDescendants2.length === 0;
|
|
18708
|
+
} catch (e) {
|
|
18709
|
+
return void 0;
|
|
18710
|
+
}
|
|
18711
|
+
}
|
|
18712
|
+
var no_focusable_content_evaluate_default = noFocusableContentEvaluate;
|
|
18636
18713
|
function tabindexEvaluate(node, options, virtualNode) {
|
|
18637
18714
|
var tabIndex = parseInt(virtualNode.attr('tabindex'), 10);
|
|
18638
18715
|
return isNaN(tabIndex) ? true : tabIndex <= 0;
|
|
@@ -18754,7 +18831,7 @@
|
|
|
18754
18831
|
return sanitize_default(noUnicodeStr);
|
|
18755
18832
|
}
|
|
18756
18833
|
function labelContentNameMismatchEvaluate(node, options, virtualNode) {
|
|
18757
|
-
var
|
|
18834
|
+
var _ref84 = options || {}, pixelThreshold = _ref84.pixelThreshold, occuranceThreshold = _ref84.occuranceThreshold;
|
|
18758
18835
|
var accText = accessible_text_default(node).toLowerCase();
|
|
18759
18836
|
if (is_human_interpretable_default(accText) < 1) {
|
|
18760
18837
|
return void 0;
|
|
@@ -19122,8 +19199,8 @@
|
|
|
19122
19199
|
var aria46 = /^aria-/;
|
|
19123
19200
|
var attrs = virtualNode.attrNames;
|
|
19124
19201
|
if (attrs.length) {
|
|
19125
|
-
for (var
|
|
19126
|
-
if (aria46.test(attrs[
|
|
19202
|
+
for (var _i22 = 0, l = attrs.length; _i22 < l; _i22++) {
|
|
19203
|
+
if (aria46.test(attrs[_i22])) {
|
|
19127
19204
|
return true;
|
|
19128
19205
|
}
|
|
19129
19206
|
}
|
|
@@ -19504,7 +19581,7 @@
|
|
|
19504
19581
|
if (!role || [ 'none', 'presentation' ].includes(role)) {
|
|
19505
19582
|
return true;
|
|
19506
19583
|
}
|
|
19507
|
-
var
|
|
19584
|
+
var _ref85 = aria_roles_default[role] || {}, accessibleNameRequired = _ref85.accessibleNameRequired;
|
|
19508
19585
|
if (accessibleNameRequired || is_focusable_default(virtualNode)) {
|
|
19509
19586
|
return true;
|
|
19510
19587
|
}
|
|
@@ -19667,6 +19744,7 @@
|
|
|
19667
19744
|
'focusable-no-name-evaluate': focusable_no_name_evaluate_default,
|
|
19668
19745
|
'focusable-not-tabbable-evaluate': focusable_not_tabbable_evaluate_default,
|
|
19669
19746
|
'landmark-is-top-level-evaluate': landmark_is_top_level_evaluate_default,
|
|
19747
|
+
'frame-focusable-content-evaluate': frame_focusable_content_evaluate_default,
|
|
19670
19748
|
'no-focusable-content-evaluate': no_focusable_content_evaluate_default,
|
|
19671
19749
|
'tabindex-evaluate': tabindex_evaluate_default,
|
|
19672
19750
|
'alt-space-value-evaluate': alt_space_value_evaluate_default,
|
|
@@ -20319,8 +20397,8 @@
|
|
|
20319
20397
|
lang: this.lang
|
|
20320
20398
|
};
|
|
20321
20399
|
var checkIDs = Object.keys(this.data.checks);
|
|
20322
|
-
for (var
|
|
20323
|
-
var id = checkIDs[
|
|
20400
|
+
for (var _i23 = 0; _i23 < checkIDs.length; _i23++) {
|
|
20401
|
+
var id = checkIDs[_i23];
|
|
20324
20402
|
var check4 = this.data.checks[id];
|
|
20325
20403
|
var _check4$messages = check4.messages, pass = _check4$messages.pass, fail = _check4$messages.fail, incomplete = _check4$messages.incomplete;
|
|
20326
20404
|
locale.checks[id] = {
|
|
@@ -20330,8 +20408,8 @@
|
|
|
20330
20408
|
};
|
|
20331
20409
|
}
|
|
20332
20410
|
var ruleIDs = Object.keys(this.data.rules);
|
|
20333
|
-
for (var
|
|
20334
|
-
var _id = ruleIDs[
|
|
20411
|
+
for (var _i24 = 0; _i24 < ruleIDs.length; _i24++) {
|
|
20412
|
+
var _id = ruleIDs[_i24];
|
|
20335
20413
|
var rule3 = this.data.rules[_id];
|
|
20336
20414
|
var description = rule3.description, help = rule3.help;
|
|
20337
20415
|
locale.rules[_id] = {
|
|
@@ -20340,8 +20418,8 @@
|
|
|
20340
20418
|
};
|
|
20341
20419
|
}
|
|
20342
20420
|
var failureSummaries = Object.keys(this.data.failureSummaries);
|
|
20343
|
-
for (var
|
|
20344
|
-
var type = failureSummaries[
|
|
20421
|
+
for (var _i25 = 0; _i25 < failureSummaries.length; _i25++) {
|
|
20422
|
+
var type = failureSummaries[_i25];
|
|
20345
20423
|
var failureSummary2 = this.data.failureSummaries[type];
|
|
20346
20424
|
var failureMessage = failureSummary2.failureMessage;
|
|
20347
20425
|
locale.failureSummaries[type] = {
|
|
@@ -20364,8 +20442,8 @@
|
|
|
20364
20442
|
key: '_applyCheckLocale',
|
|
20365
20443
|
value: function _applyCheckLocale(checks) {
|
|
20366
20444
|
var keys = Object.keys(checks);
|
|
20367
|
-
for (var
|
|
20368
|
-
var id = keys[
|
|
20445
|
+
for (var _i26 = 0; _i26 < keys.length; _i26++) {
|
|
20446
|
+
var id = keys[_i26];
|
|
20369
20447
|
if (!this.data.checks[id]) {
|
|
20370
20448
|
throw new Error('Locale provided for unknown check: "'.concat(id, '"'));
|
|
20371
20449
|
}
|
|
@@ -20376,8 +20454,8 @@
|
|
|
20376
20454
|
key: '_applyRuleLocale',
|
|
20377
20455
|
value: function _applyRuleLocale(rules) {
|
|
20378
20456
|
var keys = Object.keys(rules);
|
|
20379
|
-
for (var
|
|
20380
|
-
var id = keys[
|
|
20457
|
+
for (var _i27 = 0; _i27 < keys.length; _i27++) {
|
|
20458
|
+
var id = keys[_i27];
|
|
20381
20459
|
if (!this.data.rules[id]) {
|
|
20382
20460
|
throw new Error('Locale provided for unknown rule: "'.concat(id, '"'));
|
|
20383
20461
|
}
|
|
@@ -20388,8 +20466,8 @@
|
|
|
20388
20466
|
key: '_applyFailureSummaries',
|
|
20389
20467
|
value: function _applyFailureSummaries(messages) {
|
|
20390
20468
|
var keys = Object.keys(messages);
|
|
20391
|
-
for (var
|
|
20392
|
-
var key = keys[
|
|
20469
|
+
for (var _i28 = 0; _i28 < keys.length; _i28++) {
|
|
20470
|
+
var key = keys[_i28];
|
|
20393
20471
|
if (!this.data.failureSummaries[key]) {
|
|
20394
20472
|
throw new Error('Locale provided for unknown failureMessage: "'.concat(key, '"'));
|
|
20395
20473
|
}
|
|
@@ -20735,8 +20813,8 @@
|
|
|
20735
20813
|
});
|
|
20736
20814
|
};
|
|
20737
20815
|
}
|
|
20738
|
-
function getHelpUrl(
|
|
20739
|
-
var brand =
|
|
20816
|
+
function getHelpUrl(_ref86, ruleId, version) {
|
|
20817
|
+
var brand = _ref86.brand, application = _ref86.application, lang = _ref86.lang;
|
|
20740
20818
|
return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
|
|
20741
20819
|
}
|
|
20742
20820
|
var audit_default = Audit;
|
|
@@ -21150,9 +21228,9 @@
|
|
|
21150
21228
|
});
|
|
21151
21229
|
}
|
|
21152
21230
|
var run_virtual_rule_default = runVirtualRule;
|
|
21153
|
-
function normalizeRunParams(
|
|
21154
|
-
var
|
|
21155
|
-
var
|
|
21231
|
+
function normalizeRunParams(_ref87) {
|
|
21232
|
+
var _ref89, _options$reporter, _axe$_audit;
|
|
21233
|
+
var _ref88 = _slicedToArray(_ref87, 3), context5 = _ref88[0], options = _ref88[1], callback = _ref88[2];
|
|
21156
21234
|
var typeErr = new TypeError('axe.run arguments are invalid');
|
|
21157
21235
|
if (!isContext(context5)) {
|
|
21158
21236
|
if (callback !== void 0) {
|
|
@@ -21173,7 +21251,7 @@
|
|
|
21173
21251
|
throw typeErr;
|
|
21174
21252
|
}
|
|
21175
21253
|
options = clone_default(options);
|
|
21176
|
-
options.reporter = (
|
|
21254
|
+
options.reporter = (_ref89 = (_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 && _ref89 !== void 0 ? _ref89 : 'v1';
|
|
21177
21255
|
return {
|
|
21178
21256
|
context: context5,
|
|
21179
21257
|
options: options,
|
|
@@ -21298,14 +21376,14 @@
|
|
|
21298
21376
|
return new Promise(function(res, rej) {
|
|
21299
21377
|
axe._audit.run(contextObj, options, res, rej);
|
|
21300
21378
|
}).then(function(results) {
|
|
21301
|
-
results = results.map(function(
|
|
21302
|
-
var nodes =
|
|
21379
|
+
results = results.map(function(_ref90) {
|
|
21380
|
+
var nodes = _ref90.nodes, result = _objectWithoutProperties(_ref90, _excluded8);
|
|
21303
21381
|
return _extends({
|
|
21304
21382
|
nodes: nodes.map(serializeNode)
|
|
21305
21383
|
}, result);
|
|
21306
21384
|
});
|
|
21307
|
-
var frames = contextObj.frames.map(function(
|
|
21308
|
-
var node =
|
|
21385
|
+
var frames = contextObj.frames.map(function(_ref91) {
|
|
21386
|
+
var node = _ref91.node;
|
|
21309
21387
|
return new dq_element_default(node, options).toJSON();
|
|
21310
21388
|
});
|
|
21311
21389
|
var environmentData;
|
|
@@ -21322,13 +21400,13 @@
|
|
|
21322
21400
|
teardown_default();
|
|
21323
21401
|
});
|
|
21324
21402
|
}
|
|
21325
|
-
function serializeNode(
|
|
21326
|
-
var node =
|
|
21403
|
+
function serializeNode(_ref92) {
|
|
21404
|
+
var node = _ref92.node, nodeResult = _objectWithoutProperties(_ref92, _excluded9);
|
|
21327
21405
|
nodeResult.node = node.toJSON();
|
|
21328
|
-
for (var
|
|
21329
|
-
var type = _arr2[
|
|
21330
|
-
nodeResult[type] = nodeResult[type].map(function(
|
|
21331
|
-
var relatedNodes =
|
|
21406
|
+
for (var _i29 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i29 < _arr2.length; _i29++) {
|
|
21407
|
+
var type = _arr2[_i29];
|
|
21408
|
+
nodeResult[type] = nodeResult[type].map(function(_ref93) {
|
|
21409
|
+
var relatedNodes = _ref93.relatedNodes, checkResult = _objectWithoutProperties(_ref93, _excluded10);
|
|
21332
21410
|
return _extends({}, checkResult, {
|
|
21333
21411
|
relatedNodes: relatedNodes.map(function(node2) {
|
|
21334
21412
|
return node2.toJSON();
|
|
@@ -21339,14 +21417,14 @@
|
|
|
21339
21417
|
return nodeResult;
|
|
21340
21418
|
}
|
|
21341
21419
|
function finishRun(partialResults) {
|
|
21342
|
-
var
|
|
21420
|
+
var _ref95, _options$reporter2, _axe$_audit2;
|
|
21343
21421
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
21344
21422
|
options = clone_default(options);
|
|
21345
|
-
var
|
|
21423
|
+
var _ref94 = partialResults.find(function(r) {
|
|
21346
21424
|
return r.environmentData;
|
|
21347
|
-
}) || {}, environmentData =
|
|
21425
|
+
}) || {}, environmentData = _ref94.environmentData;
|
|
21348
21426
|
axe._audit.normalizeOptions(options);
|
|
21349
|
-
options.reporter = (
|
|
21427
|
+
options.reporter = (_ref95 = (_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 && _ref95 !== void 0 ? _ref95 : 'v1';
|
|
21350
21428
|
setFrameSpec(partialResults);
|
|
21351
21429
|
var results = merge_results_default(partialResults);
|
|
21352
21430
|
results = axe._audit.after(results, options);
|
|
@@ -21376,8 +21454,8 @@
|
|
|
21376
21454
|
_iterator4.f();
|
|
21377
21455
|
}
|
|
21378
21456
|
}
|
|
21379
|
-
function getMergedFrameSpecs(
|
|
21380
|
-
var childFrameSpecs =
|
|
21457
|
+
function getMergedFrameSpecs(_ref96) {
|
|
21458
|
+
var childFrameSpecs = _ref96.frames, parentFrameSpec = _ref96.frameSpec;
|
|
21381
21459
|
if (!parentFrameSpec) {
|
|
21382
21460
|
return childFrameSpecs;
|
|
21383
21461
|
}
|
|
@@ -21437,12 +21515,12 @@
|
|
|
21437
21515
|
var transformedResults = results.map(function(result) {
|
|
21438
21516
|
var transformedResult = _extends({}, result);
|
|
21439
21517
|
var types = [ 'passes', 'violations', 'incomplete', 'inapplicable' ];
|
|
21440
|
-
for (var
|
|
21441
|
-
var type = _types[
|
|
21518
|
+
for (var _i30 = 0, _types = types; _i30 < _types.length; _i30++) {
|
|
21519
|
+
var type = _types[_i30];
|
|
21442
21520
|
if (transformedResult[type] && Array.isArray(transformedResult[type])) {
|
|
21443
|
-
transformedResult[type] = transformedResult[type].map(function(
|
|
21521
|
+
transformedResult[type] = transformedResult[type].map(function(_ref97) {
|
|
21444
21522
|
var _node;
|
|
21445
|
-
var node =
|
|
21523
|
+
var node = _ref97.node, typeResult = _objectWithoutProperties(_ref97, _excluded13);
|
|
21446
21524
|
node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
|
|
21447
21525
|
return _extends({
|
|
21448
21526
|
node: node
|
|
@@ -21850,7 +21928,7 @@
|
|
|
21850
21928
|
help: 'Zooming and scaling should not be disabled'
|
|
21851
21929
|
},
|
|
21852
21930
|
'nested-interactive': {
|
|
21853
|
-
description: '
|
|
21931
|
+
description: 'Ensures interactive controls are not nested as they are not always announced by screen readers or can cause focus problems for assistive technologies',
|
|
21854
21932
|
help: 'Interactive controls must not be nested'
|
|
21855
21933
|
},
|
|
21856
21934
|
'no-autoplay-audio': {
|
|
@@ -22272,7 +22350,10 @@
|
|
|
22272
22350
|
impact: 'serious',
|
|
22273
22351
|
messages: {
|
|
22274
22352
|
pass: 'Element does not have focusable descendants',
|
|
22275
|
-
fail:
|
|
22353
|
+
fail: {
|
|
22354
|
+
default: 'Element has focusable descendants',
|
|
22355
|
+
notHidden: 'Using a negative tabindex on an element inside an interactive control does not prevent assistive technologies from focusing the element (even with \'aria-hidden=true\')'
|
|
22356
|
+
},
|
|
22276
22357
|
incomplete: 'Could not determine if element has descendants'
|
|
22277
22358
|
}
|
|
22278
22359
|
},
|
|
@@ -23126,7 +23207,12 @@
|
|
|
23126
23207
|
matches: 'autocomplete-matches',
|
|
23127
23208
|
tags: [ 'cat.forms', 'wcag21aa', 'wcag135' ],
|
|
23128
23209
|
actIds: [ '73f2c2' ],
|
|
23129
|
-
all: [
|
|
23210
|
+
all: [ {
|
|
23211
|
+
options: {
|
|
23212
|
+
stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null' ]
|
|
23213
|
+
},
|
|
23214
|
+
id: 'autocomplete-valid'
|
|
23215
|
+
} ],
|
|
23130
23216
|
any: [],
|
|
23131
23217
|
none: []
|
|
23132
23218
|
}, {
|
|
@@ -24065,7 +24151,10 @@
|
|
|
24065
24151
|
deprecated: true
|
|
24066
24152
|
}, {
|
|
24067
24153
|
id: 'autocomplete-valid',
|
|
24068
|
-
evaluate: 'autocomplete-valid-evaluate'
|
|
24154
|
+
evaluate: 'autocomplete-valid-evaluate',
|
|
24155
|
+
options: {
|
|
24156
|
+
stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null' ]
|
|
24157
|
+
}
|
|
24069
24158
|
}, {
|
|
24070
24159
|
id: 'accesskeys',
|
|
24071
24160
|
evaluate: 'accesskeys-evaluate',
|
|
@@ -24090,7 +24179,7 @@
|
|
|
24090
24179
|
evaluate: 'focusable-not-tabbable-evaluate'
|
|
24091
24180
|
}, {
|
|
24092
24181
|
id: 'frame-focusable-content',
|
|
24093
|
-
evaluate: '
|
|
24182
|
+
evaluate: 'frame-focusable-content-evaluate'
|
|
24094
24183
|
}, {
|
|
24095
24184
|
id: 'landmark-is-top-level',
|
|
24096
24185
|
evaluate: 'landmark-is-top-level-evaluate'
|