axe-core 4.3.5 → 4.4.0-canary.30ebc27

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,5 +1,5 @@
1
- /*! axe v4.3.5
2
- * Copyright (c) 2021 Deque Systems, Inc.
1
+ /*! axe v4.4.0-canary.30ebc27
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
5
5
  * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -15,19 +15,14 @@
15
15
  'use strict';
16
16
  function _typeof(obj) {
17
17
  '@babel/helpers - typeof';
18
- if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
19
- _typeof = function _typeof(obj) {
20
- return typeof obj;
21
- };
22
- } else {
23
- _typeof = function _typeof(obj) {
24
- return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
25
- };
26
- }
27
- return _typeof(obj);
18
+ return _typeof = 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator ? function(obj) {
19
+ return typeof obj;
20
+ } : function(obj) {
21
+ return obj && 'function' == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
22
+ }, _typeof(obj);
28
23
  }
29
24
  var axe = axe || {};
30
- axe.version = '4.3.5';
25
+ axe.version = '4.4.0-canary.30ebc27';
31
26
  if (typeof define === 'function' && define.amd) {
32
27
  define('axe-core', [], function() {
33
28
  return axe;
@@ -79,6 +74,9 @@
79
74
  configurable: true
80
75
  }
81
76
  });
77
+ Object.defineProperty(subClass, 'prototype', {
78
+ writable: false
79
+ });
82
80
  if (superClass) {
83
81
  _setPrototypeOf(subClass, superClass);
84
82
  }
@@ -106,6 +104,8 @@
106
104
  function _possibleConstructorReturn(self, call) {
107
105
  if (call && (_typeof(call) === 'object' || typeof call === 'function')) {
108
106
  return call;
107
+ } else if (call !== void 0) {
108
+ throw new TypeError('Derived constructors may only return object or undefined');
109
109
  }
110
110
  return _assertThisInitialized(self);
111
111
  }
@@ -271,6 +271,9 @@
271
271
  if (staticProps) {
272
272
  _defineProperties(Constructor, staticProps);
273
273
  }
274
+ Object.defineProperty(Constructor, 'prototype', {
275
+ writable: false
276
+ });
274
277
  return Constructor;
275
278
  }
276
279
  function _createForOfIteratorHelper(o, allowArrayLike) {
@@ -359,16 +362,11 @@
359
362
  }
360
363
  function _typeof(obj) {
361
364
  '@babel/helpers - typeof';
362
- if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
363
- _typeof = function _typeof(obj) {
364
- return typeof obj;
365
- };
366
- } else {
367
- _typeof = function _typeof(obj) {
368
- return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
369
- };
370
- }
371
- return _typeof(obj);
365
+ return _typeof = 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator ? function(obj) {
366
+ return typeof obj;
367
+ } : function(obj) {
368
+ return obj && 'function' == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
369
+ }, _typeof(obj);
372
370
  }
373
371
  (function() {
374
372
  var __create = Object.create;
@@ -4640,7 +4638,7 @@
4640
4638
  }
4641
4639
  };
4642
4640
  _ctor.prototype.subarray = function(start, end) {
4643
- function clamp(v, min2, max) {
4641
+ function clamp2(v, min2, max) {
4644
4642
  return v < min2 ? min2 : v > max ? max : v;
4645
4643
  }
4646
4644
  start = ECMAScript.ToInt32(start);
@@ -4657,8 +4655,8 @@
4657
4655
  if (end < 0) {
4658
4656
  end = this.length + end;
4659
4657
  }
4660
- start = clamp(start, 0, this.length);
4661
- end = clamp(end, 0, this.length);
4658
+ start = clamp2(start, 0, this.length);
4659
+ end = clamp2(end, 0, this.length);
4662
4660
  var len = end - start;
4663
4661
  if (len < 0) {
4664
4662
  len = 0;
@@ -5002,7 +5000,7 @@
5002
5000
  return _collectResultsFromFrames;
5003
5001
  },
5004
5002
  contains: function contains() {
5005
- return contains_default;
5003
+ return _contains;
5006
5004
  },
5007
5005
  convertSelector: function convertSelector() {
5008
5006
  return _convertSelector;
@@ -5071,7 +5069,7 @@
5071
5069
  return get_rule_default;
5072
5070
  },
5073
5071
  getScroll: function getScroll() {
5074
- return get_scroll_default;
5072
+ return _getScroll;
5075
5073
  },
5076
5074
  getScrollState: function getScrollState() {
5077
5075
  return get_scroll_state_default;
@@ -5185,7 +5183,7 @@
5185
5183
  return select_default;
5186
5184
  },
5187
5185
  sendCommandToFrame: function sendCommandToFrame() {
5188
- return send_command_to_frame_default;
5186
+ return _sendCommandToFrame;
5189
5187
  },
5190
5188
  setScrollState: function setScrollState() {
5191
5189
  return set_scroll_state_default;
@@ -5257,7 +5255,7 @@
5257
5255
  };
5258
5256
  }
5259
5257
  function isRespondableMessage(postedMessage) {
5260
- return _typeof(postedMessage) === 'object' && typeof postedMessage.channelId === 'string' && postedMessage.source === getSource();
5258
+ return postedMessage !== null && _typeof(postedMessage) === 'object' && typeof postedMessage.channelId === 'string' && postedMessage.source === getSource();
5261
5259
  }
5262
5260
  function buildErrorObject(error) {
5263
5261
  var msg = error.message || 'Unknown error occurred';
@@ -5321,14 +5319,6 @@
5321
5319
  return _rnds8;
5322
5320
  };
5323
5321
  }
5324
- try {
5325
- if (!_rng) {
5326
- var nodeCrypto = require('crypto');
5327
- _rng = function _rng() {
5328
- return nodeCrypto.randomBytes(16);
5329
- };
5330
- }
5331
- } catch (e) {}
5332
5322
  if (!_rng) {
5333
5323
  var _rnds = new Array(16);
5334
5324
  _rng = function _rng() {
@@ -5511,25 +5501,30 @@
5511
5501
  }
5512
5502
  function messageHandler(_ref2, topicHandler) {
5513
5503
  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
5504
  try {
5524
- if (data2.topic) {
5525
- var responder = createResponder(win, channelId);
5526
- assertIsParentWindow(win);
5527
- topicHandler(data2, responder);
5528
- } else {
5529
- callReplyHandler(win, data2);
5505
+ var data2 = parseMessage(dataString) || {};
5506
+ var channelId = data2.channelId, message = data2.message, messageId = data2.messageId;
5507
+ if (!originIsAllowed(origin) || !isNewMessage(messageId)) {
5508
+ return;
5509
+ }
5510
+ if (message instanceof Error && win.parent !== window) {
5511
+ axe.log(message);
5512
+ return false;
5513
+ }
5514
+ try {
5515
+ if (data2.topic) {
5516
+ var responder = createResponder(win, channelId);
5517
+ assertIsParentWindow(win);
5518
+ topicHandler(data2, responder);
5519
+ } else {
5520
+ callReplyHandler(win, data2);
5521
+ }
5522
+ } catch (error) {
5523
+ processError(win, error, channelId);
5530
5524
  }
5531
5525
  } catch (error) {
5532
- processError(win, error, channelId);
5526
+ axe.log(error);
5527
+ return false;
5533
5528
  }
5534
5529
  }
5535
5530
  function callReplyHandler(win, data2) {
@@ -5945,23 +5940,23 @@
5945
5940
  var xhtml;
5946
5941
  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
5942
  var MAXATTRIBUTELENGTH = 31;
5943
+ var attrCharsRegex = /([\\"])/g;
5944
+ var newlineChars = /(\r\n|\r|\n)/g;
5945
+ function escapeAttribute(str) {
5946
+ return str.replace(attrCharsRegex, '\\$1').replace(newlineChars, '\\a ');
5947
+ }
5948
5948
  function getAttributeNameValue(node, at) {
5949
5949
  var name = at.name;
5950
5950
  var atnv;
5951
5951
  if (name.indexOf('href') !== -1 || name.indexOf('src') !== -1) {
5952
5952
  var friendly = get_friendly_uri_end_default(node.getAttribute(name));
5953
5953
  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
- }
5954
+ atnv = escape_selector_default(at.name) + '$="' + escapeAttribute(friendly) + '"';
5960
5955
  } else {
5961
- atnv = escape_selector_default(at.name) + '="' + escape_selector_default(node.getAttribute(name)) + '"';
5956
+ atnv = escape_selector_default(at.name) + '="' + escapeAttribute(node.getAttribute(name)) + '"';
5962
5957
  }
5963
5958
  } else {
5964
- atnv = escape_selector_default(name) + '="' + escape_selector_default(at.value) + '"';
5959
+ atnv = escape_selector_default(name) + '="' + escapeAttribute(at.value) + '"';
5965
5960
  }
5966
5961
  return atnv;
5967
5962
  }
@@ -6365,7 +6360,15 @@
6365
6360
  checkResult.data = data2;
6366
6361
  },
6367
6362
  relatedNodes: function relatedNodes(nodes) {
6363
+ if (!window.Node) {
6364
+ return;
6365
+ }
6368
6366
  nodes = nodes instanceof window.Node ? [ nodes ] : to_array_default(nodes);
6367
+ if (!nodes.every(function(node) {
6368
+ return node instanceof window.Node || node.actualNode;
6369
+ })) {
6370
+ return;
6371
+ }
6369
6372
  checkResult.relatedNodes = nodes.map(function(element) {
6370
6373
  return new dq_element_default(element, options);
6371
6374
  });
@@ -6754,21 +6757,19 @@
6754
6757
  return !!win.frameElement;
6755
6758
  };
6756
6759
  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) {
6760
+ function _sendCommandToFrame(node, parameters, resolve, reject) {
6765
6761
  var _parameters$options$p, _parameters$options;
6766
6762
  var win = node.contentWindow;
6763
+ 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
6764
  if (!win) {
6768
6765
  log_default('Frame does not have a content window', node);
6769
6766
  resolve(null);
6770
6767
  return;
6771
6768
  }
6769
+ if (pingWaitTime === 0) {
6770
+ callAxeStart(node, parameters, resolve, reject);
6771
+ return;
6772
+ }
6772
6773
  var timeout = setTimeout(function() {
6773
6774
  timeout = setTimeout(function() {
6774
6775
  if (!parameters.debug) {
@@ -6777,24 +6778,35 @@
6777
6778
  reject(err('No response from frame', node));
6778
6779
  }
6779
6780
  }, 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);
6781
+ }, pingWaitTime);
6781
6782
  _respondable(win, 'axe.ping', null, void 0, function() {
6782
6783
  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
- });
6784
+ callAxeStart(node, parameters, resolve, reject);
6795
6785
  });
6796
6786
  }
6797
- var send_command_to_frame_default = sendCommandToFrame;
6787
+ function callAxeStart(node, parameters, resolve, reject) {
6788
+ var _parameters$options$f, _parameters$options2;
6789
+ 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;
6790
+ var win = node.contentWindow;
6791
+ var timeout = setTimeout(function collectResultFramesTimeout() {
6792
+ reject(err('Axe in frame timed out', node));
6793
+ }, frameWaitTime);
6794
+ _respondable(win, 'axe.start', parameters, void 0, function(data2) {
6795
+ clearTimeout(timeout);
6796
+ if (data2 instanceof Error === false) {
6797
+ resolve(data2);
6798
+ } else {
6799
+ reject(data2);
6800
+ }
6801
+ });
6802
+ }
6803
+ function err(message, node) {
6804
+ var selector;
6805
+ if (axe._tree) {
6806
+ selector = _getSelector(node);
6807
+ }
6808
+ return new Error(message + ': ' + (selector || node));
6809
+ }
6798
6810
  function getAllChecks(object) {
6799
6811
  var result = [];
6800
6812
  return result.concat(object.any || []).concat(object.all || []).concat(object.none || []);
@@ -6923,40 +6935,37 @@
6923
6935
  frameElement: frameElement
6924
6936
  });
6925
6937
  }
6926
- send_command_to_frame_default(frameElement, params, callback, rej);
6938
+ _sendCommandToFrame(frameElement, params, callback, rej);
6927
6939
  });
6928
6940
  });
6929
6941
  q.then(function(data2) {
6930
6942
  resolve(merge_results_default(data2, options));
6931
6943
  })['catch'](reject);
6932
6944
  }
6933
- function contains(vNode, otherVNode) {
6934
- function containsShadowChild(vNode2, otherVNode2) {
6935
- if (vNode2.shadowId === otherVNode2.shadowId) {
6936
- return true;
6937
- }
6938
- return !!vNode2.children.find(function(child) {
6939
- return containsShadowChild(child, otherVNode2);
6940
- });
6941
- }
6945
+ function _contains(vNode, otherVNode) {
6942
6946
  if (vNode.shadowId || otherVNode.shadowId) {
6943
- return containsShadowChild(vNode, otherVNode);
6947
+ do {
6948
+ if (vNode.shadowId === otherVNode.shadowId) {
6949
+ return true;
6950
+ }
6951
+ otherVNode = otherVNode.parent;
6952
+ } while (otherVNode);
6953
+ return false;
6944
6954
  }
6945
- if (vNode.actualNode) {
6946
- if (typeof vNode.actualNode.contains === 'function') {
6947
- return vNode.actualNode.contains(otherVNode.actualNode);
6948
- }
6949
- return !!(vNode.actualNode.compareDocumentPosition(otherVNode.actualNode) & 16);
6950
- } else {
6955
+ if (!vNode.actualNode) {
6951
6956
  do {
6952
6957
  if (otherVNode === vNode) {
6953
6958
  return true;
6954
6959
  }
6955
- } while (otherVNode = otherVNode && otherVNode.parent);
6960
+ otherVNode = otherVNode.parent;
6961
+ } while (otherVNode);
6956
6962
  }
6957
- return false;
6963
+ if (typeof vNode.actualNode.contains !== 'function') {
6964
+ var position = vNode.actualNode.compareDocumentPosition(otherVNode.actualNode);
6965
+ return !!(position & 16);
6966
+ }
6967
+ return vNode.actualNode.contains(otherVNode.actualNode);
6958
6968
  }
6959
- var contains_default = contains;
6960
6969
  function deepMerge() {
6961
6970
  var target = {};
6962
6971
  for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -7051,6 +7060,9 @@
7051
7060
  insertedIntoFocusOrder: function insertedIntoFocusOrder() {
7052
7061
  return inserted_into_focus_order_default;
7053
7062
  },
7063
+ isCurrentPageLink: function isCurrentPageLink() {
7064
+ return _isCurrentPageLink;
7065
+ },
7054
7066
  isFocusable: function isFocusable() {
7055
7067
  return is_focusable_default;
7056
7068
  },
@@ -7079,7 +7091,7 @@
7079
7091
  return is_opaque_default;
7080
7092
  },
7081
7093
  isSkipLink: function isSkipLink() {
7082
- return is_skip_link_default;
7094
+ return _isSkipLink;
7083
7095
  },
7084
7096
  isVisible: function isVisible() {
7085
7097
  return is_visible_default;
@@ -7167,15 +7179,51 @@
7167
7179
  return null;
7168
7180
  }
7169
7181
  var get_composed_parent_default = getComposedParent;
7182
+ var angularSkipLinkRegex = /^\/\#/;
7183
+ var angularRouterLinkRegex = /^#[!/]/;
7184
+ function _isCurrentPageLink(anchor) {
7185
+ var _window$location;
7186
+ var href = anchor.getAttribute('href');
7187
+ if (!href || href === '#') {
7188
+ return false;
7189
+ }
7190
+ if (angularSkipLinkRegex.test(href)) {
7191
+ return true;
7192
+ }
7193
+ var hash = anchor.hash, protocol = anchor.protocol, hostname = anchor.hostname, port = anchor.port, pathname = anchor.pathname;
7194
+ if (angularRouterLinkRegex.test(hash)) {
7195
+ return false;
7196
+ }
7197
+ if (href.charAt(0) === '#') {
7198
+ return true;
7199
+ }
7200
+ if (typeof ((_window$location = window.location) === null || _window$location === void 0 ? void 0 : _window$location.origin) !== 'string' || window.location.origin.indexOf('://') === -1) {
7201
+ return null;
7202
+ }
7203
+ var currentPageUrl = window.location.origin + window.location.pathname;
7204
+ var url;
7205
+ if (!hostname) {
7206
+ url = window.location.origin;
7207
+ } else {
7208
+ url = ''.concat(protocol, '//').concat(hostname).concat(port ? ':'.concat(port) : '');
7209
+ }
7210
+ if (!pathname) {
7211
+ url += window.location.pathname;
7212
+ } else {
7213
+ url += (pathname[0] !== '/' ? '/' : '') + pathname;
7214
+ }
7215
+ return url === currentPageUrl;
7216
+ }
7170
7217
  function getElementByReference(node, attr) {
7171
7218
  var fragment = node.getAttribute(attr);
7172
7219
  if (!fragment) {
7173
7220
  return null;
7174
7221
  }
7175
- if (fragment.charAt(0) === '#') {
7176
- fragment = decodeURIComponent(fragment.substring(1));
7177
- } else if (fragment.substr(0, 2) === '/#') {
7178
- fragment = decodeURIComponent(fragment.substring(2));
7222
+ if (attr === 'href' && !_isCurrentPageLink(node)) {
7223
+ return null;
7224
+ }
7225
+ if (fragment.indexOf('#') !== -1) {
7226
+ fragment = decodeURIComponent(fragment.substr(fragment.indexOf('#') + 1));
7179
7227
  }
7180
7228
  var candidate = document.getElementById(fragment);
7181
7229
  if (candidate) {
@@ -7377,7 +7425,7 @@
7377
7425
  }
7378
7426
  var elHeight = parseInt(style.getPropertyValue('height'));
7379
7427
  var elWidth = parseInt(style.getPropertyValue('width'));
7380
- var scroll = get_scroll_default(el);
7428
+ var scroll = _getScroll(el);
7381
7429
  var scrollableWithZeroHeight = scroll && elHeight === 0;
7382
7430
  var scrollableWithZeroWidth = scroll && elWidth === 0;
7383
7431
  var posAbsoluteOverflowHiddenAndSmall = style.getPropertyValue('position') === 'absolute' && (elHeight < 2 || elWidth < 2) && style.getPropertyValue('overflow') === 'hidden';
@@ -7413,7 +7461,7 @@
7413
7461
  }
7414
7462
  vNode._stackingOrder = [ 0 ];
7415
7463
  addNodeToGrid(rootGrid, vNode);
7416
- if (get_scroll_default(vNode.actualNode)) {
7464
+ if (_getScroll(vNode.actualNode)) {
7417
7465
  var subGrid = {
7418
7466
  container: vNode,
7419
7467
  cells: []
@@ -7436,7 +7484,7 @@
7436
7484
  _vNode._stackingOrder = getStackingOrder(_vNode, parentVNode);
7437
7485
  var scrollRegionParent = findScrollRegionParent(_vNode, parentVNode);
7438
7486
  var grid = scrollRegionParent ? scrollRegionParent._subGrid : rootGrid;
7439
- if (get_scroll_default(_vNode.actualNode)) {
7487
+ if (_getScroll(_vNode.actualNode)) {
7440
7488
  var _subGrid = {
7441
7489
  container: _vNode,
7442
7490
  cells: []
@@ -7652,7 +7700,7 @@
7652
7700
  var scrollRegionParent = null;
7653
7701
  var checkedNodes = [ vNode ];
7654
7702
  while (parentVNode) {
7655
- if (get_scroll_default(parentVNode.actualNode)) {
7703
+ if (_getScroll(parentVNode.actualNode)) {
7656
7704
  scrollRegionParent = parentVNode;
7657
7705
  break;
7658
7706
  }
@@ -8474,6 +8522,11 @@
8474
8522
  allowedAttrs: [ 'aria-expanded' ],
8475
8523
  superclassRole: [ 'landmark' ]
8476
8524
  },
8525
+ comment: {
8526
+ type: 'structure',
8527
+ allowedAttrs: [ 'aria-level', 'aria-posinset', 'aria-setsize' ],
8528
+ superclassRole: [ 'article' ]
8529
+ },
8477
8530
  definition: {
8478
8531
  type: 'structure',
8479
8532
  allowedAttrs: [ 'aria-expanded' ],
@@ -8664,6 +8717,11 @@
8664
8717
  accessibleNameRequired: true,
8665
8718
  childrenPresentational: true
8666
8719
  },
8720
+ mark: {
8721
+ type: 'structure',
8722
+ superclassRole: [ 'section' ],
8723
+ prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
8724
+ },
8667
8725
  navigation: {
8668
8726
  type: 'landmark',
8669
8727
  allowedAttrs: [ 'aria-expanded' ],
@@ -8843,6 +8901,12 @@
8843
8901
  nameFromContent: true,
8844
8902
  childrenPresentational: true
8845
8903
  },
8904
+ suggestion: {
8905
+ type: 'structure',
8906
+ requiredOwned: [ 'insertion', 'deletion' ],
8907
+ superclassRole: [ 'section' ],
8908
+ prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
8909
+ },
8846
8910
  tab: {
8847
8911
  type: 'widget',
8848
8912
  requiredContext: [ 'tablist' ],
@@ -8970,13 +9034,12 @@
8970
9034
  },
8971
9035
  'doc-biblioentry': {
8972
9036
  type: 'listitem',
8973
- requiredContext: [ 'doc-bibliography' ],
8974
9037
  allowedAttrs: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize' ],
8975
- superclassRole: [ 'listitem' ]
9038
+ superclassRole: [ 'listitem' ],
9039
+ deprecated: true
8976
9040
  },
8977
9041
  'doc-bibliography': {
8978
9042
  type: 'landmark',
8979
- requiredOwned: [ 'doc-biblioentry' ],
8980
9043
  allowedAttrs: [ 'aria-expanded' ],
8981
9044
  superclassRole: [ 'landmark' ]
8982
9045
  },
@@ -9023,15 +9086,14 @@
9023
9086
  },
9024
9087
  'doc-endnote': {
9025
9088
  type: 'listitem',
9026
- requiredContext: [ 'doc-endnotes' ],
9027
9089
  allowedAttrs: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize' ],
9028
9090
  superclassRole: [ 'listitem' ]
9029
9091
  },
9030
9092
  'doc-endnotes': {
9031
9093
  type: 'landmark',
9032
- requiredOwned: [ 'doc-endnote' ],
9033
9094
  allowedAttrs: [ 'aria-expanded' ],
9034
- superclassRole: [ 'landmark' ]
9095
+ superclassRole: [ 'landmark' ],
9096
+ deprecated: true
9035
9097
  },
9036
9098
  'doc-epigraph': {
9037
9099
  type: 'section',
@@ -9065,7 +9127,6 @@
9065
9127
  },
9066
9128
  'doc-glossary': {
9067
9129
  type: 'landmark',
9068
- requiredOwned: [ 'definition', 'term' ],
9069
9130
  allowedAttrs: [ 'aria-expanded' ],
9070
9131
  superclassRole: [ 'landmark' ]
9071
9132
  },
@@ -9191,8 +9252,16 @@
9191
9252
  allowedRoles: true
9192
9253
  },
9193
9254
  area: {
9255
+ variant: {
9256
+ href: {
9257
+ matches: '[href]',
9258
+ allowedRoles: false
9259
+ },
9260
+ default: {
9261
+ allowedRoles: [ 'button', 'link' ]
9262
+ }
9263
+ },
9194
9264
  contentTypes: [ 'phrasing', 'flow' ],
9195
- allowedRoles: false,
9196
9265
  namingMethods: [ 'altText' ]
9197
9266
  },
9198
9267
  article: {
@@ -9432,12 +9501,14 @@
9432
9501
  img: {
9433
9502
  variant: {
9434
9503
  nonEmptyAlt: {
9435
- matches: {
9504
+ matches: [ {
9436
9505
  attributes: {
9437
9506
  alt: '/.+/'
9438
9507
  }
9439
- },
9440
- allowedRoles: [ 'button', 'checkbox', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'scrollbar', 'separator', 'slider', 'switch', 'tab', 'treeitem', 'doc-cover' ]
9508
+ }, {
9509
+ hasAccessibleName: true
9510
+ } ],
9511
+ allowedRoles: [ 'button', 'checkbox', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'radio', 'scrollbar', 'separator', 'slider', 'switch', 'tab', 'treeitem', 'doc-cover' ]
9441
9512
  },
9442
9513
  usemap: {
9443
9514
  matches: '[usemap]',
@@ -9717,7 +9788,7 @@
9717
9788
  },
9718
9789
  section: {
9719
9790
  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' ],
9791
+ 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
9792
  shadowRoot: true
9722
9793
  },
9723
9794
  select: {
@@ -10189,16 +10260,21 @@
10189
10260
  return element_has_image_default(node, style) || get_own_background_color_default(style).alpha === 1;
10190
10261
  }
10191
10262
  var is_opaque_default = isOpaque;
10192
- var isInternalLinkRegex = /^\/?#[^/!]/;
10193
- function isSkipLink(element) {
10194
- if (!isInternalLinkRegex.test(element.getAttribute('href'))) {
10263
+ function _isSkipLink(element) {
10264
+ if (!element.href) {
10195
10265
  return false;
10196
10266
  }
10197
10267
  var firstPageLink;
10198
10268
  if (typeof cache_default.get('firstPageLink') !== 'undefined') {
10199
10269
  firstPageLink = cache_default.get('firstPageLink');
10200
10270
  } else {
10201
- firstPageLink = query_selector_all_default(axe._tree, 'a:not([href^="#"]):not([href^="/#"]):not([href^="javascript"])')[0];
10271
+ if (!window.location.origin) {
10272
+ firstPageLink = query_selector_all_default(axe._tree, 'a:not([href^="#"]):not([href^="/#"]):not([href^="javascript:"])')[0];
10273
+ } else {
10274
+ firstPageLink = query_selector_all_default(axe._tree, 'a[href]:not([href^="javascript:"])').find(function(link) {
10275
+ return !_isCurrentPageLink(link.actualNode);
10276
+ });
10277
+ }
10202
10278
  cache_default.set('firstPageLink', firstPageLink || null);
10203
10279
  }
10204
10280
  if (!firstPageLink) {
@@ -10206,7 +10282,6 @@
10206
10282
  }
10207
10283
  return element.compareDocumentPosition(firstPageLink.actualNode) === element.DOCUMENT_POSITION_FOLLOWING;
10208
10284
  }
10209
- var is_skip_link_default = isSkipLink;
10210
10285
  function reduceToElementsBelowFloating(elements, targetNode) {
10211
10286
  var floatingPositions = [ 'fixed', 'sticky' ];
10212
10287
  var finalElements = [];
@@ -10241,7 +10316,7 @@
10241
10316
  var vNode = get_node_from_tree_default(node);
10242
10317
  var ancestor = vNode.parent;
10243
10318
  while (ancestor) {
10244
- if (get_scroll_default(ancestor.actualNode)) {
10319
+ if (_getScroll(ancestor.actualNode)) {
10245
10320
  return ancestor.actualNode;
10246
10321
  }
10247
10322
  ancestor = ancestor.parent;
@@ -10624,9 +10699,15 @@
10624
10699
  }
10625
10700
  var failure_summary_default = failureSummary;
10626
10701
  function incompleteFallbackMessage() {
10627
- return typeof axe._audit.data.incompleteFallbackMessage === 'function' ? axe._audit.data.incompleteFallbackMessage() : axe._audit.data.incompleteFallbackMessage;
10702
+ var incompleteFallbackMessage2 = axe._audit.data.incompleteFallbackMessage;
10703
+ if (typeof incompleteFallbackMessage2 === 'function') {
10704
+ incompleteFallbackMessage2 = incompleteFallbackMessage2();
10705
+ }
10706
+ if (typeof incompleteFallbackMessage2 !== 'string') {
10707
+ return '';
10708
+ }
10709
+ return incompleteFallbackMessage2;
10628
10710
  }
10629
- var incomplete_fallback_msg_default = incompleteFallbackMessage;
10630
10711
  function normalizeRelatedNodes(node, options) {
10631
10712
  [ 'any', 'all', 'none' ].forEach(function(type) {
10632
10713
  if (!Array.isArray(node[type])) {
@@ -10706,7 +10787,7 @@
10706
10787
  axe._thisWillBeDeletedDoNotUse = axe._thisWillBeDeletedDoNotUse || {};
10707
10788
  axe._thisWillBeDeletedDoNotUse.helpers = {
10708
10789
  failureSummary: failure_summary_default,
10709
- incompleteFallbackMessage: incomplete_fallback_msg_default,
10790
+ incompleteFallbackMessage: incompleteFallbackMessage,
10710
10791
  processAggregate: process_aggregate_default
10711
10792
  };
10712
10793
  var dataRegex = /\$\{\s?data\s?\}/g;
@@ -10742,7 +10823,7 @@
10742
10823
  var _str = message[data2];
10743
10824
  return substitute(_str, data2);
10744
10825
  }
10745
- var str = message['default'] || incomplete_fallback_msg_default();
10826
+ var str = message['default'] || incompleteFallbackMessage();
10746
10827
  if (data2 && data2.messageKey && message[data2.messageKey]) {
10747
10828
  str = message[data2.messageKey];
10748
10829
  }
@@ -11017,6 +11098,10 @@
11017
11098
  this.include.sort(node_sorter_default);
11018
11099
  }
11019
11100
  function _getFrameContexts(context5) {
11101
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
11102
+ if (options.iframes === false) {
11103
+ return [];
11104
+ }
11020
11105
  var _Context = new Context(context5), frames = _Context.frames;
11021
11106
  return frames.map(function(_ref22) {
11022
11107
  var node = _ref22.node, frameContext = _objectWithoutProperties(_ref22, _excluded2);
@@ -11038,7 +11123,7 @@
11038
11123
  return rule3;
11039
11124
  }
11040
11125
  var get_rule_default = getRule;
11041
- function getScroll(elm) {
11126
+ function _getScroll(elm) {
11042
11127
  var buffer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
11043
11128
  var overflowX = elm.scrollWidth > elm.clientWidth + buffer;
11044
11129
  var overflowY = elm.scrollHeight > elm.clientHeight + buffer;
@@ -11046,10 +11131,8 @@
11046
11131
  return;
11047
11132
  }
11048
11133
  var style = window.getComputedStyle(elm);
11049
- var overflowXStyle = style.getPropertyValue('overflow-x');
11050
- var overflowYStyle = style.getPropertyValue('overflow-y');
11051
- var scrollableX = overflowXStyle !== 'visible' && overflowXStyle !== 'hidden';
11052
- var scrollableY = overflowYStyle !== 'visible' && overflowYStyle !== 'hidden';
11134
+ var scrollableX = isScrollable(style, 'overflow-x');
11135
+ var scrollableY = isScrollable(style, 'overflow-y');
11053
11136
  if (overflowX && scrollableX || overflowY && scrollableY) {
11054
11137
  return {
11055
11138
  elm: elm,
@@ -11058,10 +11141,13 @@
11058
11141
  };
11059
11142
  }
11060
11143
  }
11061
- var get_scroll_default = getScroll;
11144
+ function isScrollable(style, prop) {
11145
+ var overflowProp = style.getPropertyValue(prop);
11146
+ return [ 'scroll', 'auto' ].includes(overflowProp);
11147
+ }
11062
11148
  function getElmScrollRecursive(root) {
11063
11149
  return Array.from(root.children || root.childNodes || []).reduce(function(scrolls, elm) {
11064
- var scroll = get_scroll_default(elm);
11150
+ var scroll = _getScroll(elm);
11065
11151
  if (scroll) {
11066
11152
  scrolls.push(scroll);
11067
11153
  }
@@ -11169,7 +11255,7 @@
11169
11255
  var is_html_element_default = isHtmlElement;
11170
11256
  function getDeepest(collection) {
11171
11257
  return collection.sort(function(a, b) {
11172
- if (contains_default(a, b)) {
11258
+ if (_contains(a, b)) {
11173
11259
  return 1;
11174
11260
  }
11175
11261
  return -1;
@@ -11177,12 +11263,12 @@
11177
11263
  }
11178
11264
  function isNodeInContext(node, context5) {
11179
11265
  var include = context5.include && getDeepest(context5.include.filter(function(candidate) {
11180
- return contains_default(candidate, node);
11266
+ return _contains(candidate, node);
11181
11267
  }));
11182
11268
  var exclude = context5.exclude && getDeepest(context5.exclude.filter(function(candidate) {
11183
- return contains_default(candidate, node);
11269
+ return _contains(candidate, node);
11184
11270
  }));
11185
- if (!exclude && include || exclude && contains_default(exclude, include)) {
11271
+ if (!exclude && include || exclude && _contains(exclude, include)) {
11186
11272
  return true;
11187
11273
  }
11188
11274
  return false;
@@ -11923,7 +12009,7 @@
11923
12009
  if (messages2.incomplete && messages2.incomplete['default']) {
11924
12010
  return messages2.incomplete['default'];
11925
12011
  } else {
11926
- return incomplete_fallback_msg_default();
12012
+ return incompleteFallbackMessage();
11927
12013
  }
11928
12014
  }
11929
12015
  if (checkData && checkData.missingData) {
@@ -12081,9 +12167,9 @@
12081
12167
  }
12082
12168
  return result;
12083
12169
  }
12084
- function reduceIncludes(includes) {
12170
+ function getOuterIncludes(includes) {
12085
12171
  return includes.reduce(function(res, el) {
12086
- if (!res.length || !contains_default(res[res.length - 1], el)) {
12172
+ if (!res.length || !_contains(res[res.length - 1], el)) {
12087
12173
  res.push(el);
12088
12174
  }
12089
12175
  return res;
@@ -12100,15 +12186,12 @@
12100
12186
  }
12101
12187
  }
12102
12188
  }
12103
- var curried = function(context6) {
12104
- return function(node) {
12105
- return is_node_in_context_default(node, context6);
12106
- };
12107
- }(context5);
12108
- var reducedIncludes = reduceIncludes(context5.include);
12109
- for (var _i10 = 0; _i10 < reducedIncludes.length; _i10++) {
12110
- candidate = reducedIncludes[_i10];
12111
- result = pushNode(result, query_selector_all_filter_default(candidate, selector, curried));
12189
+ var outerIncludes = getOuterIncludes(context5.include);
12190
+ var isInContext = getContextFilter(context5);
12191
+ for (var _i10 = 0; _i10 < outerIncludes.length; _i10++) {
12192
+ candidate = outerIncludes[_i10];
12193
+ var nodes = query_selector_all_filter_default(candidate, selector, isInContext);
12194
+ result = pushNode(result, nodes);
12112
12195
  }
12113
12196
  if (axe._selectCache) {
12114
12197
  axe._selectCache.push({
@@ -12119,6 +12202,14 @@
12119
12202
  return result;
12120
12203
  }
12121
12204
  var select_default = select;
12205
+ function getContextFilter(context5) {
12206
+ if (!context5.exclude || context5.exclude.length === 0) {
12207
+ return null;
12208
+ }
12209
+ return function(node) {
12210
+ return is_node_in_context_default(node, context5);
12211
+ };
12212
+ }
12122
12213
  function setScroll(elm, top, left) {
12123
12214
  if (elm === window) {
12124
12215
  return elm.scroll(left, top);
@@ -12687,6 +12778,10 @@
12687
12778
  return matcher === someString;
12688
12779
  }
12689
12780
  var from_primative_default = fromPrimative;
12781
+ function hasAccessibleName2(vNode, matcher) {
12782
+ return from_primative_default(!!accessible_text_virtual_default(vNode), matcher);
12783
+ }
12784
+ var has_accessible_name_default = hasAccessibleName2;
12690
12785
  function fromFunction(getValue, matcher) {
12691
12786
  var matcherType = _typeof(matcher);
12692
12787
  if (matcherType !== 'object' || Array.isArray(matcher) || matcher instanceof RegExp) {
@@ -12739,6 +12834,7 @@
12739
12834
  }
12740
12835
  var semantic_role_default = semanticRole;
12741
12836
  var matchers = {
12837
+ hasAccessibleName: has_accessible_name_default,
12742
12838
  attributes: attributes_default,
12743
12839
  condition: condition_default,
12744
12840
  explicitRole: explicit_role_default,
@@ -12773,6 +12869,7 @@
12773
12869
  return from_definition_default(vNode, definition);
12774
12870
  }
12775
12871
  var matches_default2 = matches5;
12872
+ matches_default2.hasAccessibleName = has_accessible_name_default;
12776
12873
  matches_default2.attributes = attributes_default;
12777
12874
  matches_default2.condition = condition_default;
12778
12875
  matches_default2.explicitRole = explicit_role_default;
@@ -12785,6 +12882,7 @@
12785
12882
  matches_default2.semanticRole = semantic_role_default;
12786
12883
  var matches_default3 = matches_default2;
12787
12884
  function getElementSpec(vNode) {
12885
+ var _ref34 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref34$noMatchAccessi = _ref34.noMatchAccessibleName, noMatchAccessibleName = _ref34$noMatchAccessi === void 0 ? false : _ref34$noMatchAccessi;
12788
12886
  var standard = standards_default.htmlElms[vNode.props.nodeName];
12789
12887
  if (!standard) {
12790
12888
  return {};
@@ -12798,6 +12896,12 @@
12798
12896
  continue;
12799
12897
  }
12800
12898
  var _variant$variantName = variant[variantName], matches14 = _variant$variantName.matches, props = _objectWithoutProperties(_variant$variantName, _excluded4);
12899
+ var matchProperties = Array.isArray(matches14) ? matches14 : [ matches14 ];
12900
+ for (var _i12 = 0; _i12 < matchProperties.length && noMatchAccessibleName; _i12++) {
12901
+ if (matchProperties[_i12].hasOwnProperty('hasAccessibleName')) {
12902
+ return standard;
12903
+ }
12904
+ }
12801
12905
  if (matches_default3(vNode, matches14)) {
12802
12906
  for (var propName in props) {
12803
12907
  if (props.hasOwnProperty(propName)) {
@@ -12815,7 +12919,7 @@
12815
12919
  }
12816
12920
  var get_element_spec_default = getElementSpec;
12817
12921
  function implicitRole2(node) {
12818
- var _ref34 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref34.chromium;
12922
+ var _ref35 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref35.chromium;
12819
12923
  var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
12820
12924
  node = vNode.actualNode;
12821
12925
  if (!vNode) {
@@ -12865,8 +12969,8 @@
12865
12969
  }
12866
12970
  return getInheritedRole(vNode.parent, explicitRoleOptions);
12867
12971
  }
12868
- function resolveImplicitRole(vNode, _ref35) {
12869
- var chromium = _ref35.chromium, explicitRoleOptions = _objectWithoutProperties(_ref35, _excluded5);
12972
+ function resolveImplicitRole(vNode, _ref36) {
12973
+ var chromium = _ref36.chromium, explicitRoleOptions = _objectWithoutProperties(_ref36, _excluded5);
12870
12974
  var implicitRole3 = implicit_role_default(vNode, {
12871
12975
  chromium: chromium
12872
12976
  });
@@ -12886,8 +12990,8 @@
12886
12990
  return hasGlobalAria || is_focusable_default(vNode);
12887
12991
  }
12888
12992
  function resolveRole(node) {
12889
- var _ref36 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12890
- var noImplicit = _ref36.noImplicit, roleOptions = _objectWithoutProperties(_ref36, _excluded6);
12993
+ var _ref37 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12994
+ var noImplicit = _ref37.noImplicit, roleOptions = _objectWithoutProperties(_ref37, _excluded6);
12891
12995
  var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
12892
12996
  if (vNode.props.nodeType !== 1) {
12893
12997
  return null;
@@ -12905,8 +13009,8 @@
12905
13009
  return explicitRole2;
12906
13010
  }
12907
13011
  function getRole(node) {
12908
- var _ref37 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12909
- var noPresentational = _ref37.noPresentational, options = _objectWithoutProperties(_ref37, _excluded7);
13012
+ var _ref38 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13013
+ var noPresentational = _ref38.noPresentational, options = _objectWithoutProperties(_ref38, _excluded7);
12910
13014
  var role = resolveRole(node, options);
12911
13015
  if (noPresentational && [ 'presentation', 'none' ].includes(role)) {
12912
13016
  return null;
@@ -12927,7 +13031,7 @@
12927
13031
  }
12928
13032
  var title_text_default = titleText;
12929
13033
  function namedFromContents(vNode) {
12930
- var _ref38 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref38.strict;
13034
+ var _ref39 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref39.strict;
12931
13035
  vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
12932
13036
  if (vNode.props.nodeType !== 1) {
12933
13037
  return false;
@@ -12964,7 +13068,9 @@
12964
13068
  var alreadyProcessed2 = accessible_text_virtual_default.alreadyProcessed;
12965
13069
  context5.startNode = context5.startNode || virtualNode;
12966
13070
  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;
13071
+ var _get_element_spec_def2 = get_element_spec_default(virtualNode, {
13072
+ noMatchAccessibleName: true
13073
+ }), contentTypes = _get_element_spec_def2.contentTypes;
12968
13074
  if (alreadyProcessed2(virtualNode, context5) || virtualNode.props.nodeType !== 1 || contentTypes !== null && contentTypes !== void 0 && contentTypes.includes('embedded')) {
12969
13075
  return '';
12970
13076
  }
@@ -13050,12 +13156,12 @@
13050
13156
  button: ''
13051
13157
  };
13052
13158
  var nativeTextMethods = {
13053
- valueText: function valueText(_ref39) {
13054
- var actualNode = _ref39.actualNode;
13159
+ valueText: function valueText(_ref40) {
13160
+ var actualNode = _ref40.actualNode;
13055
13161
  return actualNode.value || '';
13056
13162
  },
13057
- buttonDefaultText: function buttonDefaultText(_ref40) {
13058
- var actualNode = _ref40.actualNode;
13163
+ buttonDefaultText: function buttonDefaultText(_ref41) {
13164
+ var actualNode = _ref41.actualNode;
13059
13165
  return defaultButtonValues[actualNode.type] || '';
13060
13166
  },
13061
13167
  tableCaptionText: descendantText.bind(null, 'caption'),
@@ -13075,8 +13181,8 @@
13075
13181
  function attrText(attr, vNode) {
13076
13182
  return vNode.attr(attr) || '';
13077
13183
  }
13078
- function descendantText(nodeName2, _ref41, context5) {
13079
- var actualNode = _ref41.actualNode;
13184
+ function descendantText(nodeName2, _ref42, context5) {
13185
+ var actualNode = _ref42.actualNode;
13080
13186
  nodeName2 = nodeName2.toLowerCase();
13081
13187
  var nodeNames2 = [ nodeName2, actualNode.nodeName.toLowerCase() ].join(',');
13082
13188
  var candidate = actualNode.querySelector(nodeNames2);
@@ -13102,7 +13208,9 @@
13102
13208
  return accName;
13103
13209
  }
13104
13210
  function findTextMethods(virtualNode) {
13105
- var elmSpec = get_element_spec_default(virtualNode);
13211
+ var elmSpec = get_element_spec_default(virtualNode, {
13212
+ noMatchAccessibleName: true
13213
+ });
13106
13214
  var methods = elmSpec.namingMethods || [];
13107
13215
  return methods.map(function(methodName) {
13108
13216
  return native_text_methods_default[methodName];
@@ -13242,6 +13350,115 @@
13242
13350
  return !isNaN(valueNow) ? String(valueNow) : '0';
13243
13351
  }
13244
13352
  var form_control_value_default = formControlValue;
13353
+ function getUnicodeNonBmpRegExp() {
13354
+ return /[\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u20A0-\u20CF\u20D0-\u20FF\u2100-\u214F\u2150-\u218F\u2190-\u21FF\u2200-\u22FF\u2300-\u23FF\u2400-\u243F\u2440-\u245F\u2460-\u24FF\u2500-\u257F\u2580-\u259F\u25A0-\u25FF\u2600-\u26FF\u2700-\u27BF\uE000-\uF8FF]/g;
13355
+ }
13356
+ function getPunctuationRegExp() {
13357
+ return /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&\xa3\xa2\xa5\xa7\u20ac()*+,\-.\/:;<=>?@\[\]^_`{|}~\xb1]/g;
13358
+ }
13359
+ function getSupplementaryPrivateUseRegExp() {
13360
+ return /[\uDB80-\uDBBF][\uDC00-\uDFFF]/g;
13361
+ }
13362
+ var emoji_regex = __toModule(require_emoji_regex());
13363
+ function hasUnicode(str, options) {
13364
+ var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations;
13365
+ if (emoji) {
13366
+ return emoji_regex['default']().test(str);
13367
+ }
13368
+ if (nonBmp) {
13369
+ return getUnicodeNonBmpRegExp().test(str) || getSupplementaryPrivateUseRegExp().test(str);
13370
+ }
13371
+ if (punctuations) {
13372
+ return getPunctuationRegExp().test(str);
13373
+ }
13374
+ return false;
13375
+ }
13376
+ var has_unicode_default = hasUnicode;
13377
+ function isIconLigature(textVNode) {
13378
+ var differenceThreshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .15;
13379
+ var occuranceThreshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
13380
+ var nodeValue = textVNode.actualNode.nodeValue.trim();
13381
+ if (!sanitize_default(nodeValue) || has_unicode_default(nodeValue, {
13382
+ emoji: true,
13383
+ nonBmp: true
13384
+ })) {
13385
+ return false;
13386
+ }
13387
+ if (!cache_default.get('canvasContext')) {
13388
+ cache_default.set('canvasContext', document.createElement('canvas').getContext('2d'));
13389
+ }
13390
+ var canvasContext = cache_default.get('canvasContext');
13391
+ var canvas = canvasContext.canvas;
13392
+ if (!cache_default.get('fonts')) {
13393
+ cache_default.set('fonts', {});
13394
+ }
13395
+ var fonts = cache_default.get('fonts');
13396
+ var style = window.getComputedStyle(textVNode.parent.actualNode);
13397
+ var fontFamily = style.getPropertyValue('font-family');
13398
+ if (!fonts[fontFamily]) {
13399
+ fonts[fontFamily] = {
13400
+ occurances: 0,
13401
+ numLigatures: 0
13402
+ };
13403
+ }
13404
+ var font = fonts[fontFamily];
13405
+ if (font.occurances >= occuranceThreshold) {
13406
+ if (font.numLigatures / font.occurances === 1) {
13407
+ return true;
13408
+ } else if (font.numLigatures === 0) {
13409
+ return false;
13410
+ }
13411
+ }
13412
+ font.occurances++;
13413
+ var fontSize = 30;
13414
+ var fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
13415
+ canvasContext.font = fontStyle;
13416
+ var firstChar = nodeValue.charAt(0);
13417
+ var width = canvasContext.measureText(firstChar).width;
13418
+ if (width < 30) {
13419
+ var diff = 30 / width;
13420
+ width *= diff;
13421
+ fontSize *= diff;
13422
+ fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
13423
+ }
13424
+ canvas.width = width;
13425
+ canvas.height = fontSize;
13426
+ canvasContext.font = fontStyle;
13427
+ canvasContext.textAlign = 'left';
13428
+ canvasContext.textBaseline = 'top';
13429
+ canvasContext.fillText(firstChar, 0, 0);
13430
+ var compareData = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
13431
+ if (!compareData.some(function(pixel) {
13432
+ return pixel;
13433
+ })) {
13434
+ font.numLigatures++;
13435
+ return true;
13436
+ }
13437
+ canvasContext.clearRect(0, 0, width, fontSize);
13438
+ canvasContext.fillText(nodeValue, 0, 0);
13439
+ var compareWith = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
13440
+ var differences = compareData.reduce(function(diff, pixel, i) {
13441
+ if (pixel === 0 && compareWith[i] === 0) {
13442
+ return diff;
13443
+ }
13444
+ if (pixel !== 0 && compareWith[i] !== 0) {
13445
+ return diff;
13446
+ }
13447
+ return ++diff;
13448
+ }, 0);
13449
+ var expectedWidth = nodeValue.split('').reduce(function(width2, _char3) {
13450
+ return width2 + canvasContext.measureText(_char3).width;
13451
+ }, 0);
13452
+ var actualWidth = canvasContext.measureText(nodeValue).width;
13453
+ var pixelDifference = differences / compareData.length;
13454
+ var sizeDifference = 1 - actualWidth / expectedWidth;
13455
+ if (pixelDifference >= differenceThreshold && sizeDifference >= differenceThreshold) {
13456
+ font.numLigatures++;
13457
+ return true;
13458
+ }
13459
+ return false;
13460
+ }
13461
+ var is_icon_ligature_default = isIconLigature;
13245
13462
  function accessibleTextVirtual(virtualNode) {
13246
13463
  var context5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13247
13464
  var actualNode = virtualNode.actualNode;
@@ -13249,6 +13466,9 @@
13249
13466
  if (shouldIgnoreHidden(virtualNode, context5)) {
13250
13467
  return '';
13251
13468
  }
13469
+ if (shouldIgnoreIconLigature(virtualNode, context5)) {
13470
+ return '';
13471
+ }
13252
13472
  var computationSteps = [ arialabelledby_text_default, arialabel_text_default, native_text_alternative_default, form_control_value_default, subtree_text_default, textNodeValue, title_text_default ];
13253
13473
  var accName = computationSteps.reduce(function(accName2, step) {
13254
13474
  if (context5.startNode === virtualNode) {
@@ -13270,8 +13490,8 @@
13270
13490
  }
13271
13491
  return virtualNode.props.nodeValue;
13272
13492
  }
13273
- function shouldIgnoreHidden(_ref42, context5) {
13274
- var actualNode = _ref42.actualNode;
13493
+ function shouldIgnoreHidden(_ref43, context5) {
13494
+ var actualNode = _ref43.actualNode;
13275
13495
  if (!actualNode) {
13276
13496
  return false;
13277
13497
  }
@@ -13280,6 +13500,13 @@
13280
13500
  }
13281
13501
  return !is_visible_default(actualNode, true);
13282
13502
  }
13503
+ function shouldIgnoreIconLigature(virtualNode, context5) {
13504
+ var ignoreIconLigature = context5.ignoreIconLigature, pixelThreshold = context5.pixelThreshold, occuranceThreshold = context5.occuranceThreshold;
13505
+ if (virtualNode.props.nodeType !== 3 || !ignoreIconLigature) {
13506
+ return false;
13507
+ }
13508
+ return is_icon_ligature_default(virtualNode, pixelThreshold, occuranceThreshold);
13509
+ }
13283
13510
  function prepareContext(virtualNode, context5) {
13284
13511
  var actualNode = virtualNode.actualNode;
13285
13512
  if (!context5.startNode) {
@@ -13410,30 +13637,6 @@
13410
13637
  return visible_virtual_default;
13411
13638
  }
13412
13639
  });
13413
- function getUnicodeNonBmpRegExp() {
13414
- return /[\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u20A0-\u20CF\u20D0-\u20FF\u2100-\u214F\u2150-\u218F\u2190-\u21FF\u2200-\u22FF\u2300-\u23FF\u2400-\u243F\u2440-\u245F\u2460-\u24FF\u2500-\u257F\u2580-\u259F\u25A0-\u25FF\u2600-\u26FF\u2700-\u27BF\uE000-\uF8FF]/g;
13415
- }
13416
- function getPunctuationRegExp() {
13417
- return /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&\xa3\xa2\xa5\xa7\u20ac()*+,\-.\/:;<=>?@\[\]^_`{|}~\xb1]/g;
13418
- }
13419
- function getSupplementaryPrivateUseRegExp() {
13420
- return /[\uDB80-\uDBBF][\uDC00-\uDFFF]/g;
13421
- }
13422
- var emoji_regex = __toModule(require_emoji_regex());
13423
- function hasUnicode(str, options) {
13424
- var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations;
13425
- if (emoji) {
13426
- return emoji_regex['default']().test(str);
13427
- }
13428
- if (nonBmp) {
13429
- return getUnicodeNonBmpRegExp().test(str) || getSupplementaryPrivateUseRegExp().test(str);
13430
- }
13431
- if (punctuations) {
13432
- return getPunctuationRegExp().test(str);
13433
- }
13434
- return false;
13435
- }
13436
- var has_unicode_default = hasUnicode;
13437
13640
  var emoji_regex2 = __toModule(require_emoji_regex());
13438
13641
  function removeUnicode(str, options) {
13439
13642
  var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations;
@@ -13469,91 +13672,6 @@
13469
13672
  return 1;
13470
13673
  }
13471
13674
  var is_human_interpretable_default = isHumanInterpretable;
13472
- function isIconLigature(textVNode) {
13473
- var differenceThreshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .15;
13474
- var occuranceThreshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
13475
- var nodeValue = textVNode.actualNode.nodeValue.trim();
13476
- if (!sanitize_default(nodeValue) || has_unicode_default(nodeValue, {
13477
- emoji: true,
13478
- nonBmp: true
13479
- })) {
13480
- return false;
13481
- }
13482
- if (!cache_default.get('canvasContext')) {
13483
- cache_default.set('canvasContext', document.createElement('canvas').getContext('2d'));
13484
- }
13485
- var canvasContext = cache_default.get('canvasContext');
13486
- var canvas = canvasContext.canvas;
13487
- if (!cache_default.get('fonts')) {
13488
- cache_default.set('fonts', {});
13489
- }
13490
- var fonts = cache_default.get('fonts');
13491
- var style = window.getComputedStyle(textVNode.parent.actualNode);
13492
- var fontFamily = style.getPropertyValue('font-family');
13493
- if (!fonts[fontFamily]) {
13494
- fonts[fontFamily] = {
13495
- occurances: 0,
13496
- numLigatures: 0
13497
- };
13498
- }
13499
- var font = fonts[fontFamily];
13500
- if (font.occurances >= occuranceThreshold) {
13501
- if (font.numLigatures / font.occurances === 1) {
13502
- return true;
13503
- } else if (font.numLigatures === 0) {
13504
- return false;
13505
- }
13506
- }
13507
- font.occurances++;
13508
- var fontSize = 30;
13509
- var fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
13510
- canvasContext.font = fontStyle;
13511
- var firstChar = nodeValue.charAt(0);
13512
- var width = canvasContext.measureText(firstChar).width;
13513
- if (width < 30) {
13514
- var diff = 30 / width;
13515
- width *= diff;
13516
- fontSize *= diff;
13517
- fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
13518
- }
13519
- canvas.width = width;
13520
- canvas.height = fontSize;
13521
- canvasContext.font = fontStyle;
13522
- canvasContext.textAlign = 'left';
13523
- canvasContext.textBaseline = 'top';
13524
- canvasContext.fillText(firstChar, 0, 0);
13525
- var compareData = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
13526
- if (!compareData.some(function(pixel) {
13527
- return pixel;
13528
- })) {
13529
- font.numLigatures++;
13530
- return true;
13531
- }
13532
- canvasContext.clearRect(0, 0, width, fontSize);
13533
- canvasContext.fillText(nodeValue, 0, 0);
13534
- var compareWith = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
13535
- var differences = compareData.reduce(function(diff, pixel, i) {
13536
- if (pixel === 0 && compareWith[i] === 0) {
13537
- return diff;
13538
- }
13539
- if (pixel !== 0 && compareWith[i] !== 0) {
13540
- return diff;
13541
- }
13542
- return ++diff;
13543
- }, 0);
13544
- var expectedWidth = nodeValue.split('').reduce(function(width2, _char3) {
13545
- return width2 + canvasContext.measureText(_char3).width;
13546
- }, 0);
13547
- var actualWidth = canvasContext.measureText(nodeValue).width;
13548
- var pixelDifference = differences / compareData.length;
13549
- var sizeDifference = 1 - actualWidth / expectedWidth;
13550
- if (pixelDifference >= differenceThreshold && sizeDifference >= differenceThreshold) {
13551
- font.numLigatures++;
13552
- return true;
13553
- }
13554
- return false;
13555
- }
13556
- var is_icon_ligature_default = isIconLigature;
13557
13675
  var _autocomplete = {
13558
13676
  stateTerms: [ 'on', 'off' ],
13559
13677
  standaloneTerms: [ 'name', 'honorific-prefix', 'given-name', 'additional-name', 'family-name', 'honorific-suffix', 'nickname', 'username', 'new-password', 'current-password', 'organization-title', 'organization', 'street-address', 'address-line1', 'address-line2', 'address-line3', 'address-level4', 'address-level3', 'address-level2', 'address-level1', 'country', 'country-name', 'postal-code', 'cc-name', 'cc-given-name', 'cc-additional-name', 'cc-family-name', 'cc-number', 'cc-exp', 'cc-exp-month', 'cc-exp-year', 'cc-csc', 'cc-type', 'transaction-currency', 'transaction-amount', 'language', 'bday', 'bday-day', 'bday-month', 'bday-year', 'sex', 'url', 'photo', 'one-time-code' ],
@@ -13562,7 +13680,7 @@
13562
13680
  locations: [ 'billing', 'shipping' ]
13563
13681
  };
13564
13682
  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;
13683
+ 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
13684
  autocompleteValue = autocompleteValue.toLowerCase().trim();
13567
13685
  stateTerms = stateTerms.concat(_autocomplete.stateTerms);
13568
13686
  if (stateTerms.includes(autocompleteValue) || autocompleteValue === '') {
@@ -13713,8 +13831,8 @@
13713
13831
  idRefs[id] = idRefs[id] || [];
13714
13832
  idRefs[id].push(node);
13715
13833
  }
13716
- for (var _i12 = 0; _i12 < refAttrs.length; ++_i12) {
13717
- var attr = refAttrs[_i12];
13834
+ for (var _i13 = 0; _i13 < refAttrs.length; ++_i13) {
13835
+ var attr = refAttrs[_i13];
13718
13836
  var attrValue = sanitize_default(node.getAttribute(attr) || '');
13719
13837
  if (!attrValue) {
13720
13838
  continue;
@@ -13726,8 +13844,10 @@
13726
13844
  }
13727
13845
  }
13728
13846
  }
13729
- for (var _i13 = 0; _i13 < node.children.length; _i13++) {
13730
- cacheIdRefs(node.children[_i13], idRefs, refAttrs);
13847
+ for (var _i14 = 0; _i14 < node.childNodes.length; _i14++) {
13848
+ if (node.childNodes[_i14].nodeType === 1) {
13849
+ cacheIdRefs(node.childNodes[_i14], idRefs, refAttrs);
13850
+ }
13731
13851
  }
13732
13852
  }
13733
13853
  function getAccessibleRefs(node) {
@@ -13763,17 +13883,21 @@
13763
13883
  function isAriaRoleAllowedOnElement(node, role) {
13764
13884
  var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
13765
13885
  var implicitRole3 = implicit_role_default(vNode);
13766
- if (role === implicitRole3) {
13767
- return true;
13768
- }
13769
13886
  var spec = get_element_spec_default(vNode);
13770
13887
  if (Array.isArray(spec.allowedRoles)) {
13771
13888
  return spec.allowedRoles.includes(role);
13772
13889
  }
13890
+ if (role === implicitRole3) {
13891
+ return false;
13892
+ }
13773
13893
  return !!spec.allowedRoles;
13774
13894
  }
13775
13895
  var is_aria_role_allowed_on_element_default = isAriaRoleAllowedOnElement;
13776
13896
  var dpubRoles2 = [ 'doc-backlink', 'doc-biblioentry', 'doc-biblioref', 'doc-cover', 'doc-endnote', 'doc-glossref', 'doc-noteref' ];
13897
+ var landmarkRoles = {
13898
+ header: 'banner',
13899
+ footer: 'contentinfo'
13900
+ };
13777
13901
  function getRoleSegments(vNode) {
13778
13902
  var roles = [];
13779
13903
  if (!vNode) {
@@ -13783,36 +13907,31 @@
13783
13907
  var nodeRoles = token_list_default(vNode.attr('role').toLowerCase());
13784
13908
  roles = roles.concat(nodeRoles);
13785
13909
  }
13786
- roles = roles.filter(function(role) {
13910
+ return roles.filter(function(role) {
13787
13911
  return is_valid_role_default(role);
13788
13912
  });
13789
- return roles;
13790
13913
  }
13791
13914
  function getElementUnallowedRoles(node) {
13792
13915
  var allowImplicit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
13793
13916
  var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
13794
- var nodeName2 = vNode.props.nodeName;
13795
13917
  if (!is_html_element_default(vNode)) {
13796
13918
  return [];
13797
13919
  }
13920
+ var nodeName2 = vNode.props.nodeName;
13921
+ var implicitRole3 = implicit_role_default(vNode) || landmarkRoles[nodeName2];
13798
13922
  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);
13923
+ return roleSegments.filter(function(role) {
13924
+ return !roleIsAllowed(role, vNode, allowImplicit, implicitRole3);
13814
13925
  });
13815
- return unallowedRoles;
13926
+ }
13927
+ function roleIsAllowed(role, vNode, allowImplicit, implicitRole3) {
13928
+ if (allowImplicit && role === implicitRole3) {
13929
+ return true;
13930
+ }
13931
+ if (dpubRoles2.includes(role) && get_role_type_default(role) !== implicitRole3) {
13932
+ return false;
13933
+ }
13934
+ return is_aria_role_allowed_on_element_default(vNode, role);
13816
13935
  }
13817
13936
  var get_element_unallowed_roles_default = getElementUnallowedRoles;
13818
13937
  function getAriaRolesByType(type) {
@@ -15587,8 +15706,8 @@
15587
15706
  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
15707
  } ];
15589
15708
  lookupTable.evaluateRoleForElement = {
15590
- A: function A(_ref44) {
15591
- var node = _ref44.node, out = _ref44.out;
15709
+ A: function A(_ref45) {
15710
+ var node = _ref45.node, out = _ref45.out;
15592
15711
  if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
15593
15712
  return true;
15594
15713
  }
@@ -15597,19 +15716,19 @@
15597
15716
  }
15598
15717
  return true;
15599
15718
  },
15600
- AREA: function AREA(_ref45) {
15601
- var node = _ref45.node;
15719
+ AREA: function AREA(_ref46) {
15720
+ var node = _ref46.node;
15602
15721
  return !node.href;
15603
15722
  },
15604
- BUTTON: function BUTTON(_ref46) {
15605
- var node = _ref46.node, role = _ref46.role, out = _ref46.out;
15723
+ BUTTON: function BUTTON(_ref47) {
15724
+ var node = _ref47.node, role = _ref47.role, out = _ref47.out;
15606
15725
  if (node.getAttribute('type') === 'menu') {
15607
15726
  return role === 'menuitem';
15608
15727
  }
15609
15728
  return out;
15610
15729
  },
15611
- IMG: function IMG(_ref47) {
15612
- var node = _ref47.node, role = _ref47.role, out = _ref47.out;
15730
+ IMG: function IMG(_ref48) {
15731
+ var node = _ref48.node, role = _ref48.role, out = _ref48.out;
15613
15732
  switch (node.alt) {
15614
15733
  case null:
15615
15734
  return out;
@@ -15621,8 +15740,8 @@
15621
15740
  return role !== 'presentation' && role !== 'none';
15622
15741
  }
15623
15742
  },
15624
- INPUT: function INPUT(_ref48) {
15625
- var node = _ref48.node, role = _ref48.role, out = _ref48.out;
15743
+ INPUT: function INPUT(_ref49) {
15744
+ var node = _ref49.node, role = _ref49.role, out = _ref49.out;
15626
15745
  switch (node.type) {
15627
15746
  case 'button':
15628
15747
  case 'image':
@@ -15652,32 +15771,32 @@
15652
15771
  return false;
15653
15772
  }
15654
15773
  },
15655
- LI: function LI(_ref49) {
15656
- var node = _ref49.node, out = _ref49.out;
15774
+ LI: function LI(_ref50) {
15775
+ var node = _ref50.node, out = _ref50.out;
15657
15776
  var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
15658
15777
  if (hasImplicitListitemRole) {
15659
15778
  return out;
15660
15779
  }
15661
15780
  return true;
15662
15781
  },
15663
- MENU: function MENU(_ref50) {
15664
- var node = _ref50.node;
15782
+ MENU: function MENU(_ref51) {
15783
+ var node = _ref51.node;
15665
15784
  if (node.getAttribute('type') === 'context') {
15666
15785
  return false;
15667
15786
  }
15668
15787
  return true;
15669
15788
  },
15670
- OPTION: function OPTION(_ref51) {
15671
- var node = _ref51.node;
15789
+ OPTION: function OPTION(_ref52) {
15790
+ var node = _ref52.node;
15672
15791
  var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
15673
15792
  return !withinOptionList;
15674
15793
  },
15675
- SELECT: function SELECT(_ref52) {
15676
- var node = _ref52.node, role = _ref52.role;
15794
+ SELECT: function SELECT(_ref53) {
15795
+ var node = _ref53.node, role = _ref53.role;
15677
15796
  return !node.multiple && node.size <= 1 && role === 'menu';
15678
15797
  },
15679
- SVG: function SVG(_ref53) {
15680
- var node = _ref53.node, out = _ref53.out;
15798
+ SVG: function SVG(_ref54) {
15799
+ var node = _ref54.node, out = _ref54.out;
15681
15800
  if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
15682
15801
  return true;
15683
15802
  }
@@ -15828,10 +15947,10 @@
15828
15947
  ariaAttr.forEach(function(attr) {
15829
15948
  preChecks[attr] = validateRowAttrs;
15830
15949
  });
15831
- if (role && allowed) {
15832
- for (var _i14 = 0; _i14 < attrs.length; _i14++) {
15950
+ if (allowed) {
15951
+ for (var _i15 = 0; _i15 < attrs.length; _i15++) {
15833
15952
  var _preChecks$attrName;
15834
- var attrName = attrs[_i14];
15953
+ var attrName = attrs[_i15];
15835
15954
  if (validate_attr_default(attrName) && (_preChecks$attrName = preChecks[attrName]) !== null && _preChecks$attrName !== void 0 && _preChecks$attrName.call(preChecks)) {
15836
15955
  invalid.push(attrName + '="' + virtualNode.attr(attrName) + '"');
15837
15956
  } else if (validate_attr_default(attrName) && !allowed.includes(attrName)) {
@@ -15841,6 +15960,9 @@
15841
15960
  }
15842
15961
  if (invalid.length) {
15843
15962
  this.data(invalid);
15963
+ if (!is_html_element_default(virtualNode) && !role && !is_focusable_default(virtualNode)) {
15964
+ return void 0;
15965
+ }
15844
15966
  return false;
15845
15967
  }
15846
15968
  return true;
@@ -15925,8 +16047,12 @@
15925
16047
  function ariaProhibitedAttrEvaluate(node) {
15926
16048
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
15927
16049
  var virtualNode = arguments.length > 2 ? arguments[2] : undefined;
15928
- var extraElementsAllowedAriaLabel = options.elementsAllowedAriaLabel || [];
15929
- var prohibitedList = listProhibitedAttrs(virtualNode, extraElementsAllowedAriaLabel);
16050
+ var elementsAllowedAriaLabel = (options === null || options === void 0 ? void 0 : options.elementsAllowedAriaLabel) || [];
16051
+ var nodeName2 = virtualNode.props.nodeName;
16052
+ var role = get_role_default(virtualNode, {
16053
+ chromium: true
16054
+ });
16055
+ var prohibitedList = listProhibitedAttrs(role, nodeName2, elementsAllowedAriaLabel);
15930
16056
  var prohibited = prohibitedList.filter(function(attrName) {
15931
16057
  if (!virtualNode.attrNames.includes(attrName)) {
15932
16058
  return false;
@@ -15936,25 +16062,32 @@
15936
16062
  if (prohibited.length === 0) {
15937
16063
  return false;
15938
16064
  }
15939
- this.data(prohibited);
15940
- var hasTextContent = sanitize_default(subtree_text_default(virtualNode)) !== '';
15941
- return hasTextContent ? void 0 : true;
15942
- }
15943
- function listProhibitedAttrs(virtualNode, elementsAllowedAriaLabel) {
15944
- var role = get_role_default(virtualNode, {
15945
- chromium: true
16065
+ var messageKey = virtualNode.hasAttr('role') ? 'hasRole' : 'noRole';
16066
+ messageKey += prohibited.length > 1 ? 'Plural' : 'Singular';
16067
+ this.data({
16068
+ role: role,
16069
+ nodeName: nodeName2,
16070
+ messageKey: messageKey,
16071
+ prohibited: prohibited
15946
16072
  });
16073
+ var textContent = subtree_text_default(virtualNode, {
16074
+ subtreeDescendant: true
16075
+ });
16076
+ if (sanitize_default(textContent) !== '') {
16077
+ return void 0;
16078
+ }
16079
+ return true;
16080
+ }
16081
+ function listProhibitedAttrs(role, nodeName2, elementsAllowedAriaLabel) {
15947
16082
  var roleSpec = standards_default.ariaRoles[role];
15948
16083
  if (roleSpec) {
15949
16084
  return roleSpec.prohibitedAttrs || [];
15950
16085
  }
15951
- var nodeName2 = virtualNode.props.nodeName;
15952
16086
  if (!!role || elementsAllowedAriaLabel.includes(nodeName2)) {
15953
16087
  return [];
15954
16088
  }
15955
16089
  return [ 'aria-label', 'aria-labelledby' ];
15956
16090
  }
15957
- var aria_prohibited_attr_evaluate_default = ariaProhibitedAttrEvaluate;
15958
16091
  var standards_exports = {};
15959
16092
  __export(standards_exports, {
15960
16093
  getAriaRolesByType: function getAriaRolesByType() {
@@ -15989,8 +16122,8 @@
15989
16122
  required = unique_array_default(options[role], required);
15990
16123
  }
15991
16124
  if (role && required) {
15992
- for (var _i15 = 0, l = required.length; _i15 < l; _i15++) {
15993
- var attr = required[_i15];
16125
+ for (var _i16 = 0, l = required.length; _i16 < l; _i16++) {
16126
+ var attr = required[_i16];
15994
16127
  if (!virtualNode.attr(attr) && !(elmSpec.implicitAttrs && typeof elmSpec.implicitAttrs[attr] !== 'undefined')) {
15995
16128
  missing.push(attr);
15996
16129
  }
@@ -16011,8 +16144,8 @@
16011
16144
  function getOwnedRoles(virtualNode, required) {
16012
16145
  var ownedRoles = [];
16013
16146
  var ownedElements = get_owned_virtual_default(virtualNode);
16014
- var _loop4 = function _loop4(_i16) {
16015
- var ownedElement = ownedElements[_i16];
16147
+ var _loop4 = function _loop4(_i17) {
16148
+ var ownedElement = ownedElements[_i17];
16016
16149
  var role = get_role_default(ownedElement, {
16017
16150
  noPresentational: true
16018
16151
  });
@@ -16024,14 +16157,14 @@
16024
16157
  ownedRoles.push(role);
16025
16158
  }
16026
16159
  };
16027
- for (var _i16 = 0; _i16 < ownedElements.length; _i16++) {
16028
- _loop4(_i16);
16160
+ for (var _i17 = 0; _i17 < ownedElements.length; _i17++) {
16161
+ _loop4(_i17);
16029
16162
  }
16030
16163
  return ownedRoles;
16031
16164
  }
16032
16165
  function missingRequiredChildren(virtualNode, role, required, ownedRoles) {
16033
- for (var _i17 = 0; _i17 < ownedRoles.length; _i17++) {
16034
- var ownedRole = ownedRoles[_i17];
16166
+ for (var _i18 = 0; _i18 < ownedRoles.length; _i18++) {
16167
+ var ownedRole = ownedRoles[_i18];
16035
16168
  if (required.includes(ownedRole)) {
16036
16169
  required = required.filter(function(requiredRole) {
16037
16170
  return requiredRole !== ownedRole;
@@ -16118,8 +16251,8 @@
16118
16251
  }
16119
16252
  var owners = getAriaOwners(node);
16120
16253
  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);
16254
+ for (var _i19 = 0, l = owners.length; _i19 < l; _i19++) {
16255
+ missingParents = getMissingContext(get_node_from_tree_default(owners[_i19]), ownGroupRoles, missingParents, true);
16123
16256
  if (!missingParents) {
16124
16257
  return true;
16125
16258
  }
@@ -16164,9 +16297,9 @@
16164
16297
  function ariaValidAttrEvaluate(node, options, virtualNode) {
16165
16298
  options = Array.isArray(options.value) ? options.value : [];
16166
16299
  var invalid = [];
16167
- var aria46 = /^aria-/;
16300
+ var aria48 = /^aria-/;
16168
16301
  virtualNode.attrNames.forEach(function(attr) {
16169
- if (options.indexOf(attr) === -1 && aria46.test(attr) && !validate_attr_default(attr)) {
16302
+ if (options.indexOf(attr) === -1 && aria48.test(attr) && !validate_attr_default(attr)) {
16170
16303
  invalid.push(attr);
16171
16304
  }
16172
16305
  });
@@ -16182,7 +16315,7 @@
16182
16315
  var needsReview = '';
16183
16316
  var messageKey = '';
16184
16317
  var invalid = [];
16185
- var aria46 = /^aria-/;
16318
+ var aria48 = /^aria-/;
16186
16319
  var skipAttrs = [ 'aria-errormessage' ];
16187
16320
  var preChecks = {
16188
16321
  'aria-controls': function ariaControls() {
@@ -16213,7 +16346,7 @@
16213
16346
  }
16214
16347
  };
16215
16348
  virtualNode.attrNames.forEach(function(attrName) {
16216
- if (skipAttrs.includes(attrName) || options.includes(attrName) || !aria46.test(attrName)) {
16349
+ if (skipAttrs.includes(attrName) || options.includes(attrName) || !aria48.test(attrName)) {
16217
16350
  return;
16218
16351
  }
16219
16352
  var validValue;
@@ -16242,6 +16375,18 @@
16242
16375
  return true;
16243
16376
  }
16244
16377
  var aria_valid_attr_value_evaluate_default = ariaValidAttrValueEvaluate;
16378
+ function deprecatedroleEvaluate(node, options, virtualNode) {
16379
+ var role = get_role_default(virtualNode, {
16380
+ dpub: true,
16381
+ fallback: true
16382
+ });
16383
+ var roleDefinition = standards_default.ariaRoles[role];
16384
+ if (!(roleDefinition !== null && roleDefinition !== void 0 && roleDefinition.deprecated)) {
16385
+ return false;
16386
+ }
16387
+ this.data(role);
16388
+ return true;
16389
+ }
16245
16390
  function nonePresentationOnElementWithNoImplicitRole(virtualNode, explicitRoles) {
16246
16391
  var hasImplicitRole = implicit_role_default(virtualNode);
16247
16392
  return !hasImplicitRole && explicitRoles.length === 2 && explicitRoles.includes('none') && explicitRoles.includes('presentation');
@@ -16947,21 +17092,65 @@
16947
17092
  return null;
16948
17093
  }
16949
17094
  var filtered_rect_stack_default = filteredRectStack;
17095
+ function clamp(value, min, max) {
17096
+ return Math.min(Math.max(min, value), max);
17097
+ }
16950
17098
  var blendFunctions = {
16951
17099
  normal: function normal(Cb, Cs) {
16952
17100
  return Cs;
17101
+ },
17102
+ multiply: function multiply(Cb, Cs) {
17103
+ return Cs * Cb;
17104
+ },
17105
+ screen: function screen(Cb, Cs) {
17106
+ return Cb + Cs - Cb * Cs;
17107
+ },
17108
+ overlay: function overlay(Cb, Cs) {
17109
+ return this['hard-light'](Cs, Cb);
17110
+ },
17111
+ darken: function darken(Cb, Cs) {
17112
+ return Math.min(Cb, Cs);
17113
+ },
17114
+ lighten: function lighten(Cb, Cs) {
17115
+ return Math.max(Cb, Cs);
17116
+ },
17117
+ 'color-dodge': function colorDodge(Cb, Cs) {
17118
+ return Cb === 0 ? 0 : Cs === 1 ? 1 : Math.min(1, Cb / (1 - Cs));
17119
+ },
17120
+ 'color-burn': function colorBurn(Cb, Cs) {
17121
+ return Cb === 1 ? 1 : Cs === 0 ? 0 : 1 - Math.min(1, (1 - Cb) / Cs);
17122
+ },
17123
+ 'hard-light': function hardLight(Cb, Cs) {
17124
+ return Cs <= .5 ? this.multiply(Cb, 2 * Cs) : this.screen(Cb, 2 * Cs - 1);
17125
+ },
17126
+ 'soft-light': function softLight(Cb, Cs) {
17127
+ if (Cs <= .5) {
17128
+ return Cb - (1 - 2 * Cs) * Cb * (1 - Cb);
17129
+ } else {
17130
+ var D = Cb <= .25 ? ((16 * Cb - 12) * Cb + 4) * Cb : Math.sqrt(Cb);
17131
+ return Cb + (2 * Cs - 1) * (D - Cb);
17132
+ }
17133
+ },
17134
+ difference: function difference(Cb, Cs) {
17135
+ return Math.abs(Cb - Cs);
17136
+ },
17137
+ exclusion: function exclusion(Cb, Cs) {
17138
+ return Cb + Cs - 2 * Cb * Cs;
16953
17139
  }
16954
17140
  };
16955
17141
  function simpleAlphaCompositing(Cs, \u03b1s, Cb, \u03b1b, blendMode) {
16956
- return Math.round(\u03b1s * (1 - \u03b1b) * Cs + \u03b1s * \u03b1b * blendFunctions[blendMode](Cb, Cs) + (1 - \u03b1s) * \u03b1b * Cb);
17142
+ return \u03b1s * (1 - \u03b1b) * Cs + \u03b1s * \u03b1b * blendFunctions[blendMode](Cb / 255, Cs / 255) * 255 + (1 - \u03b1s) * \u03b1b * Cb;
16957
17143
  }
16958
17144
  function flattenColors(fgColor, bgColor) {
16959
17145
  var blendMode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'normal';
16960
17146
  var r = simpleAlphaCompositing(fgColor.red, fgColor.alpha, bgColor.red, bgColor.alpha, blendMode);
16961
17147
  var g = simpleAlphaCompositing(fgColor.green, fgColor.alpha, bgColor.green, bgColor.alpha, blendMode);
16962
17148
  var b = simpleAlphaCompositing(fgColor.blue, fgColor.alpha, bgColor.blue, bgColor.alpha, blendMode);
16963
- var a = Math.max(0, Math.min(fgColor.alpha + bgColor.alpha * (1 - fgColor.alpha), 1));
16964
- return new color_default(r, g, b, a);
17149
+ var \u03b1o = clamp(fgColor.alpha + bgColor.alpha * (1 - fgColor.alpha), 0, 1);
17150
+ var Cr = Math.round(r / \u03b1o);
17151
+ var Cg = Math.round(g / \u03b1o);
17152
+ var Cb = Math.round(b / \u03b1o);
17153
+ return new color_default(Cr, Cg, Cb, \u03b1o);
16965
17154
  }
16966
17155
  var flatten_colors_default = flattenColors;
16967
17156
  function flattenColors2(fgColor, bgColor) {
@@ -16973,28 +17162,25 @@
16973
17162
  return new color_default(r, g, b, a);
16974
17163
  }
16975
17164
  var flatten_shadow_colors_default = flattenColors2;
16976
- function contentOverlapping(targetElement, bgNode) {
16977
- var targetRect = targetElement.getClientRects()[0];
16978
- var obscuringElements = shadow_elements_from_point_default(targetRect.left, targetRect.top);
16979
- if (obscuringElements) {
16980
- for (var i = 0; i < obscuringElements.length; i++) {
16981
- if (obscuringElements[i] !== targetElement && obscuringElements[i] === bgNode) {
16982
- return true;
16983
- }
16984
- }
17165
+ function isInlineDescendant(node, descendant) {
17166
+ var CONTAINED_BY = Node.DOCUMENT_POSITION_CONTAINED_BY;
17167
+ if (!(node.compareDocumentPosition(descendant) & CONTAINED_BY)) {
17168
+ return false;
16985
17169
  }
16986
- return false;
17170
+ var style = window.getComputedStyle(descendant);
17171
+ var display = style.getPropertyValue('display');
17172
+ if (!display.includes('inline')) {
17173
+ return false;
17174
+ }
17175
+ var position = style.getPropertyValue('position');
17176
+ return position === 'static';
16987
17177
  }
16988
17178
  function calculateObscuringElement(elmIndex, elmStack, originalElm) {
16989
- if (elmIndex > 0) {
16990
- for (var i = elmIndex - 1; i >= 0; i--) {
16991
- var bgElm = elmStack[i];
16992
- if (contentOverlapping(originalElm, bgElm)) {
16993
- return true;
16994
- } else {
16995
- elmStack.splice(i, 1);
16996
- }
17179
+ for (var _i20 = elmIndex - 1; _i20 >= 0; _i20--) {
17180
+ if (!isInlineDescendant(originalElm, elmStack[_i20])) {
17181
+ return true;
16997
17182
  }
17183
+ elmStack.splice(_i20, 1);
16998
17184
  }
16999
17185
  return false;
17000
17186
  }
@@ -17031,7 +17217,7 @@
17031
17217
  }
17032
17218
  var get_background_stack_default = getBackgroundStack;
17033
17219
  function getTextShadowColors(node) {
17034
- var _ref54 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref54.minRatio, maxRatio = _ref54.maxRatio;
17220
+ var _ref55 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref55.minRatio, maxRatio = _ref55.maxRatio;
17035
17221
  var style = window.getComputedStyle(node);
17036
17222
  var textShadow = style.getPropertyValue('text-shadow');
17037
17223
  if (textShadow === 'none') {
@@ -17042,8 +17228,8 @@
17042
17228
  assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
17043
17229
  var shadowColors = [];
17044
17230
  var shadows = parseTextShadows(textShadow);
17045
- shadows.forEach(function(_ref55) {
17046
- var colorStr = _ref55.colorStr, pixels = _ref55.pixels;
17231
+ shadows.forEach(function(_ref56) {
17232
+ var colorStr = _ref56.colorStr, pixels = _ref56.pixels;
17047
17233
  colorStr = colorStr || style.getPropertyValue('color');
17048
17234
  var _pixels = _slicedToArray(pixels, 3), offsetY = _pixels[0], offsetX = _pixels[1], _pixels$ = _pixels[2], blurRadius = _pixels$ === void 0 ? 0 : _pixels$;
17049
17235
  if ((!minRatio || blurRadius >= fontSize * minRatio) && (!maxRatio || blurRadius < fontSize * maxRatio)) {
@@ -17093,8 +17279,8 @@
17093
17279
  }
17094
17280
  return shadows;
17095
17281
  }
17096
- function textShadowColor(_ref56) {
17097
- var colorStr = _ref56.colorStr, offsetX = _ref56.offsetX, offsetY = _ref56.offsetY, blurRadius = _ref56.blurRadius, fontSize = _ref56.fontSize;
17282
+ function textShadowColor(_ref57) {
17283
+ var colorStr = _ref57.colorStr, offsetX = _ref57.offsetX, offsetY = _ref57.offsetY, blurRadius = _ref57.blurRadius, fontSize = _ref57.fontSize;
17098
17284
  if (offsetX > blurRadius || offsetY > blurRadius) {
17099
17285
  return new color_default(0, 0, 0, 0);
17100
17286
  }
@@ -17119,7 +17305,9 @@
17119
17305
  minRatio: shadowOutlineEmMax
17120
17306
  });
17121
17307
  if (bgColors.length) {
17122
- bgColors = [ bgColors.reduce(flatten_shadow_colors_default) ];
17308
+ bgColors = [ {
17309
+ color: bgColors.reduce(flatten_shadow_colors_default)
17310
+ } ];
17123
17311
  }
17124
17312
  var elmStack = get_background_stack_default(elm);
17125
17313
  (elmStack || []).some(function(bgElm) {
@@ -17132,7 +17320,11 @@
17132
17320
  }
17133
17321
  if (bgColor.alpha !== 0) {
17134
17322
  bgElms.push(bgElm);
17135
- bgColors.unshift(bgColor);
17323
+ var blendMode = bgElmStyle.getPropertyValue('mix-blend-mode');
17324
+ bgColors.unshift({
17325
+ color: bgColor,
17326
+ blendMode: normalizeBlendMode(blendMode)
17327
+ });
17136
17328
  return bgColor.alpha === 1;
17137
17329
  } else {
17138
17330
  return false;
@@ -17143,10 +17335,13 @@
17143
17335
  }
17144
17336
  var pageBgs = getPageBackgroundColors(elm, elmStack.includes(document.body));
17145
17337
  (_bgColors = bgColors).unshift.apply(_bgColors, _toConsumableArray(pageBgs));
17146
- var colors = bgColors.reduce(function(bgColor, fgColor) {
17147
- return flatten_colors_default(fgColor, bgColor);
17338
+ if (bgColors.length === 0) {
17339
+ return new color_default(255, 255, 255, 1);
17340
+ }
17341
+ var blendedColor = bgColors.reduce(function(bgColor, fgColor) {
17342
+ return flatten_colors_default(fgColor.color, bgColor.color instanceof color_default ? bgColor.color : bgColor, fgColor.blendMode);
17148
17343
  });
17149
- return colors;
17344
+ return flatten_colors_default(blendedColor.color instanceof color_default ? blendedColor.color : blendedColor, new color_default(255, 255, 255, 1));
17150
17345
  }
17151
17346
  function elmPartiallyObscured(elm, bgElm, bgColor) {
17152
17347
  var obscured = elm !== bgElm && !_visuallyContains(elm, bgElm) && bgColor.alpha !== 0;
@@ -17155,6 +17350,9 @@
17155
17350
  }
17156
17351
  return obscured;
17157
17352
  }
17353
+ function normalizeBlendMode(blendmode) {
17354
+ return !!blendmode ? blendmode : void 0;
17355
+ }
17158
17356
  function getPageBackgroundColors(elm, stackContainsBody) {
17159
17357
  var pageColors = [];
17160
17358
  if (!stackContainsBody) {
@@ -17166,13 +17364,18 @@
17166
17364
  var bodyBgColor = get_own_background_color_default(bodyStyle);
17167
17365
  var bodyBgColorApplies = bodyBgColor.alpha !== 0 && _visuallyContains(elm, body);
17168
17366
  if (bodyBgColor.alpha !== 0 && htmlBgColor.alpha === 0 || bodyBgColorApplies && bodyBgColor.alpha !== 1) {
17169
- pageColors.unshift(bodyBgColor);
17367
+ pageColors.unshift({
17368
+ color: bodyBgColor,
17369
+ blendMode: normalizeBlendMode(bodyStyle.getPropertyValue('mix-blend-mode'))
17370
+ });
17170
17371
  }
17171
17372
  if (htmlBgColor.alpha !== 0 && (!bodyBgColorApplies || bodyBgColorApplies && bodyBgColor.alpha !== 1)) {
17172
- pageColors.unshift(htmlBgColor);
17373
+ pageColors.unshift({
17374
+ color: htmlBgColor,
17375
+ blendMode: normalizeBlendMode(htmlStyle.getPropertyValue('mix-blend-mode'))
17376
+ });
17173
17377
  }
17174
17378
  }
17175
- pageColors.unshift(new color_default(255, 255, 255, 1));
17176
17379
  return pageColors;
17177
17380
  }
17178
17381
  function getContrast(bgColor, fgColor) {
@@ -17281,14 +17484,17 @@
17281
17484
  contrast = get_contrast_default(bgColor, fgColor);
17282
17485
  } else if (fgColor && bgColor) {
17283
17486
  shadowColor = [].concat(_toConsumableArray(shadowColors), [ bgColor ]).reduce(flatten_shadow_colors_default);
17284
- var bgContrast = get_contrast_default(bgColor, shadowColor);
17285
- var fgContrast = get_contrast_default(shadowColor, fgColor);
17286
- contrast = Math.max(bgContrast, fgContrast);
17287
- contrastContributor = bgContrast > fgContrast ? 'shadowOnBgColor' : 'fgOnShadowColor';
17487
+ var fgBgContrast = get_contrast_default(bgColor, fgColor);
17488
+ var bgShContrast = get_contrast_default(bgColor, shadowColor);
17489
+ var fgShContrast = get_contrast_default(shadowColor, fgColor);
17490
+ contrast = Math.max(fgBgContrast, bgShContrast, fgShContrast);
17491
+ if (contrast !== fgBgContrast) {
17492
+ contrastContributor = bgShContrast > fgShContrast ? 'shadowOnBgColor' : 'fgOnShadowColor';
17493
+ }
17288
17494
  }
17289
17495
  var ptSize = Math.ceil(fontSize * 72) / 96;
17290
17496
  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;
17497
+ var _ref58 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref58.expected, minThreshold = _ref58.minThreshold, maxThreshold = _ref58.maxThreshold;
17292
17498
  var isValid = contrast > expected;
17293
17499
  if (typeof minThreshold === 'number' && contrast < minThreshold || typeof maxThreshold === 'number' && contrast > maxThreshold) {
17294
17500
  return true;
@@ -17328,8 +17534,8 @@
17328
17534
  }
17329
17535
  return isValid;
17330
17536
  }
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;
17537
+ function findPseudoElement(vNode, _ref59) {
17538
+ 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
17539
  if (ignorePseudo) {
17334
17540
  return;
17335
17541
  }
@@ -17371,7 +17577,7 @@
17371
17577
  }
17372
17578
  function parseUnit(str) {
17373
17579
  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;
17580
+ 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
17581
  return {
17376
17582
  value: parseFloat(value),
17377
17583
  unit: unit.toLowerCase()
@@ -17614,14 +17820,14 @@
17614
17820
  }
17615
17821
  function getHeadingOrder(results) {
17616
17822
  results = _toConsumableArray(results);
17617
- results.sort(function(_ref61, _ref62) {
17618
- var nodeA = _ref61.node;
17619
- var nodeB = _ref62.node;
17823
+ results.sort(function(_ref62, _ref63) {
17824
+ var nodeA = _ref62.node;
17825
+ var nodeB = _ref63.node;
17620
17826
  return nodeA.ancestry.length - nodeB.ancestry.length;
17621
17827
  });
17622
17828
  var headingOrder = results.reduce(mergeHeadingOrder, []);
17623
- return headingOrder.filter(function(_ref63) {
17624
- var level = _ref63.level;
17829
+ return headingOrder.filter(function(_ref64) {
17830
+ var level = _ref64.level;
17625
17831
  return level !== -1;
17626
17832
  });
17627
17833
  }
@@ -17672,7 +17878,7 @@
17672
17878
  var headingRole = role && role.includes('heading');
17673
17879
  var ariaHeadingLevel = vNode.attr('aria-level');
17674
17880
  var ariaLevel = parseInt(ariaHeadingLevel, 10);
17675
- var _ref64 = vNode.props.nodeName.match(/h(\d)/) || [], _ref65 = _slicedToArray(_ref64, 2), headingLevel = _ref65[1];
17881
+ var _ref65 = vNode.props.nodeName.match(/h(\d)/) || [], _ref66 = _slicedToArray(_ref65, 2), headingLevel = _ref66[1];
17676
17882
  if (!headingRole) {
17677
17883
  return -1;
17678
17884
  }
@@ -17738,8 +17944,8 @@
17738
17944
  if (results.length < 2) {
17739
17945
  return results;
17740
17946
  }
17741
- var incompleteResults = results.filter(function(_ref66) {
17742
- var result = _ref66.result;
17947
+ var incompleteResults = results.filter(function(_ref67) {
17948
+ var result = _ref67.result;
17743
17949
  return result !== void 0;
17744
17950
  });
17745
17951
  var uniqueResults = [];
@@ -17751,12 +17957,12 @@
17751
17957
  if (nameMap[name]) {
17752
17958
  return 'continue';
17753
17959
  }
17754
- var sameNameResults = incompleteResults.filter(function(_ref67, resultNum) {
17755
- var data2 = _ref67.data;
17960
+ var sameNameResults = incompleteResults.filter(function(_ref68, resultNum) {
17961
+ var data2 = _ref68.data;
17756
17962
  return data2.name === name && resultNum !== index;
17757
17963
  });
17758
- var isSameUrl = sameNameResults.every(function(_ref68) {
17759
- var data2 = _ref68.data;
17964
+ var isSameUrl = sameNameResults.every(function(_ref69) {
17965
+ var data2 = _ref69.data;
17760
17966
  return isIdenticalObject(data2.urlProps, urlProps);
17761
17967
  });
17762
17968
  if (sameNameResults.length && !isSameUrl) {
@@ -17886,7 +18092,7 @@
17886
18092
  function internalLinkPresentEvaluate(node, options, virtualNode) {
17887
18093
  var links = query_selector_all_default(virtualNode, 'a[href]');
17888
18094
  return links.some(function(vLink) {
17889
- return /^#[^/!]/.test(vLink.actualNode.getAttribute('href'));
18095
+ return /^#[^/!]/.test(vLink.attr('href'));
17890
18096
  });
17891
18097
  }
17892
18098
  var internal_link_present_evaluate_default = internalLinkPresentEvaluate;
@@ -17917,16 +18123,16 @@
17917
18123
  var outerText = elm.textContent.trim();
17918
18124
  var innerText = outerText;
17919
18125
  while (innerText === outerText && nextNode !== void 0) {
17920
- var _i19 = -1;
18126
+ var _i21 = -1;
17921
18127
  elm = nextNode;
17922
18128
  if (elm.children.length === 0) {
17923
18129
  return elm;
17924
18130
  }
17925
18131
  do {
17926
- _i19++;
17927
- innerText = elm.children[_i19].textContent.trim();
17928
- } while (innerText === '' && _i19 + 1 < elm.children.length);
17929
- nextNode = elm.children[_i19];
18132
+ _i21++;
18133
+ innerText = elm.children[_i21].textContent.trim();
18134
+ } while (innerText === '' && _i21 + 1 < elm.children.length);
18135
+ nextNode = elm.children[_i21];
17930
18136
  }
17931
18137
  return elm;
17932
18138
  }
@@ -17980,7 +18186,7 @@
17980
18186
  return false;
17981
18187
  }
17982
18188
  var p_as_heading_evaluate_default = pAsHeadingEvaluate;
17983
- var landmarkRoles = get_aria_roles_by_type_default('landmark');
18189
+ var landmarkRoles2 = get_aria_roles_by_type_default('landmark');
17984
18190
  var implicitAriaLiveRoles = [ 'alert', 'log', 'status' ];
17985
18191
  function isRegion(virtualNode, options) {
17986
18192
  var node = virtualNode.actualNode;
@@ -17989,7 +18195,7 @@
17989
18195
  if ([ 'assertive', 'polite' ].includes(ariaLive) || implicitAriaLiveRoles.includes(role)) {
17990
18196
  return true;
17991
18197
  }
17992
- if (landmarkRoles.includes(role)) {
18198
+ if (landmarkRoles2.includes(role)) {
17993
18199
  return true;
17994
18200
  }
17995
18201
  if (options.regionMatcher && matches_default3(virtualNode, options.regionMatcher)) {
@@ -17999,7 +18205,7 @@
17999
18205
  }
18000
18206
  function findRegionlessElms(virtualNode, options) {
18001
18207
  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)) {
18208
+ if (get_role_default(virtualNode) === 'button' || isRegion(virtualNode, options) || [ 'iframe', 'frame' ].includes(virtualNode.props.nodeName) || _isSkipLink(virtualNode.actualNode) && get_element_by_reference_default(virtualNode.actualNode, 'href') || !is_visible_default(node, true)) {
18003
18209
  var vNode = virtualNode;
18004
18210
  while (vNode) {
18005
18211
  vNode._hasRegionDescendant = true;
@@ -18012,8 +18218,8 @@
18012
18218
  } else if (node !== document.body && has_content_default(node, true)) {
18013
18219
  return [ virtualNode ];
18014
18220
  } else {
18015
- return virtualNode.children.filter(function(_ref69) {
18016
- var actualNode = _ref69.actualNode;
18221
+ return virtualNode.children.filter(function(_ref70) {
18222
+ var actualNode = _ref70.actualNode;
18017
18223
  return actualNode.nodeType === 1;
18018
18224
  }).map(function(vNode) {
18019
18225
  return findRegionlessElms(vNode, options);
@@ -18196,8 +18402,8 @@
18196
18402
  if (!virtualNode.children) {
18197
18403
  return void 0;
18198
18404
  }
18199
- var titleNode = virtualNode.children.find(function(_ref70) {
18200
- var props = _ref70.props;
18405
+ var titleNode = virtualNode.children.find(function(_ref71) {
18406
+ var props = _ref71.props;
18201
18407
  return props.nodeName === 'title';
18202
18408
  });
18203
18409
  if (!titleNode) {
@@ -18220,8 +18426,8 @@
18220
18426
  }
18221
18427
  var svg_non_empty_title_evaluate_default = svgNonEmptyTitleEvaluate;
18222
18428
  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;
18429
+ var _ref72 = context5 || {}, _ref72$cssom = _ref72.cssom, cssom = _ref72$cssom === void 0 ? void 0 : _ref72$cssom;
18430
+ var _ref73 = options || {}, _ref73$degreeThreshol = _ref73.degreeThreshold, degreeThreshold = _ref73$degreeThreshol === void 0 ? 0 : _ref73$degreeThreshol;
18225
18431
  if (!cssom || !cssom.length) {
18226
18432
  return void 0;
18227
18433
  }
@@ -18229,14 +18435,14 @@
18229
18435
  var relatedElements = [];
18230
18436
  var rulesGroupByDocumentFragment = groupCssomByDocument(cssom);
18231
18437
  var _loop6 = function _loop6() {
18232
- var key = _Object$keys2[_i20];
18438
+ var key = _Object$keys2[_i22];
18233
18439
  var _rulesGroupByDocument = rulesGroupByDocumentFragment[key], root = _rulesGroupByDocument.root, rules = _rulesGroupByDocument.rules;
18234
18440
  var orientationRules = rules.filter(isMediaRuleWithOrientation);
18235
18441
  if (!orientationRules.length) {
18236
18442
  return 'continue';
18237
18443
  }
18238
- orientationRules.forEach(function(_ref73) {
18239
- var cssRules = _ref73.cssRules;
18444
+ orientationRules.forEach(function(_ref74) {
18445
+ var cssRules = _ref74.cssRules;
18240
18446
  Array.from(cssRules).forEach(function(cssRule) {
18241
18447
  var locked = getIsOrientationLocked(cssRule);
18242
18448
  if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
@@ -18247,7 +18453,7 @@
18247
18453
  });
18248
18454
  });
18249
18455
  };
18250
- for (var _i20 = 0, _Object$keys2 = Object.keys(rulesGroupByDocumentFragment); _i20 < _Object$keys2.length; _i20++) {
18456
+ for (var _i22 = 0, _Object$keys2 = Object.keys(rulesGroupByDocumentFragment); _i22 < _Object$keys2.length; _i22++) {
18251
18457
  var _ret3 = _loop6();
18252
18458
  if (_ret3 === 'continue') {
18253
18459
  continue;
@@ -18261,8 +18467,8 @@
18261
18467
  }
18262
18468
  return false;
18263
18469
  function groupCssomByDocument(cssObjectModel) {
18264
- return cssObjectModel.reduce(function(out, _ref74) {
18265
- var sheet = _ref74.sheet, root = _ref74.root, shadowId = _ref74.shadowId;
18470
+ return cssObjectModel.reduce(function(out, _ref75) {
18471
+ var sheet = _ref75.sheet, root = _ref75.root, shadowId = _ref75.shadowId;
18266
18472
  var key = shadowId ? shadowId : 'topDocument';
18267
18473
  if (!out[key]) {
18268
18474
  out[key] = {
@@ -18278,15 +18484,15 @@
18278
18484
  return out;
18279
18485
  }, {});
18280
18486
  }
18281
- function isMediaRuleWithOrientation(_ref75) {
18282
- var type = _ref75.type, cssText = _ref75.cssText;
18487
+ function isMediaRuleWithOrientation(_ref76) {
18488
+ var type = _ref76.type, cssText = _ref76.cssText;
18283
18489
  if (type !== 4) {
18284
18490
  return false;
18285
18491
  }
18286
18492
  return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
18287
18493
  }
18288
- function getIsOrientationLocked(_ref76) {
18289
- var selectorText = _ref76.selectorText, style = _ref76.style;
18494
+ function getIsOrientationLocked(_ref77) {
18495
+ var selectorText = _ref77.selectorText, style = _ref77.style;
18290
18496
  if (!selectorText || style.length <= 0) {
18291
18497
  return false;
18292
18498
  }
@@ -18333,7 +18539,7 @@
18333
18539
  }
18334
18540
  }
18335
18541
  function getAngleInDegrees(angleWithUnit) {
18336
- var _ref77 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref78 = _slicedToArray(_ref77, 1), unit = _ref78[0];
18542
+ var _ref78 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref79 = _slicedToArray(_ref78, 1), unit = _ref79[0];
18337
18543
  if (!unit) {
18338
18544
  return;
18339
18545
  }
@@ -18382,7 +18588,7 @@
18382
18588
  }
18383
18589
  var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
18384
18590
  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;
18591
+ 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
18592
  var content = virtualNode.attr('content') || '';
18387
18593
  if (!content) {
18388
18594
  return true;
@@ -18498,8 +18704,8 @@
18498
18704
  if (!tabbableElements || !tabbableElements.length) {
18499
18705
  return true;
18500
18706
  }
18501
- var relatedNodes = tabbableElements.reduce(function(out, _ref80) {
18502
- var el = _ref80.actualNode;
18707
+ var relatedNodes = tabbableElements.reduce(function(out, _ref81) {
18708
+ var el = _ref81.actualNode;
18503
18709
  var nodeName2 = el.nodeName.toUpperCase();
18504
18710
  if (elementsThatCanBeDisabled.includes(nodeName2)) {
18505
18711
  out.push(el);
@@ -18538,8 +18744,8 @@
18538
18744
  }
18539
18745
  var focusable_element_evaluate_default = focusableElementEvaluate;
18540
18746
  function focusableModalOpenEvaluate(node, options, virtualNode) {
18541
- var tabbableElements = virtualNode.tabbableElements.map(function(_ref81) {
18542
- var actualNode = _ref81.actualNode;
18747
+ var tabbableElements = virtualNode.tabbableElements.map(function(_ref82) {
18748
+ var actualNode = _ref82.actualNode;
18543
18749
  return actualNode;
18544
18750
  });
18545
18751
  if (!tabbableElements || !tabbableElements.length) {
@@ -18571,8 +18777,8 @@
18571
18777
  if (!tabbableElements || !tabbableElements.length) {
18572
18778
  return true;
18573
18779
  }
18574
- var relatedNodes = tabbableElements.reduce(function(out, _ref82) {
18575
- var el = _ref82.actualNode;
18780
+ var relatedNodes = tabbableElements.reduce(function(out, _ref83) {
18781
+ var el = _ref83.actualNode;
18576
18782
  var nodeName2 = el.nodeName.toUpperCase();
18577
18783
  if (!elementsThatCanBeDisabled.includes(nodeName2)) {
18578
18784
  out.push(el);
@@ -18620,7 +18826,7 @@
18620
18826
  return focusableDescendants(child);
18621
18827
  });
18622
18828
  }
18623
- function noFocusbleContentEvaluate(node, options, virtualNode) {
18829
+ function frameFocusableContentEvaluate(node, options, virtualNode) {
18624
18830
  if (!virtualNode.children) {
18625
18831
  return void 0;
18626
18832
  }
@@ -18632,7 +18838,52 @@
18632
18838
  return void 0;
18633
18839
  }
18634
18840
  }
18635
- var no_focusable_content_evaluate_default = noFocusbleContentEvaluate;
18841
+ var frame_focusable_content_evaluate_default = frameFocusableContentEvaluate;
18842
+ function noFocusableContentEvaluate(node, options, virtualNode) {
18843
+ if (!virtualNode.children) {
18844
+ return void 0;
18845
+ }
18846
+ try {
18847
+ var focusableDescendants2 = getFocusableDescendants(virtualNode);
18848
+ if (!focusableDescendants2.length) {
18849
+ return true;
18850
+ }
18851
+ var notHiddenElements = focusableDescendants2.filter(usesUnreliableHidingStrategy);
18852
+ if (notHiddenElements.length > 0) {
18853
+ this.data({
18854
+ messageKey: 'notHidden'
18855
+ });
18856
+ this.relatedNodes(notHiddenElements);
18857
+ } else {
18858
+ this.relatedNodes(focusableDescendants2);
18859
+ }
18860
+ return false;
18861
+ } catch (e) {
18862
+ return void 0;
18863
+ }
18864
+ }
18865
+ function getFocusableDescendants(vNode) {
18866
+ if (!vNode.children) {
18867
+ if (vNode.props.nodeType === 1) {
18868
+ throw new Error('Cannot determine children');
18869
+ }
18870
+ return [];
18871
+ }
18872
+ var retVal = [];
18873
+ vNode.children.forEach(function(child) {
18874
+ var role = get_role_default(child);
18875
+ if (get_role_type_default(role) === 'widget' && is_focusable_default(child)) {
18876
+ retVal.push(child);
18877
+ } else {
18878
+ retVal.push.apply(retVal, _toConsumableArray(getFocusableDescendants(child)));
18879
+ }
18880
+ });
18881
+ return retVal;
18882
+ }
18883
+ function usesUnreliableHidingStrategy(vNode) {
18884
+ var tabIndex = parseInt(vNode.attr('tabindex'), 10);
18885
+ return !isNaN(tabIndex) && tabIndex < 0;
18886
+ }
18636
18887
  function tabindexEvaluate(node, options, virtualNode) {
18637
18888
  var tabIndex = parseInt(virtualNode.attr('tabindex'), 10);
18638
18889
  return isNaN(tabIndex) ? true : tabIndex <= 0;
@@ -18754,18 +19005,17 @@
18754
19005
  return sanitize_default(noUnicodeStr);
18755
19006
  }
18756
19007
  function labelContentNameMismatchEvaluate(node, options, virtualNode) {
18757
- var _ref83 = options || {}, pixelThreshold = _ref83.pixelThreshold, occuranceThreshold = _ref83.occuranceThreshold;
19008
+ var _ref84 = options || {}, pixelThreshold = _ref84.pixelThreshold, occuranceThreshold = _ref84.occuranceThreshold;
18758
19009
  var accText = accessible_text_default(node).toLowerCase();
18759
19010
  if (is_human_interpretable_default(accText) < 1) {
18760
19011
  return void 0;
18761
19012
  }
18762
- var textVNodes = visible_text_nodes_default(virtualNode);
18763
- var nonLigatureText = textVNodes.filter(function(textVNode) {
18764
- return !is_icon_ligature_default(textVNode, pixelThreshold, occuranceThreshold);
18765
- }).map(function(textVNode) {
18766
- return textVNode.actualNode.nodeValue;
18767
- }).join('');
18768
- var visibleText = sanitize_default(nonLigatureText).toLowerCase();
19013
+ var visibleText = sanitize_default(subtree_text_default(virtualNode, {
19014
+ subtreeDescendant: true,
19015
+ ignoreIconLigature: true,
19016
+ pixelThreshold: pixelThreshold,
19017
+ occuranceThreshold: occuranceThreshold
19018
+ })).toLowerCase();
18769
19019
  if (!visibleText) {
18770
19020
  return true;
18771
19021
  }
@@ -18913,13 +19163,13 @@
18913
19163
  return false;
18914
19164
  }
18915
19165
  var dlitem_evaluate_default = dlitemEvaluate;
18916
- function listitemEvaluate(node) {
18917
- var parent = get_composed_parent_default(node);
19166
+ function listitemEvaluate(node, options, virtualNode) {
19167
+ var parent = virtualNode.parent;
18918
19168
  if (!parent) {
18919
19169
  return void 0;
18920
19170
  }
18921
- var parentTagName = parent.nodeName.toUpperCase();
18922
- var parentRole = (parent.getAttribute('role') || '').toLowerCase();
19171
+ var parentNodeName = parent.props.nodeName;
19172
+ var parentRole = get_explicit_role_default(parent);
18923
19173
  if ([ 'presentation', 'none', 'list' ].includes(parentRole)) {
18924
19174
  return true;
18925
19175
  }
@@ -18929,9 +19179,8 @@
18929
19179
  });
18930
19180
  return false;
18931
19181
  }
18932
- return [ 'UL', 'OL' ].includes(parentTagName);
19182
+ return [ 'ul', 'ol', 'menu' ].includes(parentNodeName);
18933
19183
  }
18934
- var listitem_evaluate_default = listitemEvaluate;
18935
19184
  function onlyDlitemsEvaluate(node, options, virtualNode) {
18936
19185
  var ALLOWED_ROLES = [ 'definition', 'term', 'list' ];
18937
19186
  var base = {
@@ -19119,11 +19368,11 @@
19119
19368
  }
19120
19369
  var no_autoplay_audio_evaluate_default = noAutoplayAudioEvaluate;
19121
19370
  function ariaAllowedAttrMatches(node, virtualNode) {
19122
- var aria46 = /^aria-/;
19371
+ var aria48 = /^aria-/;
19123
19372
  var attrs = virtualNode.attrNames;
19124
19373
  if (attrs.length) {
19125
- for (var _i21 = 0, l = attrs.length; _i21 < l; _i21++) {
19126
- if (aria46.test(attrs[_i21])) {
19374
+ for (var _i23 = 0, l = attrs.length; _i23 < l; _i23++) {
19375
+ if (aria48.test(attrs[_i23])) {
19127
19376
  return true;
19128
19377
  }
19129
19378
  }
@@ -19139,9 +19388,9 @@
19139
19388
  }
19140
19389
  var aria_allowed_role_matches_default = ariaAllowedRoleMatches;
19141
19390
  function ariaHasAttrMatches(node, virtualNode) {
19142
- var aria46 = /^aria-/;
19391
+ var aria48 = /^aria-/;
19143
19392
  return virtualNode.attrNames.some(function(attr) {
19144
- return aria46.test(attr);
19393
+ return aria48.test(attr);
19145
19394
  });
19146
19395
  }
19147
19396
  var aria_has_attr_matches_default = ariaHasAttrMatches;
@@ -19434,7 +19683,7 @@
19434
19683
  }
19435
19684
  function isLandmarkVirtual(virtualNode2) {
19436
19685
  var actualNode = virtualNode2.actualNode;
19437
- var landmarkRoles2 = get_aria_roles_by_type_default('landmark');
19686
+ var landmarkRoles3 = get_aria_roles_by_type_default('landmark');
19438
19687
  var role = get_role_default(actualNode);
19439
19688
  if (!role) {
19440
19689
  return false;
@@ -19447,7 +19696,7 @@
19447
19696
  var accessibleText2 = accessible_text_virtual_default(virtualNode2);
19448
19697
  return !!accessibleText2;
19449
19698
  }
19450
- return landmarkRoles2.indexOf(role) >= 0 || role === 'region';
19699
+ return landmarkRoles3.indexOf(role) >= 0 || role === 'region';
19451
19700
  }
19452
19701
  return isLandmarkVirtual(virtualNode) && is_visible_default(node, true);
19453
19702
  }
@@ -19504,7 +19753,7 @@
19504
19753
  if (!role || [ 'none', 'presentation' ].includes(role)) {
19505
19754
  return true;
19506
19755
  }
19507
- var _ref84 = aria_roles_default[role] || {}, accessibleNameRequired = _ref84.accessibleNameRequired;
19756
+ var _ref85 = aria_roles_default[role] || {}, accessibleNameRequired = _ref85.accessibleNameRequired;
19508
19757
  if (accessibleNameRequired || is_focusable_default(virtualNode)) {
19509
19758
  return true;
19510
19759
  }
@@ -19544,7 +19793,7 @@
19544
19793
  }
19545
19794
  var p_as_heading_matches_default = pAsHeadingMatches;
19546
19795
  function scrollableRegionFocusableMatches(node, virtualNode) {
19547
- if (!!get_scroll_default(node, 13) === false) {
19796
+ if (!!_getScroll(node, 13) === false) {
19548
19797
  return false;
19549
19798
  }
19550
19799
  var role = get_explicit_role_default(virtualNode);
@@ -19576,7 +19825,7 @@
19576
19825
  }
19577
19826
  var scrollable_region_focusable_matches_default = scrollableRegionFocusableMatches;
19578
19827
  function skipLinkMatches(node) {
19579
- return is_skip_link_default(node) && is_offscreen_default(node);
19828
+ return _isSkipLink(node) && is_offscreen_default(node);
19580
19829
  }
19581
19830
  var skip_link_matches_default = skipLinkMatches;
19582
19831
  function windowIsTopMatches(node) {
@@ -19596,7 +19845,7 @@
19596
19845
  'aria-errormessage-evaluate': aria_errormessage_evaluate_default,
19597
19846
  'aria-hidden-body-evaluate': aria_hidden_body_evaluate_default,
19598
19847
  'aria-level-evaluate': aria_level_evaluate_default,
19599
- 'aria-prohibited-attr-evaluate': aria_prohibited_attr_evaluate_default,
19848
+ 'aria-prohibited-attr-evaluate': ariaProhibitedAttrEvaluate,
19600
19849
  'aria-required-attr-evaluate': aria_required_attr_evaluate_default,
19601
19850
  'aria-required-children-evaluate': aria_required_children_evaluate_default,
19602
19851
  'aria-required-parent-evaluate': aria_required_parent_evaluate_default,
@@ -19604,6 +19853,7 @@
19604
19853
  'aria-unsupported-attr-evaluate': aria_unsupported_attr_evaluate_default,
19605
19854
  'aria-valid-attr-evaluate': aria_valid_attr_evaluate_default,
19606
19855
  'aria-valid-attr-value-evaluate': aria_valid_attr_value_evaluate_default,
19856
+ 'deprecatedrole-evaluate': deprecatedroleEvaluate,
19607
19857
  'fallbackrole-evaluate': fallbackrole_evaluate_default,
19608
19858
  'has-global-aria-attribute-evaluate': has_global_aria_attribute_evaluate_default,
19609
19859
  'has-implicit-chromium-role-matches': has_implicit_chromium_role_matches_default,
@@ -19667,7 +19917,8 @@
19667
19917
  'focusable-no-name-evaluate': focusable_no_name_evaluate_default,
19668
19918
  'focusable-not-tabbable-evaluate': focusable_not_tabbable_evaluate_default,
19669
19919
  'landmark-is-top-level-evaluate': landmark_is_top_level_evaluate_default,
19670
- 'no-focusable-content-evaluate': no_focusable_content_evaluate_default,
19920
+ 'frame-focusable-content-evaluate': frame_focusable_content_evaluate_default,
19921
+ 'no-focusable-content-evaluate': noFocusableContentEvaluate,
19671
19922
  'tabindex-evaluate': tabindex_evaluate_default,
19672
19923
  'alt-space-value-evaluate': alt_space_value_evaluate_default,
19673
19924
  'duplicate-img-label-evaluate': duplicate_img_label_evaluate_default,
@@ -19684,7 +19935,7 @@
19684
19935
  'valid-lang-evaluate': valid_lang_evaluate_default,
19685
19936
  'xml-lang-mismatch-evaluate': xml_lang_mismatch_evaluate_default,
19686
19937
  'dlitem-evaluate': dlitem_evaluate_default,
19687
- 'listitem-evaluate': listitem_evaluate_default,
19938
+ 'listitem-evaluate': listitemEvaluate,
19688
19939
  'only-dlitems-evaluate': only_dlitems_evaluate_default,
19689
19940
  'only-listitems-evaluate': only_listitems_evaluate_default,
19690
19941
  'structured-dlitems-evaluate': structured_dlitems_evaluate_default,
@@ -20319,8 +20570,8 @@
20319
20570
  lang: this.lang
20320
20571
  };
20321
20572
  var checkIDs = Object.keys(this.data.checks);
20322
- for (var _i22 = 0; _i22 < checkIDs.length; _i22++) {
20323
- var id = checkIDs[_i22];
20573
+ for (var _i24 = 0; _i24 < checkIDs.length; _i24++) {
20574
+ var id = checkIDs[_i24];
20324
20575
  var check4 = this.data.checks[id];
20325
20576
  var _check4$messages = check4.messages, pass = _check4$messages.pass, fail = _check4$messages.fail, incomplete = _check4$messages.incomplete;
20326
20577
  locale.checks[id] = {
@@ -20330,8 +20581,8 @@
20330
20581
  };
20331
20582
  }
20332
20583
  var ruleIDs = Object.keys(this.data.rules);
20333
- for (var _i23 = 0; _i23 < ruleIDs.length; _i23++) {
20334
- var _id = ruleIDs[_i23];
20584
+ for (var _i25 = 0; _i25 < ruleIDs.length; _i25++) {
20585
+ var _id = ruleIDs[_i25];
20335
20586
  var rule3 = this.data.rules[_id];
20336
20587
  var description = rule3.description, help = rule3.help;
20337
20588
  locale.rules[_id] = {
@@ -20340,8 +20591,8 @@
20340
20591
  };
20341
20592
  }
20342
20593
  var failureSummaries = Object.keys(this.data.failureSummaries);
20343
- for (var _i24 = 0; _i24 < failureSummaries.length; _i24++) {
20344
- var type = failureSummaries[_i24];
20594
+ for (var _i26 = 0; _i26 < failureSummaries.length; _i26++) {
20595
+ var type = failureSummaries[_i26];
20345
20596
  var failureSummary2 = this.data.failureSummaries[type];
20346
20597
  var failureMessage = failureSummary2.failureMessage;
20347
20598
  locale.failureSummaries[type] = {
@@ -20364,8 +20615,8 @@
20364
20615
  key: '_applyCheckLocale',
20365
20616
  value: function _applyCheckLocale(checks) {
20366
20617
  var keys = Object.keys(checks);
20367
- for (var _i25 = 0; _i25 < keys.length; _i25++) {
20368
- var id = keys[_i25];
20618
+ for (var _i27 = 0; _i27 < keys.length; _i27++) {
20619
+ var id = keys[_i27];
20369
20620
  if (!this.data.checks[id]) {
20370
20621
  throw new Error('Locale provided for unknown check: "'.concat(id, '"'));
20371
20622
  }
@@ -20376,8 +20627,8 @@
20376
20627
  key: '_applyRuleLocale',
20377
20628
  value: function _applyRuleLocale(rules) {
20378
20629
  var keys = Object.keys(rules);
20379
- for (var _i26 = 0; _i26 < keys.length; _i26++) {
20380
- var id = keys[_i26];
20630
+ for (var _i28 = 0; _i28 < keys.length; _i28++) {
20631
+ var id = keys[_i28];
20381
20632
  if (!this.data.rules[id]) {
20382
20633
  throw new Error('Locale provided for unknown rule: "'.concat(id, '"'));
20383
20634
  }
@@ -20388,8 +20639,8 @@
20388
20639
  key: '_applyFailureSummaries',
20389
20640
  value: function _applyFailureSummaries(messages) {
20390
20641
  var keys = Object.keys(messages);
20391
- for (var _i27 = 0; _i27 < keys.length; _i27++) {
20392
- var key = keys[_i27];
20642
+ for (var _i29 = 0; _i29 < keys.length; _i29++) {
20643
+ var key = keys[_i29];
20393
20644
  if (!this.data.failureSummaries[key]) {
20394
20645
  throw new Error('Locale provided for unknown failureMessage: "'.concat(key, '"'));
20395
20646
  }
@@ -20660,6 +20911,9 @@
20660
20911
  brand: this.brand,
20661
20912
  application: this.application
20662
20913
  };
20914
+ if (typeof branding === 'string') {
20915
+ this.application = branding;
20916
+ }
20663
20917
  if (branding && branding.hasOwnProperty('brand') && branding.brand && typeof branding.brand === 'string') {
20664
20918
  this.brand = branding.brand;
20665
20919
  }
@@ -20735,8 +20989,8 @@
20735
20989
  });
20736
20990
  };
20737
20991
  }
20738
- function getHelpUrl(_ref85, ruleId, version) {
20739
- var brand = _ref85.brand, application = _ref85.application, lang = _ref85.lang;
20992
+ function getHelpUrl(_ref86, ruleId, version) {
20993
+ var brand = _ref86.brand, application = _ref86.application, lang = _ref86.lang;
20740
20994
  return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
20741
20995
  }
20742
20996
  var audit_default = Audit;
@@ -21150,9 +21404,9 @@
21150
21404
  });
21151
21405
  }
21152
21406
  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];
21407
+ function normalizeRunParams(_ref87) {
21408
+ var _ref89, _options$reporter, _axe$_audit;
21409
+ var _ref88 = _slicedToArray(_ref87, 3), context5 = _ref88[0], options = _ref88[1], callback = _ref88[2];
21156
21410
  var typeErr = new TypeError('axe.run arguments are invalid');
21157
21411
  if (!isContext(context5)) {
21158
21412
  if (callback !== void 0) {
@@ -21173,7 +21427,7 @@
21173
21427
  throw typeErr;
21174
21428
  }
21175
21429
  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';
21430
+ 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
21431
  return {
21178
21432
  context: context5,
21179
21433
  options: options,
@@ -21298,14 +21552,14 @@
21298
21552
  return new Promise(function(res, rej) {
21299
21553
  axe._audit.run(contextObj, options, res, rej);
21300
21554
  }).then(function(results) {
21301
- results = results.map(function(_ref89) {
21302
- var nodes = _ref89.nodes, result = _objectWithoutProperties(_ref89, _excluded8);
21555
+ results = results.map(function(_ref90) {
21556
+ var nodes = _ref90.nodes, result = _objectWithoutProperties(_ref90, _excluded8);
21303
21557
  return _extends({
21304
21558
  nodes: nodes.map(serializeNode)
21305
21559
  }, result);
21306
21560
  });
21307
- var frames = contextObj.frames.map(function(_ref90) {
21308
- var node = _ref90.node;
21561
+ var frames = contextObj.frames.map(function(_ref91) {
21562
+ var node = _ref91.node;
21309
21563
  return new dq_element_default(node, options).toJSON();
21310
21564
  });
21311
21565
  var environmentData;
@@ -21322,13 +21576,13 @@
21322
21576
  teardown_default();
21323
21577
  });
21324
21578
  }
21325
- function serializeNode(_ref91) {
21326
- var node = _ref91.node, nodeResult = _objectWithoutProperties(_ref91, _excluded9);
21579
+ function serializeNode(_ref92) {
21580
+ var node = _ref92.node, nodeResult = _objectWithoutProperties(_ref92, _excluded9);
21327
21581
  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);
21582
+ for (var _i30 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i30 < _arr2.length; _i30++) {
21583
+ var type = _arr2[_i30];
21584
+ nodeResult[type] = nodeResult[type].map(function(_ref93) {
21585
+ var relatedNodes = _ref93.relatedNodes, checkResult = _objectWithoutProperties(_ref93, _excluded10);
21332
21586
  return _extends({}, checkResult, {
21333
21587
  relatedNodes: relatedNodes.map(function(node2) {
21334
21588
  return node2.toJSON();
@@ -21339,14 +21593,14 @@
21339
21593
  return nodeResult;
21340
21594
  }
21341
21595
  function finishRun(partialResults) {
21342
- var _ref94, _options$reporter2, _axe$_audit2;
21596
+ var _ref95, _options$reporter2, _axe$_audit2;
21343
21597
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
21344
21598
  options = clone_default(options);
21345
- var _ref93 = partialResults.find(function(r) {
21599
+ var _ref94 = partialResults.find(function(r) {
21346
21600
  return r.environmentData;
21347
- }) || {}, environmentData = _ref93.environmentData;
21601
+ }) || {}, environmentData = _ref94.environmentData;
21348
21602
  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';
21603
+ 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
21604
  setFrameSpec(partialResults);
21351
21605
  var results = merge_results_default(partialResults);
21352
21606
  results = axe._audit.after(results, options);
@@ -21376,8 +21630,8 @@
21376
21630
  _iterator4.f();
21377
21631
  }
21378
21632
  }
21379
- function getMergedFrameSpecs(_ref95) {
21380
- var childFrameSpecs = _ref95.frames, parentFrameSpec = _ref95.frameSpec;
21633
+ function getMergedFrameSpecs(_ref96) {
21634
+ var childFrameSpecs = _ref96.frames, parentFrameSpec = _ref96.frameSpec;
21381
21635
  if (!parentFrameSpec) {
21382
21636
  return childFrameSpecs;
21383
21637
  }
@@ -21437,12 +21691,12 @@
21437
21691
  var transformedResults = results.map(function(result) {
21438
21692
  var transformedResult = _extends({}, result);
21439
21693
  var types = [ 'passes', 'violations', 'incomplete', 'inapplicable' ];
21440
- for (var _i29 = 0, _types = types; _i29 < _types.length; _i29++) {
21441
- var type = _types[_i29];
21694
+ for (var _i31 = 0, _types = types; _i31 < _types.length; _i31++) {
21695
+ var type = _types[_i31];
21442
21696
  if (transformedResult[type] && Array.isArray(transformedResult[type])) {
21443
- transformedResult[type] = transformedResult[type].map(function(_ref96) {
21697
+ transformedResult[type] = transformedResult[type].map(function(_ref97) {
21444
21698
  var _node;
21445
- var node = _ref96.node, typeResult = _objectWithoutProperties(_ref96, _excluded13);
21699
+ var node = _ref97.node, typeResult = _objectWithoutProperties(_ref97, _excluded13);
21446
21700
  node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
21447
21701
  return _extends({
21448
21702
  node: node
@@ -21665,6 +21919,10 @@
21665
21919
  description: 'Ensures each page has at least one mechanism for a user to bypass navigation and jump straight to the content',
21666
21920
  help: 'Page must have means to bypass repeated blocks'
21667
21921
  },
21922
+ 'color-contrast-enhanced': {
21923
+ description: 'Ensures the contrast between foreground and background colors meets WCAG 2 AAA contrast ratio thresholds',
21924
+ help: 'Elements must have sufficient color contrast'
21925
+ },
21668
21926
  'color-contrast': {
21669
21927
  description: 'Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds',
21670
21928
  help: 'Elements must have sufficient color contrast'
@@ -21850,7 +22108,7 @@
21850
22108
  help: 'Zooming and scaling should not be disabled'
21851
22109
  },
21852
22110
  'nested-interactive': {
21853
- description: 'Ensure controls are not nested as they are not announced by screen readers',
22111
+ 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
22112
  help: 'Interactive controls must not be nested'
21855
22113
  },
21856
22114
  'no-autoplay-audio': {
@@ -21956,7 +22214,8 @@
21956
22214
  fail: {
21957
22215
  singular: 'ARIA attribute is not allowed: ${data.values}',
21958
22216
  plural: 'ARIA attributes are not allowed: ${data.values}'
21959
- }
22217
+ },
22218
+ incomplete: 'Check that there is no problem if the ARIA attribute is ignored on this element: ${data.values}'
21960
22219
  }
21961
22220
  },
21962
22221
  'aria-allowed-role': {
@@ -22007,8 +22266,18 @@
22007
22266
  impact: 'serious',
22008
22267
  messages: {
22009
22268
  pass: 'ARIA attribute is allowed',
22010
- fail: 'ARIA attribute: ${data.values} is not allowed. Use a different role attribute or element.',
22011
- incomplete: 'ARIA attribute: ${data.values} is not well supported. Use a different role attribute or element.'
22269
+ fail: {
22270
+ hasRolePlural: '${data.prohibited} attributes cannot be used with role "${data.role}".',
22271
+ hasRoleSingular: '${data.prohibited} attribute cannot be used with role "${data.role}".',
22272
+ noRolePlural: '${data.prohibited} attributes cannot be used on a ${data.nodeName} with no valid role attribute.',
22273
+ noRoleSingular: '${data.prohibited} attribute cannot be used on a ${data.nodeName} with no valid role attribute.'
22274
+ },
22275
+ incomplete: {
22276
+ hasRoleSingular: '${data.prohibited} attribute is not well supported with role "${data.role}".',
22277
+ hasRolePlural: '${data.prohibited} attributes are not well supported with role "${data.role}".',
22278
+ noRoleSingular: '${data.prohibited} attribute is not well supported on a ${data.nodeName} with no valid role attribute.',
22279
+ noRolePlural: '${data.prohibited} attributes are not well supported on a ${data.nodeName} with no valid role attribute.'
22280
+ }
22012
22281
  }
22013
22282
  },
22014
22283
  'aria-required-attr': {
@@ -22085,6 +22354,13 @@
22085
22354
  }
22086
22355
  }
22087
22356
  },
22357
+ deprecatedrole: {
22358
+ impact: 'minor',
22359
+ messages: {
22360
+ pass: 'ARIA role is not deprecated',
22361
+ fail: 'The role used is deprecated: ${data.values}'
22362
+ }
22363
+ },
22088
22364
  fallbackrole: {
22089
22365
  impact: 'serious',
22090
22366
  messages: {
@@ -22148,6 +22424,32 @@
22148
22424
  fail: 'Element has invalid semantics for an element in the focus order.'
22149
22425
  }
22150
22426
  },
22427
+ 'color-contrast-enhanced': {
22428
+ impact: 'serious',
22429
+ messages: {
22430
+ pass: 'Element has sufficient color contrast of ${data.contrastRatio}',
22431
+ fail: {
22432
+ default: 'Element has insufficient color contrast of ${data.contrastRatio} (foreground color: ${data.fgColor}, background color: ${data.bgColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}',
22433
+ fgOnShadowColor: 'Element has insufficient color contrast of ${data.contrastRatio} between the foreground and shadow color (foreground color: ${data.fgColor}, text-shadow color: ${data.shadowColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}',
22434
+ shadowOnBgColor: 'Element has insufficient color contrast of ${data.contrastRatio} between the shadow color and background color (text-shadow color: ${data.shadowColor}, background color: ${data.bgColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}'
22435
+ },
22436
+ incomplete: {
22437
+ default: 'Unable to determine contrast ratio',
22438
+ bgImage: 'Element\'s background color could not be determined due to a background image',
22439
+ bgGradient: 'Element\'s background color could not be determined due to a background gradient',
22440
+ imgNode: 'Element\'s background color could not be determined because element contains an image node',
22441
+ bgOverlap: 'Element\'s background color could not be determined because it is overlapped by another element',
22442
+ fgAlpha: 'Element\'s foreground color could not be determined because of alpha transparency',
22443
+ elmPartiallyObscured: 'Element\'s background color could not be determined because it\'s partially obscured by another element',
22444
+ elmPartiallyObscuring: 'Element\'s background color could not be determined because it partially overlaps other elements',
22445
+ outsideViewport: 'Element\'s background color could not be determined because it\'s outside the viewport',
22446
+ equalRatio: 'Element has a 1:1 contrast ratio with the background',
22447
+ shortTextContent: 'Element content is too short to determine if it is actual text content',
22448
+ nonBmp: 'Element content contains only non-text characters',
22449
+ pseudoContent: 'Element\'s background color could not be determined due to a pseudo element'
22450
+ }
22451
+ }
22452
+ },
22151
22453
  'color-contrast': {
22152
22454
  impact: 'serious',
22153
22455
  messages: {
@@ -22272,7 +22574,10 @@
22272
22574
  impact: 'serious',
22273
22575
  messages: {
22274
22576
  pass: 'Element does not have focusable descendants',
22275
- fail: 'Element has focusable descendants',
22577
+ fail: {
22578
+ default: 'Element has focusable descendants',
22579
+ 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\')'
22580
+ },
22276
22581
  incomplete: 'Could not determine if element has descendants'
22277
22582
  }
22278
22583
  },
@@ -22841,7 +23146,7 @@
22841
23146
  }
22842
23147
  }
22843
23148
  },
22844
- incompleteFallbackMessage: {}
23149
+ incompleteFallbackMessage: 'axe couldn\'t tell the reason. Time to break out the element inspector!'
22845
23150
  },
22846
23151
  rules: [ {
22847
23152
  id: 'accesskeys',
@@ -23043,7 +23348,7 @@
23043
23348
  tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
23044
23349
  all: [],
23045
23350
  any: [],
23046
- none: [ 'fallbackrole', 'invalidrole', 'abstractrole', 'unsupportedrole' ]
23351
+ none: [ 'fallbackrole', 'invalidrole', 'abstractrole', 'unsupportedrole', 'deprecatedrole' ]
23047
23352
  }, {
23048
23353
  id: 'aria-text',
23049
23354
  selector: '[role=text]',
@@ -23126,7 +23431,12 @@
23126
23431
  matches: 'autocomplete-matches',
23127
23432
  tags: [ 'cat.forms', 'wcag21aa', 'wcag135' ],
23128
23433
  actIds: [ '73f2c2' ],
23129
- all: [ 'autocomplete-valid' ],
23434
+ all: [ {
23435
+ options: {
23436
+ stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null' ]
23437
+ },
23438
+ id: 'autocomplete-valid'
23439
+ } ],
23130
23440
  any: [],
23131
23441
  none: []
23132
23442
  }, {
@@ -23183,6 +23493,35 @@
23183
23493
  id: 'landmark'
23184
23494
  } ],
23185
23495
  none: []
23496
+ }, {
23497
+ id: 'color-contrast-enhanced',
23498
+ matches: 'color-contrast-matches',
23499
+ excludeHidden: false,
23500
+ enabled: false,
23501
+ tags: [ 'cat.color', 'wcag2aaa', 'wcag146' ],
23502
+ all: [],
23503
+ any: [ {
23504
+ options: {
23505
+ ignoreUnicode: true,
23506
+ ignoreLength: false,
23507
+ ignorePseudo: false,
23508
+ boldValue: 700,
23509
+ boldTextPt: 14,
23510
+ largeTextPt: 18,
23511
+ contrastRatio: {
23512
+ normal: {
23513
+ expected: 7
23514
+ },
23515
+ large: {
23516
+ expected: 4.5
23517
+ }
23518
+ },
23519
+ pseudoSizeThreshold: .25,
23520
+ shadowOutlineEmMax: .1
23521
+ },
23522
+ id: 'color-contrast-enhanced'
23523
+ } ],
23524
+ none: []
23186
23525
  }, {
23187
23526
  id: 'color-contrast',
23188
23527
  matches: 'color-contrast-matches',
@@ -23206,7 +23545,7 @@
23206
23545
  }
23207
23546
  },
23208
23547
  pseudoSizeThreshold: .25,
23209
- shadowOutlineEmMax: .1
23548
+ shadowOutlineEmMax: .2
23210
23549
  },
23211
23550
  id: 'color-contrast'
23212
23551
  } ],
@@ -24007,6 +24346,9 @@
24007
24346
  id: 'aria-valid-attr',
24008
24347
  evaluate: 'aria-valid-attr-evaluate',
24009
24348
  options: []
24349
+ }, {
24350
+ id: 'deprecatedrole',
24351
+ evaluate: 'deprecatedrole-evaluate'
24010
24352
  }, {
24011
24353
  id: 'fallbackrole',
24012
24354
  evaluate: 'fallbackrole-evaluate'
@@ -24035,6 +24377,27 @@
24035
24377
  options: {
24036
24378
  roles: [ 'tooltip' ]
24037
24379
  }
24380
+ }, {
24381
+ id: 'color-contrast-enhanced',
24382
+ evaluate: 'color-contrast-evaluate',
24383
+ options: {
24384
+ ignoreUnicode: true,
24385
+ ignoreLength: false,
24386
+ ignorePseudo: false,
24387
+ boldValue: 700,
24388
+ boldTextPt: 14,
24389
+ largeTextPt: 18,
24390
+ contrastRatio: {
24391
+ normal: {
24392
+ expected: 7
24393
+ },
24394
+ large: {
24395
+ expected: 4.5
24396
+ }
24397
+ },
24398
+ pseudoSizeThreshold: .25,
24399
+ shadowOutlineEmMax: .1
24400
+ }
24038
24401
  }, {
24039
24402
  id: 'color-contrast',
24040
24403
  evaluate: 'color-contrast-evaluate',
@@ -24054,7 +24417,7 @@
24054
24417
  }
24055
24418
  },
24056
24419
  pseudoSizeThreshold: .25,
24057
- shadowOutlineEmMax: .1
24420
+ shadowOutlineEmMax: .2
24058
24421
  }
24059
24422
  }, {
24060
24423
  id: 'link-in-text-block',
@@ -24065,7 +24428,10 @@
24065
24428
  deprecated: true
24066
24429
  }, {
24067
24430
  id: 'autocomplete-valid',
24068
- evaluate: 'autocomplete-valid-evaluate'
24431
+ evaluate: 'autocomplete-valid-evaluate',
24432
+ options: {
24433
+ stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null' ]
24434
+ }
24069
24435
  }, {
24070
24436
  id: 'accesskeys',
24071
24437
  evaluate: 'accesskeys-evaluate',
@@ -24090,7 +24456,7 @@
24090
24456
  evaluate: 'focusable-not-tabbable-evaluate'
24091
24457
  }, {
24092
24458
  id: 'frame-focusable-content',
24093
- evaluate: 'no-focusable-content-evaluate'
24459
+ evaluate: 'frame-focusable-content-evaluate'
24094
24460
  }, {
24095
24461
  id: 'landmark-is-top-level',
24096
24462
  evaluate: 'landmark-is-top-level-evaluate'