govuk_publishing_components 66.4.2 → 66.5.0

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.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +7 -1
  3. data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +14 -32
  4. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +3 -1
  5. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +231 -221
  6. data/app/views/govuk_publishing_components/components/_published_dates.html.erb +13 -12
  7. data/app/views/govuk_publishing_components/components/_signup_link.html.erb +1 -1
  8. data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +0 -19
  9. data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +12 -23
  10. data/app/views/govuk_publishing_components/components/docs/published_dates.yml +0 -6
  11. data/app/views/govuk_publishing_components/components/docs/signup_link.yml +8 -0
  12. data/config/locales/en.yml +2 -2
  13. data/lib/govuk_publishing_components/version.rb +1 -1
  14. data/node_modules/axe-core/axe.d.ts +39 -1
  15. data/node_modules/axe-core/axe.js +1062 -534
  16. data/node_modules/axe-core/axe.min.js +2 -2
  17. data/node_modules/axe-core/gather-internals.js +219 -0
  18. data/node_modules/axe-core/locales/_template.json +5 -0
  19. data/node_modules/axe-core/locales/ja.json +1 -0
  20. data/node_modules/axe-core/locales/{no_NB.json → nb.json} +1 -1
  21. data/node_modules/axe-core/locales/pt_BR.json +1 -1
  22. data/node_modules/axe-core/locales/pt_PT.json +1 -1
  23. data/node_modules/axe-core/locales/zh_CN.json +1 -1
  24. data/node_modules/axe-core/locales/zh_TW.json +1 -1
  25. data/node_modules/axe-core/package.json +11 -6
  26. data/node_modules/axe-core/sri-history.json +4 -0
  27. metadata +4 -3
@@ -1,4 +1,4 @@
1
- /*! axe v4.11.4
1
+ /*! axe v4.12.0
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.11.4';
25
+ axe.version = '4.12.0';
26
26
  if (typeof define === 'function' && define.amd) {
27
27
  define('axe-core', [], function() {
28
28
  return axe;
@@ -38,6 +38,141 @@
38
38
  var commons;
39
39
  'use strict';
40
40
  var _excluded = [ 'precision', 'format', 'inGamut' ], _excluded2 = [ 'space' ], _excluded3 = [ 'algorithm' ], _excluded4 = [ 'method' ], _excluded5 = [ 'maxDeltaE', 'deltaEMethod', 'steps', 'maxSteps' ], _excluded6 = [ 'node' ], _excluded7 = [ 'relatedNodes' ], _excluded8 = [ 'node' ], _excluded9 = [ 'variant' ], _excluded0 = [ 'matches' ], _excluded1 = [ 'chromium' ], _excluded10 = [ 'noImplicit' ], _excluded11 = [ 'noPresentational' ], _excluded12 = [ 'node' ], _excluded13 = [ 'environmentData' ], _excluded14 = [ 'environmentData' ], _excluded15 = [ 'environmentData' ], _excluded16 = [ 'environmentData' ], _excluded17 = [ 'environmentData' ];
41
+ function _regenerator() {
42
+ var e, t, r = 'function' == typeof Symbol ? Symbol : {}, n = r.iterator || '@@iterator', o = r.toStringTag || '@@toStringTag';
43
+ function i(r, n, o, i) {
44
+ var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype);
45
+ return _regeneratorDefine2(u, '_invoke', function(r, n, o) {
46
+ var i, c, u, f = 0, p = o || [], y = !1, G = {
47
+ p: 0,
48
+ n: 0,
49
+ v: e,
50
+ a: d,
51
+ f: d.bind(e, 4),
52
+ d: function d(t, r) {
53
+ return i = t, c = 0, u = e, G.n = r, a;
54
+ }
55
+ };
56
+ function d(r, n) {
57
+ for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
58
+ var o, i = p[t], d = G.p, l = i[2];
59
+ r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0,
60
+ G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r,
61
+ i[5] = n, G.n = l, c = 0));
62
+ }
63
+ if (o || r > 1) {
64
+ return a;
65
+ }
66
+ throw y = !0, n;
67
+ }
68
+ return function(o, p, l) {
69
+ if (f > 1) {
70
+ throw TypeError('Generator is already running');
71
+ }
72
+ for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y; ) {
73
+ i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
74
+ try {
75
+ if (f = 2, i) {
76
+ if (c || (o = 'next'), t = i[o]) {
77
+ if (!(t = t.call(i, u))) {
78
+ throw TypeError('iterator result is not an object');
79
+ }
80
+ if (!t.done) {
81
+ return t;
82
+ }
83
+ u = t.value, c < 2 && (c = 0);
84
+ } else {
85
+ 1 === c && (t = i['return']) && t.call(i), c < 2 && (u = TypeError('The iterator does not provide a \'' + o + '\' method'),
86
+ c = 1);
87
+ }
88
+ i = e;
89
+ } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) {
90
+ break;
91
+ }
92
+ } catch (t) {
93
+ i = e, c = 1, u = t;
94
+ } finally {
95
+ f = 1;
96
+ }
97
+ }
98
+ return {
99
+ value: t,
100
+ done: y
101
+ };
102
+ };
103
+ }(r, o, i), !0), u;
104
+ }
105
+ var a = {};
106
+ function Generator() {}
107
+ function GeneratorFunction() {}
108
+ function GeneratorFunctionPrototype() {}
109
+ t = Object.getPrototypeOf;
110
+ var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function() {
111
+ return this;
112
+ }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
113
+ function f(e) {
114
+ return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype,
115
+ _regeneratorDefine2(e, o, 'GeneratorFunction')), e.prototype = Object.create(u),
116
+ e;
117
+ }
118
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, 'constructor', GeneratorFunctionPrototype),
119
+ _regeneratorDefine2(GeneratorFunctionPrototype, 'constructor', GeneratorFunction),
120
+ GeneratorFunction.displayName = 'GeneratorFunction', _regeneratorDefine2(GeneratorFunctionPrototype, o, 'GeneratorFunction'),
121
+ _regeneratorDefine2(u), _regeneratorDefine2(u, o, 'Generator'), _regeneratorDefine2(u, n, function() {
122
+ return this;
123
+ }), _regeneratorDefine2(u, 'toString', function() {
124
+ return '[object Generator]';
125
+ }), (_regenerator = function _regenerator() {
126
+ return {
127
+ w: i,
128
+ m: f
129
+ };
130
+ })();
131
+ }
132
+ function _regeneratorDefine2(e, r, n, t) {
133
+ var i = Object.defineProperty;
134
+ try {
135
+ i({}, '', {});
136
+ } catch (e) {
137
+ i = 0;
138
+ }
139
+ _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) {
140
+ function o(r, n) {
141
+ _regeneratorDefine2(e, r, function(e) {
142
+ return this._invoke(r, n, e);
143
+ });
144
+ }
145
+ r ? i ? i(e, r, {
146
+ value: n,
147
+ enumerable: !t,
148
+ configurable: !t,
149
+ writable: !t
150
+ }) : e[r] = n : (o('next', 0), o('throw', 1), o('return', 2));
151
+ }, _regeneratorDefine2(e, r, n, t);
152
+ }
153
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
154
+ try {
155
+ var i = n[a](c), u = i.value;
156
+ } catch (n) {
157
+ return void e(n);
158
+ }
159
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
160
+ }
161
+ function _asyncToGenerator(n) {
162
+ return function() {
163
+ var t = this, e = arguments;
164
+ return new Promise(function(r, o) {
165
+ var a = n.apply(t, e);
166
+ function _next(n) {
167
+ asyncGeneratorStep(a, r, o, _next, _throw, 'next', n);
168
+ }
169
+ function _throw(n) {
170
+ asyncGeneratorStep(a, r, o, _next, _throw, 'throw', n);
171
+ }
172
+ _next(void 0);
173
+ });
174
+ };
175
+ }
41
176
  function _toArray(r) {
42
177
  return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest();
43
178
  }
@@ -6879,6 +7014,9 @@
6879
7014
  getCheckOption: function getCheckOption() {
6880
7015
  return get_check_option_default;
6881
7016
  },
7017
+ getElementInternals: function getElementInternals() {
7018
+ return _getElementInternals;
7019
+ },
6882
7020
  getElementSource: function getElementSource() {
6883
7021
  return _getElementSource;
6884
7022
  },
@@ -6952,7 +7090,7 @@
6952
7090
  return is_hidden_default;
6953
7091
  },
6954
7092
  isHtmlElement: function isHtmlElement() {
6955
- return is_html_element_default;
7093
+ return _isHtmlElement;
6956
7094
  },
6957
7095
  isLabelledFramesSelector: function isLabelledFramesSelector() {
6958
7096
  return _isLabelledFramesSelector;
@@ -6966,6 +7104,9 @@
6966
7104
  isShadowRoot: function isShadowRoot() {
6967
7105
  return is_shadow_root_default;
6968
7106
  },
7107
+ isValidCustomElementName: function isValidCustomElementName() {
7108
+ return _isValidCustomElementName;
7109
+ },
6969
7110
  isValidLang: function isValidLang() {
6970
7111
  return valid_langs_default;
6971
7112
  },
@@ -6999,6 +7140,9 @@
6999
7140
  nodeSorter: function nodeSorter() {
7000
7141
  return node_sorter_default;
7001
7142
  },
7143
+ normalizeRunOptions: function normalizeRunOptions() {
7144
+ return _normalizeRunOptions;
7145
+ },
7002
7146
  objectHasOwn: function objectHasOwn() {
7003
7147
  return _objectHasOwn;
7004
7148
  },
@@ -8148,8 +8292,8 @@
8148
8292
  format.type || (format.type = 'function');
8149
8293
  format.name || (format.name = 'color');
8150
8294
  format.coordGrammar = parseCoordGrammar(format.coords);
8151
- var coordFormats = Object.entries(this.coords).map(function(_ref153, i) {
8152
- var _ref154 = _slicedToArray(_ref153, 2), id = _ref154[0], coordMeta = _ref154[1];
8295
+ var coordFormats = Object.entries(this.coords).map(function(_ref154, i) {
8296
+ var _ref155 = _slicedToArray(_ref154, 2), id = _ref155[0], coordMeta = _ref155[1];
8153
8297
  var outputType = format.coordGrammar[i][0];
8154
8298
  var fromRange = coordMeta.range || coordMeta.refRange;
8155
8299
  var toRange = outputType.range, suffix = '';
@@ -12351,11 +12495,18 @@
12351
12495
  });
12352
12496
  }
12353
12497
  var extend_meta_data_default = extendMetaData;
12498
+ var reservedNames = [ 'annotation-xml', 'color-profile', 'font-face', 'font-face-src', 'font-face-uri', 'font-face-format', 'font-face-name', 'missing-glyph' ];
12499
+ var validLocalNameRegex = /^(?:[A-Za-z](?:[\x01-\x08\x0B\x0E-\x1F!-\.0-=\?-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*|(?:[:_\x80-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])(?:[\x2D\.0-:A-Z_a-z\x80-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF])*)$/;
12500
+ var alphaLowerRegex = /[a-z]/;
12501
+ var alphaUpperRegex = /[A-Z]/;
12502
+ function _isValidCustomElementName(nodeName2) {
12503
+ return !reservedNames.includes(nodeName2) && validLocalNameRegex.test(nodeName2) && alphaLowerRegex.test(nodeName2[0]) && !alphaUpperRegex.test(nodeName2) && nodeName2.includes('-');
12504
+ }
12354
12505
  var possibleShadowRoots = [ 'article', 'aside', 'blockquote', 'body', 'div', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'main', 'nav', 'p', 'section', 'span' ];
12355
12506
  function isShadowRoot(node) {
12356
12507
  if (node.shadowRoot) {
12357
12508
  var nodeName2 = node.nodeName.toLowerCase();
12358
- if (possibleShadowRoots.includes(nodeName2) || /^[a-z][a-z0-9_.-]*-[a-z0-9_.-]*$/.test(nodeName2)) {
12509
+ if (possibleShadowRoots.includes(nodeName2) || _isValidCustomElementName(nodeName2)) {
12359
12510
  return true;
12360
12511
  }
12361
12512
  }
@@ -16341,12 +16492,15 @@
16341
16492
  }
16342
16493
  var get_element_spec_default = getElementSpec;
16343
16494
  function implicitRole2(node) {
16495
+ var _vNode$elementInterna;
16344
16496
  var _ref56 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref56.chromium;
16345
- var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
16346
- node = vNode.actualNode;
16497
+ var _nodeLookup10 = _nodeLookup(node), vNode = _nodeLookup10.vNode;
16347
16498
  if (!vNode) {
16348
16499
  throw new ReferenceError('Cannot get implicit role of a node outside the current scope.');
16349
16500
  }
16501
+ if ((_vNode$elementInterna = vNode.elementInternals) !== null && _vNode$elementInterna !== void 0 && _vNode$elementInterna.role) {
16502
+ return vNode.elementInternals.role;
16503
+ }
16350
16504
  var nodeName2 = vNode.props.nodeName;
16351
16505
  var role = implicit_html_roles_default[nodeName2];
16352
16506
  if (!role && chromium) {
@@ -16417,7 +16571,7 @@
16417
16571
  function resolveRole(node) {
16418
16572
  var _ref58 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
16419
16573
  var noImplicit = _ref58.noImplicit, roleOptions = _objectWithoutProperties(_ref58, _excluded10);
16420
- var _nodeLookup10 = _nodeLookup(node), vNode = _nodeLookup10.vNode;
16574
+ var _nodeLookup11 = _nodeLookup(node), vNode = _nodeLookup11.vNode;
16421
16575
  if (vNode.props.nodeType !== 1) {
16422
16576
  return null;
16423
16577
  }
@@ -16445,7 +16599,7 @@
16445
16599
  var get_role_default = getRole;
16446
16600
  var alwaysTitleElements = [ 'iframe' ];
16447
16601
  function titleText(node) {
16448
- var _nodeLookup11 = _nodeLookup(node), vNode = _nodeLookup11.vNode;
16602
+ var _nodeLookup12 = _nodeLookup(node), vNode = _nodeLookup12.vNode;
16449
16603
  if (vNode.props.nodeType !== 1 || !node.hasAttr('title')) {
16450
16604
  return '';
16451
16605
  }
@@ -16522,18 +16676,143 @@
16522
16676
  }
16523
16677
  return isVisibleToScreenReadersVirtual(vNode.parent, true);
16524
16678
  });
16679
+ function getUnicodeNonBmpRegExp() {
16680
+ return /[\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u20A0-\u20CF\u20D0-\u20FF\u2100-\u214F\u2150-\u218F\u2190-\u21FF\u2200-\u22FF\u2300-\u23FF\u2400-\u243F\u2440-\u245F\u2460-\u24FF\u2500-\u257F\u2580-\u259F\u25A0-\u25FF\u2600-\u26FF\u2700-\u27BF\uE000-\uF8FF]/g;
16681
+ }
16682
+ function getPunctuationRegExp() {
16683
+ return /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&\xa3\xa2\xa5\xa7\u20ac()*+,\-.\/:;<=>?@\[\]^_`{|}~\xb1]/g;
16684
+ }
16685
+ function getSupplementaryPrivateUseRegExp() {
16686
+ return /[\uDB80-\uDBBF][\uDC00-\uDFFF]/g;
16687
+ }
16688
+ function getCategoryFormatRegExp() {
16689
+ return /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC38]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/g;
16690
+ }
16691
+ function hasUnicode(str, options) {
16692
+ var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations;
16693
+ var value = false;
16694
+ if (emoji) {
16695
+ value || (value = emoji_regex_default().test(str));
16696
+ }
16697
+ if (nonBmp) {
16698
+ value || (value = getUnicodeNonBmpRegExp().test(str) || getSupplementaryPrivateUseRegExp().test(str) || getCategoryFormatRegExp().test(str));
16699
+ }
16700
+ if (punctuations) {
16701
+ value || (value = getPunctuationRegExp().test(str));
16702
+ }
16703
+ return value;
16704
+ }
16705
+ var has_unicode_default = hasUnicode;
16706
+ function _isIconLigature(textVNode) {
16707
+ var differenceThreshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .15;
16708
+ var occurrenceThreshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
16709
+ var nodeValue = textVNode.actualNode.nodeValue.trim();
16710
+ if (!sanitize_default(nodeValue) || has_unicode_default(nodeValue, {
16711
+ emoji: true,
16712
+ nonBmp: true
16713
+ })) {
16714
+ return false;
16715
+ }
16716
+ var canvasContext = cache_default.get('canvasContext', function() {
16717
+ return document.createElement('canvas').getContext('2d', {
16718
+ willReadFrequently: true
16719
+ });
16720
+ });
16721
+ var canvas = canvasContext.canvas;
16722
+ var fonts = cache_default.get('fonts', function() {
16723
+ return {};
16724
+ });
16725
+ var style = window.getComputedStyle(textVNode.parent.actualNode);
16726
+ var fontFamily = style.getPropertyValue('font-family');
16727
+ if (!fonts[fontFamily]) {
16728
+ fonts[fontFamily] = {
16729
+ occurrences: 0,
16730
+ numLigatures: 0
16731
+ };
16732
+ }
16733
+ var font = fonts[fontFamily];
16734
+ if (font.occurrences >= occurrenceThreshold) {
16735
+ if (font.numLigatures / font.occurrences === 1) {
16736
+ return true;
16737
+ } else if (font.numLigatures === 0) {
16738
+ return false;
16739
+ }
16740
+ }
16741
+ font.occurrences++;
16742
+ var fontSize = 30;
16743
+ var fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
16744
+ canvasContext.font = fontStyle;
16745
+ var firstChar = nodeValue.charAt(0);
16746
+ var width = canvasContext.measureText(firstChar).width;
16747
+ if (width === 0) {
16748
+ font.numLigatures++;
16749
+ return true;
16750
+ }
16751
+ if (width < 30) {
16752
+ var diff = 30 / width;
16753
+ width *= diff;
16754
+ fontSize *= diff;
16755
+ fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
16756
+ }
16757
+ canvas.width = width;
16758
+ canvas.height = fontSize;
16759
+ canvasContext.font = fontStyle;
16760
+ canvasContext.textAlign = 'left';
16761
+ canvasContext.textBaseline = 'top';
16762
+ canvasContext.fillText(firstChar, 0, 0);
16763
+ var compareData = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
16764
+ if (!compareData.some(function(pixel) {
16765
+ return pixel;
16766
+ })) {
16767
+ font.numLigatures++;
16768
+ return true;
16769
+ }
16770
+ canvasContext.clearRect(0, 0, width, fontSize);
16771
+ canvasContext.fillText(nodeValue, 0, 0);
16772
+ var compareWith = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
16773
+ var differences = compareData.reduce(function(diff, pixel, i) {
16774
+ if (pixel === 0 && compareWith[i] === 0) {
16775
+ return diff;
16776
+ }
16777
+ if (pixel !== 0 && compareWith[i] !== 0) {
16778
+ return diff;
16779
+ }
16780
+ return ++diff;
16781
+ }, 0);
16782
+ var expectedWidth = nodeValue.split('').reduce(function(totalWidth, _char2) {
16783
+ return totalWidth + canvasContext.measureText(_char2).width;
16784
+ }, 0);
16785
+ var actualWidth = canvasContext.measureText(nodeValue).width;
16786
+ var pixelDifference = differences / compareData.length;
16787
+ var sizeDifference = 1 - actualWidth / expectedWidth;
16788
+ if (pixelDifference >= differenceThreshold && sizeDifference >= differenceThreshold) {
16789
+ font.numLigatures++;
16790
+ return true;
16791
+ }
16792
+ return false;
16793
+ }
16525
16794
  function visibleVirtual(element, screenReader, noRecursing) {
16526
- var _nodeLookup12 = _nodeLookup(element), vNode = _nodeLookup12.vNode;
16795
+ var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
16796
+ var _nodeLookup13 = _nodeLookup(element), vNode = _nodeLookup13.vNode;
16527
16797
  var visibleMethod = screenReader ? _isVisibleToScreenReaders : _isVisibleOnScreen;
16528
16798
  var visible2 = !element.actualNode || element.actualNode && visibleMethod(element);
16799
+ var ignoreIconLigature = options.ignoreIconLigature, pixelThreshold = options.pixelThreshold, occurrenceThreshold = options.occurrenceThreshold;
16529
16800
  var result = vNode.children.map(function(child) {
16530
- var _child$props = child.props, nodeType = _child$props.nodeType, nodeValue = _child$props.nodeValue;
16801
+ var _child$props = child.props, nodeType = _child$props.nodeType, nodeValue = _child$props.nodeValue, nodeName2 = _child$props.nodeName;
16531
16802
  if (nodeType === 3) {
16532
- if (nodeValue && visible2) {
16533
- return nodeValue;
16803
+ if (!nodeValue || !visible2) {
16804
+ return '';
16805
+ }
16806
+ if (ignoreIconLigature && _isIconLigature(child, pixelThreshold, occurrenceThreshold)) {
16807
+ return '';
16534
16808
  }
16535
- } else if (!noRecursing) {
16536
- return visibleVirtual(child, screenReader);
16809
+ return nodeValue;
16810
+ }
16811
+ if (nodeName2 === 'br') {
16812
+ return ' ';
16813
+ }
16814
+ if (!noRecursing) {
16815
+ return visibleVirtual(child, screenReader, false, options);
16537
16816
  }
16538
16817
  }).join('');
16539
16818
  return sanitize_default(result);
@@ -16602,14 +16881,14 @@
16602
16881
  return valueString;
16603
16882
  }
16604
16883
  function nativeTextboxValue(node) {
16605
- var _nodeLookup13 = _nodeLookup(node), vNode = _nodeLookup13.vNode;
16884
+ var _nodeLookup14 = _nodeLookup(node), vNode = _nodeLookup14.vNode;
16606
16885
  if (is_native_textbox_default(vNode)) {
16607
16886
  return vNode.props.value || '';
16608
16887
  }
16609
16888
  return '';
16610
16889
  }
16611
16890
  function nativeSelectValue(node) {
16612
- var _nodeLookup14 = _nodeLookup(node), vNode = _nodeLookup14.vNode;
16891
+ var _nodeLookup15 = _nodeLookup(node), vNode = _nodeLookup15.vNode;
16613
16892
  if (!is_native_select_default(vNode)) {
16614
16893
  return '';
16615
16894
  }
@@ -16625,7 +16904,7 @@
16625
16904
  }).join(' ') || '';
16626
16905
  }
16627
16906
  function ariaTextboxValue(node) {
16628
- var _nodeLookup15 = _nodeLookup(node), vNode = _nodeLookup15.vNode, domNode = _nodeLookup15.domNode;
16907
+ var _nodeLookup16 = _nodeLookup(node), vNode = _nodeLookup16.vNode, domNode = _nodeLookup16.domNode;
16629
16908
  if (!is_aria_textbox_default(vNode)) {
16630
16909
  return '';
16631
16910
  }
@@ -16636,7 +16915,7 @@
16636
16915
  }
16637
16916
  }
16638
16917
  function ariaListboxValue(node, context) {
16639
- var _nodeLookup16 = _nodeLookup(node), vNode = _nodeLookup16.vNode;
16918
+ var _nodeLookup17 = _nodeLookup(node), vNode = _nodeLookup17.vNode;
16640
16919
  if (!is_aria_listbox_default(vNode)) {
16641
16920
  return '';
16642
16921
  }
@@ -16649,7 +16928,7 @@
16649
16928
  return _accessibleTextVirtual(selected[0], context);
16650
16929
  }
16651
16930
  function ariaComboboxValue(node, context) {
16652
- var _nodeLookup17 = _nodeLookup(node), vNode = _nodeLookup17.vNode;
16931
+ var _nodeLookup18 = _nodeLookup(node), vNode = _nodeLookup18.vNode;
16653
16932
  if (!is_aria_combobox_default(vNode)) {
16654
16933
  return '';
16655
16934
  }
@@ -16659,7 +16938,7 @@
16659
16938
  return listbox ? ariaListboxValue(listbox, context) : '';
16660
16939
  }
16661
16940
  function ariaRangeValue(node) {
16662
- var _nodeLookup18 = _nodeLookup(node), vNode = _nodeLookup18.vNode;
16941
+ var _nodeLookup19 = _nodeLookup(node), vNode = _nodeLookup19.vNode;
16663
16942
  if (!is_aria_range_default(vNode) || !vNode.hasAttr('aria-valuenow')) {
16664
16943
  return '';
16665
16944
  }
@@ -16819,168 +17098,53 @@
16819
17098
  return native_text_methods_default[methodName];
16820
17099
  });
16821
17100
  }
16822
- function getUnicodeNonBmpRegExp() {
16823
- return /[\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u20A0-\u20CF\u20D0-\u20FF\u2100-\u214F\u2150-\u218F\u2190-\u21FF\u2200-\u22FF\u2300-\u23FF\u2400-\u243F\u2440-\u245F\u2460-\u24FF\u2500-\u257F\u2580-\u259F\u25A0-\u25FF\u2600-\u26FF\u2700-\u27BF\uE000-\uF8FF]/g;
16824
- }
16825
- function getPunctuationRegExp() {
16826
- return /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&\xa3\xa2\xa5\xa7\u20ac()*+,\-.\/:;<=>?@\[\]^_`{|}~\xb1]/g;
16827
- }
16828
- function getSupplementaryPrivateUseRegExp() {
16829
- return /[\uDB80-\uDBBF][\uDC00-\uDFFF]/g;
17101
+ function _accessibleTextVirtual(virtualNode) {
17102
+ var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17103
+ context = prepareContext(virtualNode, context);
17104
+ if (shouldIgnoreHidden(virtualNode, context)) {
17105
+ return '';
17106
+ }
17107
+ if (shouldIgnoreIconLigature(virtualNode, context)) {
17108
+ return '';
17109
+ }
17110
+ var computationSteps = [ arialabelledby_text_default, _arialabelText, _nativeTextAlternative, form_control_value_default, subtree_text_default, textNodeValue, title_text_default ];
17111
+ var accessibleName = computationSteps.reduce(function(accName, step) {
17112
+ if (context.startNode === virtualNode) {
17113
+ accName = sanitize_default(accName);
17114
+ }
17115
+ if (accName !== '') {
17116
+ return accName;
17117
+ }
17118
+ return step(virtualNode, context);
17119
+ }, '');
17120
+ if (context.debug) {
17121
+ axe.log(accessibleName || '{empty-value}', virtualNode.actualNode, context);
17122
+ }
17123
+ return accessibleName;
16830
17124
  }
16831
- function getCategoryFormatRegExp() {
16832
- return /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC38]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/g;
17125
+ function textNodeValue(virtualNode) {
17126
+ if (virtualNode.props.nodeType !== 3) {
17127
+ return '';
17128
+ }
17129
+ return virtualNode.props.nodeValue;
16833
17130
  }
16834
- function hasUnicode(str, options) {
16835
- var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations;
16836
- var value = false;
16837
- if (emoji) {
16838
- value || (value = emoji_regex_default().test(str));
17131
+ function shouldIgnoreHidden(virtualNode, context) {
17132
+ if (!virtualNode) {
17133
+ return false;
16839
17134
  }
16840
- if (nonBmp) {
16841
- value || (value = getUnicodeNonBmpRegExp().test(str) || getSupplementaryPrivateUseRegExp().test(str) || getCategoryFormatRegExp().test(str));
17135
+ if (context.includeHidden && !nativelyHidden(virtualNode)) {
17136
+ return false;
16842
17137
  }
16843
- if (punctuations) {
16844
- value || (value = getPunctuationRegExp().test(str));
17138
+ if (virtualNode.props.nodeType !== 1) {
17139
+ return false;
16845
17140
  }
16846
- return value;
17141
+ return !_isVisibleToScreenReaders(virtualNode);
16847
17142
  }
16848
- var has_unicode_default = hasUnicode;
16849
- function _isIconLigature(textVNode) {
16850
- var differenceThreshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .15;
16851
- var occurrenceThreshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
16852
- var nodeValue = textVNode.actualNode.nodeValue.trim();
16853
- if (!sanitize_default(nodeValue) || has_unicode_default(nodeValue, {
16854
- emoji: true,
16855
- nonBmp: true
16856
- })) {
16857
- return false;
16858
- }
16859
- var canvasContext = cache_default.get('canvasContext', function() {
16860
- return document.createElement('canvas').getContext('2d', {
16861
- willReadFrequently: true
16862
- });
16863
- });
16864
- var canvas = canvasContext.canvas;
16865
- var fonts = cache_default.get('fonts', function() {
16866
- return {};
16867
- });
16868
- var style = window.getComputedStyle(textVNode.parent.actualNode);
16869
- var fontFamily = style.getPropertyValue('font-family');
16870
- if (!fonts[fontFamily]) {
16871
- fonts[fontFamily] = {
16872
- occurrences: 0,
16873
- numLigatures: 0
16874
- };
16875
- }
16876
- var font = fonts[fontFamily];
16877
- if (font.occurrences >= occurrenceThreshold) {
16878
- if (font.numLigatures / font.occurrences === 1) {
16879
- return true;
16880
- } else if (font.numLigatures === 0) {
16881
- return false;
16882
- }
16883
- }
16884
- font.occurrences++;
16885
- var fontSize = 30;
16886
- var fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
16887
- canvasContext.font = fontStyle;
16888
- var firstChar = nodeValue.charAt(0);
16889
- var width = canvasContext.measureText(firstChar).width;
16890
- if (width === 0) {
16891
- font.numLigatures++;
16892
- return true;
16893
- }
16894
- if (width < 30) {
16895
- var diff = 30 / width;
16896
- width *= diff;
16897
- fontSize *= diff;
16898
- fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
16899
- }
16900
- canvas.width = width;
16901
- canvas.height = fontSize;
16902
- canvasContext.font = fontStyle;
16903
- canvasContext.textAlign = 'left';
16904
- canvasContext.textBaseline = 'top';
16905
- canvasContext.fillText(firstChar, 0, 0);
16906
- var compareData = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
16907
- if (!compareData.some(function(pixel) {
16908
- return pixel;
16909
- })) {
16910
- font.numLigatures++;
16911
- return true;
16912
- }
16913
- canvasContext.clearRect(0, 0, width, fontSize);
16914
- canvasContext.fillText(nodeValue, 0, 0);
16915
- var compareWith = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
16916
- var differences = compareData.reduce(function(diff, pixel, i) {
16917
- if (pixel === 0 && compareWith[i] === 0) {
16918
- return diff;
16919
- }
16920
- if (pixel !== 0 && compareWith[i] !== 0) {
16921
- return diff;
16922
- }
16923
- return ++diff;
16924
- }, 0);
16925
- var expectedWidth = nodeValue.split('').reduce(function(totalWidth, _char2) {
16926
- return totalWidth + canvasContext.measureText(_char2).width;
16927
- }, 0);
16928
- var actualWidth = canvasContext.measureText(nodeValue).width;
16929
- var pixelDifference = differences / compareData.length;
16930
- var sizeDifference = 1 - actualWidth / expectedWidth;
16931
- if (pixelDifference >= differenceThreshold && sizeDifference >= differenceThreshold) {
16932
- font.numLigatures++;
16933
- return true;
16934
- }
16935
- return false;
16936
- }
16937
- function _accessibleTextVirtual(virtualNode) {
16938
- var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
16939
- context = prepareContext(virtualNode, context);
16940
- if (shouldIgnoreHidden(virtualNode, context)) {
16941
- return '';
16942
- }
16943
- if (shouldIgnoreIconLigature(virtualNode, context)) {
16944
- return '';
16945
- }
16946
- var computationSteps = [ arialabelledby_text_default, _arialabelText, _nativeTextAlternative, form_control_value_default, subtree_text_default, textNodeValue, title_text_default ];
16947
- var accessibleName = computationSteps.reduce(function(accName, step) {
16948
- if (context.startNode === virtualNode) {
16949
- accName = sanitize_default(accName);
16950
- }
16951
- if (accName !== '') {
16952
- return accName;
16953
- }
16954
- return step(virtualNode, context);
16955
- }, '');
16956
- if (context.debug) {
16957
- axe.log(accessibleName || '{empty-value}', virtualNode.actualNode, context);
16958
- }
16959
- return accessibleName;
16960
- }
16961
- function textNodeValue(virtualNode) {
16962
- if (virtualNode.props.nodeType !== 3) {
16963
- return '';
16964
- }
16965
- return virtualNode.props.nodeValue;
16966
- }
16967
- function shouldIgnoreHidden(virtualNode, context) {
16968
- if (!virtualNode) {
16969
- return false;
16970
- }
16971
- if (context.includeHidden && !nativelyHidden(virtualNode)) {
16972
- return false;
16973
- }
16974
- if (virtualNode.props.nodeType !== 1) {
16975
- return false;
16976
- }
16977
- return !_isVisibleToScreenReaders(virtualNode);
16978
- }
16979
- function shouldIgnoreIconLigature(virtualNode, context) {
16980
- var _context$occurrenceTh;
16981
- var ignoreIconLigature = context.ignoreIconLigature, pixelThreshold = context.pixelThreshold;
16982
- var occurrenceThreshold = (_context$occurrenceTh = context.occurrenceThreshold) !== null && _context$occurrenceTh !== void 0 ? _context$occurrenceTh : context.occuranceThreshold;
16983
- if (virtualNode.props.nodeType !== 3 || !ignoreIconLigature) {
17143
+ function shouldIgnoreIconLigature(virtualNode, context) {
17144
+ var _context$occurrenceTh;
17145
+ var ignoreIconLigature = context.ignoreIconLigature, pixelThreshold = context.pixelThreshold;
17146
+ var occurrenceThreshold = (_context$occurrenceTh = context.occurrenceThreshold) !== null && _context$occurrenceTh !== void 0 ? _context$occurrenceTh : context.occuranceThreshold;
17147
+ if (virtualNode.props.nodeType !== 3 || !ignoreIconLigature) {
16984
17148
  return false;
16985
17149
  }
16986
17150
  return _isIconLigature(virtualNode, pixelThreshold, occurrenceThreshold);
@@ -17284,7 +17448,7 @@
17284
17448
  var get_text_element_stack_default = getTextElementStack;
17285
17449
  var visualRoles = [ 'checkbox', 'img', 'meter', 'progressbar', 'scrollbar', 'radio', 'slider', 'spinbutton', 'textbox' ];
17286
17450
  function isVisualContent(el) {
17287
- var _nodeLookup19 = _nodeLookup(el), vNode = _nodeLookup19.vNode;
17451
+ var _nodeLookup20 = _nodeLookup(el), vNode = _nodeLookup20.vNode;
17288
17452
  var role = axe.commons.aria.getExplicitRole(vNode);
17289
17453
  if (role) {
17290
17454
  return visualRoles.indexOf(role) !== -1;
@@ -17352,7 +17516,7 @@
17352
17516
  }
17353
17517
  var inserted_into_focus_order_default = insertedIntoFocusOrder;
17354
17518
  function isHiddenWithCSS(el, descendentVisibilityValue) {
17355
- var _nodeLookup20 = _nodeLookup(el), vNode = _nodeLookup20.vNode, domNode = _nodeLookup20.domNode;
17519
+ var _nodeLookup21 = _nodeLookup(el), vNode = _nodeLookup21.vNode, domNode = _nodeLookup21.domNode;
17356
17520
  if (!vNode) {
17357
17521
  return _isHiddenWithCSS(domNode, descendentVisibilityValue);
17358
17522
  }
@@ -17415,7 +17579,7 @@
17415
17579
  var inlineBlockLike = [ 'inline-block', 'inline-flex', 'inline-grid' ];
17416
17580
  function isInTextBlock(node) {
17417
17581
  var _ref64 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, noLengthCompare = _ref64.noLengthCompare, _ref64$includeInlineB = _ref64.includeInlineBlock, includeInlineBlock = _ref64$includeInlineB === void 0 ? false : _ref64$includeInlineB;
17418
- var _nodeLookup21 = _nodeLookup(node), vNode = _nodeLookup21.vNode, domNode = _nodeLookup21.domNode;
17582
+ var _nodeLookup22 = _nodeLookup(node), vNode = _nodeLookup22.vNode, domNode = _nodeLookup22.domNode;
17419
17583
  if (isBlock(domNode) || !includeInlineBlock && isInlineBlockLike(vNode)) {
17420
17584
  return false;
17421
17585
  }
@@ -17465,7 +17629,7 @@
17465
17629
  }
17466
17630
  var is_in_text_block_default = isInTextBlock;
17467
17631
  function isBlock(node) {
17468
- var _nodeLookup22 = _nodeLookup(node), vNode = _nodeLookup22.vNode;
17632
+ var _nodeLookup23 = _nodeLookup(node), vNode = _nodeLookup23.vNode;
17469
17633
  var display2 = vNode.getComputedStylePropertyValue('display');
17470
17634
  return blockLike.includes(display2) || display2.substr(0, 6) === 'table-';
17471
17635
  }
@@ -18335,6 +18499,20 @@
18335
18499
  }
18336
18500
  return this._cache.boundingClientRect;
18337
18501
  }
18502
+ }, {
18503
+ key: 'elementInternals',
18504
+ get: function get() {
18505
+ if (!axe._enableElementInternals) {
18506
+ return;
18507
+ }
18508
+ if (!this._cache.hasOwnProperty('elementInternals')) {
18509
+ this._cache.elementInternals = _getElementInternals(this.actualNode);
18510
+ }
18511
+ return this._cache.elementInternals;
18512
+ },
18513
+ set: function set(value) {
18514
+ this._cache.elementInternals = value;
18515
+ }
18338
18516
  } ]);
18339
18517
  }(abstract_virtual_node_default);
18340
18518
  var virtual_node_default = VirtualNode;
@@ -19111,6 +19289,75 @@
19111
19289
  };
19112
19290
  }
19113
19291
  var get_stylesheet_factory_default = getStyleSheetFactory;
19292
+ var propNames = [ '_internals', 'internals', 'internals_' ];
19293
+ var symbolNames = [ 'internals', 'privateInternals' ];
19294
+ function _getElementInternals(node) {
19295
+ var _globalThis$_elementI;
19296
+ if (!_isValidCustomElementName(node.nodeName.toLowerCase())) {
19297
+ return;
19298
+ }
19299
+ var mapInternals = (_globalThis$_elementI = globalThis._elementInternals) === null || _globalThis$_elementI === void 0 ? void 0 : _globalThis$_elementI.get(node);
19300
+ if (mapInternals) {
19301
+ return mapInternals;
19302
+ }
19303
+ if (!('ElementInternals' in window)) {
19304
+ return;
19305
+ }
19306
+ var _iterator11 = _createForOfIteratorHelper(propNames), _step11;
19307
+ try {
19308
+ for (_iterator11.s(); !(_step11 = _iterator11.n()).done; ) {
19309
+ var _Object$getOwnPropert;
19310
+ var propName = _step11.value;
19311
+ if ((_Object$getOwnPropert = Object.getOwnPropertyDescriptor(node, propName)) !== null && _Object$getOwnPropert !== void 0 && _Object$getOwnPropert.get) {
19312
+ continue;
19313
+ }
19314
+ if (node[propName] instanceof window.ElementInternals) {
19315
+ return node[propName];
19316
+ }
19317
+ }
19318
+ } catch (err) {
19319
+ _iterator11.e(err);
19320
+ } finally {
19321
+ _iterator11.f();
19322
+ }
19323
+ var ownSymbols = Object.getOwnPropertySymbols(node);
19324
+ if (!ownSymbols.length) {
19325
+ return;
19326
+ }
19327
+ var _iterator12 = _createForOfIteratorHelper(symbolNames), _step12;
19328
+ try {
19329
+ var _loop8 = function _loop8() {
19330
+ var symbolName = _step12.value;
19331
+ var symbol = ownSymbols.find(function(s) {
19332
+ return s.description === symbolName;
19333
+ });
19334
+ if (symbol) {
19335
+ var _Object$getOwnPropert2;
19336
+ if ((_Object$getOwnPropert2 = Object.getOwnPropertyDescriptor(node, symbol)) !== null && _Object$getOwnPropert2 !== void 0 && _Object$getOwnPropert2.get) {
19337
+ return 0;
19338
+ }
19339
+ if (node[symbol] instanceof window.ElementInternals) {
19340
+ return {
19341
+ v: node[symbol]
19342
+ };
19343
+ }
19344
+ }
19345
+ }, _ret4;
19346
+ for (_iterator12.s(); !(_step12 = _iterator12.n()).done; ) {
19347
+ _ret4 = _loop8();
19348
+ if (_ret4 === 0) {
19349
+ continue;
19350
+ }
19351
+ if (_ret4) {
19352
+ return _ret4.v;
19353
+ }
19354
+ }
19355
+ } catch (err) {
19356
+ _iterator12.e(err);
19357
+ } finally {
19358
+ _iterator12.f();
19359
+ }
19360
+ }
19114
19361
  var styleSheet;
19115
19362
  function injectStyle(style) {
19116
19363
  if (styleSheet && styleSheet.parentNode) {
@@ -19185,7 +19432,7 @@
19185
19432
  return hidden;
19186
19433
  }
19187
19434
  var is_hidden_default = isHidden;
19188
- function isHtmlElement(node) {
19435
+ function _isHtmlElement(node) {
19189
19436
  var _node$props$nodeName, _node$props;
19190
19437
  var nodeName2 = (_node$props$nodeName = (_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.nodeName) !== null && _node$props$nodeName !== void 0 ? _node$props$nodeName : node.nodeName.toLowerCase();
19191
19438
  if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
@@ -19193,7 +19440,6 @@
19193
19440
  }
19194
19441
  return !!standards_default.htmlElms[nodeName2];
19195
19442
  }
19196
- var is_html_element_default = isHtmlElement;
19197
19443
  function _isNodeInContext(node, _ref74) {
19198
19444
  var _ref74$include = _ref74.include, include = _ref74$include === void 0 ? [] : _ref74$include, _ref74$exclude = _ref74.exclude, exclude = _ref74$exclude === void 0 ? [] : _ref74$exclude;
19199
19445
  var filterInclude = include.filter(function(candidate) {
@@ -19214,18 +19460,18 @@
19214
19460
  }
19215
19461
  function getDeepest(collection) {
19216
19462
  var deepest;
19217
- var _iterator11 = _createForOfIteratorHelper(collection), _step11;
19463
+ var _iterator13 = _createForOfIteratorHelper(collection), _step13;
19218
19464
  try {
19219
- for (_iterator11.s(); !(_step11 = _iterator11.n()).done; ) {
19220
- var node = _step11.value;
19465
+ for (_iterator13.s(); !(_step13 = _iterator13.n()).done; ) {
19466
+ var node = _step13.value;
19221
19467
  if (!deepest || !_contains(node, deepest)) {
19222
19468
  deepest = node;
19223
19469
  }
19224
19470
  }
19225
19471
  } catch (err) {
19226
- _iterator11.e(err);
19472
+ _iterator13.e(err);
19227
19473
  } finally {
19228
- _iterator11.f();
19474
+ _iterator13.f();
19229
19475
  }
19230
19476
  return deepest;
19231
19477
  }
@@ -19340,6 +19586,9 @@
19340
19586
  }
19341
19587
  var parse_stylesheet_default = parseStylesheet;
19342
19588
  function parseCrossOriginStylesheet(url, options, priority, importedUrls, isCrossOrigin) {
19589
+ if (url === null || url === void 0) {
19590
+ return Promise.resolve();
19591
+ }
19343
19592
  importedUrls.push(url);
19344
19593
  return new Promise(function(resolve, reject) {
19345
19594
  var request = new window.XMLHttpRequest();
@@ -20047,18 +20296,18 @@
20047
20296
  };
20048
20297
  }
20049
20298
  var serial = {};
20050
- var _iterator12 = _createForOfIteratorHelper(constants_default.serializableErrorProps), _step12;
20299
+ var _iterator14 = _createForOfIteratorHelper(constants_default.serializableErrorProps), _step14;
20051
20300
  try {
20052
- for (_iterator12.s(); !(_step12 = _iterator12.n()).done; ) {
20053
- var prop = _step12.value;
20301
+ for (_iterator14.s(); !(_step14 = _iterator14.n()).done; ) {
20302
+ var prop = _step14.value;
20054
20303
  if ([ 'string', 'number', 'boolean' ].includes(_typeof(err2[prop]))) {
20055
20304
  serial[prop] = err2[prop];
20056
20305
  }
20057
20306
  }
20058
20307
  } catch (err) {
20059
- _iterator12.e(err);
20308
+ _iterator14.e(err);
20060
20309
  } finally {
20061
- _iterator12.f();
20310
+ _iterator14.f();
20062
20311
  }
20063
20312
  if (err2.cause) {
20064
20313
  serial.cause = iteration < 10 ? _serializeError(err2.cause, iteration + 1) : '...';
@@ -20139,18 +20388,18 @@
20139
20388
  return Array.from(elms);
20140
20389
  }
20141
20390
  var selected = [];
20142
- var _iterator13 = _createForOfIteratorHelper(elms), _step13;
20391
+ var _iterator15 = _createForOfIteratorHelper(elms), _step15;
20143
20392
  try {
20144
- for (_iterator13.s(); !(_step13 = _iterator13.n()).done; ) {
20145
- var elm = _step13.value;
20393
+ for (_iterator15.s(); !(_step15 = _iterator15.n()).done; ) {
20394
+ var elm = _step15.value;
20146
20395
  if (elm !== null && elm !== void 0 && elm.shadowRoot) {
20147
20396
  selected.push.apply(selected, _toConsumableArray(selectAllRecursive(restSelector, elm.shadowRoot)));
20148
20397
  }
20149
20398
  }
20150
20399
  } catch (err) {
20151
- _iterator13.e(err);
20400
+ _iterator15.e(err);
20152
20401
  } finally {
20153
- _iterator13.f();
20402
+ _iterator15.f();
20154
20403
  }
20155
20404
  return selected;
20156
20405
  }
@@ -20189,6 +20438,80 @@
20189
20438
  return codes;
20190
20439
  }
20191
20440
  var valid_langs_default = isValidLang;
20441
+ function _normalizeRunOptions() {
20442
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
20443
+ var tags = [];
20444
+ var ruleIds = [];
20445
+ axe._audit.rules.forEach(function(rule) {
20446
+ ruleIds.push(rule.id);
20447
+ rule.tags.forEach(function(tag) {
20448
+ if (!tags.includes(tag)) {
20449
+ tags.push(tag);
20450
+ }
20451
+ });
20452
+ });
20453
+ if ([ 'object', 'string' ].includes(_typeof(options.runOnly))) {
20454
+ if (typeof options.runOnly === 'string') {
20455
+ options.runOnly = [ options.runOnly ];
20456
+ }
20457
+ if (Array.isArray(options.runOnly)) {
20458
+ var hasTag = options.runOnly.find(function(value) {
20459
+ return tags.includes(value);
20460
+ });
20461
+ var hasRule = options.runOnly.find(function(value) {
20462
+ return ruleIds.includes(value);
20463
+ });
20464
+ if (hasTag && hasRule) {
20465
+ throw new Error('runOnly cannot be both rules and tags');
20466
+ }
20467
+ if (hasRule) {
20468
+ options.runOnly = {
20469
+ type: 'rule',
20470
+ values: options.runOnly
20471
+ };
20472
+ } else {
20473
+ options.runOnly = {
20474
+ type: 'tag',
20475
+ values: options.runOnly
20476
+ };
20477
+ }
20478
+ }
20479
+ var only = options.runOnly;
20480
+ if (only.value && !only.values) {
20481
+ only.values = only.value;
20482
+ delete only.value;
20483
+ }
20484
+ if (!Array.isArray(only.values) || only.values.length === 0) {
20485
+ throw new Error('runOnly.values must be a non-empty array');
20486
+ }
20487
+ if ([ 'rule', 'rules' ].includes(only.type)) {
20488
+ only.type = 'rule';
20489
+ only.values.forEach(function(ruleId) {
20490
+ if (!ruleIds.includes(ruleId)) {
20491
+ throw new Error('unknown rule `' + ruleId + '` in options.runOnly');
20492
+ }
20493
+ });
20494
+ } else if ([ 'tag', 'tags', void 0 ].includes(only.type)) {
20495
+ only.type = 'tag';
20496
+ var unmatchedTags = only.values.filter(function(tag) {
20497
+ return !tags.includes(tag) && !/wcag2[1-3]a{1,3}/.test(tag);
20498
+ });
20499
+ if (unmatchedTags.length !== 0) {
20500
+ axe.log('Could not find tags `' + unmatchedTags.join('`, `') + '`');
20501
+ }
20502
+ } else {
20503
+ throw new Error('Unknown runOnly type \''.concat(only.type, '\''));
20504
+ }
20505
+ }
20506
+ if (_typeof(options.rules) === 'object') {
20507
+ Object.keys(options.rules).forEach(function(ruleId) {
20508
+ if (!ruleIds.includes(ruleId)) {
20509
+ throw new Error('unknown rule `' + ruleId + '` in options.rules');
20510
+ }
20511
+ });
20512
+ }
20513
+ return options;
20514
+ }
20192
20515
  var SerialVirtualNode = function(_abstract_virtual_nod2) {
20193
20516
  function SerialVirtualNode(serialNode) {
20194
20517
  var _this8;
@@ -20385,10 +20708,13 @@
20385
20708
  }
20386
20709
  });
20387
20710
  }
20711
+ var previousHelpUrlSettings = {
20712
+ brand: audit.brand,
20713
+ application: audit.application,
20714
+ lang: audit.lang
20715
+ };
20388
20716
  if (typeof spec.branding !== 'undefined') {
20389
20717
  audit.setBranding(spec.branding);
20390
- } else {
20391
- audit._constructHelpUrls();
20392
20718
  }
20393
20719
  if (spec.tagExclude) {
20394
20720
  audit.tagExclude = spec.tagExclude;
@@ -20396,6 +20722,7 @@
20396
20722
  if (spec.locale) {
20397
20723
  audit.applyLocale(spec.locale);
20398
20724
  }
20725
+ audit._constructHelpUrls(previousHelpUrlSettings);
20399
20726
  if (spec.standards) {
20400
20727
  configureStandards(spec.standards);
20401
20728
  }
@@ -20413,6 +20740,215 @@
20413
20740
  }
20414
20741
  }
20415
20742
  var configure_default = configure;
20743
+ var ELEMENT_INTERNALS_DEFAULT_TIMEOUT = 1e3;
20744
+ var getElementInternals2;
20745
+ var elementInternalsTimeout;
20746
+ function externalAPIs() {
20747
+ var _ref87 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, internalsTimeout = _ref87.elementInternalsTimeout, getInternals = _ref87.getElementInternals;
20748
+ if (isNotNullOrUndefined(internalsTimeout)) {
20749
+ assert_default(typeof internalsTimeout === 'number', 'elementInternalsTimeout must be a number');
20750
+ elementInternalsTimeout = internalsTimeout;
20751
+ } else if (internalsTimeout === null) {
20752
+ elementInternalsTimeout = ELEMENT_INTERNALS_DEFAULT_TIMEOUT;
20753
+ }
20754
+ if (isNotNullOrUndefined(getInternals)) {
20755
+ assert_default(typeof getInternals === 'function', 'getElementInternals must be a function that returns a Promise');
20756
+ getElementInternals2 = getInternals;
20757
+ } else if (getInternals === null) {
20758
+ getElementInternals2 = null;
20759
+ }
20760
+ }
20761
+ function isNotNullOrUndefined(val) {
20762
+ return val !== void 0 && val !== null;
20763
+ }
20764
+ function asyncTimeout(_x) {
20765
+ return _asyncTimeout.apply(this, arguments);
20766
+ }
20767
+ function _asyncTimeout() {
20768
+ _asyncTimeout = _asyncToGenerator(_regenerator().m(function _callee(ms) {
20769
+ return _regenerator().w(function(_context2) {
20770
+ while (1) {
20771
+ switch (_context2.n) {
20772
+ case 0:
20773
+ return _context2.a(2, new Promise(function(res) {
20774
+ return setTimeout(res, ms, 'timeout');
20775
+ }));
20776
+ }
20777
+ }
20778
+ }, _callee);
20779
+ }));
20780
+ return _asyncTimeout.apply(this, arguments);
20781
+ }
20782
+ function loadElementInternals() {
20783
+ return _loadElementInternals.apply(this, arguments);
20784
+ }
20785
+ function _loadElementInternals() {
20786
+ _loadElementInternals = _asyncToGenerator(_regenerator().m(function _callee2() {
20787
+ var logger, promiseValue, internalsMap, _i43, _internalsMap$_i, internals, ancestry, node, vNode, _i44, _Object$entries, _Object$entries$_i, _key12, val, type2, value, _args2 = arguments;
20788
+ return _regenerator().w(function(_context3) {
20789
+ while (1) {
20790
+ switch (_context3.n) {
20791
+ case 0:
20792
+ logger = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : log_default;
20793
+ if (getElementInternals2) {
20794
+ _context3.n = 1;
20795
+ break;
20796
+ }
20797
+ return _context3.a(2);
20798
+
20799
+ case 1:
20800
+ _context3.n = 2;
20801
+ return Promise.race([ asyncTimeout(elementInternalsTimeout), getElementInternals2() ]);
20802
+
20803
+ case 2:
20804
+ promiseValue = _context3.v;
20805
+ assert_default(promiseValue !== 'timeout', 'Timeout called for elementInternals');
20806
+ internalsMap = clone2(promiseValue);
20807
+ if (!(!internalsMap || !Array.isArray(internalsMap))) {
20808
+ _context3.n = 3;
20809
+ break;
20810
+ }
20811
+ logger('externalAPIs.getElementInternals() did not return an array');
20812
+ return _context3.a(2);
20813
+
20814
+ case 3:
20815
+ _i43 = 0;
20816
+
20817
+ case 4:
20818
+ if (!(_i43 < internalsMap.length)) {
20819
+ _context3.n = 14;
20820
+ break;
20821
+ }
20822
+ if (!(!internalsMap[_i43] || _typeof(internalsMap[_i43]) !== 'object')) {
20823
+ _context3.n = 5;
20824
+ break;
20825
+ }
20826
+ logger('externalAPIs.getElementInternals()['.concat(_i43, '] is not an object'));
20827
+ return _context3.a(3, 13);
20828
+
20829
+ case 5:
20830
+ _internalsMap$_i = internalsMap[_i43], internals = _internalsMap$_i.internals,
20831
+ ancestry = _internalsMap$_i.ancestry;
20832
+ if (!(!internals || _typeof(internals) !== 'object')) {
20833
+ _context3.n = 6;
20834
+ break;
20835
+ }
20836
+ logger('externalAPIs.getElementInternals()['.concat(_i43, '].internals is not an object'));
20837
+ return _context3.a(3, 13);
20838
+
20839
+ case 6:
20840
+ if (!(!ancestry || !(Array.isArray(ancestry) || typeof ancestry === 'string'))) {
20841
+ _context3.n = 7;
20842
+ break;
20843
+ }
20844
+ logger('externalAPIs.getElementInternals()['.concat(_i43, '].ancestry is not a string or an array of strings'));
20845
+ return _context3.a(3, 13);
20846
+
20847
+ case 7:
20848
+ node = _shadowSelect(ancestry);
20849
+ vNode = get_node_from_tree_default(node);
20850
+ if (vNode) {
20851
+ _context3.n = 8;
20852
+ break;
20853
+ }
20854
+ logger('Unable to locate node using selector '.concat(ancestry, ' from externalAPIs.getElementInternals()[').concat(_i43, ']'));
20855
+ return _context3.a(3, 13);
20856
+
20857
+ case 8:
20858
+ _i44 = 0, _Object$entries = Object.entries(internals);
20859
+
20860
+ case 9:
20861
+ if (!(_i44 < _Object$entries.length)) {
20862
+ _context3.n = 12;
20863
+ break;
20864
+ }
20865
+ _Object$entries$_i = _slicedToArray(_Object$entries[_i44], 2), _key12 = _Object$entries$_i[0],
20866
+ val = _Object$entries$_i[1];
20867
+ if (!(typeof val === 'string')) {
20868
+ _context3.n = 10;
20869
+ break;
20870
+ }
20871
+ return _context3.a(3, 11);
20872
+
20873
+ case 10:
20874
+ type2 = val.type, value = val.value;
20875
+ if (!type2) {
20876
+ logger('externalAPIs.getElementInternals()['.concat(_i43, '].internals.').concat(_key12, ' is an object but has no "type" property'));
20877
+ }
20878
+ if (!value) {
20879
+ logger('externalAPIs.getElementInternals()['.concat(_i43, '].internals.').concat(_key12, ' is an object but has no "value" property'));
20880
+ }
20881
+ if (type2 === 'HTMLElement') {
20882
+ setHTMLElement(internals, _key12, value);
20883
+ } else if (type2 === 'NodeList') {
20884
+ setNodeList(internals, _key12, value);
20885
+ }
20886
+
20887
+ case 11:
20888
+ _i44++;
20889
+ _context3.n = 9;
20890
+ break;
20891
+
20892
+ case 12:
20893
+ vNode.elementInternals = internals;
20894
+
20895
+ case 13:
20896
+ _i43++;
20897
+ _context3.n = 4;
20898
+ break;
20899
+
20900
+ case 14:
20901
+ return _context3.a(2);
20902
+ }
20903
+ }
20904
+ }, _callee2);
20905
+ }));
20906
+ return _loadElementInternals.apply(this, arguments);
20907
+ }
20908
+ var external = {
20909
+ loadElementInternals: loadElementInternals
20910
+ };
20911
+ function setHTMLElement(internals, key, value) {
20912
+ var node = _shadowSelect(value);
20913
+ if (node) {
20914
+ internals[key] = node;
20915
+ } else {
20916
+ Object.defineProperty(internals, key, {
20917
+ get: function get() {
20918
+ throw new Error('Unable to locate node using selector: '.concat(value));
20919
+ }
20920
+ });
20921
+ }
20922
+ }
20923
+ function setNodeList(internals, key, value) {
20924
+ var nodes = [];
20925
+ var errorSelectors = [];
20926
+ var _iterator16 = _createForOfIteratorHelper(value), _step16;
20927
+ try {
20928
+ for (_iterator16.s(); !(_step16 = _iterator16.n()).done; ) {
20929
+ var selector = _step16.value;
20930
+ var node = _shadowSelect(selector);
20931
+ if (node) {
20932
+ nodes.push(node);
20933
+ } else {
20934
+ errorSelectors.push(selector);
20935
+ }
20936
+ }
20937
+ } catch (err) {
20938
+ _iterator16.e(err);
20939
+ } finally {
20940
+ _iterator16.f();
20941
+ }
20942
+ if (errorSelectors.length === 0) {
20943
+ internals[key] = nodes;
20944
+ } else {
20945
+ Object.defineProperty(internals, key, {
20946
+ get: function get() {
20947
+ throw new Error('Unable to locate nodes using selectors: '.concat(errorSelectors.join(',')));
20948
+ }
20949
+ });
20950
+ }
20951
+ }
20416
20952
  function frameMessenger2(frameHandler) {
20417
20953
  _respondable.updateMessenger(frameHandler);
20418
20954
  }
@@ -20432,7 +20968,8 @@
20432
20968
  help: rd.help,
20433
20969
  helpUrl: rd.helpUrl,
20434
20970
  tags: matchingRule.tags,
20435
- actIds: matchingRule.actIds
20971
+ actIds: matchingRule.actIds,
20972
+ enabled: matchingRule.enabled
20436
20973
  };
20437
20974
  });
20438
20975
  }
@@ -20863,10 +21400,10 @@
20863
21400
  if (!attrValue) {
20864
21401
  continue;
20865
21402
  }
20866
- var _iterator14 = _createForOfIteratorHelper(token_list_default(attrValue)), _step14;
21403
+ var _iterator17 = _createForOfIteratorHelper(token_list_default(attrValue)), _step17;
20867
21404
  try {
20868
- for (_iterator14.s(); !(_step14 = _iterator14.n()).done; ) {
20869
- var token = _step14.value;
21405
+ for (_iterator17.s(); !(_step17 = _iterator17.n()).done; ) {
21406
+ var token = _step17.value;
20870
21407
  if (!idRefs.has(token)) {
20871
21408
  idRefs.set(token, [ node ]);
20872
21409
  } else {
@@ -20874,9 +21411,9 @@
20874
21411
  }
20875
21412
  }
20876
21413
  } catch (err) {
20877
- _iterator14.e(err);
21414
+ _iterator17.e(err);
20878
21415
  } finally {
20879
- _iterator14.f();
21416
+ _iterator17.f();
20880
21417
  }
20881
21418
  }
20882
21419
  }
@@ -20940,8 +21477,8 @@
20940
21477
  }
20941
21478
  function getElementUnallowedRoles(node) {
20942
21479
  var allowImplicit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
20943
- var _nodeLookup23 = _nodeLookup(node), vNode = _nodeLookup23.vNode;
20944
- if (!is_html_element_default(vNode)) {
21480
+ var _nodeLookup24 = _nodeLookup(node), vNode = _nodeLookup24.vNode;
21481
+ if (!_isHtmlElement(vNode)) {
20945
21482
  return [];
20946
21483
  }
20947
21484
  var nodeName2 = vNode.props.nodeName;
@@ -22730,8 +23267,8 @@
22730
23267
  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' ]
22731
23268
  } ];
22732
23269
  lookupTable.evaluateRoleForElement = {
22733
- A: function A(_ref87) {
22734
- var node = _ref87.node, out = _ref87.out;
23270
+ A: function A(_ref88) {
23271
+ var node = _ref88.node, out = _ref88.out;
22735
23272
  if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
22736
23273
  return true;
22737
23274
  }
@@ -22740,19 +23277,19 @@
22740
23277
  }
22741
23278
  return true;
22742
23279
  },
22743
- AREA: function AREA(_ref88) {
22744
- var node = _ref88.node;
23280
+ AREA: function AREA(_ref89) {
23281
+ var node = _ref89.node;
22745
23282
  return !node.href;
22746
23283
  },
22747
- BUTTON: function BUTTON(_ref89) {
22748
- var node = _ref89.node, role = _ref89.role, out = _ref89.out;
23284
+ BUTTON: function BUTTON(_ref90) {
23285
+ var node = _ref90.node, role = _ref90.role, out = _ref90.out;
22749
23286
  if (node.getAttribute('type') === 'menu') {
22750
23287
  return role === 'menuitem';
22751
23288
  }
22752
23289
  return out;
22753
23290
  },
22754
- IMG: function IMG(_ref90) {
22755
- var node = _ref90.node, role = _ref90.role, out = _ref90.out;
23291
+ IMG: function IMG(_ref91) {
23292
+ var node = _ref91.node, role = _ref91.role, out = _ref91.out;
22756
23293
  switch (node.alt) {
22757
23294
  case null:
22758
23295
  return out;
@@ -22764,8 +23301,8 @@
22764
23301
  return role !== 'presentation' && role !== 'none';
22765
23302
  }
22766
23303
  },
22767
- INPUT: function INPUT(_ref91) {
22768
- var node = _ref91.node, role = _ref91.role, out = _ref91.out;
23304
+ INPUT: function INPUT(_ref92) {
23305
+ var node = _ref92.node, role = _ref92.role, out = _ref92.out;
22769
23306
  switch (node.type) {
22770
23307
  case 'button':
22771
23308
  case 'image':
@@ -22795,32 +23332,32 @@
22795
23332
  return false;
22796
23333
  }
22797
23334
  },
22798
- LI: function LI(_ref92) {
22799
- var node = _ref92.node, out = _ref92.out;
23335
+ LI: function LI(_ref93) {
23336
+ var node = _ref93.node, out = _ref93.out;
22800
23337
  var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
22801
23338
  if (hasImplicitListitemRole) {
22802
23339
  return out;
22803
23340
  }
22804
23341
  return true;
22805
23342
  },
22806
- MENU: function MENU(_ref93) {
22807
- var node = _ref93.node;
23343
+ MENU: function MENU(_ref94) {
23344
+ var node = _ref94.node;
22808
23345
  if (node.getAttribute('type') === 'context') {
22809
23346
  return false;
22810
23347
  }
22811
23348
  return true;
22812
23349
  },
22813
- OPTION: function OPTION(_ref94) {
22814
- var node = _ref94.node;
23350
+ OPTION: function OPTION(_ref95) {
23351
+ var node = _ref95.node;
22815
23352
  var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
22816
23353
  return !withinOptionList;
22817
23354
  },
22818
- SELECT: function SELECT(_ref95) {
22819
- var node = _ref95.node, role = _ref95.role;
23355
+ SELECT: function SELECT(_ref96) {
23356
+ var node = _ref96.node, role = _ref96.role;
22820
23357
  return !node.multiple && node.size <= 1 && role === 'menu';
22821
23358
  },
22822
- SVG: function SVG(_ref96) {
22823
- var node = _ref96.node, out = _ref96.out;
23359
+ SVG: function SVG(_ref97) {
23360
+ var node = _ref97.node, out = _ref97.out;
22824
23361
  if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
22825
23362
  return true;
22826
23363
  }
@@ -22845,7 +23382,7 @@
22845
23382
  }
22846
23383
  var is_accessible_ref_default = isAccessibleRef;
22847
23384
  function _isComboboxPopup(virtualNode) {
22848
- var _ref97 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, popupRoles = _ref97.popupRoles;
23385
+ var _ref98 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, popupRoles = _ref98.popupRoles;
22849
23386
  var role = get_role_default(virtualNode);
22850
23387
  popupRoles !== null && popupRoles !== void 0 ? popupRoles : popupRoles = aria_attrs_default['aria-haspopup'].values;
22851
23388
  if (!popupRoles.includes(role)) {
@@ -23048,10 +23585,10 @@
23048
23585
  }
23049
23586
  });
23050
23587
  });
23051
- var _iterator15 = _createForOfIteratorHelper(messageKeys), _step15;
23588
+ var _iterator18 = _createForOfIteratorHelper(messageKeys), _step18;
23052
23589
  try {
23053
- for (_iterator15.s(); !(_step15 = _iterator15.n()).done; ) {
23054
- var messageKey = _step15.value;
23590
+ for (_iterator18.s(); !(_step18 = _iterator18.n()).done; ) {
23591
+ var messageKey = _step18.value;
23055
23592
  if (badCells[messageKey].size > 0) {
23056
23593
  this.relatedNodes(_toConsumableArray(badCells[messageKey]));
23057
23594
  if (messageKey === emptyHdrs) {
@@ -23064,9 +23601,9 @@
23064
23601
  }
23065
23602
  }
23066
23603
  } catch (err) {
23067
- _iterator15.e(err);
23604
+ _iterator18.e(err);
23068
23605
  } finally {
23069
- _iterator15.f();
23606
+ _iterator18.f();
23070
23607
  }
23071
23608
  return true;
23072
23609
  }
@@ -23134,8 +23671,8 @@
23134
23671
  if (!virtualNode.children) {
23135
23672
  return void 0;
23136
23673
  }
23137
- var titleNode = virtualNode.children.find(function(_ref98) {
23138
- var props = _ref98.props;
23674
+ var titleNode = virtualNode.children.find(function(_ref99) {
23675
+ var props = _ref99.props;
23139
23676
  return props.nodeName === 'title';
23140
23677
  });
23141
23678
  if (!titleNode) {
@@ -23272,8 +23809,8 @@
23272
23809
  }
23273
23810
  return false;
23274
23811
  }
23275
- function getNumberValue(domNode, _ref99) {
23276
- var cssProperty = _ref99.cssProperty, absoluteValues = _ref99.absoluteValues, normalValue = _ref99.normalValue;
23812
+ function getNumberValue(domNode, _ref100) {
23813
+ var cssProperty = _ref100.cssProperty, absoluteValues = _ref100.absoluteValues, normalValue = _ref100.normalValue;
23277
23814
  var computedStyle = window.getComputedStyle(domNode);
23278
23815
  var cssPropValue = computedStyle.getPropertyValue(cssProperty);
23279
23816
  if (cssPropValue === 'normal') {
@@ -23420,8 +23957,8 @@
23420
23957
  } else if (node !== document.body && has_content_default(node, true) && !isShallowlyHidden(virtualNode)) {
23421
23958
  return [ virtualNode ];
23422
23959
  } else {
23423
- return virtualNode.children.filter(function(_ref100) {
23424
- var actualNode = _ref100.actualNode;
23960
+ return virtualNode.children.filter(function(_ref101) {
23961
+ var actualNode = _ref101.actualNode;
23425
23962
  return actualNode.nodeType === 1;
23426
23963
  }).map(function(vNode) {
23427
23964
  return findRegionlessElms(vNode, options);
@@ -23458,19 +23995,19 @@
23458
23995
  return;
23459
23996
  }
23460
23997
  var frameAncestry = r.node.ancestry.slice(0, -1);
23461
- var _iterator16 = _createForOfIteratorHelper(iframeResults), _step16;
23998
+ var _iterator19 = _createForOfIteratorHelper(iframeResults), _step19;
23462
23999
  try {
23463
- for (_iterator16.s(); !(_step16 = _iterator16.n()).done; ) {
23464
- var iframeResult = _step16.value;
24000
+ for (_iterator19.s(); !(_step19 = _iterator19.n()).done; ) {
24001
+ var iframeResult = _step19.value;
23465
24002
  if (_matchAncestry(frameAncestry, iframeResult.node.ancestry)) {
23466
24003
  r.result = iframeResult.result;
23467
24004
  break;
23468
24005
  }
23469
24006
  }
23470
24007
  } catch (err) {
23471
- _iterator16.e(err);
24008
+ _iterator19.e(err);
23472
24009
  } finally {
23473
- _iterator16.f();
24010
+ _iterator19.f();
23474
24011
  }
23475
24012
  });
23476
24013
  iframeResults.forEach(function(r) {
@@ -23569,7 +24106,7 @@
23569
24106
  var separatorRegex = /[;,\s]/;
23570
24107
  var validRedirectNumRegex = /^[0-9.]+$/;
23571
24108
  function metaRefreshEvaluate(node, options, virtualNode) {
23572
- var _ref101 = options || {}, minDelay = _ref101.minDelay, maxDelay = _ref101.maxDelay;
24109
+ var _ref102 = options || {}, minDelay = _ref102.minDelay, maxDelay = _ref102.maxDelay;
23573
24110
  var content = (virtualNode.attr('content') || '').trim();
23574
24111
  var _content$split = content.split(separatorRegex), _content$split2 = _slicedToArray(_content$split, 1), redirectStr = _content$split2[0];
23575
24112
  if (!redirectStr.match(validRedirectNumRegex)) {
@@ -23932,10 +24469,10 @@
23932
24469
  var OPAQUE_STROKE_OFFSET_MIN_PX = 1.5;
23933
24470
  var edges = [ 'top', 'right', 'bottom', 'left' ];
23934
24471
  function _getStrokeColorsFromShadows(parsedShadows) {
23935
- var _ref102 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref102$ignoreEdgeCou = _ref102.ignoreEdgeCount, ignoreEdgeCount = _ref102$ignoreEdgeCou === void 0 ? false : _ref102$ignoreEdgeCou;
24472
+ var _ref103 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref103$ignoreEdgeCou = _ref103.ignoreEdgeCount, ignoreEdgeCount = _ref103$ignoreEdgeCou === void 0 ? false : _ref103$ignoreEdgeCou;
23936
24473
  var shadowMap = getShadowColorsMap(parsedShadows);
23937
- var shadowsByColor = Object.entries(shadowMap).map(function(_ref103) {
23938
- var _ref104 = _slicedToArray(_ref103, 2), colorStr = _ref104[0], sides = _ref104[1];
24474
+ var shadowsByColor = Object.entries(shadowMap).map(function(_ref104) {
24475
+ var _ref105 = _slicedToArray(_ref104, 2), colorStr = _ref105[0], sides = _ref105[1];
23939
24476
  var edgeCount = edges.filter(function(side) {
23940
24477
  return sides[side].length !== 0;
23941
24478
  }).length;
@@ -23945,8 +24482,8 @@
23945
24482
  edgeCount: edgeCount
23946
24483
  };
23947
24484
  });
23948
- if (!ignoreEdgeCount && shadowsByColor.some(function(_ref105) {
23949
- var edgeCount = _ref105.edgeCount;
24485
+ if (!ignoreEdgeCount && shadowsByColor.some(function(_ref106) {
24486
+ var edgeCount = _ref106.edgeCount;
23950
24487
  return edgeCount > 1 && edgeCount < 4;
23951
24488
  })) {
23952
24489
  return null;
@@ -23957,11 +24494,11 @@
23957
24494
  }
23958
24495
  function getShadowColorsMap(parsedShadows) {
23959
24496
  var colorMap = {};
23960
- var _iterator17 = _createForOfIteratorHelper(parsedShadows), _step17;
24497
+ var _iterator20 = _createForOfIteratorHelper(parsedShadows), _step20;
23961
24498
  try {
23962
- for (_iterator17.s(); !(_step17 = _iterator17.n()).done; ) {
24499
+ for (_iterator20.s(); !(_step20 = _iterator20.n()).done; ) {
23963
24500
  var _colorMap$colorStr;
23964
- var _step17$value = _step17.value, colorStr = _step17$value.colorStr, pixels = _step17$value.pixels;
24501
+ var _step20$value = _step20.value, colorStr = _step20$value.colorStr, pixels = _step20$value.pixels;
23965
24502
  (_colorMap$colorStr = colorMap[colorStr]) !== null && _colorMap$colorStr !== void 0 ? _colorMap$colorStr : colorMap[colorStr] = {
23966
24503
  top: [],
23967
24504
  right: [],
@@ -23982,14 +24519,14 @@
23982
24519
  }
23983
24520
  }
23984
24521
  } catch (err) {
23985
- _iterator17.e(err);
24522
+ _iterator20.e(err);
23986
24523
  } finally {
23987
- _iterator17.f();
24524
+ _iterator20.f();
23988
24525
  }
23989
24526
  return colorMap;
23990
24527
  }
23991
- function shadowGroupToColor(_ref106) {
23992
- var colorStr = _ref106.colorStr, sides = _ref106.sides, edgeCount = _ref106.edgeCount;
24528
+ function shadowGroupToColor(_ref107) {
24529
+ var colorStr = _ref107.colorStr, sides = _ref107.sides, edgeCount = _ref107.edgeCount;
23993
24530
  if (edgeCount !== 4) {
23994
24531
  return null;
23995
24532
  }
@@ -24040,8 +24577,8 @@
24040
24577
  throw new Error('Unable to process text-shadows: '.concat(str));
24041
24578
  }
24042
24579
  }
24043
- shadows.forEach(function(_ref107) {
24044
- var pixels = _ref107.pixels;
24580
+ shadows.forEach(function(_ref108) {
24581
+ var pixels = _ref108.pixels;
24045
24582
  if (pixels.length === 2) {
24046
24583
  pixels.push(0);
24047
24584
  }
@@ -24049,7 +24586,7 @@
24049
24586
  return shadows;
24050
24587
  }
24051
24588
  function _getTextShadowColors(node) {
24052
- var _ref108 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref108.minRatio, maxRatio = _ref108.maxRatio, ignoreEdgeCount = _ref108.ignoreEdgeCount;
24589
+ var _ref109 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref109.minRatio, maxRatio = _ref109.maxRatio, ignoreEdgeCount = _ref109.ignoreEdgeCount;
24053
24590
  var shadowColors = [];
24054
24591
  var style = window.getComputedStyle(node);
24055
24592
  var textShadow = style.getPropertyValue('text-shadow');
@@ -24061,10 +24598,10 @@
24061
24598
  assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
24062
24599
  var thinShadows = [];
24063
24600
  var shadows = _parseTextShadows(textShadow);
24064
- var _iterator18 = _createForOfIteratorHelper(shadows), _step18;
24601
+ var _iterator21 = _createForOfIteratorHelper(shadows), _step21;
24065
24602
  try {
24066
- for (_iterator18.s(); !(_step18 = _iterator18.n()).done; ) {
24067
- var shadow = _step18.value;
24603
+ for (_iterator21.s(); !(_step21 = _iterator21.n()).done; ) {
24604
+ var shadow = _step21.value;
24068
24605
  var colorStr = shadow.colorStr || style.getPropertyValue('color');
24069
24606
  var _shadow$pixels = _slicedToArray(shadow.pixels, 3), offsetX = _shadow$pixels[0], offsetY = _shadow$pixels[1], _shadow$pixels$ = _shadow$pixels[2], blurRadius = _shadow$pixels$ === void 0 ? 0 : _shadow$pixels$;
24070
24607
  if (maxRatio && blurRadius >= fontSize * maxRatio) {
@@ -24097,9 +24634,9 @@
24097
24634
  shadowColors.push(_color3);
24098
24635
  }
24099
24636
  } catch (err) {
24100
- _iterator18.e(err);
24637
+ _iterator21.e(err);
24101
24638
  } finally {
24102
- _iterator18.f();
24639
+ _iterator21.f();
24103
24640
  }
24104
24641
  if (thinShadows.length > 0) {
24105
24642
  var strokeColors = _getStrokeColorsFromShadows(thinShadows, {
@@ -24112,8 +24649,8 @@
24112
24649
  }
24113
24650
  return shadowColors;
24114
24651
  }
24115
- function textShadowColor(_ref109) {
24116
- var colorStr = _ref109.colorStr, offsetX = _ref109.offsetX, offsetY = _ref109.offsetY, blurRadius = _ref109.blurRadius, fontSize = _ref109.fontSize;
24652
+ function textShadowColor(_ref110) {
24653
+ var colorStr = _ref110.colorStr, offsetX = _ref110.offsetX, offsetY = _ref110.offsetY, blurRadius = _ref110.blurRadius, fontSize = _ref110.fontSize;
24117
24654
  if (offsetX > blurRadius || offsetY > blurRadius) {
24118
24655
  return new color_default(0, 0, 0, 0);
24119
24656
  }
@@ -24141,13 +24678,13 @@
24141
24678
  var _stackingOrder2;
24142
24679
  var bgVNode = get_node_from_tree_default(bgElm);
24143
24680
  var bgColor = getOwnBackgroundColor2(bgVNode);
24144
- var stackingOrder = bgVNode._stackingOrder.filter(function(_ref110) {
24145
- var vNode = _ref110.vNode;
24681
+ var stackingOrder = bgVNode._stackingOrder.filter(function(_ref111) {
24682
+ var vNode = _ref111.vNode;
24146
24683
  return !!vNode;
24147
24684
  });
24148
- stackingOrder.forEach(function(_ref111, index) {
24685
+ stackingOrder.forEach(function(_ref112, index) {
24149
24686
  var _stackingOrder;
24150
- var vNode = _ref111.vNode;
24687
+ var vNode = _ref112.vNode;
24151
24688
  var ancestorVNode2 = (_stackingOrder = stackingOrder[index - 1]) === null || _stackingOrder === void 0 ? void 0 : _stackingOrder.vNode;
24152
24689
  var context2 = addToStackingContext(contextMap, vNode, ancestorVNode2);
24153
24690
  if (index === 0 && !contextMap.get(vNode)) {
@@ -24401,8 +24938,8 @@
24401
24938
  function getTextColor(nodeStyle) {
24402
24939
  return new color_default().parseString(nodeStyle.getPropertyValue('-webkit-text-fill-color') || nodeStyle.getPropertyValue('color'));
24403
24940
  }
24404
- function getStrokeColor(nodeStyle, _ref112) {
24405
- var _ref112$textStrokeEmM = _ref112.textStrokeEmMin, textStrokeEmMin = _ref112$textStrokeEmM === void 0 ? 0 : _ref112$textStrokeEmM;
24941
+ function getStrokeColor(nodeStyle, _ref113) {
24942
+ var _ref113$textStrokeEmM = _ref113.textStrokeEmMin, textStrokeEmMin = _ref113$textStrokeEmM === void 0 ? 0 : _ref113$textStrokeEmM;
24406
24943
  var strokeWidth = parseFloat(nodeStyle.getPropertyValue('-webkit-text-stroke-width'));
24407
24944
  if (strokeWidth === 0) {
24408
24945
  return null;
@@ -24444,11 +24981,11 @@
24444
24981
  return fgColor;
24445
24982
  }
24446
24983
  function findNodeInContexts(contexts, node) {
24447
- var _iterator19 = _createForOfIteratorHelper(contexts), _step19;
24984
+ var _iterator22 = _createForOfIteratorHelper(contexts), _step22;
24448
24985
  try {
24449
- for (_iterator19.s(); !(_step19 = _iterator19.n()).done; ) {
24986
+ for (_iterator22.s(); !(_step22 = _iterator22.n()).done; ) {
24450
24987
  var _context$vNode;
24451
- var context = _step19.value;
24988
+ var context = _step22.value;
24452
24989
  if (((_context$vNode = context.vNode) === null || _context$vNode === void 0 ? void 0 : _context$vNode.actualNode) === node) {
24453
24990
  return context;
24454
24991
  }
@@ -24458,9 +24995,9 @@
24458
24995
  }
24459
24996
  }
24460
24997
  } catch (err) {
24461
- _iterator19.e(err);
24998
+ _iterator22.e(err);
24462
24999
  } finally {
24463
- _iterator19.f();
25000
+ _iterator22.f();
24464
25001
  }
24465
25002
  }
24466
25003
  function hasValidContrastRatio(bg, fg, fontSize, isBold) {
@@ -24564,25 +25101,25 @@
24564
25101
  if (results.length < 2) {
24565
25102
  return results;
24566
25103
  }
24567
- var incompleteResults = results.filter(function(_ref113) {
24568
- var result = _ref113.result;
25104
+ var incompleteResults = results.filter(function(_ref114) {
25105
+ var result = _ref114.result;
24569
25106
  return result !== void 0;
24570
25107
  });
24571
25108
  var uniqueResults = [];
24572
25109
  var nameMap = {};
24573
- var _loop8 = function _loop8(index) {
25110
+ var _loop9 = function _loop9(index) {
24574
25111
  var _currentResult$relate;
24575
25112
  var currentResult = incompleteResults[index];
24576
25113
  var _currentResult$data = currentResult.data, name = _currentResult$data.name, urlProps = _currentResult$data.urlProps;
24577
25114
  if (nameMap[name]) {
24578
25115
  return 1;
24579
25116
  }
24580
- var sameNameResults = incompleteResults.filter(function(_ref114, resultNum) {
24581
- var data = _ref114.data;
25117
+ var sameNameResults = incompleteResults.filter(function(_ref115, resultNum) {
25118
+ var data = _ref115.data;
24582
25119
  return data.name === name && resultNum !== index;
24583
25120
  });
24584
- var isSameUrl = sameNameResults.every(function(_ref115) {
24585
- var data = _ref115.data;
25121
+ var isSameUrl = sameNameResults.every(function(_ref116) {
25122
+ var data = _ref116.data;
24586
25123
  return isIdenticalObject(data.urlProps, urlProps);
24587
25124
  });
24588
25125
  if (sameNameResults.length && !isSameUrl) {
@@ -24596,7 +25133,7 @@
24596
25133
  uniqueResults.push(currentResult);
24597
25134
  };
24598
25135
  for (var index = 0; index < incompleteResults.length; index++) {
24599
- if (_loop8(index)) {
25136
+ if (_loop9(index)) {
24600
25137
  continue;
24601
25138
  }
24602
25139
  }
@@ -24608,7 +25145,7 @@
24608
25145
  var headingRole = role && role.includes('heading');
24609
25146
  var ariaHeadingLevel = vNode.attr('aria-level');
24610
25147
  var ariaLevel = parseInt(ariaHeadingLevel, 10);
24611
- var _ref116 = vNode.props.nodeName.match(/h(\d)/) || [], _ref117 = _slicedToArray(_ref116, 2), headingLevel = _ref117[1];
25148
+ var _ref117 = vNode.props.nodeName.match(/h(\d)/) || [], _ref118 = _slicedToArray(_ref117, 2), headingLevel = _ref118[1];
24612
25149
  if (!headingRole) {
24613
25150
  return -1;
24614
25151
  }
@@ -24668,14 +25205,14 @@
24668
25205
  }
24669
25206
  function getHeadingOrder(results) {
24670
25207
  results = _toConsumableArray(results);
24671
- results.sort(function(_ref118, _ref119) {
24672
- var nodeA = _ref118.node;
24673
- var nodeB = _ref119.node;
25208
+ results.sort(function(_ref119, _ref120) {
25209
+ var nodeA = _ref119.node;
25210
+ var nodeB = _ref120.node;
24674
25211
  return nodeA.ancestry.length - nodeB.ancestry.length;
24675
25212
  });
24676
25213
  var headingOrder = results.reduce(mergeHeadingOrder, []);
24677
- return headingOrder.filter(function(_ref120) {
24678
- var level = _ref120.level;
25214
+ return headingOrder.filter(function(_ref121) {
25215
+ var level = _ref121.level;
24679
25216
  return level !== -1;
24680
25217
  });
24681
25218
  }
@@ -24804,10 +25341,10 @@
24804
25341
  function filterByElmsOverlap(vNode, nearbyElms) {
24805
25342
  var fullyObscuringElms = [];
24806
25343
  var partialObscuringElms = [];
24807
- var _iterator20 = _createForOfIteratorHelper(nearbyElms), _step20;
25344
+ var _iterator23 = _createForOfIteratorHelper(nearbyElms), _step23;
24808
25345
  try {
24809
- for (_iterator20.s(); !(_step20 = _iterator20.n()).done; ) {
24810
- var vNeighbor = _step20.value;
25346
+ for (_iterator23.s(); !(_step23 = _iterator23.n()).done; ) {
25347
+ var vNeighbor = _step23.value;
24811
25348
  if (!isDescendantNotInTabOrder2(vNode, vNeighbor) && _hasVisualOverlap(vNode, vNeighbor) && getCssPointerEvents(vNeighbor) !== 'none') {
24812
25349
  if (isEnclosedRect2(vNode, vNeighbor)) {
24813
25350
  fullyObscuringElms.push(vNeighbor);
@@ -24817,9 +25354,9 @@
24817
25354
  }
24818
25355
  }
24819
25356
  } catch (err) {
24820
- _iterator20.e(err);
25357
+ _iterator23.e(err);
24821
25358
  } finally {
24822
- _iterator20.f();
25359
+ _iterator23.f();
24823
25360
  }
24824
25361
  return {
24825
25362
  fullyObscuringElms: fullyObscuringElms,
@@ -24875,8 +25412,8 @@
24875
25412
  return _contains(vAncestor, vNode) && !_isInTabOrder(vNode);
24876
25413
  }
24877
25414
  function mapActualNodes(vNodes) {
24878
- return vNodes.map(function(_ref121) {
24879
- var actualNode = _ref121.actualNode;
25415
+ return vNodes.map(function(_ref122) {
25416
+ var actualNode = _ref122.actualNode;
24880
25417
  return actualNode;
24881
25418
  });
24882
25419
  }
@@ -24892,10 +25429,10 @@
24892
25429
  }
24893
25430
  var closeNeighbors = [];
24894
25431
  var closestOffset = minOffset;
24895
- var _iterator21 = _createForOfIteratorHelper(_findNearbyElms(vNode, minOffset)), _step21;
25432
+ var _iterator24 = _createForOfIteratorHelper(_findNearbyElms(vNode, minOffset)), _step24;
24896
25433
  try {
24897
- for (_iterator21.s(); !(_step21 = _iterator21.n()).done; ) {
24898
- var vNeighbor = _step21.value;
25434
+ for (_iterator24.s(); !(_step24 = _iterator24.n()).done; ) {
25435
+ var vNeighbor = _step24.value;
24899
25436
  if (get_role_type_default(vNeighbor) !== 'widget' || !_isFocusable(vNeighbor)) {
24900
25437
  continue;
24901
25438
  }
@@ -24924,9 +25461,9 @@
24924
25461
  closeNeighbors.push(vNeighbor);
24925
25462
  }
24926
25463
  } catch (err) {
24927
- _iterator21.e(err);
25464
+ _iterator24.e(err);
24928
25465
  } finally {
24929
- _iterator21.f();
25466
+ _iterator24.f();
24930
25467
  }
24931
25468
  if (closeNeighbors.length === 0) {
24932
25469
  this.data({
@@ -24935,8 +25472,8 @@
24935
25472
  });
24936
25473
  return true;
24937
25474
  }
24938
- this.relatedNodes(closeNeighbors.map(function(_ref122) {
24939
- var actualNode = _ref122.actualNode;
25475
+ this.relatedNodes(closeNeighbors.map(function(_ref123) {
25476
+ var actualNode = _ref123.actualNode;
24940
25477
  return actualNode;
24941
25478
  }));
24942
25479
  if (!closeNeighbors.some(_isInTabOrder)) {
@@ -24957,7 +25494,7 @@
24957
25494
  return Math.round(num * 10) / 10;
24958
25495
  }
24959
25496
  function metaViewportScaleEvaluate(node, options, virtualNode) {
24960
- var _ref123 = options || {}, _ref123$scaleMinimum = _ref123.scaleMinimum, scaleMinimum = _ref123$scaleMinimum === void 0 ? 2 : _ref123$scaleMinimum, _ref123$lowerBound = _ref123.lowerBound, lowerBound = _ref123$lowerBound === void 0 ? false : _ref123$lowerBound;
25497
+ var _ref124 = options || {}, _ref124$scaleMinimum = _ref124.scaleMinimum, scaleMinimum = _ref124$scaleMinimum === void 0 ? 2 : _ref124$scaleMinimum, _ref124$lowerBound = _ref124.lowerBound, lowerBound = _ref124$lowerBound === void 0 ? false : _ref124$lowerBound;
24961
25498
  var content = virtualNode.attr('content') || '';
24962
25499
  if (!content) {
24963
25500
  return true;
@@ -25002,23 +25539,23 @@
25002
25539
  }
25003
25540
  var meta_viewport_scale_evaluate_default = metaViewportScaleEvaluate;
25004
25541
  function cssOrientationLockEvaluate(node, options, virtualNode, context) {
25005
- var _ref124 = context || {}, _ref124$cssom = _ref124.cssom, cssom = _ref124$cssom === void 0 ? void 0 : _ref124$cssom;
25006
- var _ref125 = options || {}, _ref125$degreeThresho = _ref125.degreeThreshold, degreeThreshold = _ref125$degreeThresho === void 0 ? 0 : _ref125$degreeThresho;
25542
+ var _ref125 = context || {}, _ref125$cssom = _ref125.cssom, cssom = _ref125$cssom === void 0 ? void 0 : _ref125$cssom;
25543
+ var _ref126 = options || {}, _ref126$degreeThresho = _ref126.degreeThreshold, degreeThreshold = _ref126$degreeThresho === void 0 ? 0 : _ref126$degreeThresho;
25007
25544
  if (!cssom || !cssom.length) {
25008
25545
  return void 0;
25009
25546
  }
25010
25547
  var isLocked = false;
25011
25548
  var relatedElements = [];
25012
25549
  var rulesGroupByDocumentFragment = groupCssomByDocument(cssom);
25013
- var _loop9 = function _loop9() {
25550
+ var _loop0 = function _loop0() {
25014
25551
  var key = _Object$keys3[_i31];
25015
25552
  var _rulesGroupByDocument = rulesGroupByDocumentFragment[key], root = _rulesGroupByDocument.root, rules = _rulesGroupByDocument.rules;
25016
25553
  var orientationRules = rules.filter(isMediaRuleWithOrientation);
25017
25554
  if (!orientationRules.length) {
25018
25555
  return 1;
25019
25556
  }
25020
- orientationRules.forEach(function(_ref126) {
25021
- var cssRules = _ref126.cssRules;
25557
+ orientationRules.forEach(function(_ref127) {
25558
+ var cssRules = _ref127.cssRules;
25022
25559
  Array.from(cssRules).forEach(function(cssRule) {
25023
25560
  var locked = getIsOrientationLocked(cssRule);
25024
25561
  if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
@@ -25030,7 +25567,7 @@
25030
25567
  });
25031
25568
  };
25032
25569
  for (var _i31 = 0, _Object$keys3 = Object.keys(rulesGroupByDocumentFragment); _i31 < _Object$keys3.length; _i31++) {
25033
- if (_loop9()) {
25570
+ if (_loop0()) {
25034
25571
  continue;
25035
25572
  }
25036
25573
  }
@@ -25042,8 +25579,8 @@
25042
25579
  }
25043
25580
  return false;
25044
25581
  function groupCssomByDocument(cssObjectModel) {
25045
- return cssObjectModel.reduce(function(out, _ref127) {
25046
- var sheet = _ref127.sheet, root = _ref127.root, shadowId = _ref127.shadowId;
25582
+ return cssObjectModel.reduce(function(out, _ref128) {
25583
+ var sheet = _ref128.sheet, root = _ref128.root, shadowId = _ref128.shadowId;
25047
25584
  var key = shadowId ? shadowId : 'topDocument';
25048
25585
  if (!out[key]) {
25049
25586
  out[key] = {
@@ -25059,15 +25596,15 @@
25059
25596
  return out;
25060
25597
  }, {});
25061
25598
  }
25062
- function isMediaRuleWithOrientation(_ref128) {
25063
- var type2 = _ref128.type, cssText = _ref128.cssText;
25599
+ function isMediaRuleWithOrientation(_ref129) {
25600
+ var type2 = _ref129.type, cssText = _ref129.cssText;
25064
25601
  if (type2 !== 4) {
25065
25602
  return false;
25066
25603
  }
25067
25604
  return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
25068
25605
  }
25069
- function getIsOrientationLocked(_ref129) {
25070
- var selectorText = _ref129.selectorText, style = _ref129.style;
25606
+ function getIsOrientationLocked(_ref130) {
25607
+ var selectorText = _ref130.selectorText, style = _ref130.style;
25071
25608
  if (!selectorText || style.length <= 0) {
25072
25609
  return false;
25073
25610
  }
@@ -25122,7 +25659,7 @@
25122
25659
  }
25123
25660
  }
25124
25661
  function getAngleInDegrees(angleWithUnit) {
25125
- var _ref130 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref131 = _slicedToArray(_ref130, 1), unit = _ref131[0];
25662
+ var _ref131 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref132 = _slicedToArray(_ref131, 1), unit = _ref132[0];
25126
25663
  if (!unit) {
25127
25664
  return 0;
25128
25665
  }
@@ -25364,18 +25901,17 @@
25364
25901
  if (!parent) {
25365
25902
  return void 0;
25366
25903
  }
25367
- var parentNodeName = parent.props.nodeName;
25368
- var parentRole = get_explicit_role_default(parent);
25904
+ var parentExplicitRole = get_explicit_role_default(parent);
25905
+ var parentRole = get_role_default(parent);
25369
25906
  if ([ 'presentation', 'none', 'list' ].includes(parentRole)) {
25370
25907
  return true;
25371
25908
  }
25372
- if (parentRole && is_valid_role_default(parentRole)) {
25909
+ if (parentExplicitRole && is_valid_role_default(parentExplicitRole)) {
25373
25910
  this.data({
25374
25911
  messageKey: 'roleNotValid'
25375
25912
  });
25376
- return false;
25377
25913
  }
25378
- return [ 'ul', 'ol', 'menu' ].includes(parentNodeName);
25914
+ return false;
25379
25915
  }
25380
25916
  function invalidChildrenEvaluate(node) {
25381
25917
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -25417,8 +25953,8 @@
25417
25953
  this.relatedNodes(relatedNodes);
25418
25954
  return true;
25419
25955
  }
25420
- function getInvalidSelector(vChild, nested, _ref132) {
25421
- var _ref132$validRoles = _ref132.validRoles, validRoles = _ref132$validRoles === void 0 ? [] : _ref132$validRoles, _ref132$validNodeName = _ref132.validNodeNames, validNodeNames = _ref132$validNodeName === void 0 ? [] : _ref132$validNodeName;
25956
+ function getInvalidSelector(vChild, nested, _ref133) {
25957
+ var _ref133$validRoles = _ref133.validRoles, validRoles = _ref133$validRoles === void 0 ? [] : _ref133$validRoles, _ref133$validNodeName = _ref133.validNodeNames, validNodeNames = _ref133$validNodeName === void 0 ? [] : _ref133$validNodeName;
25422
25958
  var _vChild$props = vChild.props, nodeName2 = _vChild$props.nodeName, nodeType = _vChild$props.nodeType, nodeValue = _vChild$props.nodeValue;
25423
25959
  var selector = nested ? 'div > ' : '';
25424
25960
  if (nodeType === 3 && nodeValue.trim() !== '') {
@@ -25427,11 +25963,12 @@
25427
25963
  if (nodeType !== 1 || !_isVisibleToScreenReaders(vChild)) {
25428
25964
  return false;
25429
25965
  }
25430
- var role = get_explicit_role_default(vChild);
25431
- if (role) {
25432
- return validRoles.includes(role) ? false : selector + '[role='.concat(role, ']');
25966
+ var explicitRole2 = get_explicit_role_default(vChild);
25967
+ var role = get_role_default(vChild);
25968
+ if (explicitRole2) {
25969
+ return validRoles.includes(explicitRole2) ? false : selector + '[role='.concat(role, ']');
25433
25970
  } else {
25434
- return validNodeNames.includes(nodeName2) ? false : selector + nodeName2;
25971
+ return validNodeNames.includes(nodeName2) || validRoles.includes(role) ? false : selector + nodeName2;
25435
25972
  }
25436
25973
  }
25437
25974
  function isDivGroup(vNode) {
@@ -25605,12 +26142,11 @@
25605
26142
  var pixelThreshold = options === null || options === void 0 ? void 0 : options.pixelThreshold;
25606
26143
  var occurrenceThreshold = (_options$occurrenceTh = options === null || options === void 0 ? void 0 : options.occurrenceThreshold) !== null && _options$occurrenceTh !== void 0 ? _options$occurrenceTh : options === null || options === void 0 ? void 0 : options.occuranceThreshold;
25607
26144
  var accText = accessible_text_default(node).toLowerCase();
25608
- var visibleText = sanitize_default(subtree_text_default(virtualNode, {
25609
- subtreeDescendant: true,
26145
+ var visibleText = visible_virtual_default(virtualNode, false, false, {
25610
26146
  ignoreIconLigature: true,
25611
26147
  pixelThreshold: pixelThreshold,
25612
26148
  occurrenceThreshold: occurrenceThreshold
25613
- })).toLowerCase();
26149
+ }).toLowerCase();
25614
26150
  if (!visibleText) {
25615
26151
  return true;
25616
26152
  }
@@ -25868,8 +26404,8 @@
25868
26404
  }
25869
26405
  var focusable_no_name_evaluate_default = focusableNoNameEvaluate;
25870
26406
  function focusableModalOpenEvaluate(node, options, virtualNode) {
25871
- var tabbableElements = virtualNode.tabbableElements.map(function(_ref133) {
25872
- var actualNode = _ref133.actualNode;
26407
+ var tabbableElements = virtualNode.tabbableElements.map(function(_ref134) {
26408
+ var actualNode = _ref134.actualNode;
25873
26409
  return actualNode;
25874
26410
  });
25875
26411
  if (!tabbableElements || !tabbableElements.length) {
@@ -26264,7 +26800,7 @@
26264
26800
  var bold = parseFloat(fontWeight) >= boldValue || fontWeight === 'bold';
26265
26801
  var ptSize = Math.ceil(fontSize * 72) / 96;
26266
26802
  var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
26267
- var _ref134 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref134.expected, minThreshold = _ref134.minThreshold, maxThreshold = _ref134.maxThreshold;
26803
+ var _ref135 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref135.expected, minThreshold = _ref135.minThreshold, maxThreshold = _ref135.maxThreshold;
26268
26804
  var pseudoElm = findPseudoElement(virtualNode, {
26269
26805
  ignorePseudo: ignorePseudo,
26270
26806
  pseudoSizeThreshold: pseudoSizeThreshold
@@ -26360,8 +26896,8 @@
26360
26896
  }
26361
26897
  return isValid;
26362
26898
  }
26363
- function findPseudoElement(vNode, _ref135) {
26364
- var _ref135$pseudoSizeThr = _ref135.pseudoSizeThreshold, pseudoSizeThreshold = _ref135$pseudoSizeThr === void 0 ? .25 : _ref135$pseudoSizeThr, _ref135$ignorePseudo = _ref135.ignorePseudo, ignorePseudo = _ref135$ignorePseudo === void 0 ? false : _ref135$ignorePseudo;
26899
+ function findPseudoElement(vNode, _ref136) {
26900
+ var _ref136$pseudoSizeThr = _ref136.pseudoSizeThreshold, pseudoSizeThreshold = _ref136$pseudoSizeThr === void 0 ? .25 : _ref136$pseudoSizeThr, _ref136$ignorePseudo = _ref136.ignorePseudo, ignorePseudo = _ref136$ignorePseudo === void 0 ? false : _ref136$ignorePseudo;
26365
26901
  if (ignorePseudo) {
26366
26902
  return;
26367
26903
  }
@@ -26403,7 +26939,7 @@
26403
26939
  }
26404
26940
  function parseUnit(str) {
26405
26941
  var unitRegex = /^([0-9.]+)([a-z]+)$/i;
26406
- var _ref136 = str.match(unitRegex) || [], _ref137 = _slicedToArray(_ref136, 3), _ref137$ = _ref137[1], value = _ref137$ === void 0 ? '' : _ref137$, _ref137$2 = _ref137[2], unit = _ref137$2 === void 0 ? '' : _ref137$2;
26942
+ var _ref137 = str.match(unitRegex) || [], _ref138 = _slicedToArray(_ref137, 3), _ref138$ = _ref138[1], value = _ref138$ === void 0 ? '' : _ref138$, _ref138$2 = _ref138[2], unit = _ref138$2 === void 0 ? '' : _ref138$2;
26407
26943
  return {
26408
26944
  value: parseFloat(value),
26409
26945
  unit: unit.toLowerCase()
@@ -26782,20 +27318,20 @@
26782
27318
  return true;
26783
27319
  }
26784
27320
  var ownedRoles = getOwnedRoles(virtualNode, required);
26785
- var unallowed = ownedRoles.filter(function(_ref138) {
26786
- var role = _ref138.role, vNode = _ref138.vNode;
27321
+ var unallowed = ownedRoles.filter(function(_ref139) {
27322
+ var role = _ref139.role, vNode = _ref139.vNode;
26787
27323
  return vNode.props.nodeType === 1 && !required.includes(role);
26788
27324
  });
26789
27325
  if (unallowed.length) {
26790
- this.relatedNodes(unallowed.map(function(_ref139) {
26791
- var vNode = _ref139.vNode;
27326
+ this.relatedNodes(unallowed.map(function(_ref140) {
27327
+ var vNode = _ref140.vNode;
26792
27328
  return vNode;
26793
27329
  }));
26794
27330
  var messageKey = virtualNode.attr('aria-busy') === 'true' ? 'aria-busy-fail' : 'unallowed';
26795
27331
  this.data({
26796
27332
  messageKey: messageKey,
26797
- values: unallowed.map(function(_ref140) {
26798
- var vNode = _ref140.vNode, attr = _ref140.attr;
27333
+ values: unallowed.map(function(_ref141) {
27334
+ var vNode = _ref141.vNode, attr = _ref141.attr;
26799
27335
  return getUnallowedSelector(vNode, attr);
26800
27336
  }).filter(function(selector, index, array) {
26801
27337
  return array.indexOf(selector) === index;
@@ -26822,7 +27358,7 @@
26822
27358
  var vNode;
26823
27359
  var ownedRoles = [];
26824
27360
  var ownedVirtual = get_owned_virtual_default(virtualNode);
26825
- var _loop0 = function _loop0() {
27361
+ var _loop1 = function _loop1() {
26826
27362
  if (vNode.props.nodeType === 3) {
26827
27363
  ownedRoles.push({
26828
27364
  vNode: vNode,
@@ -26842,7 +27378,7 @@
26842
27378
  })) {
26843
27379
  ownedVirtual.push.apply(ownedVirtual, _toConsumableArray(vNode.children));
26844
27380
  } else if (role || hasGlobalAriaOrFocusable) {
26845
- var attr = globalAriaAttr || 'tabindex';
27381
+ var attr = globalAriaAttr || (vNode.hasAttr('tabindex') ? 'tabindex' : void 0);
26846
27382
  ownedRoles.push({
26847
27383
  role: role,
26848
27384
  attr: attr,
@@ -26851,15 +27387,15 @@
26851
27387
  }
26852
27388
  };
26853
27389
  while (vNode = ownedVirtual.shift()) {
26854
- if (_loop0()) {
27390
+ if (_loop1()) {
26855
27391
  continue;
26856
27392
  }
26857
27393
  }
26858
27394
  return ownedRoles;
26859
27395
  }
26860
27396
  function hasRequiredChildren(required, ownedRoles) {
26861
- return ownedRoles.some(function(_ref141) {
26862
- var role = _ref141.role;
27397
+ return ownedRoles.some(function(_ref142) {
27398
+ var role = _ref142.role;
26863
27399
  return role && required.includes(role);
26864
27400
  });
26865
27401
  }
@@ -26884,8 +27420,8 @@
26884
27420
  }
26885
27421
  return nodeName2;
26886
27422
  }
26887
- function isContent(_ref142) {
26888
- var vNode = _ref142.vNode;
27423
+ function isContent(_ref143) {
27424
+ var vNode = _ref143.vNode;
26889
27425
  if (vNode.props.nodeType === 3) {
26890
27426
  return vNode.props.nodeValue.trim().length > 0;
26891
27427
  }
@@ -27055,7 +27591,7 @@
27055
27591
  }
27056
27592
  function ariaConditionalRowAttr(node) {
27057
27593
  var _invalidTableRowAttrs, _invalidTableRowAttrs2;
27058
- var _ref143 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, invalidTableRowAttrs = _ref143.invalidTableRowAttrs;
27594
+ var _ref144 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, invalidTableRowAttrs = _ref144.invalidTableRowAttrs;
27059
27595
  var virtualNode = arguments.length > 2 ? arguments[2] : undefined;
27060
27596
  var invalidAttrs = (_invalidTableRowAttrs = invalidTableRowAttrs === null || invalidTableRowAttrs === void 0 || (_invalidTableRowAttrs2 = invalidTableRowAttrs.filter) === null || _invalidTableRowAttrs2 === void 0 ? void 0 : _invalidTableRowAttrs2.call(invalidTableRowAttrs, function(invalidAttr) {
27061
27597
  return virtualNode.hasAttr(invalidAttr);
@@ -27083,10 +27619,10 @@
27083
27619
  var rowOwnerQuery = 'table:not([role]), [role~="treegrid"], [role~="table"], [role~="grid"]';
27084
27620
  return closest_default(virtualNode, rowOwnerQuery);
27085
27621
  }
27086
- function ariaConditionalCheckboxAttr(node, options, virtualNode) {
27622
+ function ariaConditionalRadioAttr(node, options, virtualNode) {
27087
27623
  var _virtualNode$props = virtualNode.props, nodeName2 = _virtualNode$props.nodeName, type2 = _virtualNode$props.type;
27088
27624
  var ariaChecked = normalizeAriaChecked(virtualNode.attr('aria-checked'));
27089
- if (nodeName2 !== 'input' || type2 !== 'checkbox' || !ariaChecked) {
27625
+ if (nodeName2 !== 'input' || type2 !== 'radio' || !ariaChecked) {
27090
27626
  return true;
27091
27627
  }
27092
27628
  var checkState = getCheckState(virtualNode);
@@ -27094,18 +27630,47 @@
27094
27630
  return true;
27095
27631
  }
27096
27632
  this.data({
27097
- messageKey: 'checkbox',
27633
+ messageKey: 'radio',
27098
27634
  checkState: checkState
27099
27635
  });
27100
27636
  return false;
27101
27637
  }
27102
27638
  function getCheckState(vNode) {
27639
+ return vNode.props.checked ? 'true' : 'false';
27640
+ }
27641
+ function normalizeAriaChecked(ariaCheckedVal) {
27642
+ if (!ariaCheckedVal) {
27643
+ return '';
27644
+ }
27645
+ ariaCheckedVal = ariaCheckedVal.toLowerCase();
27646
+ if (ariaCheckedVal === 'true') {
27647
+ return ariaCheckedVal;
27648
+ }
27649
+ return 'false';
27650
+ }
27651
+ function ariaConditionalCheckboxAttr(node, options, virtualNode) {
27652
+ var _virtualNode$props2 = virtualNode.props, nodeName2 = _virtualNode$props2.nodeName, type2 = _virtualNode$props2.type;
27653
+ var ariaChecked = normalizeAriaChecked2(virtualNode.attr('aria-checked'));
27654
+ if (nodeName2 !== 'input' || type2 !== 'checkbox' || !ariaChecked) {
27655
+ return true;
27656
+ }
27657
+ var checkState = getCheckState2(virtualNode);
27658
+ if (ariaChecked === checkState) {
27659
+ return true;
27660
+ }
27661
+ this.data({
27662
+ messageKey: 'checkbox',
27663
+ checkState: checkState
27664
+ });
27665
+ return false;
27666
+ }
27667
+ function getCheckState2(vNode) {
27103
27668
  if (vNode.props.indeterminate) {
27104
27669
  return 'mixed';
27105
27670
  }
27106
27671
  return vNode.props.checked ? 'true' : 'false';
27107
27672
  }
27108
- function normalizeAriaChecked(ariaCheckedVal) {
27673
+ function normalizeAriaChecked2(ariaCheckedVal) {
27109
27674
  if (!ariaCheckedVal) {
27110
27675
  return '';
27111
27676
  }
@@ -27117,7 +27682,8 @@
27117
27682
  }
27118
27683
  var conditionalRoleMap = {
27119
27684
  row: ariaConditionalRowAttr,
27120
- checkbox: ariaConditionalCheckboxAttr
27685
+ checkbox: ariaConditionalCheckboxAttr,
27686
+ radio: ariaConditionalRadioAttr
27121
27687
  };
27122
27688
  function ariaConditionalAttrEvaluate(node, options, virtualNode) {
27123
27689
  var role = get_role_default(virtualNode);
@@ -27157,18 +27723,18 @@
27157
27723
  if (Array.isArray(options[role])) {
27158
27724
  allowed = unique_array_default(options[role].concat(allowed));
27159
27725
  }
27160
- var _iterator22 = _createForOfIteratorHelper(virtualNode.attrNames), _step22;
27726
+ var _iterator25 = _createForOfIteratorHelper(virtualNode.attrNames), _step25;
27161
27727
  try {
27162
- for (_iterator22.s(); !(_step22 = _iterator22.n()).done; ) {
27163
- var attrName = _step22.value;
27728
+ for (_iterator25.s(); !(_step25 = _iterator25.n()).done; ) {
27729
+ var attrName = _step25.value;
27164
27730
  if (validate_attr_default(attrName) && !allowed.includes(attrName) && !ignoredAttrs(attrName, virtualNode.attr(attrName), virtualNode)) {
27165
27731
  invalid.push(attrName);
27166
27732
  }
27167
27733
  }
27168
27734
  } catch (err) {
27169
- _iterator22.e(err);
27735
+ _iterator25.e(err);
27170
27736
  } finally {
27171
- _iterator22.f();
27737
+ _iterator25.f();
27172
27738
  }
27173
27739
  if (!invalid.length) {
27174
27740
  return true;
@@ -27176,7 +27742,7 @@
27176
27742
  this.data(invalid.map(function(attrName) {
27177
27743
  return attrName + '="' + virtualNode.attr(attrName) + '"';
27178
27744
  }));
27179
- if (!role && !is_html_element_default(virtualNode) && !_isFocusable(virtualNode)) {
27745
+ if (!role && !_isHtmlElement(virtualNode) && !_isFocusable(virtualNode)) {
27180
27746
  return void 0;
27181
27747
  }
27182
27748
  return false;
@@ -27202,18 +27768,18 @@
27202
27768
  var allowedAriaAttrs = elmSpec.allowedAriaAttrs;
27203
27769
  var globalAriaAttrs = get_global_aria_attrs_default();
27204
27770
  var invalid = [];
27205
- var _iterator23 = _createForOfIteratorHelper(virtualNode.attrNames), _step23;
27771
+ var _iterator26 = _createForOfIteratorHelper(virtualNode.attrNames), _step26;
27206
27772
  try {
27207
- for (_iterator23.s(); !(_step23 = _iterator23.n()).done; ) {
27208
- var attrName = _step23.value;
27773
+ for (_iterator26.s(); !(_step26 = _iterator26.n()).done; ) {
27774
+ var attrName = _step26.value;
27209
27775
  if (globalAriaAttrs.includes(attrName) && !allowedAriaAttrs.includes(attrName)) {
27210
27776
  invalid.push(attrName);
27211
27777
  }
27212
27778
  }
27213
27779
  } catch (err) {
27214
- _iterator23.e(err);
27780
+ _iterator26.e(err);
27215
27781
  } finally {
27216
- _iterator23.f();
27782
+ _iterator26.f();
27217
27783
  }
27218
27784
  if (!invalid.length) {
27219
27785
  return true;
@@ -27373,7 +27939,7 @@
27373
27939
  if (!role || [ 'none', 'presentation' ].includes(role)) {
27374
27940
  return true;
27375
27941
  }
27376
- var _ref144 = aria_roles_default[role] || {}, accessibleNameRequired = _ref144.accessibleNameRequired;
27942
+ var _ref145 = aria_roles_default[role] || {}, accessibleNameRequired = _ref145.accessibleNameRequired;
27377
27943
  if (accessibleNameRequired || _isFocusable(virtualNode)) {
27378
27944
  return true;
27379
27945
  }
@@ -27605,7 +28171,7 @@
27605
28171
  }
27606
28172
  var data_table_large_matches_default = dataTableLargeMatches;
27607
28173
  function colorContrastMatches(node, virtualNode) {
27608
- var _virtualNode$props2 = virtualNode.props, nodeName2 = _virtualNode$props2.nodeName, inputType = _virtualNode$props2.type;
28174
+ var _virtualNode$props3 = virtualNode.props, nodeName2 = _virtualNode$props3.nodeName, inputType = _virtualNode$props3.type;
27609
28175
  if (nodeName2 === 'option') {
27610
28176
  return false;
27611
28177
  }
@@ -27820,6 +28386,7 @@
27820
28386
  'aria-busy-evaluate': ariaBusyEvaluate,
27821
28387
  'aria-conditional-attr-evaluate': ariaConditionalAttrEvaluate,
27822
28388
  'aria-conditional-checkbox-attr-evaluate': ariaConditionalCheckboxAttr,
28389
+ 'aria-conditional-radio-attr-evaluate': ariaConditionalRadioAttr,
27823
28390
  'aria-conditional-row-attr-evaluate': ariaConditionalRowAttr,
27824
28391
  'aria-errormessage-evaluate': ariaErrormessageEvaluate,
27825
28392
  'aria-has-attr-matches': aria_has_attr_matches_default,
@@ -28609,10 +29176,10 @@
28609
29176
  value: function setAllowedOrigins(allowedOrigins) {
28610
29177
  var defaultOrigin = getDefaultOrigin();
28611
29178
  this.allowedOrigins = [];
28612
- var _iterator24 = _createForOfIteratorHelper(allowedOrigins), _step24;
29179
+ var _iterator27 = _createForOfIteratorHelper(allowedOrigins), _step27;
28613
29180
  try {
28614
- for (_iterator24.s(); !(_step24 = _iterator24.n()).done; ) {
28615
- var origin = _step24.value;
29181
+ for (_iterator27.s(); !(_step27 = _iterator27.n()).done; ) {
29182
+ var origin = _step27.value;
28616
29183
  if (origin === constants_default.allOrigins) {
28617
29184
  this.allowedOrigins = [ '*' ];
28618
29185
  return;
@@ -28623,9 +29190,9 @@
28623
29190
  }
28624
29191
  }
28625
29192
  } catch (err) {
28626
- _iterator24.e(err);
29193
+ _iterator27.e(err);
28627
29194
  } finally {
28628
- _iterator24.f();
29195
+ _iterator27.f();
28629
29196
  }
28630
29197
  }
28631
29198
  }, {
@@ -28694,56 +29261,61 @@
28694
29261
  }, {
28695
29262
  key: 'run',
28696
29263
  value: function run(context, options, resolve, reject) {
28697
- this.normalizeOptions(options);
29264
+ var _this13 = this;
29265
+ _normalizeRunOptions(options);
28698
29266
  dq_element_default.setRunOptions(options);
28699
- axe._selectCache = [];
28700
- var allRulesToRun = getRulesToRun(this.rules, context, options);
28701
- var runNowRules = allRulesToRun.now;
28702
- var runLaterRules = allRulesToRun.later;
28703
- var nowRulesQueue = queue_default();
28704
- runNowRules.forEach(function(rule) {
28705
- nowRulesQueue.defer(getDefferedRule(rule, context, options));
28706
- });
28707
- var preloaderQueue = queue_default();
28708
- if (runLaterRules.length) {
28709
- preloaderQueue.defer(function(res) {
28710
- _preload(options).then(function(assets) {
28711
- return res(assets);
28712
- })['catch'](function(err2) {
28713
- console.warn('Couldn\'t load preload assets: ', err2);
28714
- res(void 0);
28715
- });
29267
+ var internalsQueue = queue_default();
29268
+ internalsQueue.defer(external.loadElementInternals());
29269
+ internalsQueue.then(function() {
29270
+ axe._selectCache = [];
29271
+ var allRulesToRun = getRulesToRun(_this13.rules, context, options);
29272
+ var runNowRules = allRulesToRun.now;
29273
+ var runLaterRules = allRulesToRun.later;
29274
+ var nowRulesQueue = queue_default();
29275
+ runNowRules.forEach(function(rule) {
29276
+ nowRulesQueue.defer(getDefferedRule(rule, context, options));
28716
29277
  });
28717
- }
28718
- var queueForNowRulesAndPreloader = queue_default();
28719
- queueForNowRulesAndPreloader.defer(nowRulesQueue);
28720
- queueForNowRulesAndPreloader.defer(preloaderQueue);
28721
- queueForNowRulesAndPreloader.then(function(nowRulesAndPreloaderResults) {
28722
- var assetsFromQueue = nowRulesAndPreloaderResults.pop();
28723
- if (assetsFromQueue && assetsFromQueue.length) {
28724
- var assets = assetsFromQueue[0];
28725
- if (assets) {
28726
- context = _extends({}, context, assets);
28727
- }
28728
- }
28729
- var nowRulesResults = nowRulesAndPreloaderResults[0];
28730
- if (!runLaterRules.length) {
28731
- axe._selectCache = void 0;
28732
- resolve(nowRulesResults.filter(function(result) {
28733
- return !!result;
28734
- }));
28735
- return;
29278
+ var preloaderQueue = queue_default();
29279
+ if (runLaterRules.length) {
29280
+ preloaderQueue.defer(function(res) {
29281
+ _preload(options).then(function(assets) {
29282
+ return res(assets);
29283
+ })['catch'](function(err2) {
29284
+ console.warn('Couldn\'t load preload assets: ', err2);
29285
+ res(void 0);
29286
+ });
29287
+ });
28736
29288
  }
28737
- var laterRulesQueue = queue_default();
28738
- runLaterRules.forEach(function(rule) {
28739
- var deferredRule = getDefferedRule(rule, context, options);
28740
- laterRulesQueue.defer(deferredRule);
28741
- });
28742
- laterRulesQueue.then(function(laterRuleResults) {
28743
- axe._selectCache = void 0;
28744
- resolve(nowRulesResults.concat(laterRuleResults).filter(function(result) {
28745
- return !!result;
28746
- }));
29289
+ var queueForNowRulesAndPreloader = queue_default();
29290
+ queueForNowRulesAndPreloader.defer(nowRulesQueue);
29291
+ queueForNowRulesAndPreloader.defer(preloaderQueue);
29292
+ queueForNowRulesAndPreloader.then(function(nowRulesAndPreloaderResults) {
29293
+ var assetsFromQueue = nowRulesAndPreloaderResults.pop();
29294
+ if (assetsFromQueue && assetsFromQueue.length) {
29295
+ var assets = assetsFromQueue[0];
29296
+ if (assets) {
29297
+ context = _extends({}, context, assets);
29298
+ }
29299
+ }
29300
+ var nowRulesResults = nowRulesAndPreloaderResults[0];
29301
+ if (!runLaterRules.length) {
29302
+ axe._selectCache = void 0;
29303
+ resolve(nowRulesResults.filter(function(result) {
29304
+ return !!result;
29305
+ }));
29306
+ return;
29307
+ }
29308
+ var laterRulesQueue = queue_default();
29309
+ runLaterRules.forEach(function(rule) {
29310
+ var deferredRule = getDefferedRule(rule, context, options);
29311
+ laterRulesQueue.defer(deferredRule);
29312
+ });
29313
+ laterRulesQueue.then(function(laterRuleResults) {
29314
+ axe._selectCache = void 0;
29315
+ resolve(nowRulesResults.concat(laterRuleResults).filter(function(result) {
29316
+ return !!result;
29317
+ }));
29318
+ })['catch'](reject);
28747
29319
  })['catch'](reject);
28748
29320
  })['catch'](reject);
28749
29321
  }
@@ -28776,89 +29348,9 @@
28776
29348
  return rule.id === ruleId;
28777
29349
  });
28778
29350
  }
28779
- }, {
28780
- key: 'normalizeOptions',
28781
- value: function normalizeOptions(options) {
28782
- var audit = this;
28783
- var tags = [];
28784
- var ruleIds = [];
28785
- audit.rules.forEach(function(rule) {
28786
- ruleIds.push(rule.id);
28787
- rule.tags.forEach(function(tag) {
28788
- if (!tags.includes(tag)) {
28789
- tags.push(tag);
28790
- }
28791
- });
28792
- });
28793
- if ([ 'object', 'string' ].includes(_typeof(options.runOnly))) {
28794
- if (typeof options.runOnly === 'string') {
28795
- options.runOnly = [ options.runOnly ];
28796
- }
28797
- if (Array.isArray(options.runOnly)) {
28798
- var hasTag = options.runOnly.find(function(value) {
28799
- return tags.includes(value);
28800
- });
28801
- var hasRule = options.runOnly.find(function(value) {
28802
- return ruleIds.includes(value);
28803
- });
28804
- if (hasTag && hasRule) {
28805
- throw new Error('runOnly cannot be both rules and tags');
28806
- }
28807
- if (hasRule) {
28808
- options.runOnly = {
28809
- type: 'rule',
28810
- values: options.runOnly
28811
- };
28812
- } else {
28813
- options.runOnly = {
28814
- type: 'tag',
28815
- values: options.runOnly
28816
- };
28817
- }
28818
- }
28819
- var only = options.runOnly;
28820
- if (only.value && !only.values) {
28821
- only.values = only.value;
28822
- delete only.value;
28823
- }
28824
- if (!Array.isArray(only.values) || only.values.length === 0) {
28825
- throw new Error('runOnly.values must be a non-empty array');
28826
- }
28827
- if ([ 'rule', 'rules' ].includes(only.type)) {
28828
- only.type = 'rule';
28829
- only.values.forEach(function(ruleId) {
28830
- if (!ruleIds.includes(ruleId)) {
28831
- throw new Error('unknown rule `' + ruleId + '` in options.runOnly');
28832
- }
28833
- });
28834
- } else if ([ 'tag', 'tags', void 0 ].includes(only.type)) {
28835
- only.type = 'tag';
28836
- var unmatchedTags = only.values.filter(function(tag) {
28837
- return !tags.includes(tag) && !/wcag2[1-3]a{1,3}/.test(tag);
28838
- });
28839
- if (unmatchedTags.length !== 0) {
28840
- axe.log('Could not find tags `' + unmatchedTags.join('`, `') + '`');
28841
- }
28842
- } else {
28843
- throw new Error('Unknown runOnly type \''.concat(only.type, '\''));
28844
- }
28845
- }
28846
- if (_typeof(options.rules) === 'object') {
28847
- Object.keys(options.rules).forEach(function(ruleId) {
28848
- if (!ruleIds.includes(ruleId)) {
28849
- throw new Error('unknown rule `' + ruleId + '` in options.rules');
28850
- }
28851
- });
28852
- }
28853
- return options;
28854
- }
28855
29351
  }, {
28856
29352
  key: 'setBranding',
28857
29353
  value: function setBranding(branding) {
28858
- var previous = {
28859
- brand: this.brand,
28860
- application: this.application
28861
- };
28862
29354
  if (typeof branding === 'string') {
28863
29355
  this.application = branding;
28864
29356
  }
@@ -28868,21 +29360,20 @@
28868
29360
  if (branding && branding.hasOwnProperty('application') && branding.application && typeof branding.application === 'string') {
28869
29361
  this.application = branding.application;
28870
29362
  }
28871
- this._constructHelpUrls(previous);
28872
29363
  }
28873
29364
  }, {
28874
29365
  key: '_constructHelpUrls',
28875
29366
  value: function _constructHelpUrls() {
28876
- var _this13 = this;
29367
+ var _this14 = this;
28877
29368
  var previous = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
28878
29369
  var version = (axe.version.match(/^[1-9][0-9]*\.[0-9]+/) || [ 'x.y' ])[0];
28879
29370
  this.rules.forEach(function(rule) {
28880
- if (!_this13.data.rules[rule.id]) {
28881
- _this13.data.rules[rule.id] = {};
29371
+ if (!_this14.data.rules[rule.id]) {
29372
+ _this14.data.rules[rule.id] = {};
28882
29373
  }
28883
- var metaData = _this13.data.rules[rule.id];
29374
+ var metaData = _this14.data.rules[rule.id];
28884
29375
  if (typeof metaData.helpUrl !== 'string' || previous && metaData.helpUrl === getHelpUrl(previous, rule.id, version)) {
28885
- metaData.helpUrl = getHelpUrl(_this13, rule.id, version);
29376
+ metaData.helpUrl = getHelpUrl(_this14, rule.id, version);
28886
29377
  }
28887
29378
  });
28888
29379
  }
@@ -29030,8 +29521,8 @@
29030
29521
  } ]
29031
29522
  });
29032
29523
  }
29033
- function getHelpUrl(_ref145, ruleId, version) {
29034
- var brand = _ref145.brand, application = _ref145.application, lang = _ref145.lang;
29524
+ function getHelpUrl(_ref146, ruleId, version) {
29525
+ var brand = _ref146.brand, application = _ref146.application, lang = _ref146.lang;
29035
29526
  return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
29036
29527
  }
29037
29528
  function setupGlobals(context) {
@@ -29214,6 +29705,14 @@
29214
29705
  resetStandards();
29215
29706
  }
29216
29707
  var reset_default = reset;
29708
+ function resetLocale() {
29709
+ var audit = axe._audit;
29710
+ if (!audit) {
29711
+ throw new Error('No audit configured');
29712
+ }
29713
+ audit._resetLocale();
29714
+ }
29715
+ var reset_locale_default = resetLocale;
29217
29716
  function runVirtualRule(ruleId, vNode) {
29218
29717
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
29219
29718
  options.reporter = options.reporter || axe._audit.reporter || 'v1';
@@ -29253,9 +29752,9 @@
29253
29752
  toolOptions: options
29254
29753
  });
29255
29754
  }
29256
- function normalizeRunParams(_ref146) {
29257
- var _ref148, _options$reporter, _axe$_audit;
29258
- var _ref147 = _slicedToArray(_ref146, 3), context = _ref147[0], options = _ref147[1], callback = _ref147[2];
29755
+ function normalizeRunParams(_ref147) {
29756
+ var _ref149, _options$reporter, _axe$_audit;
29757
+ var _ref148 = _slicedToArray(_ref147, 3), context = _ref148[0], options = _ref148[1], callback = _ref148[2];
29259
29758
  var typeErr = new TypeError('axe.run arguments are invalid');
29260
29759
  if (!_isContextSpec(context)) {
29261
29760
  if (callback !== void 0) {
@@ -29276,7 +29775,7 @@
29276
29775
  throw typeErr;
29277
29776
  }
29278
29777
  options = clone2(options);
29279
- options.reporter = (_ref148 = (_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 && _ref148 !== void 0 ? _ref148 : 'v1';
29778
+ options.reporter = (_ref149 = (_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 && _ref149 !== void 0 ? _ref149 : 'v1';
29280
29779
  return {
29281
29780
  context: context,
29282
29781
  options: options,
@@ -29394,11 +29893,17 @@
29394
29893
  axe._running = true;
29395
29894
  options.elementRef = false;
29396
29895
  return new Promise(function(res, rej) {
29896
+ if (options.performanceTimer) {
29897
+ performance_timer_default.auditStart();
29898
+ }
29397
29899
  axe._audit.run(contextObj, options, res, rej);
29398
29900
  }).then(function(results) {
29901
+ if (options.performanceTimer) {
29902
+ performance_timer_default.auditEnd();
29903
+ }
29399
29904
  results = node_serializer_default.mapRawResults(results);
29400
- var frames = contextObj.frames.map(function(_ref149) {
29401
- var node = _ref149.node;
29905
+ var frames = contextObj.frames.map(function(_ref150) {
29906
+ var node = _ref150.node;
29402
29907
  return node_serializer_default.toSpec(node);
29403
29908
  });
29404
29909
  var environmentData;
@@ -29419,14 +29924,14 @@
29419
29924
  });
29420
29925
  }
29421
29926
  function finishRun(partialResults) {
29422
- var _ref151, _options$reporter2, _axe$_audit2;
29927
+ var _ref152, _options$reporter2, _axe$_audit2;
29423
29928
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
29424
29929
  options = clone2(options);
29425
- var _ref150 = partialResults.find(function(r) {
29930
+ var _ref151 = partialResults.find(function(r) {
29426
29931
  return r.environmentData;
29427
- }) || {}, environmentData = _ref150.environmentData;
29428
- axe._audit.normalizeOptions(options);
29429
- options.reporter = (_ref151 = (_options$reporter2 = options.reporter) !== null && _options$reporter2 !== void 0 ? _options$reporter2 : (_axe$_audit2 = axe._audit) === null || _axe$_audit2 === void 0 ? void 0 : _axe$_audit2.reporter) !== null && _ref151 !== void 0 ? _ref151 : 'v1';
29932
+ }) || {}, environmentData = _ref151.environmentData;
29933
+ _normalizeRunOptions(options);
29934
+ options.reporter = (_ref152 = (_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 && _ref152 !== void 0 ? _ref152 : 'v1';
29430
29935
  setFrameSpec(partialResults);
29431
29936
  var results = merge_results_default(partialResults);
29432
29937
  results = axe._audit.after(results, options);
@@ -29438,10 +29943,10 @@
29438
29943
  }
29439
29944
  function setFrameSpec(partialResults) {
29440
29945
  var frameStack = [];
29441
- var _iterator25 = _createForOfIteratorHelper(partialResults), _step25;
29946
+ var _iterator28 = _createForOfIteratorHelper(partialResults), _step28;
29442
29947
  try {
29443
- for (_iterator25.s(); !(_step25 = _iterator25.n()).done; ) {
29444
- var partialResult = _step25.value;
29948
+ for (_iterator28.s(); !(_step28 = _iterator28.n()).done; ) {
29949
+ var partialResult = _step28.value;
29445
29950
  var frameSpec = frameStack.shift();
29446
29951
  if (!partialResult) {
29447
29952
  continue;
@@ -29451,13 +29956,13 @@
29451
29956
  frameStack.unshift.apply(frameStack, _toConsumableArray(frameSpecs));
29452
29957
  }
29453
29958
  } catch (err) {
29454
- _iterator25.e(err);
29959
+ _iterator28.e(err);
29455
29960
  } finally {
29456
- _iterator25.f();
29961
+ _iterator28.f();
29457
29962
  }
29458
29963
  }
29459
- function getMergedFrameSpecs(_ref152) {
29460
- var childFrameSpecs = _ref152.frames, parentFrameSpec = _ref152.frameSpec;
29964
+ function getMergedFrameSpecs(_ref153) {
29965
+ var childFrameSpecs = _ref153.frames, parentFrameSpec = _ref153.frameSpec;
29461
29966
  if (!parentFrameSpec) {
29462
29967
  return childFrameSpecs;
29463
29968
  }
@@ -29587,7 +30092,8 @@
29587
30092
  metadataFunctionMap: metadata_function_map_default
29588
30093
  },
29589
30094
  public: {
29590
- reporters: reporters
30095
+ reporters: reporters,
30096
+ external: external
29591
30097
  },
29592
30098
  helpers: {
29593
30099
  failureSummary: failure_summary_default,
@@ -29627,6 +30133,7 @@
29627
30133
  axe.imports = imports_exports;
29628
30134
  axe.cleanup = cleanup_default;
29629
30135
  axe.configure = configure_default;
30136
+ axe.externalAPIs = externalAPIs;
29630
30137
  axe.frameMessenger = frameMessenger2;
29631
30138
  axe.getRules = get_rules_default;
29632
30139
  axe._load = load;
@@ -29636,6 +30143,7 @@
29636
30143
  axe.getReporter = getReporter;
29637
30144
  axe.addReporter = addReporter;
29638
30145
  axe.reset = reset_default;
30146
+ axe.resetLocale = reset_locale_default;
29639
30147
  axe._runRules = runRules;
29640
30148
  axe.runVirtualRule = runVirtualRule;
29641
30149
  axe.run = run4;
@@ -29737,6 +30245,10 @@
29737
30245
  description: 'Ensure all elements with a role attribute use a valid value',
29738
30246
  help: 'ARIA roles used must conform to valid values'
29739
30247
  },
30248
+ 'aria-tab-name': {
30249
+ description: 'Ensure every ARIA tab node has an accessible name',
30250
+ help: 'ARIA tab nodes must have an accessible name'
30251
+ },
29740
30252
  'aria-text': {
29741
30253
  description: 'Ensure role="text" is used on elements with no focusable descendants',
29742
30254
  help: '"role=text" should have no focusable descendants'
@@ -30132,6 +30644,7 @@
30132
30644
  pass: 'ARIA attribute is allowed',
30133
30645
  fail: {
30134
30646
  checkbox: 'Remove aria-checked, or set it to "${data.checkState}" to match the real checkbox state',
30647
+ radio: 'Remove aria-checked, or set it to "${data.checkState}" to match the real radio state',
30135
30648
  rowSingular: 'This attribute is supported with treegrid rows, but not ${data.ownerRole}: ${data.invalidAttrs}',
30136
30649
  rowPlural: 'These attributes are supported with treegrid rows, but not ${data.ownerRole}: ${data.invalidAttrs}'
30137
30650
  }
@@ -31438,6 +31951,20 @@
31438
31951
  all: [],
31439
31952
  any: [],
31440
31953
  none: [ 'invalidrole', 'abstractrole', 'unsupportedrole' ]
31954
+ }, {
31955
+ id: 'aria-tab-name',
31956
+ impact: 'serious',
31957
+ selector: '[role="tab"]',
31958
+ matches: 'no-naming-method-matches',
31959
+ tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'TTv5', 'TT5.c', 'EN-301-549', 'EN-9.4.1.2', 'ACT', 'RGAAv4', 'RGAA-7.1.1' ],
31960
+ all: [],
31961
+ any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
31962
+ options: {
31963
+ attribute: 'title'
31964
+ },
31965
+ id: 'non-empty-title'
31966
+ } ],
31967
+ none: []
31441
31968
  }, {
31442
31969
  id: 'aria-text',
31443
31970
  impact: 'serious',
@@ -32058,7 +32585,8 @@
32058
32585
  id: 'landmark-complementary-is-top-level',
32059
32586
  impact: 'moderate',
32060
32587
  selector: 'aside:not([role]), [role=complementary]',
32061
- tags: [ 'cat.semantics', 'best-practice' ],
32588
+ tags: [ 'cat.semantics', 'best-practice', 'deprecated' ],
32589
+ enabled: false,
32062
32590
  all: [],
32063
32591
  any: [ 'landmark-is-top-level' ],
32064
32592
  none: []