axe-core 4.4.3-canary.b2a4233 → 4.4.3-canary.b5ceabc

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.b2a4233
1
+ /*! axe v4.4.3-canary.b5ceabc
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.b2a4233';
25
+ axe.version = '4.4.3-canary.b5ceabc';
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');
@@ -8931,7 +8936,7 @@
8931
8936
  },
8932
8937
  menubar: {
8933
8938
  type: 'composite',
8934
- requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox' ],
8939
+ requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox', 'menu' ],
8935
8940
  allowedAttrs: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
8936
8941
  superclassRole: [ 'menu' ]
8937
8942
  },
@@ -9025,7 +9030,6 @@
9025
9030
  },
9026
9031
  radiogroup: {
9027
9032
  type: 'composite',
9028
- requiredOwned: [ 'radio' ],
9029
9033
  allowedAttrs: [ 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
9030
9034
  superclassRole: [ 'select' ],
9031
9035
  accessibleNameRequired: false
@@ -16530,12 +16534,19 @@
16530
16534
  var role = get_role_default(ownedElement, {
16531
16535
  noPresentational: true
16532
16536
  });
16533
- if (!role || [ 'group', 'rowgroup' ].includes(role) && required.some(function(requiredRole) {
16537
+ var hasGlobalAria = get_global_aria_attrs_default().some(function(attr) {
16538
+ return ownedElement.hasAttr(attr);
16539
+ });
16540
+ var hasGlobalAriaOrFocusable = hasGlobalAria || _isFocusable(ownedElement);
16541
+ if (!role && !hasGlobalAriaOrFocusable || [ 'group', 'rowgroup' ].includes(role) && required.some(function(requiredRole) {
16534
16542
  return requiredRole === role;
16535
16543
  })) {
16536
16544
  ownedElements.push.apply(ownedElements, _toConsumableArray(ownedElement.children));
16537
- } else if (role) {
16538
- ownedRoles.push(role);
16545
+ } else if (role || hasGlobalAriaOrFocusable) {
16546
+ ownedRoles.push({
16547
+ role: role,
16548
+ ownedElement: ownedElement
16549
+ });
16539
16550
  }
16540
16551
  };
16541
16552
  for (var _i19 = 0; _i19 < ownedElements.length; _i19++) {
@@ -16544,13 +16555,21 @@
16544
16555
  return ownedRoles;
16545
16556
  }
16546
16557
  function missingRequiredChildren(virtualNode, role, required, ownedRoles) {
16547
- for (var _i20 = 0; _i20 < ownedRoles.length; _i20++) {
16548
- var ownedRole = ownedRoles[_i20];
16549
- if (required.includes(ownedRole)) {
16558
+ var _loop5 = function _loop5(_i20) {
16559
+ var role2 = ownedRoles[_i20].role;
16560
+ if (required.includes(role2)) {
16550
16561
  required = required.filter(function(requiredRole) {
16551
- return requiredRole !== ownedRole;
16562
+ return requiredRole !== role2;
16552
16563
  });
16553
- return null;
16564
+ return {
16565
+ v: null
16566
+ };
16567
+ }
16568
+ };
16569
+ for (var _i20 = 0; _i20 < ownedRoles.length; _i20++) {
16570
+ var _ret2 = _loop5(_i20);
16571
+ if (_typeof(_ret2) === 'object') {
16572
+ return _ret2.v;
16554
16573
  }
16555
16574
  }
16556
16575
  if (required.length) {
@@ -16568,6 +16587,20 @@
16568
16587
  return true;
16569
16588
  }
16570
16589
  var ownedRoles = getOwnedRoles(virtualNode, required);
16590
+ var unallowed = ownedRoles.filter(function(_ref54) {
16591
+ var role2 = _ref54.role;
16592
+ return !required.includes(role2);
16593
+ });
16594
+ if (unallowed.length) {
16595
+ this.relatedNodes(unallowed.map(function(_ref55) {
16596
+ var ownedElement = _ref55.ownedElement;
16597
+ return ownedElement;
16598
+ }));
16599
+ this.data({
16600
+ messageKey: 'unallowed'
16601
+ });
16602
+ return false;
16603
+ }
16571
16604
  var missing = missingRequiredChildren(virtualNode, role, required, ownedRoles);
16572
16605
  if (!missing) {
16573
16606
  return true;
@@ -17152,7 +17185,7 @@
17152
17185
  }
17153
17186
  var get_background_stack_default = getBackgroundStack;
17154
17187
  function getTextShadowColors(node) {
17155
- var _ref54 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref54.minRatio, maxRatio = _ref54.maxRatio;
17188
+ var _ref56 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref56.minRatio, maxRatio = _ref56.maxRatio;
17156
17189
  var style = window.getComputedStyle(node);
17157
17190
  var textShadow = style.getPropertyValue('text-shadow');
17158
17191
  if (textShadow === 'none') {
@@ -17163,8 +17196,8 @@
17163
17196
  assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
17164
17197
  var shadowColors = [];
17165
17198
  var shadows = parseTextShadows(textShadow);
17166
- shadows.forEach(function(_ref55) {
17167
- var colorStr = _ref55.colorStr, pixels = _ref55.pixels;
17199
+ shadows.forEach(function(_ref57) {
17200
+ var colorStr = _ref57.colorStr, pixels = _ref57.pixels;
17168
17201
  colorStr = colorStr || style.getPropertyValue('color');
17169
17202
  var _pixels = _slicedToArray(pixels, 3), offsetY = _pixels[0], offsetX = _pixels[1], _pixels$ = _pixels[2], blurRadius = _pixels$ === void 0 ? 0 : _pixels$;
17170
17203
  if ((!minRatio || blurRadius >= fontSize * minRatio) && (!maxRatio || blurRadius < fontSize * maxRatio)) {
@@ -17214,8 +17247,8 @@
17214
17247
  }
17215
17248
  return shadows;
17216
17249
  }
17217
- function textShadowColor(_ref56) {
17218
- var colorStr = _ref56.colorStr, offsetX = _ref56.offsetX, offsetY = _ref56.offsetY, blurRadius = _ref56.blurRadius, fontSize = _ref56.fontSize;
17250
+ function textShadowColor(_ref58) {
17251
+ var colorStr = _ref58.colorStr, offsetX = _ref58.offsetX, offsetY = _ref58.offsetY, blurRadius = _ref58.blurRadius, fontSize = _ref58.fontSize;
17219
17252
  if (offsetX > blurRadius || offsetY > blurRadius) {
17220
17253
  return new color_default(0, 0, 0, 0);
17221
17254
  }
@@ -17399,7 +17432,7 @@
17399
17432
  var bold = parseFloat(fontWeight) >= boldValue || fontWeight === 'bold';
17400
17433
  var ptSize = Math.ceil(fontSize * 72) / 96;
17401
17434
  var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
17402
- var _ref57 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref57.expected, minThreshold = _ref57.minThreshold, maxThreshold = _ref57.maxThreshold;
17435
+ var _ref59 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref59.expected, minThreshold = _ref59.minThreshold, maxThreshold = _ref59.maxThreshold;
17403
17436
  var pseudoElm = findPseudoElement(virtualNode, {
17404
17437
  ignorePseudo: ignorePseudo,
17405
17438
  pseudoSizeThreshold: pseudoSizeThreshold
@@ -17478,8 +17511,8 @@
17478
17511
  }
17479
17512
  return isValid;
17480
17513
  }
17481
- function findPseudoElement(vNode, _ref58) {
17482
- 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;
17514
+ function findPseudoElement(vNode, _ref60) {
17515
+ var _ref60$pseudoSizeThre = _ref60.pseudoSizeThreshold, pseudoSizeThreshold = _ref60$pseudoSizeThre === void 0 ? .25 : _ref60$pseudoSizeThre, _ref60$ignorePseudo = _ref60.ignorePseudo, ignorePseudo = _ref60$ignorePseudo === void 0 ? false : _ref60$ignorePseudo;
17483
17516
  if (ignorePseudo) {
17484
17517
  return;
17485
17518
  }
@@ -17521,7 +17554,7 @@
17521
17554
  }
17522
17555
  function parseUnit(str) {
17523
17556
  var unitRegex = /^([0-9.]+)([a-z]+)$/i;
17524
- 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;
17557
+ var _ref61 = str.match(unitRegex) || [], _ref62 = _slicedToArray(_ref61, 3), _ref62$ = _ref62[1], value = _ref62$ === void 0 ? '' : _ref62$, _ref62$2 = _ref62[2], unit = _ref62$2 === void 0 ? '' : _ref62$2;
17525
17558
  return {
17526
17559
  value: parseFloat(value),
17527
17560
  unit: unit.toLowerCase()
@@ -17789,8 +17822,8 @@
17789
17822
  if (!tabbableElements || !tabbableElements.length) {
17790
17823
  return true;
17791
17824
  }
17792
- var relatedNodes = tabbableElements.reduce(function(out, _ref61) {
17793
- var el = _ref61.actualNode;
17825
+ var relatedNodes = tabbableElements.reduce(function(out, _ref63) {
17826
+ var el = _ref63.actualNode;
17794
17827
  var nodeName2 = el.nodeName.toUpperCase();
17795
17828
  if (elementsThatCanBeDisabled.includes(nodeName2)) {
17796
17829
  out.push(el);
@@ -17831,8 +17864,8 @@
17831
17864
  }
17832
17865
  var focusable_element_evaluate_default = focusableElementEvaluate;
17833
17866
  function focusableModalOpenEvaluate(node, options, virtualNode) {
17834
- var tabbableElements = virtualNode.tabbableElements.map(function(_ref62) {
17835
- var actualNode = _ref62.actualNode;
17867
+ var tabbableElements = virtualNode.tabbableElements.map(function(_ref64) {
17868
+ var actualNode = _ref64.actualNode;
17836
17869
  return actualNode;
17837
17870
  });
17838
17871
  if (!tabbableElements || !tabbableElements.length) {
@@ -17864,8 +17897,8 @@
17864
17897
  if (!tabbableElements || !tabbableElements.length) {
17865
17898
  return true;
17866
17899
  }
17867
- var relatedNodes = tabbableElements.reduce(function(out, _ref63) {
17868
- var el = _ref63.actualNode;
17900
+ var relatedNodes = tabbableElements.reduce(function(out, _ref65) {
17901
+ var el = _ref65.actualNode;
17869
17902
  var nodeName2 = el.nodeName.toUpperCase();
17870
17903
  if (!elementsThatCanBeDisabled.includes(nodeName2)) {
17871
17904
  out.push(el);
@@ -18094,7 +18127,7 @@
18094
18127
  return sanitize_default(noUnicodeStr);
18095
18128
  }
18096
18129
  function labelContentNameMismatchEvaluate(node, options, virtualNode) {
18097
- var _ref64 = options || {}, pixelThreshold = _ref64.pixelThreshold, occuranceThreshold = _ref64.occuranceThreshold;
18130
+ var _ref66 = options || {}, pixelThreshold = _ref66.pixelThreshold, occuranceThreshold = _ref66.occuranceThreshold;
18098
18131
  var accText = accessible_text_default(node).toLowerCase();
18099
18132
  if (is_human_interpretable_default(accText) < 1) {
18100
18133
  return void 0;
@@ -18460,23 +18493,23 @@
18460
18493
  }
18461
18494
  var no_autoplay_audio_evaluate_default = noAutoplayAudioEvaluate;
18462
18495
  function cssOrientationLockEvaluate(node, options, virtualNode, context) {
18463
- var _ref65 = context || {}, _ref65$cssom = _ref65.cssom, cssom = _ref65$cssom === void 0 ? void 0 : _ref65$cssom;
18464
- var _ref66 = options || {}, _ref66$degreeThreshol = _ref66.degreeThreshold, degreeThreshold = _ref66$degreeThreshol === void 0 ? 0 : _ref66$degreeThreshol;
18496
+ var _ref67 = context || {}, _ref67$cssom = _ref67.cssom, cssom = _ref67$cssom === void 0 ? void 0 : _ref67$cssom;
18497
+ var _ref68 = options || {}, _ref68$degreeThreshol = _ref68.degreeThreshold, degreeThreshold = _ref68$degreeThreshol === void 0 ? 0 : _ref68$degreeThreshol;
18465
18498
  if (!cssom || !cssom.length) {
18466
18499
  return void 0;
18467
18500
  }
18468
18501
  var isLocked = false;
18469
18502
  var relatedElements = [];
18470
18503
  var rulesGroupByDocumentFragment = groupCssomByDocument(cssom);
18471
- var _loop5 = function _loop5() {
18504
+ var _loop6 = function _loop6() {
18472
18505
  var key = _Object$keys2[_i23];
18473
18506
  var _rulesGroupByDocument = rulesGroupByDocumentFragment[key], root = _rulesGroupByDocument.root, rules = _rulesGroupByDocument.rules;
18474
18507
  var orientationRules = rules.filter(isMediaRuleWithOrientation);
18475
18508
  if (!orientationRules.length) {
18476
18509
  return 'continue';
18477
18510
  }
18478
- orientationRules.forEach(function(_ref67) {
18479
- var cssRules = _ref67.cssRules;
18511
+ orientationRules.forEach(function(_ref69) {
18512
+ var cssRules = _ref69.cssRules;
18480
18513
  Array.from(cssRules).forEach(function(cssRule) {
18481
18514
  var locked = getIsOrientationLocked(cssRule);
18482
18515
  if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
@@ -18488,8 +18521,8 @@
18488
18521
  });
18489
18522
  };
18490
18523
  for (var _i23 = 0, _Object$keys2 = Object.keys(rulesGroupByDocumentFragment); _i23 < _Object$keys2.length; _i23++) {
18491
- var _ret2 = _loop5();
18492
- if (_ret2 === 'continue') {
18524
+ var _ret3 = _loop6();
18525
+ if (_ret3 === 'continue') {
18493
18526
  continue;
18494
18527
  }
18495
18528
  }
@@ -18501,8 +18534,8 @@
18501
18534
  }
18502
18535
  return false;
18503
18536
  function groupCssomByDocument(cssObjectModel) {
18504
- return cssObjectModel.reduce(function(out, _ref68) {
18505
- var sheet = _ref68.sheet, root = _ref68.root, shadowId = _ref68.shadowId;
18537
+ return cssObjectModel.reduce(function(out, _ref70) {
18538
+ var sheet = _ref70.sheet, root = _ref70.root, shadowId = _ref70.shadowId;
18506
18539
  var key = shadowId ? shadowId : 'topDocument';
18507
18540
  if (!out[key]) {
18508
18541
  out[key] = {
@@ -18518,15 +18551,15 @@
18518
18551
  return out;
18519
18552
  }, {});
18520
18553
  }
18521
- function isMediaRuleWithOrientation(_ref69) {
18522
- var type = _ref69.type, cssText = _ref69.cssText;
18554
+ function isMediaRuleWithOrientation(_ref71) {
18555
+ var type = _ref71.type, cssText = _ref71.cssText;
18523
18556
  if (type !== 4) {
18524
18557
  return false;
18525
18558
  }
18526
18559
  return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
18527
18560
  }
18528
- function getIsOrientationLocked(_ref70) {
18529
- var selectorText = _ref70.selectorText, style = _ref70.style;
18561
+ function getIsOrientationLocked(_ref72) {
18562
+ var selectorText = _ref72.selectorText, style = _ref72.style;
18530
18563
  if (!selectorText || style.length <= 0) {
18531
18564
  return false;
18532
18565
  }
@@ -18573,7 +18606,7 @@
18573
18606
  }
18574
18607
  }
18575
18608
  function getAngleInDegrees(angleWithUnit) {
18576
- var _ref71 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref72 = _slicedToArray(_ref71, 1), unit = _ref72[0];
18609
+ var _ref73 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref74 = _slicedToArray(_ref73, 1), unit = _ref74[0];
18577
18610
  if (!unit) {
18578
18611
  return;
18579
18612
  }
@@ -18622,7 +18655,7 @@
18622
18655
  }
18623
18656
  var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
18624
18657
  function metaViewportScaleEvaluate(node, options, virtualNode) {
18625
- 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;
18658
+ var _ref75 = options || {}, _ref75$scaleMinimum = _ref75.scaleMinimum, scaleMinimum = _ref75$scaleMinimum === void 0 ? 2 : _ref75$scaleMinimum, _ref75$lowerBound = _ref75.lowerBound, lowerBound = _ref75$lowerBound === void 0 ? false : _ref75$lowerBound;
18626
18659
  var content = virtualNode.attr('content') || '';
18627
18660
  if (!content) {
18628
18661
  return true;
@@ -18688,14 +18721,14 @@
18688
18721
  }
18689
18722
  function getHeadingOrder(results) {
18690
18723
  results = _toConsumableArray(results);
18691
- results.sort(function(_ref74, _ref75) {
18692
- var nodeA = _ref74.node;
18693
- var nodeB = _ref75.node;
18724
+ results.sort(function(_ref76, _ref77) {
18725
+ var nodeA = _ref76.node;
18726
+ var nodeB = _ref77.node;
18694
18727
  return nodeA.ancestry.length - nodeB.ancestry.length;
18695
18728
  });
18696
18729
  var headingOrder = results.reduce(mergeHeadingOrder, []);
18697
- return headingOrder.filter(function(_ref76) {
18698
- var level = _ref76.level;
18730
+ return headingOrder.filter(function(_ref78) {
18731
+ var level = _ref78.level;
18699
18732
  return level !== -1;
18700
18733
  });
18701
18734
  }
@@ -18746,7 +18779,7 @@
18746
18779
  var headingRole = role && role.includes('heading');
18747
18780
  var ariaHeadingLevel = vNode.attr('aria-level');
18748
18781
  var ariaLevel = parseInt(ariaHeadingLevel, 10);
18749
- var _ref77 = vNode.props.nodeName.match(/h(\d)/) || [], _ref78 = _slicedToArray(_ref77, 2), headingLevel = _ref78[1];
18782
+ var _ref79 = vNode.props.nodeName.match(/h(\d)/) || [], _ref80 = _slicedToArray(_ref79, 2), headingLevel = _ref80[1];
18750
18783
  if (!headingRole) {
18751
18784
  return -1;
18752
18785
  }
@@ -18812,25 +18845,25 @@
18812
18845
  if (results.length < 2) {
18813
18846
  return results;
18814
18847
  }
18815
- var incompleteResults = results.filter(function(_ref79) {
18816
- var result = _ref79.result;
18848
+ var incompleteResults = results.filter(function(_ref81) {
18849
+ var result = _ref81.result;
18817
18850
  return result !== void 0;
18818
18851
  });
18819
18852
  var uniqueResults = [];
18820
18853
  var nameMap = {};
18821
- var _loop6 = function _loop6(index) {
18854
+ var _loop7 = function _loop7(index) {
18822
18855
  var _currentResult$relate;
18823
18856
  var currentResult = incompleteResults[index];
18824
18857
  var _currentResult$data = currentResult.data, name = _currentResult$data.name, urlProps = _currentResult$data.urlProps;
18825
18858
  if (nameMap[name]) {
18826
18859
  return 'continue';
18827
18860
  }
18828
- var sameNameResults = incompleteResults.filter(function(_ref80, resultNum) {
18829
- var data2 = _ref80.data;
18861
+ var sameNameResults = incompleteResults.filter(function(_ref82, resultNum) {
18862
+ var data2 = _ref82.data;
18830
18863
  return data2.name === name && resultNum !== index;
18831
18864
  });
18832
- var isSameUrl = sameNameResults.every(function(_ref81) {
18833
- var data2 = _ref81.data;
18865
+ var isSameUrl = sameNameResults.every(function(_ref83) {
18866
+ var data2 = _ref83.data;
18834
18867
  return isIdenticalObject(data2.urlProps, urlProps);
18835
18868
  });
18836
18869
  if (sameNameResults.length && !isSameUrl) {
@@ -18844,8 +18877,8 @@
18844
18877
  uniqueResults.push(currentResult);
18845
18878
  };
18846
18879
  for (var index = 0; index < incompleteResults.length; index++) {
18847
- var _ret3 = _loop6(index);
18848
- if (_ret3 === 'continue') {
18880
+ var _ret4 = _loop7(index);
18881
+ if (_ret4 === 'continue') {
18849
18882
  continue;
18850
18883
  }
18851
18884
  }
@@ -19246,7 +19279,7 @@
19246
19279
  var separatorRegex = /[;,\s]/;
19247
19280
  var validRedirectNumRegex = /^[0-9.]+$/;
19248
19281
  function metaRefreshEvaluate(node, options, virtualNode) {
19249
- var _ref82 = options || {}, minDelay = _ref82.minDelay, maxDelay = _ref82.maxDelay;
19282
+ var _ref84 = options || {}, minDelay = _ref84.minDelay, maxDelay = _ref84.maxDelay;
19250
19283
  var content = (virtualNode.attr('content') || '').trim();
19251
19284
  var _content$split = content.split(separatorRegex), _content$split2 = _slicedToArray(_content$split, 1), redirectStr = _content$split2[0];
19252
19285
  if (!redirectStr.match(validRedirectNumRegex)) {
@@ -19413,8 +19446,8 @@
19413
19446
  } else if (node !== document.body && has_content_default(node, true)) {
19414
19447
  return [ virtualNode ];
19415
19448
  } else {
19416
- return virtualNode.children.filter(function(_ref83) {
19417
- var actualNode = _ref83.actualNode;
19449
+ return virtualNode.children.filter(function(_ref85) {
19450
+ var actualNode = _ref85.actualNode;
19418
19451
  return actualNode.nodeType === 1;
19419
19452
  }).map(function(vNode) {
19420
19453
  return findRegionlessElms(vNode, options);
@@ -19573,8 +19606,8 @@
19573
19606
  }
19574
19607
  return false;
19575
19608
  }
19576
- function getNumberValue(domNode, _ref84) {
19577
- var cssProperty = _ref84.cssProperty, absoluteValues = _ref84.absoluteValues, normalValue = _ref84.normalValue;
19609
+ function getNumberValue(domNode, _ref86) {
19610
+ var cssProperty = _ref86.cssProperty, absoluteValues = _ref86.absoluteValues, normalValue = _ref86.normalValue;
19578
19611
  var computedStyle = window.getComputedStyle(domNode);
19579
19612
  var cssPropValue = computedStyle.getPropertyValue(cssProperty);
19580
19613
  if (cssPropValue === 'normal') {
@@ -19644,8 +19677,8 @@
19644
19677
  if (!virtualNode.children) {
19645
19678
  return void 0;
19646
19679
  }
19647
- var titleNode = virtualNode.children.find(function(_ref85) {
19648
- var props = _ref85.props;
19680
+ var titleNode = virtualNode.children.find(function(_ref87) {
19681
+ var props = _ref87.props;
19649
19682
  return props.nodeName === 'title';
19650
19683
  });
19651
19684
  if (!titleNode) {
@@ -20214,7 +20247,7 @@
20214
20247
  if (!role || [ 'none', 'presentation' ].includes(role)) {
20215
20248
  return true;
20216
20249
  }
20217
- var _ref86 = aria_roles_default[role] || {}, accessibleNameRequired = _ref86.accessibleNameRequired;
20250
+ var _ref88 = aria_roles_default[role] || {}, accessibleNameRequired = _ref88.accessibleNameRequired;
20218
20251
  if (accessibleNameRequired || _isFocusable(virtualNode)) {
20219
20252
  return true;
20220
20253
  }
@@ -21469,8 +21502,8 @@
21469
21502
  });
21470
21503
  };
21471
21504
  }
21472
- function getHelpUrl(_ref87, ruleId, version) {
21473
- var brand = _ref87.brand, application = _ref87.application, lang = _ref87.lang;
21505
+ function getHelpUrl(_ref89, ruleId, version) {
21506
+ var brand = _ref89.brand, application = _ref89.application, lang = _ref89.lang;
21474
21507
  return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
21475
21508
  }
21476
21509
  var audit_default = Audit;
@@ -21885,9 +21918,9 @@
21885
21918
  });
21886
21919
  }
21887
21920
  var run_virtual_rule_default = runVirtualRule;
21888
- function normalizeRunParams(_ref88) {
21889
- var _ref90, _options$reporter, _axe$_audit;
21890
- var _ref89 = _slicedToArray(_ref88, 3), context = _ref89[0], options = _ref89[1], callback = _ref89[2];
21921
+ function normalizeRunParams(_ref90) {
21922
+ var _ref92, _options$reporter, _axe$_audit;
21923
+ var _ref91 = _slicedToArray(_ref90, 3), context = _ref91[0], options = _ref91[1], callback = _ref91[2];
21891
21924
  var typeErr = new TypeError('axe.run arguments are invalid');
21892
21925
  if (!isContext(context)) {
21893
21926
  if (callback !== void 0) {
@@ -21908,7 +21941,7 @@
21908
21941
  throw typeErr;
21909
21942
  }
21910
21943
  options = clone_default(options);
21911
- 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';
21944
+ options.reporter = (_ref92 = (_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 && _ref92 !== void 0 ? _ref92 : 'v1';
21912
21945
  return {
21913
21946
  context: context,
21914
21947
  options: options,
@@ -22033,14 +22066,14 @@
22033
22066
  return new Promise(function(res, rej) {
22034
22067
  axe._audit.run(contextObj, options, res, rej);
22035
22068
  }).then(function(results) {
22036
- results = results.map(function(_ref91) {
22037
- var nodes = _ref91.nodes, result = _objectWithoutProperties(_ref91, _excluded8);
22069
+ results = results.map(function(_ref93) {
22070
+ var nodes = _ref93.nodes, result = _objectWithoutProperties(_ref93, _excluded8);
22038
22071
  return _extends({
22039
22072
  nodes: nodes.map(serializeNode)
22040
22073
  }, result);
22041
22074
  });
22042
- var frames = contextObj.frames.map(function(_ref92) {
22043
- var node = _ref92.node;
22075
+ var frames = contextObj.frames.map(function(_ref94) {
22076
+ var node = _ref94.node;
22044
22077
  return new dq_element_default(node, options).toJSON();
22045
22078
  });
22046
22079
  var environmentData;
@@ -22060,13 +22093,13 @@
22060
22093
  return Promise.reject(err2);
22061
22094
  });
22062
22095
  }
22063
- function serializeNode(_ref93) {
22064
- var node = _ref93.node, nodeResult = _objectWithoutProperties(_ref93, _excluded9);
22096
+ function serializeNode(_ref95) {
22097
+ var node = _ref95.node, nodeResult = _objectWithoutProperties(_ref95, _excluded9);
22065
22098
  nodeResult.node = node.toJSON();
22066
22099
  for (var _i32 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i32 < _arr2.length; _i32++) {
22067
22100
  var type = _arr2[_i32];
22068
- nodeResult[type] = nodeResult[type].map(function(_ref94) {
22069
- var relatedNodes = _ref94.relatedNodes, checkResult = _objectWithoutProperties(_ref94, _excluded10);
22101
+ nodeResult[type] = nodeResult[type].map(function(_ref96) {
22102
+ var relatedNodes = _ref96.relatedNodes, checkResult = _objectWithoutProperties(_ref96, _excluded10);
22070
22103
  return _extends({}, checkResult, {
22071
22104
  relatedNodes: relatedNodes.map(function(node2) {
22072
22105
  return node2.toJSON();
@@ -22077,14 +22110,14 @@
22077
22110
  return nodeResult;
22078
22111
  }
22079
22112
  function finishRun(partialResults) {
22080
- var _ref96, _options$reporter2, _axe$_audit2;
22113
+ var _ref98, _options$reporter2, _axe$_audit2;
22081
22114
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
22082
22115
  options = clone_default(options);
22083
- var _ref95 = partialResults.find(function(r) {
22116
+ var _ref97 = partialResults.find(function(r) {
22084
22117
  return r.environmentData;
22085
- }) || {}, environmentData = _ref95.environmentData;
22118
+ }) || {}, environmentData = _ref97.environmentData;
22086
22119
  axe._audit.normalizeOptions(options);
22087
- 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';
22120
+ options.reporter = (_ref98 = (_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 && _ref98 !== void 0 ? _ref98 : 'v1';
22088
22121
  setFrameSpec(partialResults);
22089
22122
  var results = merge_results_default(partialResults);
22090
22123
  results = axe._audit.after(results, options);
@@ -22114,8 +22147,8 @@
22114
22147
  _iterator5.f();
22115
22148
  }
22116
22149
  }
22117
- function getMergedFrameSpecs(_ref97) {
22118
- var childFrameSpecs = _ref97.frames, parentFrameSpec = _ref97.frameSpec;
22150
+ function getMergedFrameSpecs(_ref99) {
22151
+ var childFrameSpecs = _ref99.frames, parentFrameSpec = _ref99.frameSpec;
22119
22152
  if (!parentFrameSpec) {
22120
22153
  return childFrameSpecs;
22121
22154
  }
@@ -22178,9 +22211,9 @@
22178
22211
  for (var _i33 = 0, _types = types; _i33 < _types.length; _i33++) {
22179
22212
  var type = _types[_i33];
22180
22213
  if (transformedResult[type] && Array.isArray(transformedResult[type])) {
22181
- transformedResult[type] = transformedResult[type].map(function(_ref98) {
22214
+ transformedResult[type] = transformedResult[type].map(function(_ref100) {
22182
22215
  var _node;
22183
- var node = _ref98.node, typeResult = _objectWithoutProperties(_ref98, _excluded13);
22216
+ var node = _ref100.node, typeResult = _objectWithoutProperties(_ref100, _excluded13);
22184
22217
  node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
22185
22218
  return _extends({
22186
22219
  node: node
@@ -22795,7 +22828,8 @@
22795
22828
  pass: 'Required ARIA children are present',
22796
22829
  fail: {
22797
22830
  singular: 'Required ARIA child role not present: ${data.values}',
22798
- plural: 'Required ARIA children role not present: ${data.values}'
22831
+ plural: 'Required ARIA children role not present: ${data.values}',
22832
+ unallowed: 'Element has children which are not allowed (see related nodes)'
22799
22833
  },
22800
22834
  incomplete: {
22801
22835
  singular: 'Expecting ARIA child role to be added: ${data.values}',