axe-core 4.4.3-canary.83ffb3d → 4.4.3-canary.90de9aa

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/axe.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! axe v4.4.3-canary.83ffb3d
1
+ /*! axe v4.4.3-canary.90de9aa
2
2
  * Copyright (c) 2022 Deque Systems, Inc.
3
3
  *
4
4
  * Your use of this Source Code Form is subject to the terms of the Mozilla Public
@@ -22,7 +22,7 @@
22
22
  }, _typeof(obj);
23
23
  }
24
24
  var axe = axe || {};
25
- axe.version = '4.4.3-canary.83ffb3d';
25
+ axe.version = '4.4.3-canary.90de9aa';
26
26
  if (typeof define === 'function' && define.amd) {
27
27
  define('axe-core', [], function() {
28
28
  return axe;
@@ -1147,7 +1147,7 @@
1147
1147
  'use strict';
1148
1148
  var sign = require_sign();
1149
1149
  var abs = Math.abs;
1150
- var floor = Math.floor;
1150
+ var floor2 = Math.floor;
1151
1151
  module.exports = function(value) {
1152
1152
  if (isNaN(value)) {
1153
1153
  return 0;
@@ -1156,7 +1156,7 @@
1156
1156
  if (value === 0 || !isFinite(value)) {
1157
1157
  return value;
1158
1158
  }
1159
- return sign(value) * floor(abs(value));
1159
+ return sign(value) * floor2(abs(value));
1160
1160
  };
1161
1161
  }
1162
1162
  });
@@ -2667,7 +2667,7 @@
2667
2667
  var indexOf = Array.prototype.indexOf;
2668
2668
  var objHasOwnProperty = Object.prototype.hasOwnProperty;
2669
2669
  var abs = Math.abs;
2670
- var floor = Math.floor;
2670
+ var floor2 = Math.floor;
2671
2671
  module.exports = function(searchElement) {
2672
2672
  var i, length, fromIndex, val;
2673
2673
  if (!numberIsNaN(searchElement)) {
@@ -2678,9 +2678,9 @@
2678
2678
  if (isNaN(fromIndex)) {
2679
2679
  fromIndex = 0;
2680
2680
  } else if (fromIndex >= 0) {
2681
- fromIndex = floor(fromIndex);
2681
+ fromIndex = floor2(fromIndex);
2682
2682
  } else {
2683
- fromIndex = toPosInt(this.length) - floor(abs(fromIndex));
2683
+ fromIndex = toPosInt(this.length) - floor2(abs(fromIndex));
2684
2684
  }
2685
2685
  for (i = fromIndex; i < length; ++i) {
2686
2686
  if (objHasOwnProperty.call(this, i)) {
@@ -4442,7 +4442,7 @@
4442
4442
  }();
4443
4443
  var LN2 = Math.LN2;
4444
4444
  var abs = Math.abs;
4445
- var floor = Math.floor;
4445
+ var floor2 = Math.floor;
4446
4446
  var log2 = Math.log;
4447
4447
  var min = Math.min;
4448
4448
  var pow = Math.pow;
@@ -4574,7 +4574,7 @@
4574
4574
  function packIEEE754(v, ebits, fbits) {
4575
4575
  var bias = (1 << ebits - 1) - 1, s, e, f, ln, i, bits, str, bytes;
4576
4576
  function roundToEven(n) {
4577
- var w = floor(n), f2 = n - w;
4577
+ var w = floor2(n), f2 = n - w;
4578
4578
  if (f2 < .5) {
4579
4579
  return w;
4580
4580
  }
@@ -4599,7 +4599,7 @@
4599
4599
  s = v < 0;
4600
4600
  v = abs(v);
4601
4601
  if (v >= pow(2, 1 - bias)) {
4602
- e = min(floor(log2(v) / LN2), 1023);
4602
+ e = min(floor2(log2(v) / LN2), 1023);
4603
4603
  f = roundToEven(v / pow(2, e) * pow(2, fbits));
4604
4604
  if (f / pow(2, fbits) >= 2) {
4605
4605
  e = e + 1;
@@ -4620,11 +4620,11 @@
4620
4620
  bits = [];
4621
4621
  for (i = fbits; i; i -= 1) {
4622
4622
  bits.push(f % 2 ? 1 : 0);
4623
- f = floor(f / 2);
4623
+ f = floor2(f / 2);
4624
4624
  }
4625
4625
  for (i = ebits; i; i -= 1) {
4626
4626
  bits.push(e % 2 ? 1 : 0);
4627
- e = floor(e / 2);
4627
+ e = floor2(e / 2);
4628
4628
  }
4629
4629
  bits.push(s ? 1 : 0);
4630
4630
  bits.reverse();
@@ -7712,8 +7712,10 @@
7712
7712
  var recursed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
7713
7713
  var x = rect.left + rect.width / 2;
7714
7714
  var y = rect.top + rect.height / 2;
7715
- var row = y / gridSize | 0;
7716
- var col = x / gridSize | 0;
7715
+ var floorX = floor(x);
7716
+ var floorY = floor(y);
7717
+ var row = floor(y / gridSize);
7718
+ var col = floor(x / gridSize);
7717
7719
  if (row > grid.cells.length || col > grid.numCols) {
7718
7720
  throw new Error('Element midpoint exceeds the grid bounds');
7719
7721
  }
@@ -7721,7 +7723,7 @@
7721
7723
  return gridCellNode.clientRects.find(function(clientRect) {
7722
7724
  var rectX = clientRect.left;
7723
7725
  var rectY = clientRect.top;
7724
- return x <= rectX + clientRect.width && x >= rectX && y <= rectY + clientRect.height && y >= rectY;
7726
+ return floorX < floor(rectX + clientRect.width) && floorX >= floor(rectX) && floorY < floor(rectY + clientRect.height) && floorY >= floor(rectY);
7725
7727
  });
7726
7728
  })) !== null && _grid$cells$row$col$f !== void 0 ? _grid$cells$row$col$f : [];
7727
7729
  var gridContainer = grid.container;
@@ -7737,6 +7739,9 @@
7737
7739
  }
7738
7740
  return stack;
7739
7741
  }
7742
+ function floor(_float) {
7743
+ return _float | 0;
7744
+ }
7740
7745
  function isStackingContext(vNode, parentVNode) {
7741
7746
  var position = vNode.getComputedStylePropertyValue('position');
7742
7747
  var zIndex = vNode.getComputedStylePropertyValue('z-index');
@@ -13845,7 +13850,6 @@
13845
13850
  var is_icon_ligature_default = isIconLigature;
13846
13851
  function accessibleTextVirtual(virtualNode) {
13847
13852
  var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13848
- var actualNode = virtualNode.actualNode;
13849
13853
  context = prepareContext(virtualNode, context);
13850
13854
  if (shouldIgnoreHidden(virtualNode, context)) {
13851
13855
  return '';
@@ -13864,7 +13868,7 @@
13864
13868
  return step(virtualNode, context);
13865
13869
  }, '');
13866
13870
  if (context.debug) {
13867
- axe.log(accName || '{empty-value}', actualNode, context);
13871
+ axe.log(accName || '{empty-value}', virtualNode.actualNode, context);
13868
13872
  }
13869
13873
  return accName;
13870
13874
  }
@@ -13874,15 +13878,14 @@
13874
13878
  }
13875
13879
  return virtualNode.props.nodeValue;
13876
13880
  }
13877
- function shouldIgnoreHidden(_ref43, context) {
13878
- var actualNode = _ref43.actualNode;
13879
- if (!actualNode) {
13881
+ function shouldIgnoreHidden(virtualNode, context) {
13882
+ if (!virtualNode) {
13880
13883
  return false;
13881
13884
  }
13882
- if (actualNode.nodeType !== 1 || context.includeHidden) {
13885
+ if (virtualNode.props.nodeType !== 1 || context.includeHidden) {
13883
13886
  return false;
13884
13887
  }
13885
- return !is_visible_default(actualNode, true);
13888
+ return !is_visible_default(virtualNode, true);
13886
13889
  }
13887
13890
  function shouldIgnoreIconLigature(virtualNode, context) {
13888
13891
  var ignoreIconLigature = context.ignoreIconLigature, pixelThreshold = context.pixelThreshold, occuranceThreshold = context.occuranceThreshold;
@@ -13892,18 +13895,14 @@
13892
13895
  return is_icon_ligature_default(virtualNode, pixelThreshold, occuranceThreshold);
13893
13896
  }
13894
13897
  function prepareContext(virtualNode, context) {
13895
- var actualNode = virtualNode.actualNode;
13896
13898
  if (!context.startNode) {
13897
13899
  context = _extends({
13898
13900
  startNode: virtualNode
13899
13901
  }, context);
13900
13902
  }
13901
- if (!actualNode) {
13902
- return context;
13903
- }
13904
- if (actualNode.nodeType === 1 && context.inLabelledByContext && context.includeHidden === void 0) {
13903
+ if (virtualNode.props.nodeType === 1 && context.inLabelledByContext && context.includeHidden === void 0) {
13905
13904
  context = _extends({
13906
- includeHidden: !is_visible_default(actualNode, true)
13905
+ includeHidden: !is_visible_default(virtualNode, true)
13907
13906
  }, context);
13908
13907
  }
13909
13908
  return context;
@@ -14064,7 +14063,7 @@
14064
14063
  locations: [ 'billing', 'shipping' ]
14065
14064
  };
14066
14065
  function isValidAutocomplete(autocompleteValue) {
14067
- var _ref44 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref44$looseTyped = _ref44.looseTyped, looseTyped = _ref44$looseTyped === void 0 ? false : _ref44$looseTyped, _ref44$stateTerms = _ref44.stateTerms, stateTerms = _ref44$stateTerms === void 0 ? [] : _ref44$stateTerms, _ref44$locations = _ref44.locations, locations = _ref44$locations === void 0 ? [] : _ref44$locations, _ref44$qualifiers = _ref44.qualifiers, qualifiers = _ref44$qualifiers === void 0 ? [] : _ref44$qualifiers, _ref44$standaloneTerm = _ref44.standaloneTerms, standaloneTerms = _ref44$standaloneTerm === void 0 ? [] : _ref44$standaloneTerm, _ref44$qualifiedTerms = _ref44.qualifiedTerms, qualifiedTerms = _ref44$qualifiedTerms === void 0 ? [] : _ref44$qualifiedTerms;
14066
+ var _ref43 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref43$looseTyped = _ref43.looseTyped, looseTyped = _ref43$looseTyped === void 0 ? false : _ref43$looseTyped, _ref43$stateTerms = _ref43.stateTerms, stateTerms = _ref43$stateTerms === void 0 ? [] : _ref43$stateTerms, _ref43$locations = _ref43.locations, locations = _ref43$locations === void 0 ? [] : _ref43$locations, _ref43$qualifiers = _ref43.qualifiers, qualifiers = _ref43$qualifiers === void 0 ? [] : _ref43$qualifiers, _ref43$standaloneTerm = _ref43.standaloneTerms, standaloneTerms = _ref43$standaloneTerm === void 0 ? [] : _ref43$standaloneTerm, _ref43$qualifiedTerms = _ref43.qualifiedTerms, qualifiedTerms = _ref43$qualifiedTerms === void 0 ? [] : _ref43$qualifiedTerms;
14068
14067
  autocompleteValue = autocompleteValue.toLowerCase().trim();
14069
14068
  stateTerms = stateTerms.concat(_autocomplete.stateTerms);
14070
14069
  if (stateTerms.includes(autocompleteValue) || autocompleteValue === '') {
@@ -16090,8 +16089,8 @@
16090
16089
  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' ]
16091
16090
  } ];
16092
16091
  lookupTable.evaluateRoleForElement = {
16093
- A: function A(_ref45) {
16094
- var node = _ref45.node, out = _ref45.out;
16092
+ A: function A(_ref44) {
16093
+ var node = _ref44.node, out = _ref44.out;
16095
16094
  if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
16096
16095
  return true;
16097
16096
  }
@@ -16100,19 +16099,19 @@
16100
16099
  }
16101
16100
  return true;
16102
16101
  },
16103
- AREA: function AREA(_ref46) {
16104
- var node = _ref46.node;
16102
+ AREA: function AREA(_ref45) {
16103
+ var node = _ref45.node;
16105
16104
  return !node.href;
16106
16105
  },
16107
- BUTTON: function BUTTON(_ref47) {
16108
- var node = _ref47.node, role = _ref47.role, out = _ref47.out;
16106
+ BUTTON: function BUTTON(_ref46) {
16107
+ var node = _ref46.node, role = _ref46.role, out = _ref46.out;
16109
16108
  if (node.getAttribute('type') === 'menu') {
16110
16109
  return role === 'menuitem';
16111
16110
  }
16112
16111
  return out;
16113
16112
  },
16114
- IMG: function IMG(_ref48) {
16115
- var node = _ref48.node, role = _ref48.role, out = _ref48.out;
16113
+ IMG: function IMG(_ref47) {
16114
+ var node = _ref47.node, role = _ref47.role, out = _ref47.out;
16116
16115
  switch (node.alt) {
16117
16116
  case null:
16118
16117
  return out;
@@ -16124,8 +16123,8 @@
16124
16123
  return role !== 'presentation' && role !== 'none';
16125
16124
  }
16126
16125
  },
16127
- INPUT: function INPUT(_ref49) {
16128
- var node = _ref49.node, role = _ref49.role, out = _ref49.out;
16126
+ INPUT: function INPUT(_ref48) {
16127
+ var node = _ref48.node, role = _ref48.role, out = _ref48.out;
16129
16128
  switch (node.type) {
16130
16129
  case 'button':
16131
16130
  case 'image':
@@ -16155,32 +16154,32 @@
16155
16154
  return false;
16156
16155
  }
16157
16156
  },
16158
- LI: function LI(_ref50) {
16159
- var node = _ref50.node, out = _ref50.out;
16157
+ LI: function LI(_ref49) {
16158
+ var node = _ref49.node, out = _ref49.out;
16160
16159
  var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
16161
16160
  if (hasImplicitListitemRole) {
16162
16161
  return out;
16163
16162
  }
16164
16163
  return true;
16165
16164
  },
16166
- MENU: function MENU(_ref51) {
16167
- var node = _ref51.node;
16165
+ MENU: function MENU(_ref50) {
16166
+ var node = _ref50.node;
16168
16167
  if (node.getAttribute('type') === 'context') {
16169
16168
  return false;
16170
16169
  }
16171
16170
  return true;
16172
16171
  },
16173
- OPTION: function OPTION(_ref52) {
16174
- var node = _ref52.node;
16172
+ OPTION: function OPTION(_ref51) {
16173
+ var node = _ref51.node;
16175
16174
  var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
16176
16175
  return !withinOptionList;
16177
16176
  },
16178
- SELECT: function SELECT(_ref53) {
16179
- var node = _ref53.node, role = _ref53.role;
16177
+ SELECT: function SELECT(_ref52) {
16178
+ var node = _ref52.node, role = _ref52.role;
16180
16179
  return !node.multiple && node.size <= 1 && role === 'menu';
16181
16180
  },
16182
- SVG: function SVG(_ref54) {
16183
- var node = _ref54.node, out = _ref54.out;
16181
+ SVG: function SVG(_ref53) {
16182
+ var node = _ref53.node, out = _ref53.out;
16184
16183
  if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
16185
16184
  return true;
16186
16185
  }
@@ -17158,7 +17157,7 @@
17158
17157
  }
17159
17158
  var get_background_stack_default = getBackgroundStack;
17160
17159
  function getTextShadowColors(node) {
17161
- var _ref55 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref55.minRatio, maxRatio = _ref55.maxRatio;
17160
+ var _ref54 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref54.minRatio, maxRatio = _ref54.maxRatio;
17162
17161
  var style = window.getComputedStyle(node);
17163
17162
  var textShadow = style.getPropertyValue('text-shadow');
17164
17163
  if (textShadow === 'none') {
@@ -17169,8 +17168,8 @@
17169
17168
  assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
17170
17169
  var shadowColors = [];
17171
17170
  var shadows = parseTextShadows(textShadow);
17172
- shadows.forEach(function(_ref56) {
17173
- var colorStr = _ref56.colorStr, pixels = _ref56.pixels;
17171
+ shadows.forEach(function(_ref55) {
17172
+ var colorStr = _ref55.colorStr, pixels = _ref55.pixels;
17174
17173
  colorStr = colorStr || style.getPropertyValue('color');
17175
17174
  var _pixels = _slicedToArray(pixels, 3), offsetY = _pixels[0], offsetX = _pixels[1], _pixels$ = _pixels[2], blurRadius = _pixels$ === void 0 ? 0 : _pixels$;
17176
17175
  if ((!minRatio || blurRadius >= fontSize * minRatio) && (!maxRatio || blurRadius < fontSize * maxRatio)) {
@@ -17220,8 +17219,8 @@
17220
17219
  }
17221
17220
  return shadows;
17222
17221
  }
17223
- function textShadowColor(_ref57) {
17224
- var colorStr = _ref57.colorStr, offsetX = _ref57.offsetX, offsetY = _ref57.offsetY, blurRadius = _ref57.blurRadius, fontSize = _ref57.fontSize;
17222
+ function textShadowColor(_ref56) {
17223
+ var colorStr = _ref56.colorStr, offsetX = _ref56.offsetX, offsetY = _ref56.offsetY, blurRadius = _ref56.blurRadius, fontSize = _ref56.fontSize;
17225
17224
  if (offsetX > blurRadius || offsetY > blurRadius) {
17226
17225
  return new color_default(0, 0, 0, 0);
17227
17226
  }
@@ -17405,7 +17404,7 @@
17405
17404
  var bold = parseFloat(fontWeight) >= boldValue || fontWeight === 'bold';
17406
17405
  var ptSize = Math.ceil(fontSize * 72) / 96;
17407
17406
  var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
17408
- var _ref58 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref58.expected, minThreshold = _ref58.minThreshold, maxThreshold = _ref58.maxThreshold;
17407
+ var _ref57 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref57.expected, minThreshold = _ref57.minThreshold, maxThreshold = _ref57.maxThreshold;
17409
17408
  var pseudoElm = findPseudoElement(virtualNode, {
17410
17409
  ignorePseudo: ignorePseudo,
17411
17410
  pseudoSizeThreshold: pseudoSizeThreshold
@@ -17484,8 +17483,8 @@
17484
17483
  }
17485
17484
  return isValid;
17486
17485
  }
17487
- function findPseudoElement(vNode, _ref59) {
17488
- var _ref59$pseudoSizeThre = _ref59.pseudoSizeThreshold, pseudoSizeThreshold = _ref59$pseudoSizeThre === void 0 ? .25 : _ref59$pseudoSizeThre, _ref59$ignorePseudo = _ref59.ignorePseudo, ignorePseudo = _ref59$ignorePseudo === void 0 ? false : _ref59$ignorePseudo;
17486
+ function findPseudoElement(vNode, _ref58) {
17487
+ var _ref58$pseudoSizeThre = _ref58.pseudoSizeThreshold, pseudoSizeThreshold = _ref58$pseudoSizeThre === void 0 ? .25 : _ref58$pseudoSizeThre, _ref58$ignorePseudo = _ref58.ignorePseudo, ignorePseudo = _ref58$ignorePseudo === void 0 ? false : _ref58$ignorePseudo;
17489
17488
  if (ignorePseudo) {
17490
17489
  return;
17491
17490
  }
@@ -17527,7 +17526,7 @@
17527
17526
  }
17528
17527
  function parseUnit(str) {
17529
17528
  var unitRegex = /^([0-9.]+)([a-z]+)$/i;
17530
- var _ref60 = str.match(unitRegex) || [], _ref61 = _slicedToArray(_ref60, 3), _ref61$ = _ref61[1], value = _ref61$ === void 0 ? '' : _ref61$, _ref61$2 = _ref61[2], unit = _ref61$2 === void 0 ? '' : _ref61$2;
17529
+ var _ref59 = str.match(unitRegex) || [], _ref60 = _slicedToArray(_ref59, 3), _ref60$ = _ref60[1], value = _ref60$ === void 0 ? '' : _ref60$, _ref60$2 = _ref60[2], unit = _ref60$2 === void 0 ? '' : _ref60$2;
17531
17530
  return {
17532
17531
  value: parseFloat(value),
17533
17532
  unit: unit.toLowerCase()
@@ -17795,8 +17794,8 @@
17795
17794
  if (!tabbableElements || !tabbableElements.length) {
17796
17795
  return true;
17797
17796
  }
17798
- var relatedNodes = tabbableElements.reduce(function(out, _ref62) {
17799
- var el = _ref62.actualNode;
17797
+ var relatedNodes = tabbableElements.reduce(function(out, _ref61) {
17798
+ var el = _ref61.actualNode;
17800
17799
  var nodeName2 = el.nodeName.toUpperCase();
17801
17800
  if (elementsThatCanBeDisabled.includes(nodeName2)) {
17802
17801
  out.push(el);
@@ -17837,8 +17836,8 @@
17837
17836
  }
17838
17837
  var focusable_element_evaluate_default = focusableElementEvaluate;
17839
17838
  function focusableModalOpenEvaluate(node, options, virtualNode) {
17840
- var tabbableElements = virtualNode.tabbableElements.map(function(_ref63) {
17841
- var actualNode = _ref63.actualNode;
17839
+ var tabbableElements = virtualNode.tabbableElements.map(function(_ref62) {
17840
+ var actualNode = _ref62.actualNode;
17842
17841
  return actualNode;
17843
17842
  });
17844
17843
  if (!tabbableElements || !tabbableElements.length) {
@@ -17870,8 +17869,8 @@
17870
17869
  if (!tabbableElements || !tabbableElements.length) {
17871
17870
  return true;
17872
17871
  }
17873
- var relatedNodes = tabbableElements.reduce(function(out, _ref64) {
17874
- var el = _ref64.actualNode;
17872
+ var relatedNodes = tabbableElements.reduce(function(out, _ref63) {
17873
+ var el = _ref63.actualNode;
17875
17874
  var nodeName2 = el.nodeName.toUpperCase();
17876
17875
  if (!elementsThatCanBeDisabled.includes(nodeName2)) {
17877
17876
  out.push(el);
@@ -18100,7 +18099,7 @@
18100
18099
  return sanitize_default(noUnicodeStr);
18101
18100
  }
18102
18101
  function labelContentNameMismatchEvaluate(node, options, virtualNode) {
18103
- var _ref65 = options || {}, pixelThreshold = _ref65.pixelThreshold, occuranceThreshold = _ref65.occuranceThreshold;
18102
+ var _ref64 = options || {}, pixelThreshold = _ref64.pixelThreshold, occuranceThreshold = _ref64.occuranceThreshold;
18104
18103
  var accText = accessible_text_default(node).toLowerCase();
18105
18104
  if (is_human_interpretable_default(accText) < 1) {
18106
18105
  return void 0;
@@ -18466,8 +18465,8 @@
18466
18465
  }
18467
18466
  var no_autoplay_audio_evaluate_default = noAutoplayAudioEvaluate;
18468
18467
  function cssOrientationLockEvaluate(node, options, virtualNode, context) {
18469
- var _ref66 = context || {}, _ref66$cssom = _ref66.cssom, cssom = _ref66$cssom === void 0 ? void 0 : _ref66$cssom;
18470
- var _ref67 = options || {}, _ref67$degreeThreshol = _ref67.degreeThreshold, degreeThreshold = _ref67$degreeThreshol === void 0 ? 0 : _ref67$degreeThreshol;
18468
+ var _ref65 = context || {}, _ref65$cssom = _ref65.cssom, cssom = _ref65$cssom === void 0 ? void 0 : _ref65$cssom;
18469
+ var _ref66 = options || {}, _ref66$degreeThreshol = _ref66.degreeThreshold, degreeThreshold = _ref66$degreeThreshol === void 0 ? 0 : _ref66$degreeThreshol;
18471
18470
  if (!cssom || !cssom.length) {
18472
18471
  return void 0;
18473
18472
  }
@@ -18481,8 +18480,8 @@
18481
18480
  if (!orientationRules.length) {
18482
18481
  return 'continue';
18483
18482
  }
18484
- orientationRules.forEach(function(_ref68) {
18485
- var cssRules = _ref68.cssRules;
18483
+ orientationRules.forEach(function(_ref67) {
18484
+ var cssRules = _ref67.cssRules;
18486
18485
  Array.from(cssRules).forEach(function(cssRule) {
18487
18486
  var locked = getIsOrientationLocked(cssRule);
18488
18487
  if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
@@ -18507,8 +18506,8 @@
18507
18506
  }
18508
18507
  return false;
18509
18508
  function groupCssomByDocument(cssObjectModel) {
18510
- return cssObjectModel.reduce(function(out, _ref69) {
18511
- var sheet = _ref69.sheet, root = _ref69.root, shadowId = _ref69.shadowId;
18509
+ return cssObjectModel.reduce(function(out, _ref68) {
18510
+ var sheet = _ref68.sheet, root = _ref68.root, shadowId = _ref68.shadowId;
18512
18511
  var key = shadowId ? shadowId : 'topDocument';
18513
18512
  if (!out[key]) {
18514
18513
  out[key] = {
@@ -18524,15 +18523,15 @@
18524
18523
  return out;
18525
18524
  }, {});
18526
18525
  }
18527
- function isMediaRuleWithOrientation(_ref70) {
18528
- var type = _ref70.type, cssText = _ref70.cssText;
18526
+ function isMediaRuleWithOrientation(_ref69) {
18527
+ var type = _ref69.type, cssText = _ref69.cssText;
18529
18528
  if (type !== 4) {
18530
18529
  return false;
18531
18530
  }
18532
18531
  return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
18533
18532
  }
18534
- function getIsOrientationLocked(_ref71) {
18535
- var selectorText = _ref71.selectorText, style = _ref71.style;
18533
+ function getIsOrientationLocked(_ref70) {
18534
+ var selectorText = _ref70.selectorText, style = _ref70.style;
18536
18535
  if (!selectorText || style.length <= 0) {
18537
18536
  return false;
18538
18537
  }
@@ -18579,7 +18578,7 @@
18579
18578
  }
18580
18579
  }
18581
18580
  function getAngleInDegrees(angleWithUnit) {
18582
- var _ref72 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref73 = _slicedToArray(_ref72, 1), unit = _ref73[0];
18581
+ var _ref71 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref72 = _slicedToArray(_ref71, 1), unit = _ref72[0];
18583
18582
  if (!unit) {
18584
18583
  return;
18585
18584
  }
@@ -18628,7 +18627,7 @@
18628
18627
  }
18629
18628
  var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
18630
18629
  function metaViewportScaleEvaluate(node, options, virtualNode) {
18631
- var _ref74 = options || {}, _ref74$scaleMinimum = _ref74.scaleMinimum, scaleMinimum = _ref74$scaleMinimum === void 0 ? 2 : _ref74$scaleMinimum, _ref74$lowerBound = _ref74.lowerBound, lowerBound = _ref74$lowerBound === void 0 ? false : _ref74$lowerBound;
18630
+ var _ref73 = options || {}, _ref73$scaleMinimum = _ref73.scaleMinimum, scaleMinimum = _ref73$scaleMinimum === void 0 ? 2 : _ref73$scaleMinimum, _ref73$lowerBound = _ref73.lowerBound, lowerBound = _ref73$lowerBound === void 0 ? false : _ref73$lowerBound;
18632
18631
  var content = virtualNode.attr('content') || '';
18633
18632
  if (!content) {
18634
18633
  return true;
@@ -18694,14 +18693,14 @@
18694
18693
  }
18695
18694
  function getHeadingOrder(results) {
18696
18695
  results = _toConsumableArray(results);
18697
- results.sort(function(_ref75, _ref76) {
18698
- var nodeA = _ref75.node;
18699
- var nodeB = _ref76.node;
18696
+ results.sort(function(_ref74, _ref75) {
18697
+ var nodeA = _ref74.node;
18698
+ var nodeB = _ref75.node;
18700
18699
  return nodeA.ancestry.length - nodeB.ancestry.length;
18701
18700
  });
18702
18701
  var headingOrder = results.reduce(mergeHeadingOrder, []);
18703
- return headingOrder.filter(function(_ref77) {
18704
- var level = _ref77.level;
18702
+ return headingOrder.filter(function(_ref76) {
18703
+ var level = _ref76.level;
18705
18704
  return level !== -1;
18706
18705
  });
18707
18706
  }
@@ -18752,7 +18751,7 @@
18752
18751
  var headingRole = role && role.includes('heading');
18753
18752
  var ariaHeadingLevel = vNode.attr('aria-level');
18754
18753
  var ariaLevel = parseInt(ariaHeadingLevel, 10);
18755
- var _ref78 = vNode.props.nodeName.match(/h(\d)/) || [], _ref79 = _slicedToArray(_ref78, 2), headingLevel = _ref79[1];
18754
+ var _ref77 = vNode.props.nodeName.match(/h(\d)/) || [], _ref78 = _slicedToArray(_ref77, 2), headingLevel = _ref78[1];
18756
18755
  if (!headingRole) {
18757
18756
  return -1;
18758
18757
  }
@@ -18818,8 +18817,8 @@
18818
18817
  if (results.length < 2) {
18819
18818
  return results;
18820
18819
  }
18821
- var incompleteResults = results.filter(function(_ref80) {
18822
- var result = _ref80.result;
18820
+ var incompleteResults = results.filter(function(_ref79) {
18821
+ var result = _ref79.result;
18823
18822
  return result !== void 0;
18824
18823
  });
18825
18824
  var uniqueResults = [];
@@ -18831,12 +18830,12 @@
18831
18830
  if (nameMap[name]) {
18832
18831
  return 'continue';
18833
18832
  }
18834
- var sameNameResults = incompleteResults.filter(function(_ref81, resultNum) {
18835
- var data2 = _ref81.data;
18833
+ var sameNameResults = incompleteResults.filter(function(_ref80, resultNum) {
18834
+ var data2 = _ref80.data;
18836
18835
  return data2.name === name && resultNum !== index;
18837
18836
  });
18838
- var isSameUrl = sameNameResults.every(function(_ref82) {
18839
- var data2 = _ref82.data;
18837
+ var isSameUrl = sameNameResults.every(function(_ref81) {
18838
+ var data2 = _ref81.data;
18840
18839
  return isIdenticalObject(data2.urlProps, urlProps);
18841
18840
  });
18842
18841
  if (sameNameResults.length && !isSameUrl) {
@@ -19252,7 +19251,7 @@
19252
19251
  var separatorRegex = /[;,\s]/;
19253
19252
  var validRedirectNumRegex = /^[0-9.]+$/;
19254
19253
  function metaRefreshEvaluate(node, options, virtualNode) {
19255
- var _ref83 = options || {}, minDelay = _ref83.minDelay, maxDelay = _ref83.maxDelay;
19254
+ var _ref82 = options || {}, minDelay = _ref82.minDelay, maxDelay = _ref82.maxDelay;
19256
19255
  var content = (virtualNode.attr('content') || '').trim();
19257
19256
  var _content$split = content.split(separatorRegex), _content$split2 = _slicedToArray(_content$split, 1), redirectStr = _content$split2[0];
19258
19257
  if (!redirectStr.match(validRedirectNumRegex)) {
@@ -19419,8 +19418,8 @@
19419
19418
  } else if (node !== document.body && has_content_default(node, true)) {
19420
19419
  return [ virtualNode ];
19421
19420
  } else {
19422
- return virtualNode.children.filter(function(_ref84) {
19423
- var actualNode = _ref84.actualNode;
19421
+ return virtualNode.children.filter(function(_ref83) {
19422
+ var actualNode = _ref83.actualNode;
19424
19423
  return actualNode.nodeType === 1;
19425
19424
  }).map(function(vNode) {
19426
19425
  return findRegionlessElms(vNode, options);
@@ -19579,8 +19578,8 @@
19579
19578
  }
19580
19579
  return false;
19581
19580
  }
19582
- function getNumberValue(domNode, _ref85) {
19583
- var cssProperty = _ref85.cssProperty, absoluteValues = _ref85.absoluteValues, normalValue = _ref85.normalValue;
19581
+ function getNumberValue(domNode, _ref84) {
19582
+ var cssProperty = _ref84.cssProperty, absoluteValues = _ref84.absoluteValues, normalValue = _ref84.normalValue;
19584
19583
  var computedStyle = window.getComputedStyle(domNode);
19585
19584
  var cssPropValue = computedStyle.getPropertyValue(cssProperty);
19586
19585
  if (cssPropValue === 'normal') {
@@ -19646,13 +19645,12 @@
19646
19645
  });
19647
19646
  return false;
19648
19647
  }
19649
- var presentational_role_evaluate_default = presentationalRoleEvaluate;
19650
19648
  function svgNonEmptyTitleEvaluate(node, options, virtualNode) {
19651
19649
  if (!virtualNode.children) {
19652
19650
  return void 0;
19653
19651
  }
19654
- var titleNode = virtualNode.children.find(function(_ref86) {
19655
- var props = _ref86.props;
19652
+ var titleNode = virtualNode.children.find(function(_ref85) {
19653
+ var props = _ref85.props;
19656
19654
  return props.nodeName === 'title';
19657
19655
  });
19658
19656
  if (!titleNode) {
@@ -20221,7 +20219,7 @@
20221
20219
  if (!role || [ 'none', 'presentation' ].includes(role)) {
20222
20220
  return true;
20223
20221
  }
20224
- var _ref87 = aria_roles_default[role] || {}, accessibleNameRequired = _ref87.accessibleNameRequired;
20222
+ var _ref86 = aria_roles_default[role] || {}, accessibleNameRequired = _ref86.accessibleNameRequired;
20225
20223
  if (accessibleNameRequired || _isFocusable(virtualNode)) {
20226
20224
  return true;
20227
20225
  }
@@ -20443,7 +20441,7 @@
20443
20441
  'page-no-duplicate-after': page_no_duplicate_after_default,
20444
20442
  'page-no-duplicate-evaluate': page_no_duplicate_evaluate_default,
20445
20443
  'presentation-role-conflict-matches': presentation_role_conflict_matches_default,
20446
- 'presentational-role-evaluate': presentational_role_evaluate_default,
20444
+ 'presentational-role-evaluate': presentationalRoleEvaluate,
20447
20445
  'region-after': region_after_default,
20448
20446
  'region-evaluate': region_evaluate_default,
20449
20447
  'same-caption-summary-evaluate': same_caption_summary_evaluate_default,
@@ -21476,8 +21474,8 @@
21476
21474
  });
21477
21475
  };
21478
21476
  }
21479
- function getHelpUrl(_ref88, ruleId, version) {
21480
- var brand = _ref88.brand, application = _ref88.application, lang = _ref88.lang;
21477
+ function getHelpUrl(_ref87, ruleId, version) {
21478
+ var brand = _ref87.brand, application = _ref87.application, lang = _ref87.lang;
21481
21479
  return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
21482
21480
  }
21483
21481
  var audit_default = Audit;
@@ -21892,9 +21890,9 @@
21892
21890
  });
21893
21891
  }
21894
21892
  var run_virtual_rule_default = runVirtualRule;
21895
- function normalizeRunParams(_ref89) {
21896
- var _ref91, _options$reporter, _axe$_audit;
21897
- var _ref90 = _slicedToArray(_ref89, 3), context = _ref90[0], options = _ref90[1], callback = _ref90[2];
21893
+ function normalizeRunParams(_ref88) {
21894
+ var _ref90, _options$reporter, _axe$_audit;
21895
+ var _ref89 = _slicedToArray(_ref88, 3), context = _ref89[0], options = _ref89[1], callback = _ref89[2];
21898
21896
  var typeErr = new TypeError('axe.run arguments are invalid');
21899
21897
  if (!isContext(context)) {
21900
21898
  if (callback !== void 0) {
@@ -21915,7 +21913,7 @@
21915
21913
  throw typeErr;
21916
21914
  }
21917
21915
  options = clone_default(options);
21918
- options.reporter = (_ref91 = (_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 && _ref91 !== void 0 ? _ref91 : 'v1';
21916
+ options.reporter = (_ref90 = (_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 && _ref90 !== void 0 ? _ref90 : 'v1';
21919
21917
  return {
21920
21918
  context: context,
21921
21919
  options: options,
@@ -22040,14 +22038,14 @@
22040
22038
  return new Promise(function(res, rej) {
22041
22039
  axe._audit.run(contextObj, options, res, rej);
22042
22040
  }).then(function(results) {
22043
- results = results.map(function(_ref92) {
22044
- var nodes = _ref92.nodes, result = _objectWithoutProperties(_ref92, _excluded8);
22041
+ results = results.map(function(_ref91) {
22042
+ var nodes = _ref91.nodes, result = _objectWithoutProperties(_ref91, _excluded8);
22045
22043
  return _extends({
22046
22044
  nodes: nodes.map(serializeNode)
22047
22045
  }, result);
22048
22046
  });
22049
- var frames = contextObj.frames.map(function(_ref93) {
22050
- var node = _ref93.node;
22047
+ var frames = contextObj.frames.map(function(_ref92) {
22048
+ var node = _ref92.node;
22051
22049
  return new dq_element_default(node, options).toJSON();
22052
22050
  });
22053
22051
  var environmentData;
@@ -22067,13 +22065,13 @@
22067
22065
  return Promise.reject(err2);
22068
22066
  });
22069
22067
  }
22070
- function serializeNode(_ref94) {
22071
- var node = _ref94.node, nodeResult = _objectWithoutProperties(_ref94, _excluded9);
22068
+ function serializeNode(_ref93) {
22069
+ var node = _ref93.node, nodeResult = _objectWithoutProperties(_ref93, _excluded9);
22072
22070
  nodeResult.node = node.toJSON();
22073
22071
  for (var _i32 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i32 < _arr2.length; _i32++) {
22074
22072
  var type = _arr2[_i32];
22075
- nodeResult[type] = nodeResult[type].map(function(_ref95) {
22076
- var relatedNodes = _ref95.relatedNodes, checkResult = _objectWithoutProperties(_ref95, _excluded10);
22073
+ nodeResult[type] = nodeResult[type].map(function(_ref94) {
22074
+ var relatedNodes = _ref94.relatedNodes, checkResult = _objectWithoutProperties(_ref94, _excluded10);
22077
22075
  return _extends({}, checkResult, {
22078
22076
  relatedNodes: relatedNodes.map(function(node2) {
22079
22077
  return node2.toJSON();
@@ -22084,14 +22082,14 @@
22084
22082
  return nodeResult;
22085
22083
  }
22086
22084
  function finishRun(partialResults) {
22087
- var _ref97, _options$reporter2, _axe$_audit2;
22085
+ var _ref96, _options$reporter2, _axe$_audit2;
22088
22086
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
22089
22087
  options = clone_default(options);
22090
- var _ref96 = partialResults.find(function(r) {
22088
+ var _ref95 = partialResults.find(function(r) {
22091
22089
  return r.environmentData;
22092
- }) || {}, environmentData = _ref96.environmentData;
22090
+ }) || {}, environmentData = _ref95.environmentData;
22093
22091
  axe._audit.normalizeOptions(options);
22094
- options.reporter = (_ref97 = (_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 && _ref97 !== void 0 ? _ref97 : 'v1';
22092
+ options.reporter = (_ref96 = (_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 && _ref96 !== void 0 ? _ref96 : 'v1';
22095
22093
  setFrameSpec(partialResults);
22096
22094
  var results = merge_results_default(partialResults);
22097
22095
  results = axe._audit.after(results, options);
@@ -22121,8 +22119,8 @@
22121
22119
  _iterator5.f();
22122
22120
  }
22123
22121
  }
22124
- function getMergedFrameSpecs(_ref98) {
22125
- var childFrameSpecs = _ref98.frames, parentFrameSpec = _ref98.frameSpec;
22122
+ function getMergedFrameSpecs(_ref97) {
22123
+ var childFrameSpecs = _ref97.frames, parentFrameSpec = _ref97.frameSpec;
22126
22124
  if (!parentFrameSpec) {
22127
22125
  return childFrameSpecs;
22128
22126
  }
@@ -22185,9 +22183,9 @@
22185
22183
  for (var _i33 = 0, _types = types; _i33 < _types.length; _i33++) {
22186
22184
  var type = _types[_i33];
22187
22185
  if (transformedResult[type] && Array.isArray(transformedResult[type])) {
22188
- transformedResult[type] = transformedResult[type].map(function(_ref99) {
22186
+ transformedResult[type] = transformedResult[type].map(function(_ref98) {
22189
22187
  var _node;
22190
- var node = _ref99.node, typeResult = _objectWithoutProperties(_ref99, _excluded13);
22188
+ var node = _ref98.node, typeResult = _objectWithoutProperties(_ref98, _excluded13);
22191
22189
  node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
22192
22190
  return _extends({
22193
22191
  node: node