axe-core 4.3.4 → 4.3.5-canary.1fd4b00

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.3.4
1
+ /*! axe v4.3.5-canary.1fd4b00
2
2
  * Copyright (c) 2021 Deque Systems, Inc.
3
3
  *
4
4
  * Your use of this Source Code Form is subject to the terms of the Mozilla Public
@@ -27,7 +27,7 @@
27
27
  return _typeof(obj);
28
28
  }
29
29
  var axe = axe || {};
30
- axe.version = '4.3.4';
30
+ axe.version = '4.3.5-canary.1fd4b00';
31
31
  if (typeof define === 'function' && define.amd) {
32
32
  define('axe-core', [], function() {
33
33
  return axe;
@@ -5185,7 +5185,7 @@
5185
5185
  return select_default;
5186
5186
  },
5187
5187
  sendCommandToFrame: function sendCommandToFrame() {
5188
- return send_command_to_frame_default;
5188
+ return _sendCommandToFrame;
5189
5189
  },
5190
5190
  setScrollState: function setScrollState() {
5191
5191
  return set_scroll_state_default;
@@ -5257,7 +5257,7 @@
5257
5257
  };
5258
5258
  }
5259
5259
  function isRespondableMessage(postedMessage) {
5260
- return _typeof(postedMessage) === 'object' && typeof postedMessage.channelId === 'string' && postedMessage.source === getSource();
5260
+ return postedMessage !== null && _typeof(postedMessage) === 'object' && typeof postedMessage.channelId === 'string' && postedMessage.source === getSource();
5261
5261
  }
5262
5262
  function buildErrorObject(error) {
5263
5263
  var msg = error.message || 'Unknown error occurred';
@@ -5511,25 +5511,30 @@
5511
5511
  }
5512
5512
  function messageHandler(_ref2, topicHandler) {
5513
5513
  var origin = _ref2.origin, dataString = _ref2.data, win = _ref2.source;
5514
- var data2 = parseMessage(dataString) || {};
5515
- var channelId = data2.channelId, message = data2.message, messageId = data2.messageId;
5516
- if (!originIsAllowed(origin) || !isNewMessage(messageId)) {
5517
- return;
5518
- }
5519
- if (message instanceof Error && win.parent !== window) {
5520
- axe.log(message);
5521
- return false;
5522
- }
5523
5514
  try {
5524
- if (data2.topic) {
5525
- var responder = createResponder(win, channelId);
5526
- assertIsParentWindow(win);
5527
- topicHandler(data2, responder);
5528
- } else {
5529
- callReplyHandler(win, data2);
5515
+ var data2 = parseMessage(dataString) || {};
5516
+ var channelId = data2.channelId, message = data2.message, messageId = data2.messageId;
5517
+ if (!originIsAllowed(origin) || !isNewMessage(messageId)) {
5518
+ return;
5519
+ }
5520
+ if (message instanceof Error && win.parent !== window) {
5521
+ axe.log(message);
5522
+ return false;
5523
+ }
5524
+ try {
5525
+ if (data2.topic) {
5526
+ var responder = createResponder(win, channelId);
5527
+ assertIsParentWindow(win);
5528
+ topicHandler(data2, responder);
5529
+ } else {
5530
+ callReplyHandler(win, data2);
5531
+ }
5532
+ } catch (error) {
5533
+ processError(win, error, channelId);
5530
5534
  }
5531
5535
  } catch (error) {
5532
- processError(win, error, channelId);
5536
+ axe.log(error);
5537
+ return false;
5533
5538
  }
5534
5539
  }
5535
5540
  function callReplyHandler(win, data2) {
@@ -5945,23 +5950,23 @@
5945
5950
  var xhtml;
5946
5951
  var ignoredAttributes = [ 'class', 'style', 'id', 'selected', 'checked', 'disabled', 'tabindex', 'aria-checked', 'aria-selected', 'aria-invalid', 'aria-activedescendant', 'aria-busy', 'aria-disabled', 'aria-expanded', 'aria-grabbed', 'aria-pressed', 'aria-valuenow' ];
5947
5952
  var MAXATTRIBUTELENGTH = 31;
5953
+ var attrCharsRegex = /([\\"])/g;
5954
+ var newlineChars = /(\r\n|\r|\n)/g;
5955
+ function escapeAttribute(str) {
5956
+ return str.replace(attrCharsRegex, '\\$1').replace(newlineChars, '\\a ');
5957
+ }
5948
5958
  function getAttributeNameValue(node, at) {
5949
5959
  var name = at.name;
5950
5960
  var atnv;
5951
5961
  if (name.indexOf('href') !== -1 || name.indexOf('src') !== -1) {
5952
5962
  var friendly = get_friendly_uri_end_default(node.getAttribute(name));
5953
5963
  if (friendly) {
5954
- var value = encodeURI(friendly);
5955
- if (value) {
5956
- atnv = escape_selector_default(at.name) + '$="' + escape_selector_default(value) + '"';
5957
- } else {
5958
- return;
5959
- }
5964
+ atnv = escape_selector_default(at.name) + '$="' + escapeAttribute(friendly) + '"';
5960
5965
  } else {
5961
- atnv = escape_selector_default(at.name) + '="' + escape_selector_default(node.getAttribute(name)) + '"';
5966
+ atnv = escape_selector_default(at.name) + '="' + escapeAttribute(node.getAttribute(name)) + '"';
5962
5967
  }
5963
5968
  } else {
5964
- atnv = escape_selector_default(name) + '="' + escape_selector_default(at.value) + '"';
5969
+ atnv = escape_selector_default(name) + '="' + escapeAttribute(at.value) + '"';
5965
5970
  }
5966
5971
  return atnv;
5967
5972
  }
@@ -6365,7 +6370,15 @@
6365
6370
  checkResult.data = data2;
6366
6371
  },
6367
6372
  relatedNodes: function relatedNodes(nodes) {
6373
+ if (!window.Node) {
6374
+ return;
6375
+ }
6368
6376
  nodes = nodes instanceof window.Node ? [ nodes ] : to_array_default(nodes);
6377
+ if (!nodes.every(function(node) {
6378
+ return node instanceof window.Node || node.actualNode;
6379
+ })) {
6380
+ return;
6381
+ }
6369
6382
  checkResult.relatedNodes = nodes.map(function(element) {
6370
6383
  return new dq_element_default(element, options);
6371
6384
  });
@@ -6754,21 +6767,19 @@
6754
6767
  return !!win.frameElement;
6755
6768
  };
6756
6769
  setDefaultFrameMessenger(_respondable);
6757
- function err(message, node) {
6758
- var selector;
6759
- if (axe._tree) {
6760
- selector = _getSelector(node);
6761
- }
6762
- return new Error(message + ': ' + (selector || node));
6763
- }
6764
- function sendCommandToFrame(node, parameters, resolve, reject) {
6770
+ function _sendCommandToFrame(node, parameters, resolve, reject) {
6765
6771
  var _parameters$options$p, _parameters$options;
6766
6772
  var win = node.contentWindow;
6773
+ var pingWaitTime = (_parameters$options$p = (_parameters$options = parameters.options) === null || _parameters$options === void 0 ? void 0 : _parameters$options.pingWaitTime) !== null && _parameters$options$p !== void 0 ? _parameters$options$p : 500;
6767
6774
  if (!win) {
6768
6775
  log_default('Frame does not have a content window', node);
6769
6776
  resolve(null);
6770
6777
  return;
6771
6778
  }
6779
+ if (pingWaitTime === 0) {
6780
+ callAxeStart(node, parameters, resolve, reject);
6781
+ return;
6782
+ }
6772
6783
  var timeout = setTimeout(function() {
6773
6784
  timeout = setTimeout(function() {
6774
6785
  if (!parameters.debug) {
@@ -6777,24 +6788,35 @@
6777
6788
  reject(err('No response from frame', node));
6778
6789
  }
6779
6790
  }, 0);
6780
- }, (_parameters$options$p = (_parameters$options = parameters.options) === null || _parameters$options === void 0 ? void 0 : _parameters$options.pingWaitTime) !== null && _parameters$options$p !== void 0 ? _parameters$options$p : 500);
6791
+ }, pingWaitTime);
6781
6792
  _respondable(win, 'axe.ping', null, void 0, function() {
6782
6793
  clearTimeout(timeout);
6783
- var frameWaitTime = parameters.options && parameters.options.frameWaitTime || 6e4;
6784
- timeout = setTimeout(function collectResultFramesTimeout() {
6785
- reject(err('Axe in frame timed out', node));
6786
- }, frameWaitTime);
6787
- _respondable(win, 'axe.start', parameters, void 0, function(data2) {
6788
- clearTimeout(timeout);
6789
- if (data2 instanceof Error === false) {
6790
- resolve(data2);
6791
- } else {
6792
- reject(data2);
6793
- }
6794
- });
6794
+ callAxeStart(node, parameters, resolve, reject);
6795
6795
  });
6796
6796
  }
6797
- var send_command_to_frame_default = sendCommandToFrame;
6797
+ function callAxeStart(node, parameters, resolve, reject) {
6798
+ var _parameters$options$f, _parameters$options2;
6799
+ var frameWaitTime = (_parameters$options$f = (_parameters$options2 = parameters.options) === null || _parameters$options2 === void 0 ? void 0 : _parameters$options2.frameWaitTime) !== null && _parameters$options$f !== void 0 ? _parameters$options$f : 6e4;
6800
+ var win = node.contentWindow;
6801
+ var timeout = setTimeout(function collectResultFramesTimeout() {
6802
+ reject(err('Axe in frame timed out', node));
6803
+ }, frameWaitTime);
6804
+ _respondable(win, 'axe.start', parameters, void 0, function(data2) {
6805
+ clearTimeout(timeout);
6806
+ if (data2 instanceof Error === false) {
6807
+ resolve(data2);
6808
+ } else {
6809
+ reject(data2);
6810
+ }
6811
+ });
6812
+ }
6813
+ function err(message, node) {
6814
+ var selector;
6815
+ if (axe._tree) {
6816
+ selector = _getSelector(node);
6817
+ }
6818
+ return new Error(message + ': ' + (selector || node));
6819
+ }
6798
6820
  function getAllChecks(object) {
6799
6821
  var result = [];
6800
6822
  return result.concat(object.any || []).concat(object.all || []).concat(object.none || []);
@@ -6923,7 +6945,7 @@
6923
6945
  frameElement: frameElement
6924
6946
  });
6925
6947
  }
6926
- send_command_to_frame_default(frameElement, params, callback, rej);
6948
+ _sendCommandToFrame(frameElement, params, callback, rej);
6927
6949
  });
6928
6950
  });
6929
6951
  q.then(function(data2) {
@@ -8474,6 +8496,11 @@
8474
8496
  allowedAttrs: [ 'aria-expanded' ],
8475
8497
  superclassRole: [ 'landmark' ]
8476
8498
  },
8499
+ comment: {
8500
+ type: 'structure',
8501
+ allowedAttrs: [ 'aria-level', 'aria-posinset', 'aria-setsize' ],
8502
+ superclassRole: [ 'article' ]
8503
+ },
8477
8504
  definition: {
8478
8505
  type: 'structure',
8479
8506
  allowedAttrs: [ 'aria-expanded' ],
@@ -8664,6 +8691,11 @@
8664
8691
  accessibleNameRequired: true,
8665
8692
  childrenPresentational: true
8666
8693
  },
8694
+ mark: {
8695
+ type: 'structure',
8696
+ superclassRole: [ 'section' ],
8697
+ prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
8698
+ },
8667
8699
  navigation: {
8668
8700
  type: 'landmark',
8669
8701
  allowedAttrs: [ 'aria-expanded' ],
@@ -8843,6 +8875,12 @@
8843
8875
  nameFromContent: true,
8844
8876
  childrenPresentational: true
8845
8877
  },
8878
+ suggestion: {
8879
+ type: 'structure',
8880
+ requiredOwned: [ 'insertion', 'deletion' ],
8881
+ superclassRole: [ 'section' ],
8882
+ prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
8883
+ },
8846
8884
  tab: {
8847
8885
  type: 'widget',
8848
8886
  requiredContext: [ 'tablist' ],
@@ -8970,13 +9008,12 @@
8970
9008
  },
8971
9009
  'doc-biblioentry': {
8972
9010
  type: 'listitem',
8973
- requiredContext: [ 'doc-bibliography' ],
8974
9011
  allowedAttrs: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize' ],
8975
- superclassRole: [ 'listitem' ]
9012
+ superclassRole: [ 'listitem' ],
9013
+ deprecated: true
8976
9014
  },
8977
9015
  'doc-bibliography': {
8978
9016
  type: 'landmark',
8979
- requiredOwned: [ 'doc-biblioentry' ],
8980
9017
  allowedAttrs: [ 'aria-expanded' ],
8981
9018
  superclassRole: [ 'landmark' ]
8982
9019
  },
@@ -9023,15 +9060,14 @@
9023
9060
  },
9024
9061
  'doc-endnote': {
9025
9062
  type: 'listitem',
9026
- requiredContext: [ 'doc-endnotes' ],
9027
9063
  allowedAttrs: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize' ],
9028
9064
  superclassRole: [ 'listitem' ]
9029
9065
  },
9030
9066
  'doc-endnotes': {
9031
9067
  type: 'landmark',
9032
- requiredOwned: [ 'doc-endnote' ],
9033
9068
  allowedAttrs: [ 'aria-expanded' ],
9034
- superclassRole: [ 'landmark' ]
9069
+ superclassRole: [ 'landmark' ],
9070
+ deprecated: true
9035
9071
  },
9036
9072
  'doc-epigraph': {
9037
9073
  type: 'section',
@@ -9065,7 +9101,6 @@
9065
9101
  },
9066
9102
  'doc-glossary': {
9067
9103
  type: 'landmark',
9068
- requiredOwned: [ 'definition', 'term' ],
9069
9104
  allowedAttrs: [ 'aria-expanded' ],
9070
9105
  superclassRole: [ 'landmark' ]
9071
9106
  },
@@ -9191,8 +9226,16 @@
9191
9226
  allowedRoles: true
9192
9227
  },
9193
9228
  area: {
9229
+ variant: {
9230
+ href: {
9231
+ matches: '[href]',
9232
+ allowedRoles: false
9233
+ },
9234
+ default: {
9235
+ allowedRoles: [ 'button', 'link' ]
9236
+ }
9237
+ },
9194
9238
  contentTypes: [ 'phrasing', 'flow' ],
9195
- allowedRoles: false,
9196
9239
  namingMethods: [ 'altText' ]
9197
9240
  },
9198
9241
  article: {
@@ -9432,11 +9475,13 @@
9432
9475
  img: {
9433
9476
  variant: {
9434
9477
  nonEmptyAlt: {
9435
- matches: {
9478
+ matches: [ {
9436
9479
  attributes: {
9437
9480
  alt: '/.+/'
9438
9481
  }
9439
- },
9482
+ }, {
9483
+ hasAccessibleName: true
9484
+ } ],
9440
9485
  allowedRoles: [ 'button', 'checkbox', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'scrollbar', 'separator', 'slider', 'switch', 'tab', 'treeitem', 'doc-cover' ]
9441
9486
  },
9442
9487
  usemap: {
@@ -9717,7 +9762,7 @@
9717
9762
  },
9718
9763
  section: {
9719
9764
  contentTypes: [ 'sectioning', 'flow' ],
9720
- allowedRoles: [ 'alert', 'alertdialog', 'application', 'banner', 'complementary', 'contentinfo', 'dialog', 'document', 'feed', 'log', 'main', 'marquee', 'navigation', 'none', 'note', 'presentation', 'search', 'status', 'tabpanel', 'doc-abstract', 'doc-acknowledgments', 'doc-afterword', 'doc-appendix', 'doc-bibliography', 'doc-chapter', 'doc-colophon', 'doc-conclusion', 'doc-credit', 'doc-credits', 'doc-dedication', 'doc-endnotes', 'doc-epigraph', 'doc-epilogue', 'doc-errata', 'doc-example', 'doc-foreword', 'doc-glossary', 'doc-index', 'doc-introduction', 'doc-notice', 'doc-pagelist', 'doc-part', 'doc-preface', 'doc-prologue', 'doc-pullquote', 'doc-qna', 'doc-toc' ],
9765
+ allowedRoles: [ 'alert', 'alertdialog', 'application', 'banner', 'complementary', 'contentinfo', 'dialog', 'document', 'feed', 'group', 'log', 'main', 'marquee', 'navigation', 'none', 'note', 'presentation', 'search', 'status', 'tabpanel', 'doc-abstract', 'doc-acknowledgments', 'doc-afterword', 'doc-appendix', 'doc-bibliography', 'doc-chapter', 'doc-colophon', 'doc-conclusion', 'doc-credit', 'doc-credits', 'doc-dedication', 'doc-endnotes', 'doc-epigraph', 'doc-epilogue', 'doc-errata', 'doc-example', 'doc-foreword', 'doc-glossary', 'doc-index', 'doc-introduction', 'doc-notice', 'doc-pagelist', 'doc-part', 'doc-preface', 'doc-prologue', 'doc-pullquote', 'doc-qna', 'doc-toc' ],
9721
9766
  shadowRoot: true
9722
9767
  },
9723
9768
  select: {
@@ -11017,6 +11062,10 @@
11017
11062
  this.include.sort(node_sorter_default);
11018
11063
  }
11019
11064
  function _getFrameContexts(context5) {
11065
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
11066
+ if (options.iframes === false) {
11067
+ return [];
11068
+ }
11020
11069
  var _Context = new Context(context5), frames = _Context.frames;
11021
11070
  return frames.map(function(_ref22) {
11022
11071
  var node = _ref22.node, frameContext = _objectWithoutProperties(_ref22, _excluded2);
@@ -12687,6 +12736,10 @@
12687
12736
  return matcher === someString;
12688
12737
  }
12689
12738
  var from_primative_default = fromPrimative;
12739
+ function hasAccessibleName2(vNode, matcher) {
12740
+ return from_primative_default(!!accessible_text_virtual_default(vNode), matcher);
12741
+ }
12742
+ var has_accessible_name_default = hasAccessibleName2;
12690
12743
  function fromFunction(getValue, matcher) {
12691
12744
  var matcherType = _typeof(matcher);
12692
12745
  if (matcherType !== 'object' || Array.isArray(matcher) || matcher instanceof RegExp) {
@@ -12739,6 +12792,7 @@
12739
12792
  }
12740
12793
  var semantic_role_default = semanticRole;
12741
12794
  var matchers = {
12795
+ hasAccessibleName: has_accessible_name_default,
12742
12796
  attributes: attributes_default,
12743
12797
  condition: condition_default,
12744
12798
  explicitRole: explicit_role_default,
@@ -12773,6 +12827,7 @@
12773
12827
  return from_definition_default(vNode, definition);
12774
12828
  }
12775
12829
  var matches_default2 = matches5;
12830
+ matches_default2.hasAccessibleName = has_accessible_name_default;
12776
12831
  matches_default2.attributes = attributes_default;
12777
12832
  matches_default2.condition = condition_default;
12778
12833
  matches_default2.explicitRole = explicit_role_default;
@@ -12785,6 +12840,7 @@
12785
12840
  matches_default2.semanticRole = semantic_role_default;
12786
12841
  var matches_default3 = matches_default2;
12787
12842
  function getElementSpec(vNode) {
12843
+ var _ref34 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref34$noMatchAccessi = _ref34.noMatchAccessibleName, noMatchAccessibleName = _ref34$noMatchAccessi === void 0 ? false : _ref34$noMatchAccessi;
12788
12844
  var standard = standards_default.htmlElms[vNode.props.nodeName];
12789
12845
  if (!standard) {
12790
12846
  return {};
@@ -12798,6 +12854,12 @@
12798
12854
  continue;
12799
12855
  }
12800
12856
  var _variant$variantName = variant[variantName], matches14 = _variant$variantName.matches, props = _objectWithoutProperties(_variant$variantName, _excluded4);
12857
+ var matchProperties = Array.isArray(matches14) ? matches14 : [ matches14 ];
12858
+ for (var _i12 = 0; _i12 < matchProperties.length && noMatchAccessibleName; _i12++) {
12859
+ if (matchProperties[_i12].hasOwnProperty('hasAccessibleName')) {
12860
+ return standard;
12861
+ }
12862
+ }
12801
12863
  if (matches_default3(vNode, matches14)) {
12802
12864
  for (var propName in props) {
12803
12865
  if (props.hasOwnProperty(propName)) {
@@ -12815,7 +12877,7 @@
12815
12877
  }
12816
12878
  var get_element_spec_default = getElementSpec;
12817
12879
  function implicitRole2(node) {
12818
- var _ref34 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref34.chromium;
12880
+ var _ref35 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref35.chromium;
12819
12881
  var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
12820
12882
  node = vNode.actualNode;
12821
12883
  if (!vNode) {
@@ -12865,8 +12927,8 @@
12865
12927
  }
12866
12928
  return getInheritedRole(vNode.parent, explicitRoleOptions);
12867
12929
  }
12868
- function resolveImplicitRole(vNode, _ref35) {
12869
- var chromium = _ref35.chromium, explicitRoleOptions = _objectWithoutProperties(_ref35, _excluded5);
12930
+ function resolveImplicitRole(vNode, _ref36) {
12931
+ var chromium = _ref36.chromium, explicitRoleOptions = _objectWithoutProperties(_ref36, _excluded5);
12870
12932
  var implicitRole3 = implicit_role_default(vNode, {
12871
12933
  chromium: chromium
12872
12934
  });
@@ -12886,8 +12948,8 @@
12886
12948
  return hasGlobalAria || is_focusable_default(vNode);
12887
12949
  }
12888
12950
  function resolveRole(node) {
12889
- var _ref36 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12890
- var noImplicit = _ref36.noImplicit, roleOptions = _objectWithoutProperties(_ref36, _excluded6);
12951
+ var _ref37 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12952
+ var noImplicit = _ref37.noImplicit, roleOptions = _objectWithoutProperties(_ref37, _excluded6);
12891
12953
  var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
12892
12954
  if (vNode.props.nodeType !== 1) {
12893
12955
  return null;
@@ -12905,8 +12967,8 @@
12905
12967
  return explicitRole2;
12906
12968
  }
12907
12969
  function getRole(node) {
12908
- var _ref37 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12909
- var noPresentational = _ref37.noPresentational, options = _objectWithoutProperties(_ref37, _excluded7);
12970
+ var _ref38 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12971
+ var noPresentational = _ref38.noPresentational, options = _objectWithoutProperties(_ref38, _excluded7);
12910
12972
  var role = resolveRole(node, options);
12911
12973
  if (noPresentational && [ 'presentation', 'none' ].includes(role)) {
12912
12974
  return null;
@@ -12927,7 +12989,7 @@
12927
12989
  }
12928
12990
  var title_text_default = titleText;
12929
12991
  function namedFromContents(vNode) {
12930
- var _ref38 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref38.strict;
12992
+ var _ref39 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref39.strict;
12931
12993
  vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
12932
12994
  if (vNode.props.nodeType !== 1) {
12933
12995
  return false;
@@ -12964,7 +13026,9 @@
12964
13026
  var alreadyProcessed2 = accessible_text_virtual_default.alreadyProcessed;
12965
13027
  context5.startNode = context5.startNode || virtualNode;
12966
13028
  var _context = context5, strict = _context.strict, inControlContext = _context.inControlContext, inLabelledByContext = _context.inLabelledByContext;
12967
- var _get_element_spec_def2 = get_element_spec_default(virtualNode), contentTypes = _get_element_spec_def2.contentTypes;
13029
+ var _get_element_spec_def2 = get_element_spec_default(virtualNode, {
13030
+ noMatchAccessibleName: true
13031
+ }), contentTypes = _get_element_spec_def2.contentTypes;
12968
13032
  if (alreadyProcessed2(virtualNode, context5) || virtualNode.props.nodeType !== 1 || contentTypes !== null && contentTypes !== void 0 && contentTypes.includes('embedded')) {
12969
13033
  return '';
12970
13034
  }
@@ -13050,12 +13114,12 @@
13050
13114
  button: ''
13051
13115
  };
13052
13116
  var nativeTextMethods = {
13053
- valueText: function valueText(_ref39) {
13054
- var actualNode = _ref39.actualNode;
13117
+ valueText: function valueText(_ref40) {
13118
+ var actualNode = _ref40.actualNode;
13055
13119
  return actualNode.value || '';
13056
13120
  },
13057
- buttonDefaultText: function buttonDefaultText(_ref40) {
13058
- var actualNode = _ref40.actualNode;
13121
+ buttonDefaultText: function buttonDefaultText(_ref41) {
13122
+ var actualNode = _ref41.actualNode;
13059
13123
  return defaultButtonValues[actualNode.type] || '';
13060
13124
  },
13061
13125
  tableCaptionText: descendantText.bind(null, 'caption'),
@@ -13075,8 +13139,8 @@
13075
13139
  function attrText(attr, vNode) {
13076
13140
  return vNode.attr(attr) || '';
13077
13141
  }
13078
- function descendantText(nodeName2, _ref41, context5) {
13079
- var actualNode = _ref41.actualNode;
13142
+ function descendantText(nodeName2, _ref42, context5) {
13143
+ var actualNode = _ref42.actualNode;
13080
13144
  nodeName2 = nodeName2.toLowerCase();
13081
13145
  var nodeNames2 = [ nodeName2, actualNode.nodeName.toLowerCase() ].join(',');
13082
13146
  var candidate = actualNode.querySelector(nodeNames2);
@@ -13102,7 +13166,9 @@
13102
13166
  return accName;
13103
13167
  }
13104
13168
  function findTextMethods(virtualNode) {
13105
- var elmSpec = get_element_spec_default(virtualNode);
13169
+ var elmSpec = get_element_spec_default(virtualNode, {
13170
+ noMatchAccessibleName: true
13171
+ });
13106
13172
  var methods = elmSpec.namingMethods || [];
13107
13173
  return methods.map(function(methodName) {
13108
13174
  return native_text_methods_default[methodName];
@@ -13270,8 +13336,8 @@
13270
13336
  }
13271
13337
  return virtualNode.props.nodeValue;
13272
13338
  }
13273
- function shouldIgnoreHidden(_ref42, context5) {
13274
- var actualNode = _ref42.actualNode;
13339
+ function shouldIgnoreHidden(_ref43, context5) {
13340
+ var actualNode = _ref43.actualNode;
13275
13341
  if (!actualNode) {
13276
13342
  return false;
13277
13343
  }
@@ -13562,7 +13628,7 @@
13562
13628
  locations: [ 'billing', 'shipping' ]
13563
13629
  };
13564
13630
  function isValidAutocomplete(autocompleteValue) {
13565
- 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;
13631
+ var _ref44 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref44$looseTyped = _ref44.looseTyped, looseTyped = _ref44$looseTyped === void 0 ? false : _ref44$looseTyped, _ref44$stateTerms = _ref44.stateTerms, stateTerms = _ref44$stateTerms === void 0 ? [] : _ref44$stateTerms, _ref44$locations = _ref44.locations, locations = _ref44$locations === void 0 ? [] : _ref44$locations, _ref44$qualifiers = _ref44.qualifiers, qualifiers = _ref44$qualifiers === void 0 ? [] : _ref44$qualifiers, _ref44$standaloneTerm = _ref44.standaloneTerms, standaloneTerms = _ref44$standaloneTerm === void 0 ? [] : _ref44$standaloneTerm, _ref44$qualifiedTerms = _ref44.qualifiedTerms, qualifiedTerms = _ref44$qualifiedTerms === void 0 ? [] : _ref44$qualifiedTerms;
13566
13632
  autocompleteValue = autocompleteValue.toLowerCase().trim();
13567
13633
  stateTerms = stateTerms.concat(_autocomplete.stateTerms);
13568
13634
  if (stateTerms.includes(autocompleteValue) || autocompleteValue === '') {
@@ -13713,8 +13779,8 @@
13713
13779
  idRefs[id] = idRefs[id] || [];
13714
13780
  idRefs[id].push(node);
13715
13781
  }
13716
- for (var _i12 = 0; _i12 < refAttrs.length; ++_i12) {
13717
- var attr = refAttrs[_i12];
13782
+ for (var _i13 = 0; _i13 < refAttrs.length; ++_i13) {
13783
+ var attr = refAttrs[_i13];
13718
13784
  var attrValue = sanitize_default(node.getAttribute(attr) || '');
13719
13785
  if (!attrValue) {
13720
13786
  continue;
@@ -13726,8 +13792,8 @@
13726
13792
  }
13727
13793
  }
13728
13794
  }
13729
- for (var _i13 = 0; _i13 < node.children.length; _i13++) {
13730
- cacheIdRefs(node.children[_i13], idRefs, refAttrs);
13795
+ for (var _i14 = 0; _i14 < node.children.length; _i14++) {
13796
+ cacheIdRefs(node.children[_i14], idRefs, refAttrs);
13731
13797
  }
13732
13798
  }
13733
13799
  function getAccessibleRefs(node) {
@@ -13763,17 +13829,21 @@
13763
13829
  function isAriaRoleAllowedOnElement(node, role) {
13764
13830
  var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
13765
13831
  var implicitRole3 = implicit_role_default(vNode);
13766
- if (role === implicitRole3) {
13767
- return true;
13768
- }
13769
13832
  var spec = get_element_spec_default(vNode);
13770
13833
  if (Array.isArray(spec.allowedRoles)) {
13771
13834
  return spec.allowedRoles.includes(role);
13772
13835
  }
13836
+ if (role === implicitRole3) {
13837
+ return false;
13838
+ }
13773
13839
  return !!spec.allowedRoles;
13774
13840
  }
13775
13841
  var is_aria_role_allowed_on_element_default = isAriaRoleAllowedOnElement;
13776
13842
  var dpubRoles2 = [ 'doc-backlink', 'doc-biblioentry', 'doc-biblioref', 'doc-cover', 'doc-endnote', 'doc-glossref', 'doc-noteref' ];
13843
+ var landmarkRoles = {
13844
+ header: 'banner',
13845
+ footer: 'contentinfo'
13846
+ };
13777
13847
  function getRoleSegments(vNode) {
13778
13848
  var roles = [];
13779
13849
  if (!vNode) {
@@ -13783,36 +13853,31 @@
13783
13853
  var nodeRoles = token_list_default(vNode.attr('role').toLowerCase());
13784
13854
  roles = roles.concat(nodeRoles);
13785
13855
  }
13786
- roles = roles.filter(function(role) {
13856
+ return roles.filter(function(role) {
13787
13857
  return is_valid_role_default(role);
13788
13858
  });
13789
- return roles;
13790
13859
  }
13791
13860
  function getElementUnallowedRoles(node) {
13792
13861
  var allowImplicit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
13793
13862
  var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
13794
- var nodeName2 = vNode.props.nodeName;
13795
13863
  if (!is_html_element_default(vNode)) {
13796
13864
  return [];
13797
13865
  }
13866
+ var nodeName2 = vNode.props.nodeName;
13867
+ var implicitRole3 = implicit_role_default(vNode) || landmarkRoles[nodeName2];
13798
13868
  var roleSegments = getRoleSegments(vNode);
13799
- var implicitRole3 = implicit_role_default(vNode);
13800
- var unallowedRoles = roleSegments.filter(function(role) {
13801
- if (allowImplicit && role === implicitRole3) {
13802
- return false;
13803
- }
13804
- if (allowImplicit && dpubRoles2.includes(role)) {
13805
- var roleType = get_role_type_default(role);
13806
- if (implicitRole3 !== roleType) {
13807
- return true;
13808
- }
13809
- }
13810
- if (!allowImplicit && !(role === 'row' && nodeName2 === 'tr' && element_matches_default(vNode, 'table[role="grid"] > tr'))) {
13811
- return true;
13812
- }
13813
- return !is_aria_role_allowed_on_element_default(vNode, role);
13869
+ return roleSegments.filter(function(role) {
13870
+ return !roleIsAllowed(role, vNode, allowImplicit, implicitRole3);
13814
13871
  });
13815
- return unallowedRoles;
13872
+ }
13873
+ function roleIsAllowed(role, vNode, allowImplicit, implicitRole3) {
13874
+ if (allowImplicit && role === implicitRole3) {
13875
+ return true;
13876
+ }
13877
+ if (dpubRoles2.includes(role) && get_role_type_default(role) !== implicitRole3) {
13878
+ return false;
13879
+ }
13880
+ return is_aria_role_allowed_on_element_default(vNode, role);
13816
13881
  }
13817
13882
  var get_element_unallowed_roles_default = getElementUnallowedRoles;
13818
13883
  function getAriaRolesByType(type) {
@@ -15587,8 +15652,8 @@
15587
15652
  nodeName: [ 'abbr', 'address', 'canvas', 'div', 'p', 'pre', 'blockquote', 'ins', 'del', 'output', 'span', 'table', 'tbody', 'thead', 'tfoot', 'td', 'em', 'strong', 'small', 's', 'cite', 'q', 'dfn', 'abbr', 'time', 'code', 'var', 'samp', 'kbd', 'sub', 'sup', 'i', 'b', 'u', 'mark', 'ruby', 'rt', 'rp', 'bdi', 'bdo', 'br', 'wbr', 'th', 'tr' ]
15588
15653
  } ];
15589
15654
  lookupTable.evaluateRoleForElement = {
15590
- A: function A(_ref44) {
15591
- var node = _ref44.node, out = _ref44.out;
15655
+ A: function A(_ref45) {
15656
+ var node = _ref45.node, out = _ref45.out;
15592
15657
  if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
15593
15658
  return true;
15594
15659
  }
@@ -15597,19 +15662,19 @@
15597
15662
  }
15598
15663
  return true;
15599
15664
  },
15600
- AREA: function AREA(_ref45) {
15601
- var node = _ref45.node;
15665
+ AREA: function AREA(_ref46) {
15666
+ var node = _ref46.node;
15602
15667
  return !node.href;
15603
15668
  },
15604
- BUTTON: function BUTTON(_ref46) {
15605
- var node = _ref46.node, role = _ref46.role, out = _ref46.out;
15669
+ BUTTON: function BUTTON(_ref47) {
15670
+ var node = _ref47.node, role = _ref47.role, out = _ref47.out;
15606
15671
  if (node.getAttribute('type') === 'menu') {
15607
15672
  return role === 'menuitem';
15608
15673
  }
15609
15674
  return out;
15610
15675
  },
15611
- IMG: function IMG(_ref47) {
15612
- var node = _ref47.node, role = _ref47.role, out = _ref47.out;
15676
+ IMG: function IMG(_ref48) {
15677
+ var node = _ref48.node, role = _ref48.role, out = _ref48.out;
15613
15678
  switch (node.alt) {
15614
15679
  case null:
15615
15680
  return out;
@@ -15621,8 +15686,8 @@
15621
15686
  return role !== 'presentation' && role !== 'none';
15622
15687
  }
15623
15688
  },
15624
- INPUT: function INPUT(_ref48) {
15625
- var node = _ref48.node, role = _ref48.role, out = _ref48.out;
15689
+ INPUT: function INPUT(_ref49) {
15690
+ var node = _ref49.node, role = _ref49.role, out = _ref49.out;
15626
15691
  switch (node.type) {
15627
15692
  case 'button':
15628
15693
  case 'image':
@@ -15652,32 +15717,32 @@
15652
15717
  return false;
15653
15718
  }
15654
15719
  },
15655
- LI: function LI(_ref49) {
15656
- var node = _ref49.node, out = _ref49.out;
15720
+ LI: function LI(_ref50) {
15721
+ var node = _ref50.node, out = _ref50.out;
15657
15722
  var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
15658
15723
  if (hasImplicitListitemRole) {
15659
15724
  return out;
15660
15725
  }
15661
15726
  return true;
15662
15727
  },
15663
- MENU: function MENU(_ref50) {
15664
- var node = _ref50.node;
15728
+ MENU: function MENU(_ref51) {
15729
+ var node = _ref51.node;
15665
15730
  if (node.getAttribute('type') === 'context') {
15666
15731
  return false;
15667
15732
  }
15668
15733
  return true;
15669
15734
  },
15670
- OPTION: function OPTION(_ref51) {
15671
- var node = _ref51.node;
15735
+ OPTION: function OPTION(_ref52) {
15736
+ var node = _ref52.node;
15672
15737
  var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
15673
15738
  return !withinOptionList;
15674
15739
  },
15675
- SELECT: function SELECT(_ref52) {
15676
- var node = _ref52.node, role = _ref52.role;
15740
+ SELECT: function SELECT(_ref53) {
15741
+ var node = _ref53.node, role = _ref53.role;
15677
15742
  return !node.multiple && node.size <= 1 && role === 'menu';
15678
15743
  },
15679
- SVG: function SVG(_ref53) {
15680
- var node = _ref53.node, out = _ref53.out;
15744
+ SVG: function SVG(_ref54) {
15745
+ var node = _ref54.node, out = _ref54.out;
15681
15746
  if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
15682
15747
  return true;
15683
15748
  }
@@ -15828,10 +15893,10 @@
15828
15893
  ariaAttr.forEach(function(attr) {
15829
15894
  preChecks[attr] = validateRowAttrs;
15830
15895
  });
15831
- if (allowed) {
15832
- for (var _i14 = 0; _i14 < attrs.length; _i14++) {
15896
+ if (role && allowed) {
15897
+ for (var _i15 = 0; _i15 < attrs.length; _i15++) {
15833
15898
  var _preChecks$attrName;
15834
- var attrName = attrs[_i14];
15899
+ var attrName = attrs[_i15];
15835
15900
  if (validate_attr_default(attrName) && (_preChecks$attrName = preChecks[attrName]) !== null && _preChecks$attrName !== void 0 && _preChecks$attrName.call(preChecks)) {
15836
15901
  invalid.push(attrName + '="' + virtualNode.attr(attrName) + '"');
15837
15902
  } else if (validate_attr_default(attrName) && !allowed.includes(attrName)) {
@@ -15989,8 +16054,8 @@
15989
16054
  required = unique_array_default(options[role], required);
15990
16055
  }
15991
16056
  if (role && required) {
15992
- for (var _i15 = 0, l = required.length; _i15 < l; _i15++) {
15993
- var attr = required[_i15];
16057
+ for (var _i16 = 0, l = required.length; _i16 < l; _i16++) {
16058
+ var attr = required[_i16];
15994
16059
  if (!virtualNode.attr(attr) && !(elmSpec.implicitAttrs && typeof elmSpec.implicitAttrs[attr] !== 'undefined')) {
15995
16060
  missing.push(attr);
15996
16061
  }
@@ -16011,8 +16076,8 @@
16011
16076
  function getOwnedRoles(virtualNode, required) {
16012
16077
  var ownedRoles = [];
16013
16078
  var ownedElements = get_owned_virtual_default(virtualNode);
16014
- var _loop4 = function _loop4(_i16) {
16015
- var ownedElement = ownedElements[_i16];
16079
+ var _loop4 = function _loop4(_i17) {
16080
+ var ownedElement = ownedElements[_i17];
16016
16081
  var role = get_role_default(ownedElement, {
16017
16082
  noPresentational: true
16018
16083
  });
@@ -16024,14 +16089,14 @@
16024
16089
  ownedRoles.push(role);
16025
16090
  }
16026
16091
  };
16027
- for (var _i16 = 0; _i16 < ownedElements.length; _i16++) {
16028
- _loop4(_i16);
16092
+ for (var _i17 = 0; _i17 < ownedElements.length; _i17++) {
16093
+ _loop4(_i17);
16029
16094
  }
16030
16095
  return ownedRoles;
16031
16096
  }
16032
16097
  function missingRequiredChildren(virtualNode, role, required, ownedRoles) {
16033
- for (var _i17 = 0; _i17 < ownedRoles.length; _i17++) {
16034
- var ownedRole = ownedRoles[_i17];
16098
+ for (var _i18 = 0; _i18 < ownedRoles.length; _i18++) {
16099
+ var ownedRole = ownedRoles[_i18];
16035
16100
  if (required.includes(ownedRole)) {
16036
16101
  required = required.filter(function(requiredRole) {
16037
16102
  return requiredRole !== ownedRole;
@@ -16118,8 +16183,8 @@
16118
16183
  }
16119
16184
  var owners = getAriaOwners(node);
16120
16185
  if (owners) {
16121
- for (var _i18 = 0, l = owners.length; _i18 < l; _i18++) {
16122
- missingParents = getMissingContext(get_node_from_tree_default(owners[_i18]), ownGroupRoles, missingParents, true);
16186
+ for (var _i19 = 0, l = owners.length; _i19 < l; _i19++) {
16187
+ missingParents = getMissingContext(get_node_from_tree_default(owners[_i19]), ownGroupRoles, missingParents, true);
16123
16188
  if (!missingParents) {
16124
16189
  return true;
16125
16190
  }
@@ -16164,9 +16229,9 @@
16164
16229
  function ariaValidAttrEvaluate(node, options, virtualNode) {
16165
16230
  options = Array.isArray(options.value) ? options.value : [];
16166
16231
  var invalid = [];
16167
- var aria46 = /^aria-/;
16232
+ var aria47 = /^aria-/;
16168
16233
  virtualNode.attrNames.forEach(function(attr) {
16169
- if (options.indexOf(attr) === -1 && aria46.test(attr) && !validate_attr_default(attr)) {
16234
+ if (options.indexOf(attr) === -1 && aria47.test(attr) && !validate_attr_default(attr)) {
16170
16235
  invalid.push(attr);
16171
16236
  }
16172
16237
  });
@@ -16182,7 +16247,7 @@
16182
16247
  var needsReview = '';
16183
16248
  var messageKey = '';
16184
16249
  var invalid = [];
16185
- var aria46 = /^aria-/;
16250
+ var aria47 = /^aria-/;
16186
16251
  var skipAttrs = [ 'aria-errormessage' ];
16187
16252
  var preChecks = {
16188
16253
  'aria-controls': function ariaControls() {
@@ -16213,7 +16278,7 @@
16213
16278
  }
16214
16279
  };
16215
16280
  virtualNode.attrNames.forEach(function(attrName) {
16216
- if (skipAttrs.includes(attrName) || options.includes(attrName) || !aria46.test(attrName)) {
16281
+ if (skipAttrs.includes(attrName) || options.includes(attrName) || !aria47.test(attrName)) {
16217
16282
  return;
16218
16283
  }
16219
16284
  var validValue;
@@ -16242,6 +16307,18 @@
16242
16307
  return true;
16243
16308
  }
16244
16309
  var aria_valid_attr_value_evaluate_default = ariaValidAttrValueEvaluate;
16310
+ function deprecatedroleEvaluate(node, options, virtualNode) {
16311
+ var role = get_role_default(virtualNode, {
16312
+ dpub: true,
16313
+ fallback: true
16314
+ });
16315
+ var roleDefinition = standards_default.ariaRoles[role];
16316
+ if (!(roleDefinition !== null && roleDefinition !== void 0 && roleDefinition.deprecated)) {
16317
+ return false;
16318
+ }
16319
+ this.data(role);
16320
+ return true;
16321
+ }
16245
16322
  function nonePresentationOnElementWithNoImplicitRole(virtualNode, explicitRoles) {
16246
16323
  var hasImplicitRole = implicit_role_default(virtualNode);
16247
16324
  return !hasImplicitRole && explicitRoles.length === 2 && explicitRoles.includes('none') && explicitRoles.includes('presentation');
@@ -17031,7 +17108,7 @@
17031
17108
  }
17032
17109
  var get_background_stack_default = getBackgroundStack;
17033
17110
  function getTextShadowColors(node) {
17034
- var _ref54 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref54.minRatio, maxRatio = _ref54.maxRatio;
17111
+ var _ref55 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref55.minRatio, maxRatio = _ref55.maxRatio;
17035
17112
  var style = window.getComputedStyle(node);
17036
17113
  var textShadow = style.getPropertyValue('text-shadow');
17037
17114
  if (textShadow === 'none') {
@@ -17042,8 +17119,8 @@
17042
17119
  assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
17043
17120
  var shadowColors = [];
17044
17121
  var shadows = parseTextShadows(textShadow);
17045
- shadows.forEach(function(_ref55) {
17046
- var colorStr = _ref55.colorStr, pixels = _ref55.pixels;
17122
+ shadows.forEach(function(_ref56) {
17123
+ var colorStr = _ref56.colorStr, pixels = _ref56.pixels;
17047
17124
  colorStr = colorStr || style.getPropertyValue('color');
17048
17125
  var _pixels = _slicedToArray(pixels, 3), offsetY = _pixels[0], offsetX = _pixels[1], _pixels$ = _pixels[2], blurRadius = _pixels$ === void 0 ? 0 : _pixels$;
17049
17126
  if ((!minRatio || blurRadius >= fontSize * minRatio) && (!maxRatio || blurRadius < fontSize * maxRatio)) {
@@ -17093,8 +17170,8 @@
17093
17170
  }
17094
17171
  return shadows;
17095
17172
  }
17096
- function textShadowColor(_ref56) {
17097
- var colorStr = _ref56.colorStr, offsetX = _ref56.offsetX, offsetY = _ref56.offsetY, blurRadius = _ref56.blurRadius, fontSize = _ref56.fontSize;
17173
+ function textShadowColor(_ref57) {
17174
+ var colorStr = _ref57.colorStr, offsetX = _ref57.offsetX, offsetY = _ref57.offsetY, blurRadius = _ref57.blurRadius, fontSize = _ref57.fontSize;
17098
17175
  if (offsetX > blurRadius || offsetY > blurRadius) {
17099
17176
  return new color_default(0, 0, 0, 0);
17100
17177
  }
@@ -17288,7 +17365,7 @@
17288
17365
  }
17289
17366
  var ptSize = Math.ceil(fontSize * 72) / 96;
17290
17367
  var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
17291
- var _ref57 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref57.expected, minThreshold = _ref57.minThreshold, maxThreshold = _ref57.maxThreshold;
17368
+ var _ref58 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref58.expected, minThreshold = _ref58.minThreshold, maxThreshold = _ref58.maxThreshold;
17292
17369
  var isValid = contrast > expected;
17293
17370
  if (typeof minThreshold === 'number' && contrast < minThreshold || typeof maxThreshold === 'number' && contrast > maxThreshold) {
17294
17371
  return true;
@@ -17328,8 +17405,8 @@
17328
17405
  }
17329
17406
  return isValid;
17330
17407
  }
17331
- function findPseudoElement(vNode, _ref58) {
17332
- 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;
17408
+ function findPseudoElement(vNode, _ref59) {
17409
+ var _ref59$pseudoSizeThre = _ref59.pseudoSizeThreshold, pseudoSizeThreshold = _ref59$pseudoSizeThre === void 0 ? .25 : _ref59$pseudoSizeThre, _ref59$ignorePseudo = _ref59.ignorePseudo, ignorePseudo = _ref59$ignorePseudo === void 0 ? false : _ref59$ignorePseudo;
17333
17410
  if (ignorePseudo) {
17334
17411
  return;
17335
17412
  }
@@ -17371,7 +17448,7 @@
17371
17448
  }
17372
17449
  function parseUnit(str) {
17373
17450
  var unitRegex = /^([0-9.]+)([a-z]+)$/i;
17374
- 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;
17451
+ var _ref60 = str.match(unitRegex) || [], _ref61 = _slicedToArray(_ref60, 3), _ref61$ = _ref61[1], value = _ref61$ === void 0 ? '' : _ref61$, _ref61$2 = _ref61[2], unit = _ref61$2 === void 0 ? '' : _ref61$2;
17375
17452
  return {
17376
17453
  value: parseFloat(value),
17377
17454
  unit: unit.toLowerCase()
@@ -17614,14 +17691,14 @@
17614
17691
  }
17615
17692
  function getHeadingOrder(results) {
17616
17693
  results = _toConsumableArray(results);
17617
- results.sort(function(_ref61, _ref62) {
17618
- var nodeA = _ref61.node;
17619
- var nodeB = _ref62.node;
17694
+ results.sort(function(_ref62, _ref63) {
17695
+ var nodeA = _ref62.node;
17696
+ var nodeB = _ref63.node;
17620
17697
  return nodeA.ancestry.length - nodeB.ancestry.length;
17621
17698
  });
17622
17699
  var headingOrder = results.reduce(mergeHeadingOrder, []);
17623
- return headingOrder.filter(function(_ref63) {
17624
- var level = _ref63.level;
17700
+ return headingOrder.filter(function(_ref64) {
17701
+ var level = _ref64.level;
17625
17702
  return level !== -1;
17626
17703
  });
17627
17704
  }
@@ -17672,7 +17749,7 @@
17672
17749
  var headingRole = role && role.includes('heading');
17673
17750
  var ariaHeadingLevel = vNode.attr('aria-level');
17674
17751
  var ariaLevel = parseInt(ariaHeadingLevel, 10);
17675
- var _ref64 = vNode.props.nodeName.match(/h(\d)/) || [], _ref65 = _slicedToArray(_ref64, 2), headingLevel = _ref65[1];
17752
+ var _ref65 = vNode.props.nodeName.match(/h(\d)/) || [], _ref66 = _slicedToArray(_ref65, 2), headingLevel = _ref66[1];
17676
17753
  if (!headingRole) {
17677
17754
  return -1;
17678
17755
  }
@@ -17738,8 +17815,8 @@
17738
17815
  if (results.length < 2) {
17739
17816
  return results;
17740
17817
  }
17741
- var incompleteResults = results.filter(function(_ref66) {
17742
- var result = _ref66.result;
17818
+ var incompleteResults = results.filter(function(_ref67) {
17819
+ var result = _ref67.result;
17743
17820
  return result !== void 0;
17744
17821
  });
17745
17822
  var uniqueResults = [];
@@ -17751,12 +17828,12 @@
17751
17828
  if (nameMap[name]) {
17752
17829
  return 'continue';
17753
17830
  }
17754
- var sameNameResults = incompleteResults.filter(function(_ref67, resultNum) {
17755
- var data2 = _ref67.data;
17831
+ var sameNameResults = incompleteResults.filter(function(_ref68, resultNum) {
17832
+ var data2 = _ref68.data;
17756
17833
  return data2.name === name && resultNum !== index;
17757
17834
  });
17758
- var isSameUrl = sameNameResults.every(function(_ref68) {
17759
- var data2 = _ref68.data;
17835
+ var isSameUrl = sameNameResults.every(function(_ref69) {
17836
+ var data2 = _ref69.data;
17760
17837
  return isIdenticalObject(data2.urlProps, urlProps);
17761
17838
  });
17762
17839
  if (sameNameResults.length && !isSameUrl) {
@@ -17886,7 +17963,7 @@
17886
17963
  function internalLinkPresentEvaluate(node, options, virtualNode) {
17887
17964
  var links = query_selector_all_default(virtualNode, 'a[href]');
17888
17965
  return links.some(function(vLink) {
17889
- return /^#[^/!]/.test(vLink.actualNode.getAttribute('href'));
17966
+ return /^#[^/!]/.test(vLink.attr('href'));
17890
17967
  });
17891
17968
  }
17892
17969
  var internal_link_present_evaluate_default = internalLinkPresentEvaluate;
@@ -17917,16 +17994,16 @@
17917
17994
  var outerText = elm.textContent.trim();
17918
17995
  var innerText = outerText;
17919
17996
  while (innerText === outerText && nextNode !== void 0) {
17920
- var _i19 = -1;
17997
+ var _i20 = -1;
17921
17998
  elm = nextNode;
17922
17999
  if (elm.children.length === 0) {
17923
18000
  return elm;
17924
18001
  }
17925
18002
  do {
17926
- _i19++;
17927
- innerText = elm.children[_i19].textContent.trim();
17928
- } while (innerText === '' && _i19 + 1 < elm.children.length);
17929
- nextNode = elm.children[_i19];
18003
+ _i20++;
18004
+ innerText = elm.children[_i20].textContent.trim();
18005
+ } while (innerText === '' && _i20 + 1 < elm.children.length);
18006
+ nextNode = elm.children[_i20];
17930
18007
  }
17931
18008
  return elm;
17932
18009
  }
@@ -17980,7 +18057,7 @@
17980
18057
  return false;
17981
18058
  }
17982
18059
  var p_as_heading_evaluate_default = pAsHeadingEvaluate;
17983
- var landmarkRoles = get_aria_roles_by_type_default('landmark');
18060
+ var landmarkRoles2 = get_aria_roles_by_type_default('landmark');
17984
18061
  var implicitAriaLiveRoles = [ 'alert', 'log', 'status' ];
17985
18062
  function isRegion(virtualNode, options) {
17986
18063
  var node = virtualNode.actualNode;
@@ -17989,7 +18066,7 @@
17989
18066
  if ([ 'assertive', 'polite' ].includes(ariaLive) || implicitAriaLiveRoles.includes(role)) {
17990
18067
  return true;
17991
18068
  }
17992
- if (landmarkRoles.includes(role)) {
18069
+ if (landmarkRoles2.includes(role)) {
17993
18070
  return true;
17994
18071
  }
17995
18072
  if (options.regionMatcher && matches_default3(virtualNode, options.regionMatcher)) {
@@ -17999,7 +18076,7 @@
17999
18076
  }
18000
18077
  function findRegionlessElms(virtualNode, options) {
18001
18078
  var node = virtualNode.actualNode;
18002
- if (isRegion(virtualNode, options) || [ 'iframe', 'frame' ].includes(virtualNode.props.nodeName) || is_skip_link_default(virtualNode.actualNode) && get_element_by_reference_default(virtualNode.actualNode, 'href') || !is_visible_default(node, true)) {
18079
+ if (get_role_default(virtualNode) === 'button' || isRegion(virtualNode, options) || [ 'iframe', 'frame' ].includes(virtualNode.props.nodeName) || is_skip_link_default(virtualNode.actualNode) && get_element_by_reference_default(virtualNode.actualNode, 'href') || !is_visible_default(node, true)) {
18003
18080
  var vNode = virtualNode;
18004
18081
  while (vNode) {
18005
18082
  vNode._hasRegionDescendant = true;
@@ -18012,8 +18089,8 @@
18012
18089
  } else if (node !== document.body && has_content_default(node, true)) {
18013
18090
  return [ virtualNode ];
18014
18091
  } else {
18015
- return virtualNode.children.filter(function(_ref69) {
18016
- var actualNode = _ref69.actualNode;
18092
+ return virtualNode.children.filter(function(_ref70) {
18093
+ var actualNode = _ref70.actualNode;
18017
18094
  return actualNode.nodeType === 1;
18018
18095
  }).map(function(vNode) {
18019
18096
  return findRegionlessElms(vNode, options);
@@ -18196,8 +18273,8 @@
18196
18273
  if (!virtualNode.children) {
18197
18274
  return void 0;
18198
18275
  }
18199
- var titleNode = virtualNode.children.find(function(_ref70) {
18200
- var props = _ref70.props;
18276
+ var titleNode = virtualNode.children.find(function(_ref71) {
18277
+ var props = _ref71.props;
18201
18278
  return props.nodeName === 'title';
18202
18279
  });
18203
18280
  if (!titleNode) {
@@ -18220,8 +18297,8 @@
18220
18297
  }
18221
18298
  var svg_non_empty_title_evaluate_default = svgNonEmptyTitleEvaluate;
18222
18299
  function cssOrientationLockEvaluate(node, options, virtualNode, context5) {
18223
- var _ref71 = context5 || {}, _ref71$cssom = _ref71.cssom, cssom = _ref71$cssom === void 0 ? void 0 : _ref71$cssom;
18224
- var _ref72 = options || {}, _ref72$degreeThreshol = _ref72.degreeThreshold, degreeThreshold = _ref72$degreeThreshol === void 0 ? 0 : _ref72$degreeThreshol;
18300
+ var _ref72 = context5 || {}, _ref72$cssom = _ref72.cssom, cssom = _ref72$cssom === void 0 ? void 0 : _ref72$cssom;
18301
+ var _ref73 = options || {}, _ref73$degreeThreshol = _ref73.degreeThreshold, degreeThreshold = _ref73$degreeThreshol === void 0 ? 0 : _ref73$degreeThreshol;
18225
18302
  if (!cssom || !cssom.length) {
18226
18303
  return void 0;
18227
18304
  }
@@ -18229,14 +18306,14 @@
18229
18306
  var relatedElements = [];
18230
18307
  var rulesGroupByDocumentFragment = groupCssomByDocument(cssom);
18231
18308
  var _loop6 = function _loop6() {
18232
- var key = _Object$keys2[_i20];
18309
+ var key = _Object$keys2[_i21];
18233
18310
  var _rulesGroupByDocument = rulesGroupByDocumentFragment[key], root = _rulesGroupByDocument.root, rules = _rulesGroupByDocument.rules;
18234
18311
  var orientationRules = rules.filter(isMediaRuleWithOrientation);
18235
18312
  if (!orientationRules.length) {
18236
18313
  return 'continue';
18237
18314
  }
18238
- orientationRules.forEach(function(_ref73) {
18239
- var cssRules = _ref73.cssRules;
18315
+ orientationRules.forEach(function(_ref74) {
18316
+ var cssRules = _ref74.cssRules;
18240
18317
  Array.from(cssRules).forEach(function(cssRule) {
18241
18318
  var locked = getIsOrientationLocked(cssRule);
18242
18319
  if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
@@ -18247,7 +18324,7 @@
18247
18324
  });
18248
18325
  });
18249
18326
  };
18250
- for (var _i20 = 0, _Object$keys2 = Object.keys(rulesGroupByDocumentFragment); _i20 < _Object$keys2.length; _i20++) {
18327
+ for (var _i21 = 0, _Object$keys2 = Object.keys(rulesGroupByDocumentFragment); _i21 < _Object$keys2.length; _i21++) {
18251
18328
  var _ret3 = _loop6();
18252
18329
  if (_ret3 === 'continue') {
18253
18330
  continue;
@@ -18261,8 +18338,8 @@
18261
18338
  }
18262
18339
  return false;
18263
18340
  function groupCssomByDocument(cssObjectModel) {
18264
- return cssObjectModel.reduce(function(out, _ref74) {
18265
- var sheet = _ref74.sheet, root = _ref74.root, shadowId = _ref74.shadowId;
18341
+ return cssObjectModel.reduce(function(out, _ref75) {
18342
+ var sheet = _ref75.sheet, root = _ref75.root, shadowId = _ref75.shadowId;
18266
18343
  var key = shadowId ? shadowId : 'topDocument';
18267
18344
  if (!out[key]) {
18268
18345
  out[key] = {
@@ -18278,15 +18355,15 @@
18278
18355
  return out;
18279
18356
  }, {});
18280
18357
  }
18281
- function isMediaRuleWithOrientation(_ref75) {
18282
- var type = _ref75.type, cssText = _ref75.cssText;
18358
+ function isMediaRuleWithOrientation(_ref76) {
18359
+ var type = _ref76.type, cssText = _ref76.cssText;
18283
18360
  if (type !== 4) {
18284
18361
  return false;
18285
18362
  }
18286
18363
  return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
18287
18364
  }
18288
- function getIsOrientationLocked(_ref76) {
18289
- var selectorText = _ref76.selectorText, style = _ref76.style;
18365
+ function getIsOrientationLocked(_ref77) {
18366
+ var selectorText = _ref77.selectorText, style = _ref77.style;
18290
18367
  if (!selectorText || style.length <= 0) {
18291
18368
  return false;
18292
18369
  }
@@ -18333,7 +18410,7 @@
18333
18410
  }
18334
18411
  }
18335
18412
  function getAngleInDegrees(angleWithUnit) {
18336
- var _ref77 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref78 = _slicedToArray(_ref77, 1), unit = _ref78[0];
18413
+ var _ref78 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref79 = _slicedToArray(_ref78, 1), unit = _ref79[0];
18337
18414
  if (!unit) {
18338
18415
  return;
18339
18416
  }
@@ -18382,7 +18459,7 @@
18382
18459
  }
18383
18460
  var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
18384
18461
  function metaViewportScaleEvaluate(node, options, virtualNode) {
18385
- var _ref79 = options || {}, _ref79$scaleMinimum = _ref79.scaleMinimum, scaleMinimum = _ref79$scaleMinimum === void 0 ? 2 : _ref79$scaleMinimum, _ref79$lowerBound = _ref79.lowerBound, lowerBound = _ref79$lowerBound === void 0 ? false : _ref79$lowerBound;
18462
+ var _ref80 = options || {}, _ref80$scaleMinimum = _ref80.scaleMinimum, scaleMinimum = _ref80$scaleMinimum === void 0 ? 2 : _ref80$scaleMinimum, _ref80$lowerBound = _ref80.lowerBound, lowerBound = _ref80$lowerBound === void 0 ? false : _ref80$lowerBound;
18386
18463
  var content = virtualNode.attr('content') || '';
18387
18464
  if (!content) {
18388
18465
  return true;
@@ -18498,8 +18575,8 @@
18498
18575
  if (!tabbableElements || !tabbableElements.length) {
18499
18576
  return true;
18500
18577
  }
18501
- var relatedNodes = tabbableElements.reduce(function(out, _ref80) {
18502
- var el = _ref80.actualNode;
18578
+ var relatedNodes = tabbableElements.reduce(function(out, _ref81) {
18579
+ var el = _ref81.actualNode;
18503
18580
  var nodeName2 = el.nodeName.toUpperCase();
18504
18581
  if (elementsThatCanBeDisabled.includes(nodeName2)) {
18505
18582
  out.push(el);
@@ -18538,8 +18615,8 @@
18538
18615
  }
18539
18616
  var focusable_element_evaluate_default = focusableElementEvaluate;
18540
18617
  function focusableModalOpenEvaluate(node, options, virtualNode) {
18541
- var tabbableElements = virtualNode.tabbableElements.map(function(_ref81) {
18542
- var actualNode = _ref81.actualNode;
18618
+ var tabbableElements = virtualNode.tabbableElements.map(function(_ref82) {
18619
+ var actualNode = _ref82.actualNode;
18543
18620
  return actualNode;
18544
18621
  });
18545
18622
  if (!tabbableElements || !tabbableElements.length) {
@@ -18571,8 +18648,8 @@
18571
18648
  if (!tabbableElements || !tabbableElements.length) {
18572
18649
  return true;
18573
18650
  }
18574
- var relatedNodes = tabbableElements.reduce(function(out, _ref82) {
18575
- var el = _ref82.actualNode;
18651
+ var relatedNodes = tabbableElements.reduce(function(out, _ref83) {
18652
+ var el = _ref83.actualNode;
18576
18653
  var nodeName2 = el.nodeName.toUpperCase();
18577
18654
  if (!elementsThatCanBeDisabled.includes(nodeName2)) {
18578
18655
  out.push(el);
@@ -18620,7 +18697,7 @@
18620
18697
  return focusableDescendants(child);
18621
18698
  });
18622
18699
  }
18623
- function noFocusbleContentEvaluate(node, options, virtualNode) {
18700
+ function frameFocusableContentEvaluate(node, options, virtualNode) {
18624
18701
  if (!virtualNode.children) {
18625
18702
  return void 0;
18626
18703
  }
@@ -18632,7 +18709,51 @@
18632
18709
  return void 0;
18633
18710
  }
18634
18711
  }
18635
- var no_focusable_content_evaluate_default = noFocusbleContentEvaluate;
18712
+ var frame_focusable_content_evaluate_default = frameFocusableContentEvaluate;
18713
+ function noFocusableContentEvaluate(node, options, virtualNode) {
18714
+ if (!virtualNode.children) {
18715
+ return void 0;
18716
+ }
18717
+ try {
18718
+ var focusableDescendants2 = getFocusableDescendants(virtualNode);
18719
+ if (!focusableDescendants2.length) {
18720
+ return true;
18721
+ }
18722
+ var notHiddenElements = focusableDescendants2.filter(usesUnreliableHidingStrategy);
18723
+ if (notHiddenElements.length > 0) {
18724
+ this.data({
18725
+ messageKey: 'notHidden'
18726
+ });
18727
+ this.relatedNodes(notHiddenElements);
18728
+ } else {
18729
+ this.relatedNodes(focusableDescendants2);
18730
+ }
18731
+ return false;
18732
+ } catch (e) {
18733
+ return void 0;
18734
+ }
18735
+ }
18736
+ function getFocusableDescendants(vNode) {
18737
+ if (!vNode.children) {
18738
+ if (vNode.props.nodeType === 1) {
18739
+ throw new Error('Cannot determine children');
18740
+ }
18741
+ return [];
18742
+ }
18743
+ var retVal = [];
18744
+ vNode.children.forEach(function(child) {
18745
+ if (is_focusable_default(child)) {
18746
+ retVal.push(child);
18747
+ } else {
18748
+ retVal.push.apply(retVal, _toConsumableArray(getFocusableDescendants(child)));
18749
+ }
18750
+ });
18751
+ return retVal;
18752
+ }
18753
+ function usesUnreliableHidingStrategy(vNode) {
18754
+ var tabIndex = parseInt(vNode.attr('tabindex'), 10);
18755
+ return !isNaN(tabIndex) && tabIndex < 0;
18756
+ }
18636
18757
  function tabindexEvaluate(node, options, virtualNode) {
18637
18758
  var tabIndex = parseInt(virtualNode.attr('tabindex'), 10);
18638
18759
  return isNaN(tabIndex) ? true : tabIndex <= 0;
@@ -18754,7 +18875,7 @@
18754
18875
  return sanitize_default(noUnicodeStr);
18755
18876
  }
18756
18877
  function labelContentNameMismatchEvaluate(node, options, virtualNode) {
18757
- var _ref83 = options || {}, pixelThreshold = _ref83.pixelThreshold, occuranceThreshold = _ref83.occuranceThreshold;
18878
+ var _ref84 = options || {}, pixelThreshold = _ref84.pixelThreshold, occuranceThreshold = _ref84.occuranceThreshold;
18758
18879
  var accText = accessible_text_default(node).toLowerCase();
18759
18880
  if (is_human_interpretable_default(accText) < 1) {
18760
18881
  return void 0;
@@ -19119,11 +19240,11 @@
19119
19240
  }
19120
19241
  var no_autoplay_audio_evaluate_default = noAutoplayAudioEvaluate;
19121
19242
  function ariaAllowedAttrMatches(node, virtualNode) {
19122
- var aria46 = /^aria-/;
19243
+ var aria47 = /^aria-/;
19123
19244
  var attrs = virtualNode.attrNames;
19124
19245
  if (attrs.length) {
19125
- for (var _i21 = 0, l = attrs.length; _i21 < l; _i21++) {
19126
- if (aria46.test(attrs[_i21])) {
19246
+ for (var _i22 = 0, l = attrs.length; _i22 < l; _i22++) {
19247
+ if (aria47.test(attrs[_i22])) {
19127
19248
  return true;
19128
19249
  }
19129
19250
  }
@@ -19139,9 +19260,9 @@
19139
19260
  }
19140
19261
  var aria_allowed_role_matches_default = ariaAllowedRoleMatches;
19141
19262
  function ariaHasAttrMatches(node, virtualNode) {
19142
- var aria46 = /^aria-/;
19263
+ var aria47 = /^aria-/;
19143
19264
  return virtualNode.attrNames.some(function(attr) {
19144
- return aria46.test(attr);
19265
+ return aria47.test(attr);
19145
19266
  });
19146
19267
  }
19147
19268
  var aria_has_attr_matches_default = ariaHasAttrMatches;
@@ -19434,7 +19555,7 @@
19434
19555
  }
19435
19556
  function isLandmarkVirtual(virtualNode2) {
19436
19557
  var actualNode = virtualNode2.actualNode;
19437
- var landmarkRoles2 = get_aria_roles_by_type_default('landmark');
19558
+ var landmarkRoles3 = get_aria_roles_by_type_default('landmark');
19438
19559
  var role = get_role_default(actualNode);
19439
19560
  if (!role) {
19440
19561
  return false;
@@ -19447,7 +19568,7 @@
19447
19568
  var accessibleText2 = accessible_text_virtual_default(virtualNode2);
19448
19569
  return !!accessibleText2;
19449
19570
  }
19450
- return landmarkRoles2.indexOf(role) >= 0 || role === 'region';
19571
+ return landmarkRoles3.indexOf(role) >= 0 || role === 'region';
19451
19572
  }
19452
19573
  return isLandmarkVirtual(virtualNode) && is_visible_default(node, true);
19453
19574
  }
@@ -19504,7 +19625,7 @@
19504
19625
  if (!role || [ 'none', 'presentation' ].includes(role)) {
19505
19626
  return true;
19506
19627
  }
19507
- var _ref84 = aria_roles_default[role] || {}, accessibleNameRequired = _ref84.accessibleNameRequired;
19628
+ var _ref85 = aria_roles_default[role] || {}, accessibleNameRequired = _ref85.accessibleNameRequired;
19508
19629
  if (accessibleNameRequired || is_focusable_default(virtualNode)) {
19509
19630
  return true;
19510
19631
  }
@@ -19604,6 +19725,7 @@
19604
19725
  'aria-unsupported-attr-evaluate': aria_unsupported_attr_evaluate_default,
19605
19726
  'aria-valid-attr-evaluate': aria_valid_attr_evaluate_default,
19606
19727
  'aria-valid-attr-value-evaluate': aria_valid_attr_value_evaluate_default,
19728
+ 'deprecatedrole-evaluate': deprecatedroleEvaluate,
19607
19729
  'fallbackrole-evaluate': fallbackrole_evaluate_default,
19608
19730
  'has-global-aria-attribute-evaluate': has_global_aria_attribute_evaluate_default,
19609
19731
  'has-implicit-chromium-role-matches': has_implicit_chromium_role_matches_default,
@@ -19667,7 +19789,8 @@
19667
19789
  'focusable-no-name-evaluate': focusable_no_name_evaluate_default,
19668
19790
  'focusable-not-tabbable-evaluate': focusable_not_tabbable_evaluate_default,
19669
19791
  'landmark-is-top-level-evaluate': landmark_is_top_level_evaluate_default,
19670
- 'no-focusable-content-evaluate': no_focusable_content_evaluate_default,
19792
+ 'frame-focusable-content-evaluate': frame_focusable_content_evaluate_default,
19793
+ 'no-focusable-content-evaluate': noFocusableContentEvaluate,
19671
19794
  'tabindex-evaluate': tabindex_evaluate_default,
19672
19795
  'alt-space-value-evaluate': alt_space_value_evaluate_default,
19673
19796
  'duplicate-img-label-evaluate': duplicate_img_label_evaluate_default,
@@ -20319,8 +20442,8 @@
20319
20442
  lang: this.lang
20320
20443
  };
20321
20444
  var checkIDs = Object.keys(this.data.checks);
20322
- for (var _i22 = 0; _i22 < checkIDs.length; _i22++) {
20323
- var id = checkIDs[_i22];
20445
+ for (var _i23 = 0; _i23 < checkIDs.length; _i23++) {
20446
+ var id = checkIDs[_i23];
20324
20447
  var check4 = this.data.checks[id];
20325
20448
  var _check4$messages = check4.messages, pass = _check4$messages.pass, fail = _check4$messages.fail, incomplete = _check4$messages.incomplete;
20326
20449
  locale.checks[id] = {
@@ -20330,8 +20453,8 @@
20330
20453
  };
20331
20454
  }
20332
20455
  var ruleIDs = Object.keys(this.data.rules);
20333
- for (var _i23 = 0; _i23 < ruleIDs.length; _i23++) {
20334
- var _id = ruleIDs[_i23];
20456
+ for (var _i24 = 0; _i24 < ruleIDs.length; _i24++) {
20457
+ var _id = ruleIDs[_i24];
20335
20458
  var rule3 = this.data.rules[_id];
20336
20459
  var description = rule3.description, help = rule3.help;
20337
20460
  locale.rules[_id] = {
@@ -20340,8 +20463,8 @@
20340
20463
  };
20341
20464
  }
20342
20465
  var failureSummaries = Object.keys(this.data.failureSummaries);
20343
- for (var _i24 = 0; _i24 < failureSummaries.length; _i24++) {
20344
- var type = failureSummaries[_i24];
20466
+ for (var _i25 = 0; _i25 < failureSummaries.length; _i25++) {
20467
+ var type = failureSummaries[_i25];
20345
20468
  var failureSummary2 = this.data.failureSummaries[type];
20346
20469
  var failureMessage = failureSummary2.failureMessage;
20347
20470
  locale.failureSummaries[type] = {
@@ -20364,8 +20487,8 @@
20364
20487
  key: '_applyCheckLocale',
20365
20488
  value: function _applyCheckLocale(checks) {
20366
20489
  var keys = Object.keys(checks);
20367
- for (var _i25 = 0; _i25 < keys.length; _i25++) {
20368
- var id = keys[_i25];
20490
+ for (var _i26 = 0; _i26 < keys.length; _i26++) {
20491
+ var id = keys[_i26];
20369
20492
  if (!this.data.checks[id]) {
20370
20493
  throw new Error('Locale provided for unknown check: "'.concat(id, '"'));
20371
20494
  }
@@ -20376,8 +20499,8 @@
20376
20499
  key: '_applyRuleLocale',
20377
20500
  value: function _applyRuleLocale(rules) {
20378
20501
  var keys = Object.keys(rules);
20379
- for (var _i26 = 0; _i26 < keys.length; _i26++) {
20380
- var id = keys[_i26];
20502
+ for (var _i27 = 0; _i27 < keys.length; _i27++) {
20503
+ var id = keys[_i27];
20381
20504
  if (!this.data.rules[id]) {
20382
20505
  throw new Error('Locale provided for unknown rule: "'.concat(id, '"'));
20383
20506
  }
@@ -20388,8 +20511,8 @@
20388
20511
  key: '_applyFailureSummaries',
20389
20512
  value: function _applyFailureSummaries(messages) {
20390
20513
  var keys = Object.keys(messages);
20391
- for (var _i27 = 0; _i27 < keys.length; _i27++) {
20392
- var key = keys[_i27];
20514
+ for (var _i28 = 0; _i28 < keys.length; _i28++) {
20515
+ var key = keys[_i28];
20393
20516
  if (!this.data.failureSummaries[key]) {
20394
20517
  throw new Error('Locale provided for unknown failureMessage: "'.concat(key, '"'));
20395
20518
  }
@@ -20660,6 +20783,9 @@
20660
20783
  brand: this.brand,
20661
20784
  application: this.application
20662
20785
  };
20786
+ if (typeof branding === 'string') {
20787
+ this.application = branding;
20788
+ }
20663
20789
  if (branding && branding.hasOwnProperty('brand') && branding.brand && typeof branding.brand === 'string') {
20664
20790
  this.brand = branding.brand;
20665
20791
  }
@@ -20735,8 +20861,8 @@
20735
20861
  });
20736
20862
  };
20737
20863
  }
20738
- function getHelpUrl(_ref85, ruleId, version) {
20739
- var brand = _ref85.brand, application = _ref85.application, lang = _ref85.lang;
20864
+ function getHelpUrl(_ref86, ruleId, version) {
20865
+ var brand = _ref86.brand, application = _ref86.application, lang = _ref86.lang;
20740
20866
  return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
20741
20867
  }
20742
20868
  var audit_default = Audit;
@@ -21150,9 +21276,9 @@
21150
21276
  });
21151
21277
  }
21152
21278
  var run_virtual_rule_default = runVirtualRule;
21153
- function normalizeRunParams(_ref86) {
21154
- var _ref88, _options$reporter, _axe$_audit;
21155
- var _ref87 = _slicedToArray(_ref86, 3), context5 = _ref87[0], options = _ref87[1], callback = _ref87[2];
21279
+ function normalizeRunParams(_ref87) {
21280
+ var _ref89, _options$reporter, _axe$_audit;
21281
+ var _ref88 = _slicedToArray(_ref87, 3), context5 = _ref88[0], options = _ref88[1], callback = _ref88[2];
21156
21282
  var typeErr = new TypeError('axe.run arguments are invalid');
21157
21283
  if (!isContext(context5)) {
21158
21284
  if (callback !== void 0) {
@@ -21173,7 +21299,7 @@
21173
21299
  throw typeErr;
21174
21300
  }
21175
21301
  options = clone_default(options);
21176
- options.reporter = (_ref88 = (_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 && _ref88 !== void 0 ? _ref88 : 'v1';
21302
+ options.reporter = (_ref89 = (_options$reporter = options.reporter) !== null && _options$reporter !== void 0 ? _options$reporter : (_axe$_audit = axe._audit) === null || _axe$_audit === void 0 ? void 0 : _axe$_audit.reporter) !== null && _ref89 !== void 0 ? _ref89 : 'v1';
21177
21303
  return {
21178
21304
  context: context5,
21179
21305
  options: options,
@@ -21298,14 +21424,14 @@
21298
21424
  return new Promise(function(res, rej) {
21299
21425
  axe._audit.run(contextObj, options, res, rej);
21300
21426
  }).then(function(results) {
21301
- results = results.map(function(_ref89) {
21302
- var nodes = _ref89.nodes, result = _objectWithoutProperties(_ref89, _excluded8);
21427
+ results = results.map(function(_ref90) {
21428
+ var nodes = _ref90.nodes, result = _objectWithoutProperties(_ref90, _excluded8);
21303
21429
  return _extends({
21304
21430
  nodes: nodes.map(serializeNode)
21305
21431
  }, result);
21306
21432
  });
21307
- var frames = contextObj.frames.map(function(_ref90) {
21308
- var node = _ref90.node;
21433
+ var frames = contextObj.frames.map(function(_ref91) {
21434
+ var node = _ref91.node;
21309
21435
  return new dq_element_default(node, options).toJSON();
21310
21436
  });
21311
21437
  var environmentData;
@@ -21322,13 +21448,13 @@
21322
21448
  teardown_default();
21323
21449
  });
21324
21450
  }
21325
- function serializeNode(_ref91) {
21326
- var node = _ref91.node, nodeResult = _objectWithoutProperties(_ref91, _excluded9);
21451
+ function serializeNode(_ref92) {
21452
+ var node = _ref92.node, nodeResult = _objectWithoutProperties(_ref92, _excluded9);
21327
21453
  nodeResult.node = node.toJSON();
21328
- for (var _i28 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i28 < _arr2.length; _i28++) {
21329
- var type = _arr2[_i28];
21330
- nodeResult[type] = nodeResult[type].map(function(_ref92) {
21331
- var relatedNodes = _ref92.relatedNodes, checkResult = _objectWithoutProperties(_ref92, _excluded10);
21454
+ for (var _i29 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i29 < _arr2.length; _i29++) {
21455
+ var type = _arr2[_i29];
21456
+ nodeResult[type] = nodeResult[type].map(function(_ref93) {
21457
+ var relatedNodes = _ref93.relatedNodes, checkResult = _objectWithoutProperties(_ref93, _excluded10);
21332
21458
  return _extends({}, checkResult, {
21333
21459
  relatedNodes: relatedNodes.map(function(node2) {
21334
21460
  return node2.toJSON();
@@ -21339,14 +21465,14 @@
21339
21465
  return nodeResult;
21340
21466
  }
21341
21467
  function finishRun(partialResults) {
21342
- var _ref94, _options$reporter2, _axe$_audit2;
21468
+ var _ref95, _options$reporter2, _axe$_audit2;
21343
21469
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
21344
21470
  options = clone_default(options);
21345
- var _ref93 = partialResults.find(function(r) {
21471
+ var _ref94 = partialResults.find(function(r) {
21346
21472
  return r.environmentData;
21347
- }) || {}, environmentData = _ref93.environmentData;
21473
+ }) || {}, environmentData = _ref94.environmentData;
21348
21474
  axe._audit.normalizeOptions(options);
21349
- options.reporter = (_ref94 = (_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 && _ref94 !== void 0 ? _ref94 : 'v1';
21475
+ options.reporter = (_ref95 = (_options$reporter2 = options.reporter) !== null && _options$reporter2 !== void 0 ? _options$reporter2 : (_axe$_audit2 = axe._audit) === null || _axe$_audit2 === void 0 ? void 0 : _axe$_audit2.reporter) !== null && _ref95 !== void 0 ? _ref95 : 'v1';
21350
21476
  setFrameSpec(partialResults);
21351
21477
  var results = merge_results_default(partialResults);
21352
21478
  results = axe._audit.after(results, options);
@@ -21376,8 +21502,8 @@
21376
21502
  _iterator4.f();
21377
21503
  }
21378
21504
  }
21379
- function getMergedFrameSpecs(_ref95) {
21380
- var childFrameSpecs = _ref95.frames, parentFrameSpec = _ref95.frameSpec;
21505
+ function getMergedFrameSpecs(_ref96) {
21506
+ var childFrameSpecs = _ref96.frames, parentFrameSpec = _ref96.frameSpec;
21381
21507
  if (!parentFrameSpec) {
21382
21508
  return childFrameSpecs;
21383
21509
  }
@@ -21437,12 +21563,12 @@
21437
21563
  var transformedResults = results.map(function(result) {
21438
21564
  var transformedResult = _extends({}, result);
21439
21565
  var types = [ 'passes', 'violations', 'incomplete', 'inapplicable' ];
21440
- for (var _i29 = 0, _types = types; _i29 < _types.length; _i29++) {
21441
- var type = _types[_i29];
21566
+ for (var _i30 = 0, _types = types; _i30 < _types.length; _i30++) {
21567
+ var type = _types[_i30];
21442
21568
  if (transformedResult[type] && Array.isArray(transformedResult[type])) {
21443
- transformedResult[type] = transformedResult[type].map(function(_ref96) {
21569
+ transformedResult[type] = transformedResult[type].map(function(_ref97) {
21444
21570
  var _node;
21445
- var node = _ref96.node, typeResult = _objectWithoutProperties(_ref96, _excluded13);
21571
+ var node = _ref97.node, typeResult = _objectWithoutProperties(_ref97, _excluded13);
21446
21572
  node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
21447
21573
  return _extends({
21448
21574
  node: node
@@ -21850,7 +21976,7 @@
21850
21976
  help: 'Zooming and scaling should not be disabled'
21851
21977
  },
21852
21978
  'nested-interactive': {
21853
- description: 'Ensure controls are not nested as they are not announced by screen readers',
21979
+ description: 'Ensures interactive controls are not nested as they are not always announced by screen readers or can cause focus problems for assistive technologies',
21854
21980
  help: 'Interactive controls must not be nested'
21855
21981
  },
21856
21982
  'no-autoplay-audio': {
@@ -22085,6 +22211,13 @@
22085
22211
  }
22086
22212
  }
22087
22213
  },
22214
+ deprecatedrole: {
22215
+ impact: 'minor',
22216
+ messages: {
22217
+ pass: 'ARIA role is not deprecated',
22218
+ fail: 'The role used is deprecated: ${data.values}'
22219
+ }
22220
+ },
22088
22221
  fallbackrole: {
22089
22222
  impact: 'serious',
22090
22223
  messages: {
@@ -22272,7 +22405,10 @@
22272
22405
  impact: 'serious',
22273
22406
  messages: {
22274
22407
  pass: 'Element does not have focusable descendants',
22275
- fail: 'Element has focusable descendants',
22408
+ fail: {
22409
+ default: 'Element has focusable descendants',
22410
+ notHidden: 'Using a negative tabindex on an element inside an interactive control does not prevent assistive technologies from focusing the element (even with \'aria-hidden=true\')'
22411
+ },
22276
22412
  incomplete: 'Could not determine if element has descendants'
22277
22413
  }
22278
22414
  },
@@ -23043,7 +23179,7 @@
23043
23179
  tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
23044
23180
  all: [],
23045
23181
  any: [],
23046
- none: [ 'fallbackrole', 'invalidrole', 'abstractrole', 'unsupportedrole' ]
23182
+ none: [ 'fallbackrole', 'invalidrole', 'abstractrole', 'unsupportedrole', 'deprecatedrole' ]
23047
23183
  }, {
23048
23184
  id: 'aria-text',
23049
23185
  selector: '[role=text]',
@@ -23126,7 +23262,12 @@
23126
23262
  matches: 'autocomplete-matches',
23127
23263
  tags: [ 'cat.forms', 'wcag21aa', 'wcag135' ],
23128
23264
  actIds: [ '73f2c2' ],
23129
- all: [ 'autocomplete-valid' ],
23265
+ all: [ {
23266
+ options: {
23267
+ stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null' ]
23268
+ },
23269
+ id: 'autocomplete-valid'
23270
+ } ],
23130
23271
  any: [],
23131
23272
  none: []
23132
23273
  }, {
@@ -24007,6 +24148,9 @@
24007
24148
  id: 'aria-valid-attr',
24008
24149
  evaluate: 'aria-valid-attr-evaluate',
24009
24150
  options: []
24151
+ }, {
24152
+ id: 'deprecatedrole',
24153
+ evaluate: 'deprecatedrole-evaluate'
24010
24154
  }, {
24011
24155
  id: 'fallbackrole',
24012
24156
  evaluate: 'fallbackrole-evaluate'
@@ -24065,7 +24209,10 @@
24065
24209
  deprecated: true
24066
24210
  }, {
24067
24211
  id: 'autocomplete-valid',
24068
- evaluate: 'autocomplete-valid-evaluate'
24212
+ evaluate: 'autocomplete-valid-evaluate',
24213
+ options: {
24214
+ stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null' ]
24215
+ }
24069
24216
  }, {
24070
24217
  id: 'accesskeys',
24071
24218
  evaluate: 'accesskeys-evaluate',
@@ -24090,7 +24237,7 @@
24090
24237
  evaluate: 'focusable-not-tabbable-evaluate'
24091
24238
  }, {
24092
24239
  id: 'frame-focusable-content',
24093
- evaluate: 'no-focusable-content-evaluate'
24240
+ evaluate: 'frame-focusable-content-evaluate'
24094
24241
  }, {
24095
24242
  id: 'landmark-is-top-level',
24096
24243
  evaluate: 'landmark-is-top-level-evaluate'