axe-core 4.3.3 → 4.3.5-canary.ae55ddb

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/axe.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! axe v4.3.3
1
+ /*! axe v4.3.5-canary.ae55ddb
2
2
  * Copyright (c) 2021 Deque Systems, Inc.
3
3
  *
4
4
  * Your use of this Source Code Form is subject to the terms of the Mozilla Public
@@ -27,7 +27,7 @@
27
27
  return _typeof(obj);
28
28
  }
29
29
  var axe = axe || {};
30
- axe.version = '4.3.3';
30
+ axe.version = '4.3.5-canary.ae55ddb';
31
31
  if (typeof define === 'function' && define.amd) {
32
32
  define('axe-core', [], function() {
33
33
  return axe;
@@ -1393,11 +1393,11 @@
1393
1393
  } else {
1394
1394
  mixin = require_mixin();
1395
1395
  generate = function() {
1396
- var cache20 = [];
1396
+ var cache21 = [];
1397
1397
  return function(length) {
1398
1398
  var args, i = 0;
1399
- if (cache20[length]) {
1400
- return cache20[length];
1399
+ if (cache21[length]) {
1400
+ return cache21[length];
1401
1401
  }
1402
1402
  args = [];
1403
1403
  while (length--) {
@@ -2216,7 +2216,7 @@
2216
2216
  var _on = ee.on;
2217
2217
  var emit = ee.emit;
2218
2218
  module.exports = function(original, length, options) {
2219
- var cache20 = create(null), conf, memLength, _get, set, del, _clear, extDel, extGet, extHas, normalizer, getListeners, setListeners, deleteListeners, memoized, resolve;
2219
+ var cache21 = create(null), conf, memLength, _get, set, del, _clear, extDel, extGet, extHas, normalizer, getListeners, setListeners, deleteListeners, memoized, resolve;
2220
2220
  if (length !== false) {
2221
2221
  memLength = length;
2222
2222
  } else if (isNaN(original.length)) {
@@ -2242,11 +2242,11 @@
2242
2242
  }
2243
2243
  id = _get(args);
2244
2244
  if (id !== null) {
2245
- if (hasOwnProperty.call(cache20, id)) {
2245
+ if (hasOwnProperty.call(cache21, id)) {
2246
2246
  if (getListeners) {
2247
2247
  conf.emit('get', id, args, this);
2248
2248
  }
2249
- return cache20[id];
2249
+ return cache21[id];
2250
2250
  }
2251
2251
  }
2252
2252
  if (args.length === 1) {
@@ -2260,10 +2260,10 @@
2260
2260
  throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
2261
2261
  }
2262
2262
  id = set(args);
2263
- } else if (hasOwnProperty.call(cache20, id)) {
2263
+ } else if (hasOwnProperty.call(cache21, id)) {
2264
2264
  throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
2265
2265
  }
2266
- cache20[id] = result;
2266
+ cache21[id] = result;
2267
2267
  if (setListeners) {
2268
2268
  conf.emit('set', id, null, result);
2269
2269
  }
@@ -2272,21 +2272,21 @@
2272
2272
  } else if (length === 0) {
2273
2273
  memoized = function memoized() {
2274
2274
  var result;
2275
- if (hasOwnProperty.call(cache20, 'data')) {
2275
+ if (hasOwnProperty.call(cache21, 'data')) {
2276
2276
  if (getListeners) {
2277
2277
  conf.emit('get', 'data', arguments, this);
2278
2278
  }
2279
- return cache20.data;
2279
+ return cache21.data;
2280
2280
  }
2281
2281
  if (arguments.length) {
2282
2282
  result = apply.call(original, this, arguments);
2283
2283
  } else {
2284
2284
  result = call.call(original, this);
2285
2285
  }
2286
- if (hasOwnProperty.call(cache20, 'data')) {
2286
+ if (hasOwnProperty.call(cache21, 'data')) {
2287
2287
  throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
2288
2288
  }
2289
- cache20.data = result;
2289
+ cache21.data = result;
2290
2290
  if (setListeners) {
2291
2291
  conf.emit('set', 'data', null, result);
2292
2292
  }
@@ -2299,21 +2299,21 @@
2299
2299
  args = resolve(arguments);
2300
2300
  }
2301
2301
  id = String(args[0]);
2302
- if (hasOwnProperty.call(cache20, id)) {
2302
+ if (hasOwnProperty.call(cache21, id)) {
2303
2303
  if (getListeners) {
2304
2304
  conf.emit('get', id, args, this);
2305
2305
  }
2306
- return cache20[id];
2306
+ return cache21[id];
2307
2307
  }
2308
2308
  if (args.length === 1) {
2309
2309
  result = call.call(original, this, args[0]);
2310
2310
  } else {
2311
2311
  result = apply.call(original, this, args);
2312
2312
  }
2313
- if (hasOwnProperty.call(cache20, id)) {
2313
+ if (hasOwnProperty.call(cache21, id)) {
2314
2314
  throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
2315
2315
  }
2316
- cache20[id] = result;
2316
+ cache21[id] = result;
2317
2317
  if (setListeners) {
2318
2318
  conf.emit('set', id, null, result);
2319
2319
  }
@@ -2334,28 +2334,28 @@
2334
2334
  return String(args[0]);
2335
2335
  },
2336
2336
  has: function has(id) {
2337
- return hasOwnProperty.call(cache20, id);
2337
+ return hasOwnProperty.call(cache21, id);
2338
2338
  },
2339
2339
  delete: function _delete(id) {
2340
2340
  var result;
2341
- if (!hasOwnProperty.call(cache20, id)) {
2341
+ if (!hasOwnProperty.call(cache21, id)) {
2342
2342
  return;
2343
2343
  }
2344
2344
  if (del) {
2345
2345
  del(id);
2346
2346
  }
2347
- result = cache20[id];
2348
- delete cache20[id];
2347
+ result = cache21[id];
2348
+ delete cache21[id];
2349
2349
  if (deleteListeners) {
2350
2350
  conf.emit('delete', id, result);
2351
2351
  }
2352
2352
  },
2353
2353
  clear: function clear() {
2354
- var oldCache = cache20;
2354
+ var oldCache = cache21;
2355
2355
  if (_clear) {
2356
2356
  _clear();
2357
2357
  }
2358
- cache20 = create(null);
2358
+ cache21 = create(null);
2359
2359
  conf.emit('clear', oldCache);
2360
2360
  },
2361
2361
  on: function on(type, listener) {
@@ -2400,7 +2400,7 @@
2400
2400
  extGet = defineLength(function() {
2401
2401
  var id, args = arguments;
2402
2402
  if (length === 0) {
2403
- return cache20.data;
2403
+ return cache21.data;
2404
2404
  }
2405
2405
  if (resolve) {
2406
2406
  args = resolve(args);
@@ -2410,7 +2410,7 @@
2410
2410
  } else {
2411
2411
  id = String(args[0]);
2412
2412
  }
2413
- return cache20[id];
2413
+ return cache21[id];
2414
2414
  });
2415
2415
  extHas = defineLength(function() {
2416
2416
  var id, args = arguments;
@@ -2561,7 +2561,7 @@
2561
2561
  var indexOf = require_e_index_of();
2562
2562
  var create = Object.create;
2563
2563
  module.exports = function() {
2564
- var lastId = 0, map = [], cache20 = create(null);
2564
+ var lastId = 0, map = [], cache21 = create(null);
2565
2565
  return {
2566
2566
  get: function get(args) {
2567
2567
  var index = 0, set = map, i, length = args.length;
@@ -2609,11 +2609,11 @@
2609
2609
  }
2610
2610
  set[1][i] = ++lastId;
2611
2611
  }
2612
- cache20[lastId] = args;
2612
+ cache21[lastId] = args;
2613
2613
  return lastId;
2614
2614
  },
2615
2615
  delete: function _delete(id) {
2616
- var index = 0, set = map, i, args = cache20[id], length = args.length, path = [];
2616
+ var index = 0, set = map, i, args = cache21[id], length = args.length, path = [];
2617
2617
  if (length === 0) {
2618
2618
  delete set[length];
2619
2619
  } else if (set = set[length]) {
@@ -2640,11 +2640,11 @@
2640
2640
  set[1].splice(i, 1);
2641
2641
  }
2642
2642
  }
2643
- delete cache20[id];
2643
+ delete cache21[id];
2644
2644
  },
2645
2645
  clear: function clear() {
2646
2646
  map = [];
2647
- cache20 = create(null);
2647
+ cache21 = create(null);
2648
2648
  }
2649
2649
  };
2650
2650
  };
@@ -2653,27 +2653,27 @@
2653
2653
  'use strict';
2654
2654
  var indexOf = require_e_index_of();
2655
2655
  module.exports = function() {
2656
- var lastId = 0, argsMap = [], cache20 = [];
2656
+ var lastId = 0, argsMap = [], cache21 = [];
2657
2657
  return {
2658
2658
  get: function get(args) {
2659
2659
  var index = indexOf.call(argsMap, args[0]);
2660
- return index === -1 ? null : cache20[index];
2660
+ return index === -1 ? null : cache21[index];
2661
2661
  },
2662
2662
  set: function set(args) {
2663
2663
  argsMap.push(args[0]);
2664
- cache20.push(++lastId);
2664
+ cache21.push(++lastId);
2665
2665
  return lastId;
2666
2666
  },
2667
2667
  delete: function _delete(id) {
2668
- var index = indexOf.call(cache20, id);
2668
+ var index = indexOf.call(cache21, id);
2669
2669
  if (index !== -1) {
2670
2670
  argsMap.splice(index, 1);
2671
- cache20.splice(index, 1);
2671
+ cache21.splice(index, 1);
2672
2672
  }
2673
2673
  },
2674
2674
  clear: function clear() {
2675
2675
  argsMap = [];
2676
- cache20 = [];
2676
+ cache21 = [];
2677
2677
  }
2678
2678
  };
2679
2679
  };
@@ -2683,7 +2683,7 @@
2683
2683
  var indexOf = require_e_index_of();
2684
2684
  var create = Object.create;
2685
2685
  module.exports = function(length) {
2686
- var lastId = 0, map = [ [], [] ], cache20 = create(null);
2686
+ var lastId = 0, map = [ [], [] ], cache21 = create(null);
2687
2687
  return {
2688
2688
  get: function get(args) {
2689
2689
  var index = 0, set = map, i;
@@ -2717,11 +2717,11 @@
2717
2717
  i = set[0].push(args[index]) - 1;
2718
2718
  }
2719
2719
  set[1][i] = ++lastId;
2720
- cache20[lastId] = args;
2720
+ cache21[lastId] = args;
2721
2721
  return lastId;
2722
2722
  },
2723
2723
  delete: function _delete(id) {
2724
- var index = 0, set = map, i, path = [], args = cache20[id];
2724
+ var index = 0, set = map, i, path = [], args = cache21[id];
2725
2725
  while (index < length - 1) {
2726
2726
  i = indexOf.call(set[0], args[index]);
2727
2727
  if (i === -1) {
@@ -2744,11 +2744,11 @@
2744
2744
  set[0].splice(i, 1);
2745
2745
  set[1].splice(i, 1);
2746
2746
  }
2747
- delete cache20[id];
2747
+ delete cache21[id];
2748
2748
  },
2749
2749
  clear: function clear() {
2750
2750
  map = [ [], [] ];
2751
- cache20 = create(null);
2751
+ cache21 = create(null);
2752
2752
  }
2753
2753
  };
2754
2754
  };
@@ -2861,7 +2861,7 @@
2861
2861
  var apply = Function.prototype.apply;
2862
2862
  var create = Object.create;
2863
2863
  require_registered_extensions().async = function(tbi, conf) {
2864
- var waiting = create(null), cache20 = create(null), base = conf.memoized, original = conf.original, currentCallback, currentContext, currentArgs;
2864
+ var waiting = create(null), cache21 = create(null), base = conf.memoized, original = conf.original, currentCallback, currentContext, currentArgs;
2865
2865
  conf.memoized = defineLength(function(arg) {
2866
2866
  var args = arguments, last = args[args.length - 1];
2867
2867
  if (typeof last === 'function') {
@@ -2893,8 +2893,8 @@
2893
2893
  currentCallback = currentContext = currentArgs = null;
2894
2894
  nextTick(function() {
2895
2895
  var data2;
2896
- if (hasOwnProperty.call(cache20, id)) {
2897
- data2 = cache20[id];
2896
+ if (hasOwnProperty.call(cache21, id)) {
2897
+ data2 = cache21[id];
2898
2898
  conf.emit('getasync', id, args, context5);
2899
2899
  apply.call(cb, data2.context, data2.args);
2900
2900
  } else {
@@ -2928,7 +2928,7 @@
2928
2928
  if (err2) {
2929
2929
  conf['delete'](id);
2930
2930
  } else {
2931
- cache20[id] = {
2931
+ cache21[id] = {
2932
2932
  context: this,
2933
2933
  args: args2
2934
2934
  };
@@ -2975,16 +2975,16 @@
2975
2975
  if (hasOwnProperty.call(waiting, id)) {
2976
2976
  return;
2977
2977
  }
2978
- if (!cache20[id]) {
2978
+ if (!cache21[id]) {
2979
2979
  return;
2980
2980
  }
2981
- result = cache20[id];
2982
- delete cache20[id];
2981
+ result = cache21[id];
2982
+ delete cache21[id];
2983
2983
  conf.emit('deleteasync', id, slice.call(result.args, 1));
2984
2984
  });
2985
2985
  conf.on('clear', function() {
2986
- var oldCache = cache20;
2987
- cache20 = create(null);
2986
+ var oldCache = cache21;
2987
+ cache21 = create(null);
2988
2988
  conf.emit('clearasync', objectMap(oldCache, function(data2) {
2989
2989
  return slice.call(data2.args, 1);
2990
2990
  }));
@@ -3078,7 +3078,7 @@
3078
3078
  var create = Object.create;
3079
3079
  var supportedModes = primitiveSet('then', 'then:finally', 'done', 'done:finally');
3080
3080
  require_registered_extensions().promise = function(mode, conf) {
3081
- var waiting = create(null), cache20 = create(null), promises = create(null);
3081
+ var waiting = create(null), cache21 = create(null), promises = create(null);
3082
3082
  if (mode === true) {
3083
3083
  mode = null;
3084
3084
  } else {
@@ -3090,7 +3090,7 @@
3090
3090
  conf.on('set', function(id, ignore, promise) {
3091
3091
  var isFailed = false;
3092
3092
  if (!isPromise(promise)) {
3093
- cache20[id] = promise;
3093
+ cache21[id] = promise;
3094
3094
  conf.emit('setasync', id, 1);
3095
3095
  return;
3096
3096
  }
@@ -3105,7 +3105,7 @@
3105
3105
  return;
3106
3106
  }
3107
3107
  delete waiting[id];
3108
- cache20[id] = result;
3108
+ cache21[id] = result;
3109
3109
  conf.emit('setasync', id, count);
3110
3110
  };
3111
3111
  var onFailure = function onFailure() {
@@ -3175,16 +3175,16 @@
3175
3175
  delete waiting[id];
3176
3176
  return;
3177
3177
  }
3178
- if (!hasOwnProperty.call(cache20, id)) {
3178
+ if (!hasOwnProperty.call(cache21, id)) {
3179
3179
  return;
3180
3180
  }
3181
- var result = cache20[id];
3182
- delete cache20[id];
3181
+ var result = cache21[id];
3182
+ delete cache21[id];
3183
3183
  conf.emit('deleteasync', id, [ result ]);
3184
3184
  });
3185
3185
  conf.on('clear', function() {
3186
- var oldCache = cache20;
3187
- cache20 = create(null);
3186
+ var oldCache = cache21;
3187
+ cache21 = create(null);
3188
3188
  waiting = create(null);
3189
3189
  promises = create(null);
3190
3190
  conf.emit('clearasync', objectMap(oldCache, function(data2) {
@@ -3206,8 +3206,8 @@
3206
3206
  conf.on('deleteasync', del = function del(id, resultArray) {
3207
3207
  apply.call(dispose, null, resultArray);
3208
3208
  });
3209
- conf.on('clearasync', function(cache20) {
3210
- forEach(cache20, function(result, id) {
3209
+ conf.on('clearasync', function(cache21) {
3210
+ forEach(cache21, function(result, id) {
3211
3211
  del(id, result);
3212
3212
  });
3213
3213
  });
@@ -3216,8 +3216,8 @@
3216
3216
  conf.on('delete', del = function del(id, result) {
3217
3217
  dispose(result);
3218
3218
  });
3219
- conf.on('clear', function(cache20) {
3220
- forEach(cache20, function(result, id) {
3219
+ conf.on('clear', function(cache21) {
3220
+ forEach(cache21, function(result, id) {
3221
3221
  del(id, result);
3222
3222
  });
3223
3223
  });
@@ -3438,20 +3438,20 @@
3438
3438
  var create = Object.create;
3439
3439
  var defineProperties = Object.defineProperties;
3440
3440
  extensions.refCounter = function(ignore, conf, options) {
3441
- var cache20, postfix;
3442
- cache20 = create(null);
3441
+ var cache21, postfix;
3442
+ cache21 = create(null);
3443
3443
  postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : '';
3444
3444
  conf.on('set' + postfix, function(id, length) {
3445
- cache20[id] = length || 1;
3445
+ cache21[id] = length || 1;
3446
3446
  });
3447
3447
  conf.on('get' + postfix, function(id) {
3448
- ++cache20[id];
3448
+ ++cache21[id];
3449
3449
  });
3450
3450
  conf.on('delete' + postfix, function(id) {
3451
- delete cache20[id];
3451
+ delete cache21[id];
3452
3452
  });
3453
3453
  conf.on('clear' + postfix, function() {
3454
- cache20 = {};
3454
+ cache21 = {};
3455
3455
  });
3456
3456
  defineProperties(conf.memoized, {
3457
3457
  deleteRef: d(function() {
@@ -3459,10 +3459,10 @@
3459
3459
  if (id === null) {
3460
3460
  return null;
3461
3461
  }
3462
- if (!cache20[id]) {
3462
+ if (!cache21[id]) {
3463
3463
  return null;
3464
3464
  }
3465
- if (!--cache20[id]) {
3465
+ if (!--cache21[id]) {
3466
3466
  conf['delete'](id);
3467
3467
  return true;
3468
3468
  }
@@ -3473,10 +3473,10 @@
3473
3473
  if (id === null) {
3474
3474
  return 0;
3475
3475
  }
3476
- if (!cache20[id]) {
3476
+ if (!cache21[id]) {
3477
3477
  return 0;
3478
3478
  }
3479
- return cache20[id];
3479
+ return cache21[id];
3480
3480
  })
3481
3481
  });
3482
3482
  };
@@ -4255,7 +4255,7 @@
4255
4255
  var LN2 = Math.LN2;
4256
4256
  var abs = Math.abs;
4257
4257
  var floor = Math.floor;
4258
- var log10 = Math.log;
4258
+ var log9 = Math.log;
4259
4259
  var min = Math.min;
4260
4260
  var pow = Math.pow;
4261
4261
  var round = Math.round;
@@ -4411,7 +4411,7 @@
4411
4411
  s = v < 0;
4412
4412
  v = abs(v);
4413
4413
  if (v >= pow(2, 1 - bias)) {
4414
- e = min(floor(log10(v) / LN2), 1023);
4414
+ e = min(floor(log9(v) / LN2), 1023);
4415
4415
  f = roundToEven(v / pow(2, e) * pow(2, fbits));
4416
4416
  if (f / pow(2, fbits) >= 2) {
4417
4417
  e = e + 1;
@@ -6762,6 +6762,7 @@
6762
6762
  return new Error(message + ': ' + (selector || node));
6763
6763
  }
6764
6764
  function sendCommandToFrame(node, parameters, resolve, reject) {
6765
+ var _parameters$options$p, _parameters$options;
6765
6766
  var win = node.contentWindow;
6766
6767
  if (!win) {
6767
6768
  log_default('Frame does not have a content window', node);
@@ -6776,7 +6777,7 @@
6776
6777
  reject(err('No response from frame', node));
6777
6778
  }
6778
6779
  }, 0);
6779
- }, 500);
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);
6780
6781
  _respondable(win, 'axe.ping', null, void 0, function() {
6781
6782
  clearTimeout(timeout);
6782
6783
  var frameWaitTime = parameters.options && parameters.options.frameWaitTime || 6e4;
@@ -7096,7 +7097,7 @@
7096
7097
  return url_props_from_attribute_default;
7097
7098
  },
7098
7099
  visuallyContains: function visuallyContains() {
7099
- return visually_contains_default;
7100
+ return _visuallyContains;
7100
7101
  },
7101
7102
  visuallyOverlaps: function visuallyOverlaps() {
7102
7103
  return visually_overlaps_default;
@@ -7325,13 +7326,14 @@
7325
7326
  });
7326
7327
  }
7327
7328
  function isVisible(el, screenReader, recursed) {
7329
+ var _window$Node;
7328
7330
  if (!el) {
7329
7331
  throw new TypeError('Cannot determine if element is visible for non-DOM nodes');
7330
7332
  }
7331
7333
  var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
7332
7334
  el = vNode ? vNode.actualNode : el;
7333
7335
  var cacheName = '_isVisible' + (screenReader ? 'ScreenReader' : '');
7334
- var _window$Node = window.Node, DOCUMENT_NODE = _window$Node.DOCUMENT_NODE, DOCUMENT_FRAGMENT_NODE = _window$Node.DOCUMENT_FRAGMENT_NODE;
7336
+ var _ref9 = (_window$Node = window.Node) !== null && _window$Node !== void 0 ? _window$Node : {}, DOCUMENT_NODE = _ref9.DOCUMENT_NODE, DOCUMENT_FRAGMENT_NODE = _ref9.DOCUMENT_FRAGMENT_NODE;
7335
7337
  var nodeType = vNode ? vNode.props.nodeType : el.nodeType;
7336
7338
  var nodeName2 = vNode ? vNode.props.nodeName : el.nodeName.toLowerCase();
7337
7339
  if (vNode && typeof vNode[cacheName] !== 'undefined') {
@@ -7374,9 +7376,12 @@
7374
7376
  return false;
7375
7377
  }
7376
7378
  var elHeight = parseInt(style.getPropertyValue('height'));
7377
- var scrollableWithZeroHeight = get_scroll_default(el) && elHeight === 0;
7378
- var posAbsoluteOverflowHiddenAndSmall = style.getPropertyValue('position') === 'absolute' && elHeight < 2 && style.getPropertyValue('overflow') === 'hidden';
7379
- if (!screenReader && (isClipped(style) || style.getPropertyValue('opacity') === '0' || scrollableWithZeroHeight || posAbsoluteOverflowHiddenAndSmall)) {
7379
+ var elWidth = parseInt(style.getPropertyValue('width'));
7380
+ var scroll = get_scroll_default(el);
7381
+ var scrollableWithZeroHeight = scroll && elHeight === 0;
7382
+ var scrollableWithZeroWidth = scroll && elWidth === 0;
7383
+ var posAbsoluteOverflowHiddenAndSmall = style.getPropertyValue('position') === 'absolute' && (elHeight < 2 || elWidth < 2) && style.getPropertyValue('overflow') === 'hidden';
7384
+ if (!screenReader && (isClipped(style) || style.getPropertyValue('opacity') === '0' || scrollableWithZeroHeight || scrollableWithZeroWidth || posAbsoluteOverflowHiddenAndSmall)) {
7380
7385
  return false;
7381
7386
  }
7382
7387
  if (!recursed && (style.getPropertyValue('visibility') === 'hidden' || !screenReader && is_offscreen_default(el))) {
@@ -7394,6 +7399,90 @@
7394
7399
  }
7395
7400
  var is_visible_default = isVisible;
7396
7401
  var gridSize = 200;
7402
+ function createGrid() {
7403
+ var root = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body;
7404
+ var rootGrid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
7405
+ container: null,
7406
+ cells: []
7407
+ };
7408
+ var parentVNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
7409
+ if (!parentVNode) {
7410
+ var vNode = get_node_from_tree_default(document.documentElement);
7411
+ if (!vNode) {
7412
+ vNode = new virtual_node_default(document.documentElement);
7413
+ }
7414
+ vNode._stackingOrder = [ 0 ];
7415
+ addNodeToGrid(rootGrid, vNode);
7416
+ if (get_scroll_default(vNode.actualNode)) {
7417
+ var subGrid = {
7418
+ container: vNode,
7419
+ cells: []
7420
+ };
7421
+ vNode._subGrid = subGrid;
7422
+ }
7423
+ }
7424
+ var treeWalker = document.createTreeWalker(root, window.NodeFilter.SHOW_ELEMENT, null, false);
7425
+ var node = parentVNode ? treeWalker.nextNode() : treeWalker.currentNode;
7426
+ while (node) {
7427
+ var _vNode = get_node_from_tree_default(node);
7428
+ if (node.parentElement) {
7429
+ parentVNode = get_node_from_tree_default(node.parentElement);
7430
+ } else if (node.parentNode && get_node_from_tree_default(node.parentNode)) {
7431
+ parentVNode = get_node_from_tree_default(node.parentNode);
7432
+ }
7433
+ if (!_vNode) {
7434
+ _vNode = new axe.VirtualNode(node, parentVNode);
7435
+ }
7436
+ _vNode._stackingOrder = getStackingOrder(_vNode, parentVNode);
7437
+ var scrollRegionParent = findScrollRegionParent(_vNode, parentVNode);
7438
+ var grid = scrollRegionParent ? scrollRegionParent._subGrid : rootGrid;
7439
+ if (get_scroll_default(_vNode.actualNode)) {
7440
+ var _subGrid = {
7441
+ container: _vNode,
7442
+ cells: []
7443
+ };
7444
+ _vNode._subGrid = _subGrid;
7445
+ }
7446
+ var rect = _vNode.boundingClientRect;
7447
+ if (rect.width !== 0 && rect.height !== 0 && is_visible_default(node)) {
7448
+ addNodeToGrid(grid, _vNode);
7449
+ }
7450
+ if (is_shadow_root_default(node)) {
7451
+ createGrid(node.shadowRoot, grid, _vNode);
7452
+ }
7453
+ node = treeWalker.nextNode();
7454
+ }
7455
+ }
7456
+ function getRectStack(grid, rect) {
7457
+ var _grid$cells$row$col$f, _grid$cells$row$col;
7458
+ var recursed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
7459
+ var x = rect.left + rect.width / 2;
7460
+ var y = rect.top + rect.height / 2;
7461
+ var row = y / gridSize | 0;
7462
+ var col = x / gridSize | 0;
7463
+ if (row > grid.cells.length || col > grid.numCols) {
7464
+ throw new Error('Element midpoint exceeds the grid bounds');
7465
+ }
7466
+ var stack = (_grid$cells$row$col$f = (_grid$cells$row$col = grid.cells[row][col]) === null || _grid$cells$row$col === void 0 ? void 0 : _grid$cells$row$col.filter(function(gridCellNode) {
7467
+ return gridCellNode.clientRects.find(function(clientRect) {
7468
+ var rectX = clientRect.left;
7469
+ var rectY = clientRect.top;
7470
+ return x <= rectX + clientRect.width && x >= rectX && y <= rectY + clientRect.height && y >= rectY;
7471
+ });
7472
+ })) !== null && _grid$cells$row$col$f !== void 0 ? _grid$cells$row$col$f : [];
7473
+ var gridContainer = grid.container;
7474
+ if (gridContainer) {
7475
+ stack = getRectStack(gridContainer._grid, gridContainer.boundingClientRect, true).concat(stack);
7476
+ }
7477
+ if (!recursed) {
7478
+ stack = stack.sort(visuallySort).map(function(vNode) {
7479
+ return vNode.actualNode;
7480
+ }).concat(document.documentElement).filter(function(node, index, array) {
7481
+ return array.indexOf(node) === index;
7482
+ });
7483
+ }
7484
+ return stack;
7485
+ }
7397
7486
  function isStackingContext(vNode, parentVNode) {
7398
7487
  var position = vNode.getComputedStylePropertyValue('position');
7399
7488
  var zIndex = vNode.getComputedStylePropertyValue('z-index');
@@ -7477,21 +7566,21 @@
7477
7566
  return floated;
7478
7567
  }
7479
7568
  function getPositionOrder(vNode) {
7480
- if (vNode.getComputedStylePropertyValue('position') === 'static') {
7481
- if (vNode.getComputedStylePropertyValue('display').indexOf('inline') !== -1) {
7482
- return 2;
7483
- }
7484
- if (isFloated(vNode)) {
7485
- return 1;
7486
- }
7487
- return 0;
7569
+ if (vNode.getComputedStylePropertyValue('display').indexOf('inline') !== -1) {
7570
+ return 2;
7488
7571
  }
7489
- return 3;
7572
+ if (isFloated(vNode)) {
7573
+ return 1;
7574
+ }
7575
+ return 0;
7490
7576
  }
7491
7577
  function visuallySort(a, b) {
7492
- for (var _i5 = 0; _i5 < a._stackingOrder.length; _i5++) {
7578
+ var length = Math.max(a._stackingOrder.length, b._stackingOrder.length);
7579
+ for (var _i5 = 0; _i5 < length; _i5++) {
7493
7580
  if (typeof b._stackingOrder[_i5] === 'undefined') {
7494
7581
  return -1;
7582
+ } else if (typeof a._stackingOrder[_i5] === 'undefined') {
7583
+ return 1;
7495
7584
  }
7496
7585
  if (b._stackingOrder[_i5] > a._stackingOrder[_i5]) {
7497
7586
  return 1;
@@ -7537,11 +7626,25 @@
7537
7626
  function getStackingOrder(vNode, parentVNode) {
7538
7627
  var stackingOrder = parentVNode._stackingOrder.slice();
7539
7628
  var zIndex = vNode.getComputedStylePropertyValue('z-index');
7540
- if (zIndex !== 'auto') {
7629
+ var positioned = vNode.getComputedStylePropertyValue('position') !== 'static';
7630
+ var floated = vNode.getComputedStylePropertyValue('float') !== 'none';
7631
+ if (positioned && ![ 'auto', '0' ].includes(zIndex)) {
7632
+ while (stackingOrder.find(function(value) {
7633
+ return value % 1 !== 0;
7634
+ })) {
7635
+ var index = stackingOrder.findIndex(function(value) {
7636
+ return value % 1 !== 0;
7637
+ });
7638
+ stackingOrder.splice(index, 1);
7639
+ }
7541
7640
  stackingOrder[stackingOrder.length - 1] = parseInt(zIndex);
7542
7641
  }
7543
7642
  if (isStackingContext(vNode, parentVNode)) {
7544
7643
  stackingOrder.push(0);
7644
+ } else if (positioned) {
7645
+ stackingOrder.push(.5);
7646
+ } else if (floated) {
7647
+ stackingOrder.push(.25);
7545
7648
  }
7546
7649
  return stackingOrder;
7547
7650
  }
@@ -7549,14 +7652,14 @@
7549
7652
  var scrollRegionParent = null;
7550
7653
  var checkedNodes = [ vNode ];
7551
7654
  while (parentVNode) {
7552
- if (parentVNode._scrollRegionParent) {
7553
- scrollRegionParent = parentVNode._scrollRegionParent;
7554
- break;
7555
- }
7556
7655
  if (get_scroll_default(parentVNode.actualNode)) {
7557
7656
  scrollRegionParent = parentVNode;
7558
7657
  break;
7559
7658
  }
7659
+ if (parentVNode._scrollRegionParent) {
7660
+ scrollRegionParent = parentVNode._scrollRegionParent;
7661
+ break;
7662
+ }
7560
7663
  checkedNodes.push(parentVNode);
7561
7664
  parentVNode = get_node_from_tree_default(parentVNode.actualNode.parentElement || parentVNode.actualNode.parentNode);
7562
7665
  }
@@ -7568,12 +7671,14 @@
7568
7671
  function addNodeToGrid(grid, vNode) {
7569
7672
  vNode._grid = grid;
7570
7673
  vNode.clientRects.forEach(function(rect) {
7674
+ var _grid$numCols;
7571
7675
  var x = rect.left;
7572
7676
  var y = rect.top;
7573
7677
  var startRow = y / gridSize | 0;
7574
7678
  var startCol = x / gridSize | 0;
7575
7679
  var endRow = (y + rect.height) / gridSize | 0;
7576
7680
  var endCol = (x + rect.width) / gridSize | 0;
7681
+ grid.numCols = Math.max((_grid$numCols = grid.numCols) !== null && _grid$numCols !== void 0 ? _grid$numCols : 0, endCol);
7577
7682
  for (var row = startRow; row <= endRow; row++) {
7578
7683
  grid.cells[row] = grid.cells[row] || [];
7579
7684
  for (var col = startCol; col <= endCol; col++) {
@@ -7585,86 +7690,6 @@
7585
7690
  }
7586
7691
  });
7587
7692
  }
7588
- function createGrid() {
7589
- var root = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body;
7590
- var rootGrid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
7591
- container: null,
7592
- cells: []
7593
- };
7594
- var parentVNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
7595
- if (!parentVNode) {
7596
- var vNode = get_node_from_tree_default(document.documentElement);
7597
- if (!vNode) {
7598
- vNode = new virtual_node_default(document.documentElement);
7599
- }
7600
- vNode._stackingOrder = [ 0 ];
7601
- addNodeToGrid(rootGrid, vNode);
7602
- if (get_scroll_default(vNode.actualNode)) {
7603
- var subGrid = {
7604
- container: vNode,
7605
- cells: []
7606
- };
7607
- vNode._subGrid = subGrid;
7608
- }
7609
- }
7610
- var treeWalker = document.createTreeWalker(root, window.NodeFilter.SHOW_ELEMENT, null, false);
7611
- var node = parentVNode ? treeWalker.nextNode() : treeWalker.currentNode;
7612
- while (node) {
7613
- var _vNode = get_node_from_tree_default(node);
7614
- if (node.parentElement) {
7615
- parentVNode = get_node_from_tree_default(node.parentElement);
7616
- } else if (node.parentNode && get_node_from_tree_default(node.parentNode)) {
7617
- parentVNode = get_node_from_tree_default(node.parentNode);
7618
- }
7619
- if (!_vNode) {
7620
- _vNode = new axe.VirtualNode(node, parentVNode);
7621
- }
7622
- _vNode._stackingOrder = getStackingOrder(_vNode, parentVNode);
7623
- var scrollRegionParent = findScrollRegionParent(_vNode, parentVNode);
7624
- var grid = scrollRegionParent ? scrollRegionParent._subGrid : rootGrid;
7625
- if (get_scroll_default(_vNode.actualNode)) {
7626
- var _subGrid = {
7627
- container: _vNode,
7628
- cells: []
7629
- };
7630
- _vNode._subGrid = _subGrid;
7631
- }
7632
- var rect = _vNode.boundingClientRect;
7633
- if (rect.width !== 0 && rect.height !== 0 && is_visible_default(node)) {
7634
- addNodeToGrid(grid, _vNode);
7635
- }
7636
- if (is_shadow_root_default(node)) {
7637
- createGrid(node.shadowRoot, grid, _vNode);
7638
- }
7639
- node = treeWalker.nextNode();
7640
- }
7641
- }
7642
- function getRectStack(grid, rect) {
7643
- var recursed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
7644
- var x = rect.left + rect.width / 2;
7645
- var y = rect.top + rect.height / 2;
7646
- var row = y / gridSize | 0;
7647
- var col = x / gridSize | 0;
7648
- var stack = grid.cells[row][col].filter(function(gridCellNode) {
7649
- return gridCellNode.clientRects.find(function(clientRect) {
7650
- var rectX = clientRect.left;
7651
- var rectY = clientRect.top;
7652
- return x <= rectX + clientRect.width && x >= rectX && y <= rectY + clientRect.height && y >= rectY;
7653
- });
7654
- });
7655
- var gridContainer = grid.container;
7656
- if (gridContainer) {
7657
- stack = getRectStack(gridContainer._grid, gridContainer.boundingClientRect, true).concat(stack);
7658
- }
7659
- if (!recursed) {
7660
- stack = stack.sort(visuallySort).map(function(vNode) {
7661
- return vNode.actualNode;
7662
- }).concat(document.documentElement).filter(function(node, index, array) {
7663
- return array.indexOf(node) === index;
7664
- });
7665
- }
7666
- return stack;
7667
- }
7668
7693
  function getElementStack(node) {
7669
7694
  if (!cache_default.get('gridCreated')) {
7670
7695
  createGrid();
@@ -7808,7 +7833,7 @@
7808
7833
  ref = idrefs_default(virtualNode.actualNode, 'aria-labelledby');
7809
7834
  candidate = ref.map(function(thing) {
7810
7835
  var vNode = get_node_from_tree_default(thing);
7811
- return vNode ? visible_virtual_default(vNode, true) : '';
7836
+ return vNode ? visible_virtual_default(vNode) : '';
7812
7837
  }).join(' ').trim();
7813
7838
  if (candidate) {
7814
7839
  return candidate;
@@ -7827,8 +7852,8 @@
7827
7852
  var hiddenTextElms = [ 'HEAD', 'TITLE', 'TEMPLATE', 'SCRIPT', 'STYLE', 'IFRAME', 'OBJECT', 'VIDEO', 'AUDIO', 'NOSCRIPT' ];
7828
7853
  function hasChildTextNodes(elm) {
7829
7854
  if (!hiddenTextElms.includes(elm.actualNode.nodeName.toUpperCase())) {
7830
- return elm.children.some(function(_ref9) {
7831
- var actualNode = _ref9.actualNode;
7855
+ return elm.children.some(function(_ref10) {
7856
+ var actualNode = _ref10.actualNode;
7832
7857
  return actualNode.nodeType === 3 && actualNode.nodeValue.trim();
7833
7858
  });
7834
7859
  }
@@ -8449,6 +8474,11 @@
8449
8474
  allowedAttrs: [ 'aria-expanded' ],
8450
8475
  superclassRole: [ 'landmark' ]
8451
8476
  },
8477
+ comment: {
8478
+ type: 'structure',
8479
+ allowedAttrs: [ 'aria-level', 'aria-posinset', 'aria-setsize' ],
8480
+ superclassRole: [ 'article' ]
8481
+ },
8452
8482
  definition: {
8453
8483
  type: 'structure',
8454
8484
  allowedAttrs: [ 'aria-expanded' ],
@@ -8560,7 +8590,7 @@
8560
8590
  },
8561
8591
  listbox: {
8562
8592
  type: 'composite',
8563
- requiredOwned: [ 'option' ],
8593
+ requiredOwned: [ 'group', 'option' ],
8564
8594
  allowedAttrs: [ 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
8565
8595
  superclassRole: [ 'select' ],
8566
8596
  accessibleNameRequired: true
@@ -8639,6 +8669,11 @@
8639
8669
  accessibleNameRequired: true,
8640
8670
  childrenPresentational: true
8641
8671
  },
8672
+ mark: {
8673
+ type: 'structure',
8674
+ superclassRole: [ 'section' ],
8675
+ prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
8676
+ },
8642
8677
  navigation: {
8643
8678
  type: 'landmark',
8644
8679
  allowedAttrs: [ 'aria-expanded' ],
@@ -8656,7 +8691,7 @@
8656
8691
  },
8657
8692
  option: {
8658
8693
  type: 'widget',
8659
- requiredContext: [ 'listbox' ],
8694
+ requiredContext: [ 'group', 'listbox' ],
8660
8695
  allowedAttrs: [ 'aria-selected', 'aria-checked', 'aria-posinset', 'aria-setsize' ],
8661
8696
  superclassRole: [ 'input' ],
8662
8697
  accessibleNameRequired: true,
@@ -8818,6 +8853,12 @@
8818
8853
  nameFromContent: true,
8819
8854
  childrenPresentational: true
8820
8855
  },
8856
+ suggestion: {
8857
+ type: 'structure',
8858
+ requiredOwned: [ 'insertion', 'deletion' ],
8859
+ superclassRole: [ 'section' ],
8860
+ prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
8861
+ },
8821
8862
  tab: {
8822
8863
  type: 'widget',
8823
8864
  requiredContext: [ 'tablist' ],
@@ -9692,7 +9733,7 @@
9692
9733
  },
9693
9734
  section: {
9694
9735
  contentTypes: [ 'sectioning', 'flow' ],
9695
- 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' ],
9736
+ 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' ],
9696
9737
  shadowRoot: true
9697
9738
  },
9698
9739
  select: {
@@ -9836,7 +9877,7 @@
9836
9877
  },
9837
9878
  wbr: {
9838
9879
  contentTypes: [ 'phrasing', 'flow' ],
9839
- allowedRoles: true
9880
+ allowedRoles: [ 'presentation', 'none' ]
9840
9881
  }
9841
9882
  };
9842
9883
  var html_elms_default = htmlElms;
@@ -10028,8 +10069,8 @@
10028
10069
  }
10029
10070
  return parseFloat(value);
10030
10071
  }
10031
- function hslToRgb(_ref10) {
10032
- var _ref11 = _slicedToArray(_ref10, 4), hue = _ref11[0], saturation = _ref11[1], lightness = _ref11[2], alpha = _ref11[3];
10072
+ function hslToRgb(_ref11) {
10073
+ var _ref12 = _slicedToArray(_ref11, 4), hue = _ref12[0], saturation = _ref12[1], lightness = _ref12[2], alpha = _ref12[3];
10033
10074
  saturation /= 255;
10034
10075
  lightness /= 255;
10035
10076
  var high = (1 - Math.abs(2 * lightness - 1)) * saturation;
@@ -10049,8 +10090,8 @@
10049
10090
  } else {
10050
10091
  colors = [ high, 0, low ];
10051
10092
  }
10052
- return colors.map(function(color10) {
10053
- return Math.round((color10 + base) * 255);
10093
+ return colors.map(function(color11) {
10094
+ return Math.round((color11 + base) * 255);
10054
10095
  }).concat(alpha);
10055
10096
  }
10056
10097
  function Color(red, green, blue, alpha) {
@@ -10068,7 +10109,7 @@
10068
10109
  var colorFnRegex = /^((?:rgb|hsl)a?)\s*\(([^\)]*)\)/i;
10069
10110
  this.parseString = function parseString(colorString) {
10070
10111
  if (standards_default.cssColors[colorString] || colorString === 'transparent') {
10071
- var _ref12 = standards_default.cssColors[colorString] || [ 0, 0, 0 ], _ref13 = _slicedToArray(_ref12, 3), red2 = _ref13[0], green2 = _ref13[1], blue2 = _ref13[2];
10112
+ var _ref13 = standards_default.cssColors[colorString] || [ 0, 0, 0 ], _ref14 = _slicedToArray(_ref13, 3), red2 = _ref14[0], green2 = _ref14[1], blue2 = _ref14[2];
10072
10113
  this.red = red2;
10073
10114
  this.green = green2;
10074
10115
  this.blue = blue2;
@@ -10118,7 +10159,7 @@
10118
10159
  }
10119
10160
  };
10120
10161
  this.parseColorFnString = function parseColorFnString(colorString) {
10121
- var _ref14 = colorString.match(colorFnRegex) || [], _ref15 = _slicedToArray(_ref14, 3), colorFunc = _ref15[1], colorValStr = _ref15[2];
10162
+ var _ref15 = colorString.match(colorFnRegex) || [], _ref16 = _slicedToArray(_ref15, 3), colorFunc = _ref16[1], colorValStr = _ref16[2];
10122
10163
  if (!colorFunc || !colorValStr) {
10123
10164
  return;
10124
10165
  }
@@ -10201,6 +10242,17 @@
10201
10242
  return finalElements;
10202
10243
  }
10203
10244
  var reduce_to_elements_below_floating_default = reduceToElementsBelowFloating;
10245
+ function _visuallyContains(node, parent) {
10246
+ var parentScrollAncestor = getScrollAncestor(parent);
10247
+ do {
10248
+ var nextScrollAncestor = getScrollAncestor(node);
10249
+ if (nextScrollAncestor === parentScrollAncestor || nextScrollAncestor === parent) {
10250
+ return contains2(node, parent);
10251
+ }
10252
+ node = nextScrollAncestor;
10253
+ } while (node);
10254
+ return false;
10255
+ }
10204
10256
  function getScrollAncestor(node) {
10205
10257
  var vNode = get_node_from_tree_default(node);
10206
10258
  var ancestor = vNode.parent;
@@ -10212,47 +10264,30 @@
10212
10264
  }
10213
10265
  }
10214
10266
  function contains2(node, parent) {
10215
- var rectBound = node.getBoundingClientRect();
10216
- var margin = .01;
10217
- var rect = {
10218
- top: rectBound.top + margin,
10219
- bottom: rectBound.bottom - margin,
10220
- left: rectBound.left + margin,
10221
- right: rectBound.right - margin
10222
- };
10223
- var parentRect = parent.getBoundingClientRect();
10224
- var parentTop = parentRect.top;
10225
- var parentLeft = parentRect.left;
10226
- var parentScrollArea = {
10227
- top: parentTop - parent.scrollTop,
10228
- bottom: parentTop - parent.scrollTop + parent.scrollHeight,
10229
- left: parentLeft - parent.scrollLeft,
10230
- right: parentLeft - parent.scrollLeft + parent.scrollWidth
10231
- };
10232
10267
  var style = window.getComputedStyle(parent);
10268
+ var overflow = style.getPropertyValue('overflow');
10233
10269
  if (style.getPropertyValue('display') === 'inline') {
10234
10270
  return true;
10235
10271
  }
10236
- if (rect.left < parentScrollArea.left && rect.left < parentRect.left || rect.top < parentScrollArea.top && rect.top < parentRect.top || rect.right > parentScrollArea.right && rect.right > parentRect.right || rect.bottom > parentScrollArea.bottom && rect.bottom > parentRect.bottom) {
10237
- return false;
10272
+ var clientRects = Array.from(node.getClientRects());
10273
+ var boundingRect = parent.getBoundingClientRect();
10274
+ var rect = {
10275
+ left: boundingRect.left,
10276
+ top: boundingRect.top,
10277
+ width: boundingRect.width,
10278
+ height: boundingRect.height
10279
+ };
10280
+ if ([ 'scroll', 'auto' ].includes(overflow) || parent instanceof window.HTMLHtmlElement) {
10281
+ rect.width = parent.scrollWidth;
10282
+ rect.height = parent.scrollHeight;
10238
10283
  }
10239
- if (rect.right > parentRect.right || rect.bottom > parentRect.bottom) {
10240
- return style.overflow === 'scroll' || style.overflow === 'auto' || style.overflow === 'hidden' || parent instanceof window.HTMLBodyElement || parent instanceof window.HTMLHtmlElement;
10284
+ if (clientRects.length === 1 && overflow === 'hidden' && style.getPropertyValue('white-space') === 'nowrap') {
10285
+ clientRects[0] = rect;
10241
10286
  }
10242
- return true;
10243
- }
10244
- function visuallyContains(node, parent) {
10245
- var parentScrollAncestor = getScrollAncestor(parent);
10246
- do {
10247
- var nextScrollAncestor = getScrollAncestor(node);
10248
- if (nextScrollAncestor === parentScrollAncestor || nextScrollAncestor === parent) {
10249
- return contains2(node, parent);
10250
- }
10251
- node = nextScrollAncestor;
10252
- } while (node);
10253
- return false;
10287
+ return clientRects.some(function(clientRect) {
10288
+ return !(Math.ceil(clientRect.left) < Math.floor(rect.left) || Math.ceil(clientRect.top) < Math.floor(rect.top) || Math.floor(clientRect.left + clientRect.width) > Math.ceil(rect.left + rect.width) || Math.floor(clientRect.top + clientRect.height) > Math.ceil(rect.top + rect.height));
10289
+ });
10254
10290
  }
10255
- var visually_contains_default = visuallyContains;
10256
10291
  function shadowElementsFromPoint(nodeX, nodeY) {
10257
10292
  var root = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : document;
10258
10293
  var i = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
@@ -10265,7 +10300,7 @@
10265
10300
  if (is_shadow_root_default(elm)) {
10266
10301
  var shadowStack = shadowElementsFromPoint(nodeX, nodeY, elm.shadowRoot, i + 1);
10267
10302
  stack = stack.concat(shadowStack);
10268
- if (stack.length && visually_contains_default(stack[0], elm)) {
10303
+ if (stack.length && _visuallyContains(stack[0], elm)) {
10269
10304
  stack.push(elm);
10270
10305
  }
10271
10306
  } else {
@@ -10407,7 +10442,7 @@
10407
10442
  key: 'props',
10408
10443
  get: function get() {
10409
10444
  if (!this._cache.hasOwnProperty('props')) {
10410
- var _this$actualNode = this.actualNode, nodeType = _this$actualNode.nodeType, nodeName2 = _this$actualNode.nodeName, id = _this$actualNode.id, multiple = _this$actualNode.multiple, nodeValue = _this$actualNode.nodeValue, value = _this$actualNode.value;
10445
+ var _this$actualNode = this.actualNode, nodeType = _this$actualNode.nodeType, nodeName2 = _this$actualNode.nodeName, id = _this$actualNode.id, multiple = _this$actualNode.multiple, nodeValue = _this$actualNode.nodeValue, value = _this$actualNode.value, selected = _this$actualNode.selected;
10411
10446
  this._cache.props = {
10412
10447
  nodeType: nodeType,
10413
10448
  nodeName: this._isXHTML ? nodeName2 : nodeName2.toLowerCase(),
@@ -10415,7 +10450,8 @@
10415
10450
  type: this._type,
10416
10451
  multiple: multiple,
10417
10452
  nodeValue: nodeValue,
10418
- value: value
10453
+ value: value,
10454
+ selected: selected
10419
10455
  };
10420
10456
  }
10421
10457
  return this._cache.props;
@@ -10795,7 +10831,7 @@
10795
10831
  return {};
10796
10832
  }
10797
10833
  var navigator = win.navigator, innerHeight = win.innerHeight, innerWidth = win.innerWidth;
10798
- var _ref16 = getOrientation(win) || {}, angle = _ref16.angle, type = _ref16.type;
10834
+ var _ref17 = getOrientation(win) || {}, angle = _ref17.angle, type = _ref17.type;
10799
10835
  return {
10800
10836
  userAgent: navigator.userAgent,
10801
10837
  windowWidth: innerWidth,
@@ -10804,12 +10840,12 @@
10804
10840
  orientationType: type
10805
10841
  };
10806
10842
  }
10807
- function getOrientation(_ref17) {
10808
- var screen = _ref17.screen;
10843
+ function getOrientation(_ref18) {
10844
+ var screen = _ref18.screen;
10809
10845
  return screen.orientation || screen.msOrientation || screen.mozOrientation;
10810
10846
  }
10811
- function createFrameContext(frame, _ref18) {
10812
- var focusable = _ref18.focusable, page = _ref18.page;
10847
+ function createFrameContext(frame, _ref19) {
10848
+ var focusable = _ref19.focusable, page = _ref19.page;
10813
10849
  return {
10814
10850
  node: frame,
10815
10851
  include: [],
@@ -10847,8 +10883,8 @@
10847
10883
  }
10848
10884
  context5.frames.push(createFrameContext(frame, context5));
10849
10885
  }
10850
- function isPageContext(_ref19) {
10851
- var include = _ref19.include;
10886
+ function isPageContext(_ref20) {
10887
+ var include = _ref20.include;
10852
10888
  return include.length === 1 && include[0].actualNode === document.documentElement;
10853
10889
  }
10854
10890
  function pushUniqueFrameSelector(context5, type, selectorArray) {
@@ -10948,8 +10984,8 @@
10948
10984
  });
10949
10985
  }
10950
10986
  }
10951
- function getRootNode2(_ref20) {
10952
- var include = _ref20.include, exclude = _ref20.exclude;
10987
+ function getRootNode2(_ref21) {
10988
+ var include = _ref21.include, exclude = _ref21.exclude;
10953
10989
  var selectors = Array.from(include).concat(Array.from(exclude));
10954
10990
  for (var i = 0; i < selectors.length; ++i) {
10955
10991
  var item = selectors[i];
@@ -10998,8 +11034,8 @@
10998
11034
  }
10999
11035
  function _getFrameContexts(context5) {
11000
11036
  var _Context = new Context(context5), frames = _Context.frames;
11001
- return frames.map(function(_ref21) {
11002
- var node = _ref21.node, frameContext = _objectWithoutProperties(_ref21, _excluded2);
11037
+ return frames.map(function(_ref22) {
11038
+ var node = _ref22.node, frameContext = _objectWithoutProperties(_ref22, _excluded2);
11003
11039
  frameContext.initiator = false;
11004
11040
  var frameSelector = _getAncestry(node);
11005
11041
  return {
@@ -11684,8 +11720,8 @@
11684
11720
  return matchExpressions(domTree, expressions, filter);
11685
11721
  }
11686
11722
  var query_selector_all_filter_default = querySelectorAllFilter;
11687
- function preloadCssom(_ref22) {
11688
- var _ref22$treeRoot = _ref22.treeRoot, treeRoot = _ref22$treeRoot === void 0 ? axe._tree[0] : _ref22$treeRoot;
11723
+ function preloadCssom(_ref23) {
11724
+ var _ref23$treeRoot = _ref23.treeRoot, treeRoot = _ref23$treeRoot === void 0 ? axe._tree[0] : _ref23$treeRoot;
11689
11725
  var rootNodes = getAllRootNodesInTree(treeRoot);
11690
11726
  if (!rootNodes.length) {
11691
11727
  return Promise.resolve();
@@ -11715,8 +11751,8 @@
11715
11751
  }
11716
11752
  function getCssomForAllRootNodes(rootNodes, convertDataToStylesheet) {
11717
11753
  var promises = [];
11718
- rootNodes.forEach(function(_ref23, index) {
11719
- var rootNode = _ref23.rootNode, shadowId = _ref23.shadowId;
11754
+ rootNodes.forEach(function(_ref24, index) {
11755
+ var rootNode = _ref24.rootNode, shadowId = _ref24.shadowId;
11720
11756
  var sheets = getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet);
11721
11757
  if (!sheets) {
11722
11758
  return Promise.all(promises);
@@ -11797,10 +11833,10 @@
11797
11833
  return true;
11798
11834
  });
11799
11835
  }
11800
- function preloadMedia(_ref24) {
11801
- var _ref24$treeRoot = _ref24.treeRoot, treeRoot = _ref24$treeRoot === void 0 ? axe._tree[0] : _ref24$treeRoot;
11802
- var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(_ref25) {
11803
- var actualNode = _ref25.actualNode;
11836
+ function preloadMedia(_ref25) {
11837
+ var _ref25$treeRoot = _ref25.treeRoot, treeRoot = _ref25$treeRoot === void 0 ? axe._tree[0] : _ref25$treeRoot;
11838
+ var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(_ref26) {
11839
+ var actualNode = _ref26.actualNode;
11804
11840
  if (actualNode.hasAttribute('src')) {
11805
11841
  return !!actualNode.getAttribute('src');
11806
11842
  }
@@ -11812,8 +11848,8 @@
11812
11848
  }
11813
11849
  return true;
11814
11850
  });
11815
- return Promise.all(mediaVirtualNodes.map(function(_ref26) {
11816
- var actualNode = _ref26.actualNode;
11851
+ return Promise.all(mediaVirtualNodes.map(function(_ref27) {
11852
+ var actualNode = _ref27.actualNode;
11817
11853
  return isMediaElementReady(actualNode);
11818
11854
  }));
11819
11855
  }
@@ -12108,8 +12144,8 @@
12108
12144
  }
12109
12145
  }
12110
12146
  function setScrollState(scrollState) {
12111
- scrollState.forEach(function(_ref28) {
12112
- var elm = _ref28.elm, top = _ref28.top, left = _ref28.left;
12147
+ scrollState.forEach(function(_ref29) {
12148
+ var elm = _ref29.elm, top = _ref29.top, left = _ref29.left;
12113
12149
  return setScroll(elm, top, left);
12114
12150
  });
12115
12151
  }
@@ -12220,9 +12256,9 @@
12220
12256
  nodeTypeToName[nodeNamesToTypes[nodeName2]] = nodeName2;
12221
12257
  });
12222
12258
  function normaliseProps(serialNode) {
12223
- var _serialNode$nodeName, _ref29, _serialNode$nodeType;
12259
+ var _serialNode$nodeName, _ref30, _serialNode$nodeType;
12224
12260
  var nodeName2 = (_serialNode$nodeName = serialNode.nodeName) !== null && _serialNode$nodeName !== void 0 ? _serialNode$nodeName : nodeTypeToName[serialNode.nodeType];
12225
- var nodeType = (_ref29 = (_serialNode$nodeType = serialNode.nodeType) !== null && _serialNode$nodeType !== void 0 ? _serialNode$nodeType : nodeNamesToTypes[serialNode.nodeName]) !== null && _ref29 !== void 0 ? _ref29 : 1;
12261
+ var nodeType = (_ref30 = (_serialNode$nodeType = serialNode.nodeType) !== null && _serialNode$nodeType !== void 0 ? _serialNode$nodeType : nodeNamesToTypes[serialNode.nodeName]) !== null && _ref30 !== void 0 ? _ref30 : 1;
12226
12262
  assert_default(typeof nodeType === 'number', 'nodeType has to be a number, got \''.concat(nodeType, '\''));
12227
12263
  assert_default(typeof nodeName2 === 'string', 'nodeName has to be a string, got \''.concat(nodeName2, '\''));
12228
12264
  nodeName2 = nodeName2.toLowerCase();
@@ -12243,8 +12279,8 @@
12243
12279
  delete props.attributes;
12244
12280
  return Object.freeze(props);
12245
12281
  }
12246
- function normaliseAttrs(_ref30) {
12247
- var _ref30$attributes = _ref30.attributes, attributes4 = _ref30$attributes === void 0 ? {} : _ref30$attributes;
12282
+ function normaliseAttrs(_ref31) {
12283
+ var _ref31$attributes = _ref31.attributes, attributes4 = _ref31$attributes === void 0 ? {} : _ref31$attributes;
12248
12284
  var attrMap = {
12249
12285
  htmlFor: 'for',
12250
12286
  className: 'class'
@@ -12386,7 +12422,7 @@
12386
12422
  }
12387
12423
  var is_unsupported_role_default = isUnsupportedRole;
12388
12424
  function isValidRole(role) {
12389
- var _ref31 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, allowAbstract = _ref31.allowAbstract, _ref31$flagUnsupporte = _ref31.flagUnsupported, flagUnsupported = _ref31$flagUnsupporte === void 0 ? false : _ref31$flagUnsupporte;
12425
+ var _ref32 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, allowAbstract = _ref32.allowAbstract, _ref32$flagUnsupporte = _ref32.flagUnsupported, flagUnsupported = _ref32$flagUnsupporte === void 0 ? false : _ref32$flagUnsupporte;
12390
12426
  var roleDefinition = standards_default.ariaRoles[role];
12391
12427
  var isRoleUnsupported = is_unsupported_role_default(role);
12392
12428
  if (!roleDefinition || flagUnsupported && isRoleUnsupported) {
@@ -12396,7 +12432,7 @@
12396
12432
  }
12397
12433
  var is_valid_role_default = isValidRole;
12398
12434
  function getExplicitRole(vNode) {
12399
- var _ref32 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, fallback = _ref32.fallback, abstracts = _ref32.abstracts, dpub = _ref32.dpub;
12435
+ var _ref33 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, fallback = _ref33.fallback, abstracts = _ref33.abstracts, dpub = _ref33.dpub;
12400
12436
  vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
12401
12437
  if (vNode.props.nodeType !== 1) {
12402
12438
  return null;
@@ -12795,7 +12831,7 @@
12795
12831
  }
12796
12832
  var get_element_spec_default = getElementSpec;
12797
12833
  function implicitRole2(node) {
12798
- var _ref33 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref33.chromium;
12834
+ var _ref34 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref34.chromium;
12799
12835
  var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
12800
12836
  node = vNode.actualNode;
12801
12837
  if (!vNode) {
@@ -12845,8 +12881,8 @@
12845
12881
  }
12846
12882
  return getInheritedRole(vNode.parent, explicitRoleOptions);
12847
12883
  }
12848
- function resolveImplicitRole(vNode, _ref34) {
12849
- var chromium = _ref34.chromium, explicitRoleOptions = _objectWithoutProperties(_ref34, _excluded5);
12884
+ function resolveImplicitRole(vNode, _ref35) {
12885
+ var chromium = _ref35.chromium, explicitRoleOptions = _objectWithoutProperties(_ref35, _excluded5);
12850
12886
  var implicitRole3 = implicit_role_default(vNode, {
12851
12887
  chromium: chromium
12852
12888
  });
@@ -12866,8 +12902,8 @@
12866
12902
  return hasGlobalAria || is_focusable_default(vNode);
12867
12903
  }
12868
12904
  function resolveRole(node) {
12869
- var _ref35 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12870
- var noImplicit = _ref35.noImplicit, roleOptions = _objectWithoutProperties(_ref35, _excluded6);
12905
+ var _ref36 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12906
+ var noImplicit = _ref36.noImplicit, roleOptions = _objectWithoutProperties(_ref36, _excluded6);
12871
12907
  var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
12872
12908
  if (vNode.props.nodeType !== 1) {
12873
12909
  return null;
@@ -12885,8 +12921,8 @@
12885
12921
  return explicitRole2;
12886
12922
  }
12887
12923
  function getRole(node) {
12888
- var _ref36 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12889
- var noPresentational = _ref36.noPresentational, options = _objectWithoutProperties(_ref36, _excluded7);
12924
+ var _ref37 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12925
+ var noPresentational = _ref37.noPresentational, options = _objectWithoutProperties(_ref37, _excluded7);
12890
12926
  var role = resolveRole(node, options);
12891
12927
  if (noPresentational && [ 'presentation', 'none' ].includes(role)) {
12892
12928
  return null;
@@ -12907,7 +12943,7 @@
12907
12943
  }
12908
12944
  var title_text_default = titleText;
12909
12945
  function namedFromContents(vNode) {
12910
- var _ref37 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref37.strict;
12946
+ var _ref38 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref38.strict;
12911
12947
  vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
12912
12948
  if (vNode.props.nodeType !== 1) {
12913
12949
  return false;
@@ -13030,12 +13066,12 @@
13030
13066
  button: ''
13031
13067
  };
13032
13068
  var nativeTextMethods = {
13033
- valueText: function valueText(_ref38) {
13034
- var actualNode = _ref38.actualNode;
13069
+ valueText: function valueText(_ref39) {
13070
+ var actualNode = _ref39.actualNode;
13035
13071
  return actualNode.value || '';
13036
13072
  },
13037
- buttonDefaultText: function buttonDefaultText(_ref39) {
13038
- var actualNode = _ref39.actualNode;
13073
+ buttonDefaultText: function buttonDefaultText(_ref40) {
13074
+ var actualNode = _ref40.actualNode;
13039
13075
  return defaultButtonValues[actualNode.type] || '';
13040
13076
  },
13041
13077
  tableCaptionText: descendantText.bind(null, 'caption'),
@@ -13055,8 +13091,8 @@
13055
13091
  function attrText(attr, vNode) {
13056
13092
  return vNode.attr(attr) || '';
13057
13093
  }
13058
- function descendantText(nodeName2, _ref40, context5) {
13059
- var actualNode = _ref40.actualNode;
13094
+ function descendantText(nodeName2, _ref41, context5) {
13095
+ var actualNode = _ref41.actualNode;
13060
13096
  nodeName2 = nodeName2.toLowerCase();
13061
13097
  var nodeNames2 = [ nodeName2, actualNode.nodeName.toLowerCase() ].join(',');
13062
13098
  var candidate = actualNode.querySelector(nodeNames2);
@@ -13169,7 +13205,7 @@
13169
13205
  }
13170
13206
  var options = query_selector_all_default(vNode, 'option');
13171
13207
  var selectedOptions = options.filter(function(option) {
13172
- return option.hasAttr('selected');
13208
+ return option.props.selected;
13173
13209
  });
13174
13210
  if (!selectedOptions.length) {
13175
13211
  selectedOptions.push(options[0]);
@@ -13250,8 +13286,8 @@
13250
13286
  }
13251
13287
  return virtualNode.props.nodeValue;
13252
13288
  }
13253
- function shouldIgnoreHidden(_ref41, context5) {
13254
- var actualNode = _ref41.actualNode;
13289
+ function shouldIgnoreHidden(_ref42, context5) {
13290
+ var actualNode = _ref42.actualNode;
13255
13291
  if (!actualNode) {
13256
13292
  return false;
13257
13293
  }
@@ -13542,7 +13578,7 @@
13542
13578
  locations: [ 'billing', 'shipping' ]
13543
13579
  };
13544
13580
  function isValidAutocomplete(autocompleteValue) {
13545
- var _ref42 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref42$looseTyped = _ref42.looseTyped, looseTyped = _ref42$looseTyped === void 0 ? false : _ref42$looseTyped, _ref42$stateTerms = _ref42.stateTerms, stateTerms = _ref42$stateTerms === void 0 ? [] : _ref42$stateTerms, _ref42$locations = _ref42.locations, locations = _ref42$locations === void 0 ? [] : _ref42$locations, _ref42$qualifiers = _ref42.qualifiers, qualifiers = _ref42$qualifiers === void 0 ? [] : _ref42$qualifiers, _ref42$standaloneTerm = _ref42.standaloneTerms, standaloneTerms = _ref42$standaloneTerm === void 0 ? [] : _ref42$standaloneTerm, _ref42$qualifiedTerms = _ref42.qualifiedTerms, qualifiedTerms = _ref42$qualifiedTerms === void 0 ? [] : _ref42$qualifiedTerms;
13581
+ 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;
13546
13582
  autocompleteValue = autocompleteValue.toLowerCase().trim();
13547
13583
  stateTerms = stateTerms.concat(_autocomplete.stateTerms);
13548
13584
  if (stateTerms.includes(autocompleteValue) || autocompleteValue === '') {
@@ -15567,8 +15603,8 @@
15567
15603
  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' ]
15568
15604
  } ];
15569
15605
  lookupTable.evaluateRoleForElement = {
15570
- A: function A(_ref43) {
15571
- var node = _ref43.node, out = _ref43.out;
15606
+ A: function A(_ref44) {
15607
+ var node = _ref44.node, out = _ref44.out;
15572
15608
  if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
15573
15609
  return true;
15574
15610
  }
@@ -15577,19 +15613,19 @@
15577
15613
  }
15578
15614
  return true;
15579
15615
  },
15580
- AREA: function AREA(_ref44) {
15581
- var node = _ref44.node;
15616
+ AREA: function AREA(_ref45) {
15617
+ var node = _ref45.node;
15582
15618
  return !node.href;
15583
15619
  },
15584
- BUTTON: function BUTTON(_ref45) {
15585
- var node = _ref45.node, role = _ref45.role, out = _ref45.out;
15620
+ BUTTON: function BUTTON(_ref46) {
15621
+ var node = _ref46.node, role = _ref46.role, out = _ref46.out;
15586
15622
  if (node.getAttribute('type') === 'menu') {
15587
15623
  return role === 'menuitem';
15588
15624
  }
15589
15625
  return out;
15590
15626
  },
15591
- IMG: function IMG(_ref46) {
15592
- var node = _ref46.node, role = _ref46.role, out = _ref46.out;
15627
+ IMG: function IMG(_ref47) {
15628
+ var node = _ref47.node, role = _ref47.role, out = _ref47.out;
15593
15629
  switch (node.alt) {
15594
15630
  case null:
15595
15631
  return out;
@@ -15601,8 +15637,8 @@
15601
15637
  return role !== 'presentation' && role !== 'none';
15602
15638
  }
15603
15639
  },
15604
- INPUT: function INPUT(_ref47) {
15605
- var node = _ref47.node, role = _ref47.role, out = _ref47.out;
15640
+ INPUT: function INPUT(_ref48) {
15641
+ var node = _ref48.node, role = _ref48.role, out = _ref48.out;
15606
15642
  switch (node.type) {
15607
15643
  case 'button':
15608
15644
  case 'image':
@@ -15632,32 +15668,32 @@
15632
15668
  return false;
15633
15669
  }
15634
15670
  },
15635
- LI: function LI(_ref48) {
15636
- var node = _ref48.node, out = _ref48.out;
15671
+ LI: function LI(_ref49) {
15672
+ var node = _ref49.node, out = _ref49.out;
15637
15673
  var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
15638
15674
  if (hasImplicitListitemRole) {
15639
15675
  return out;
15640
15676
  }
15641
15677
  return true;
15642
15678
  },
15643
- MENU: function MENU(_ref49) {
15644
- var node = _ref49.node;
15679
+ MENU: function MENU(_ref50) {
15680
+ var node = _ref50.node;
15645
15681
  if (node.getAttribute('type') === 'context') {
15646
15682
  return false;
15647
15683
  }
15648
15684
  return true;
15649
15685
  },
15650
- OPTION: function OPTION(_ref50) {
15651
- var node = _ref50.node;
15686
+ OPTION: function OPTION(_ref51) {
15687
+ var node = _ref51.node;
15652
15688
  var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
15653
15689
  return !withinOptionList;
15654
15690
  },
15655
- SELECT: function SELECT(_ref51) {
15656
- var node = _ref51.node, role = _ref51.role;
15691
+ SELECT: function SELECT(_ref52) {
15692
+ var node = _ref52.node, role = _ref52.role;
15657
15693
  return !node.multiple && node.size <= 1 && role === 'menu';
15658
15694
  },
15659
- SVG: function SVG(_ref52) {
15660
- var node = _ref52.node, out = _ref52.out;
15695
+ SVG: function SVG(_ref53) {
15696
+ var node = _ref53.node, out = _ref53.out;
15661
15697
  if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
15662
15698
  return true;
15663
15699
  }
@@ -15785,10 +15821,36 @@
15785
15821
  if (Array.isArray(options[role])) {
15786
15822
  allowed = unique_array_default(options[role].concat(allowed));
15787
15823
  }
15824
+ var tableMap = cache_default.get('aria-allowed-attr-table');
15825
+ if (!tableMap) {
15826
+ tableMap = new WeakMap();
15827
+ cache_default.set('aria-allowed-attr-table', tableMap);
15828
+ }
15829
+ function validateRowAttrs() {
15830
+ if (virtualNode.parent && role === 'row') {
15831
+ var table5 = closest_default(virtualNode, 'table, [role="treegrid"], [role="table"], [role="grid"]');
15832
+ var tableRole = tableMap.get(table5);
15833
+ if (table5 && !tableRole) {
15834
+ tableRole = get_role_default(table5);
15835
+ tableMap.set(table5, tableRole);
15836
+ }
15837
+ if ([ 'table', 'grid' ].includes(tableRole) && role === 'row') {
15838
+ return true;
15839
+ }
15840
+ }
15841
+ }
15842
+ var ariaAttr = Array.isArray(options.validTreeRowAttrs) ? options.validTreeRowAttrs : [];
15843
+ var preChecks = {};
15844
+ ariaAttr.forEach(function(attr) {
15845
+ preChecks[attr] = validateRowAttrs;
15846
+ });
15788
15847
  if (role && allowed) {
15789
15848
  for (var _i14 = 0; _i14 < attrs.length; _i14++) {
15849
+ var _preChecks$attrName;
15790
15850
  var attrName = attrs[_i14];
15791
- if (validate_attr_default(attrName) && !allowed.includes(attrName)) {
15851
+ if (validate_attr_default(attrName) && (_preChecks$attrName = preChecks[attrName]) !== null && _preChecks$attrName !== void 0 && _preChecks$attrName.call(preChecks)) {
15852
+ invalid.push(attrName + '="' + virtualNode.attr(attrName) + '"');
15853
+ } else if (validate_attr_default(attrName) && !allowed.includes(attrName)) {
15792
15854
  invalid.push(attrName + '="' + virtualNode.attr(attrName) + '"');
15793
15855
  }
15794
15856
  }
@@ -15845,6 +15907,13 @@
15845
15907
  return void 0;
15846
15908
  }
15847
15909
  if (idref) {
15910
+ if (!is_visible_default(idref, true)) {
15911
+ this.data({
15912
+ messageKey: 'hidden',
15913
+ values: token_list_default(attr2)
15914
+ });
15915
+ return false;
15916
+ }
15848
15917
  return idref.getAttribute('role') === 'alert' || idref.getAttribute('aria-live') === 'assertive' || idref.getAttribute('aria-live') === 'polite' || token_list_default(virtualNode.attr('aria-describedby')).indexOf(attr2) > -1;
15849
15918
  }
15850
15919
  return;
@@ -16774,8 +16843,11 @@
16774
16843
  flattenColors: function flattenColors() {
16775
16844
  return flatten_colors_default;
16776
16845
  },
16846
+ flattenShadowColors: function flattenShadowColors() {
16847
+ return flatten_shadow_colors_default;
16848
+ },
16777
16849
  getBackgroundColor: function getBackgroundColor() {
16778
- return get_background_color_default;
16850
+ return _getBackgroundColor;
16779
16851
  },
16780
16852
  getBackgroundStack: function getBackgroundStack() {
16781
16853
  return get_background_stack_default;
@@ -16891,7 +16963,24 @@
16891
16963
  return null;
16892
16964
  }
16893
16965
  var filtered_rect_stack_default = filteredRectStack;
16966
+ var blendFunctions = {
16967
+ normal: function normal(Cb, Cs) {
16968
+ return Cs;
16969
+ }
16970
+ };
16971
+ function simpleAlphaCompositing(Cs, \u03b1s, Cb, \u03b1b, blendMode) {
16972
+ return Math.round(\u03b1s * (1 - \u03b1b) * Cs + \u03b1s * \u03b1b * blendFunctions[blendMode](Cb, Cs) + (1 - \u03b1s) * \u03b1b * Cb);
16973
+ }
16894
16974
  function flattenColors(fgColor, bgColor) {
16975
+ var blendMode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'normal';
16976
+ var r = simpleAlphaCompositing(fgColor.red, fgColor.alpha, bgColor.red, bgColor.alpha, blendMode);
16977
+ var g = simpleAlphaCompositing(fgColor.green, fgColor.alpha, bgColor.green, bgColor.alpha, blendMode);
16978
+ var b = simpleAlphaCompositing(fgColor.blue, fgColor.alpha, bgColor.blue, bgColor.alpha, blendMode);
16979
+ var a = Math.max(0, Math.min(fgColor.alpha + bgColor.alpha * (1 - fgColor.alpha), 1));
16980
+ return new color_default(r, g, b, a);
16981
+ }
16982
+ var flatten_colors_default = flattenColors;
16983
+ function flattenColors2(fgColor, bgColor) {
16895
16984
  var alpha = fgColor.alpha;
16896
16985
  var r = (1 - alpha) * bgColor.red + alpha * fgColor.red;
16897
16986
  var g = (1 - alpha) * bgColor.green + alpha * fgColor.green;
@@ -16899,7 +16988,7 @@
16899
16988
  var a = fgColor.alpha + bgColor.alpha * (1 - fgColor.alpha);
16900
16989
  return new color_default(r, g, b, a);
16901
16990
  }
16902
- var flatten_colors_default = flattenColors;
16991
+ var flatten_shadow_colors_default = flattenColors2;
16903
16992
  function contentOverlapping(targetElement, bgNode) {
16904
16993
  var targetRect = targetElement.getClientRects()[0];
16905
16994
  var obscuringElements = shadow_elements_from_point_default(targetRect.left, targetRect.top);
@@ -16928,13 +17017,17 @@
16928
17017
  function sortPageBackground(elmStack) {
16929
17018
  var bodyIndex = elmStack.indexOf(document.body);
16930
17019
  var bgNodes = elmStack;
16931
- var sortBodyElement = bodyIndex > 1 || bodyIndex === -1;
16932
- if (sortBodyElement && !element_has_image_default(document.documentElement) && get_own_background_color_default(window.getComputedStyle(document.documentElement)).alpha === 0) {
17020
+ var htmlBgColor = get_own_background_color_default(window.getComputedStyle(document.documentElement));
17021
+ if (bodyIndex > 1 && htmlBgColor.alpha === 0 && !element_has_image_default(document.documentElement)) {
16933
17022
  if (bodyIndex > 1) {
16934
17023
  bgNodes.splice(bodyIndex, 1);
17024
+ bgNodes.push(document.body);
17025
+ }
17026
+ var htmlIndex = bgNodes.indexOf(document.documentElement);
17027
+ if (htmlIndex > 0) {
17028
+ bgNodes.splice(htmlIndex, 1);
17029
+ bgNodes.push(document.documentElement);
16935
17030
  }
16936
- bgNodes.splice(elmStack.indexOf(document.documentElement), 1);
16937
- bgNodes.push(document.body);
16938
17031
  }
16939
17032
  return bgNodes;
16940
17033
  }
@@ -16954,7 +17047,7 @@
16954
17047
  }
16955
17048
  var get_background_stack_default = getBackgroundStack;
16956
17049
  function getTextShadowColors(node) {
16957
- var _ref53 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref53.minRatio, maxRatio = _ref53.maxRatio;
17050
+ var _ref54 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref54.minRatio, maxRatio = _ref54.maxRatio;
16958
17051
  var style = window.getComputedStyle(node);
16959
17052
  var textShadow = style.getPropertyValue('text-shadow');
16960
17053
  if (textShadow === 'none') {
@@ -16965,19 +17058,19 @@
16965
17058
  assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
16966
17059
  var shadowColors = [];
16967
17060
  var shadows = parseTextShadows(textShadow);
16968
- shadows.forEach(function(_ref54) {
16969
- var colorStr = _ref54.colorStr, pixels = _ref54.pixels;
17061
+ shadows.forEach(function(_ref55) {
17062
+ var colorStr = _ref55.colorStr, pixels = _ref55.pixels;
16970
17063
  colorStr = colorStr || style.getPropertyValue('color');
16971
17064
  var _pixels = _slicedToArray(pixels, 3), offsetY = _pixels[0], offsetX = _pixels[1], _pixels$ = _pixels[2], blurRadius = _pixels$ === void 0 ? 0 : _pixels$;
16972
17065
  if ((!minRatio || blurRadius >= fontSize * minRatio) && (!maxRatio || blurRadius < fontSize * maxRatio)) {
16973
- var color10 = textShadowColor({
17066
+ var color11 = textShadowColor({
16974
17067
  colorStr: colorStr,
16975
17068
  offsetY: offsetY,
16976
17069
  offsetX: offsetX,
16977
17070
  blurRadius: blurRadius,
16978
17071
  fontSize: fontSize
16979
17072
  });
16980
- shadowColors.push(color10);
17073
+ shadowColors.push(color11);
16981
17074
  }
16982
17075
  });
16983
17076
  return shadowColors;
@@ -17016,8 +17109,8 @@
17016
17109
  }
17017
17110
  return shadows;
17018
17111
  }
17019
- function textShadowColor(_ref55) {
17020
- var colorStr = _ref55.colorStr, offsetX = _ref55.offsetX, offsetY = _ref55.offsetY, blurRadius = _ref55.blurRadius, fontSize = _ref55.fontSize;
17112
+ function textShadowColor(_ref56) {
17113
+ var colorStr = _ref56.colorStr, offsetX = _ref56.offsetX, offsetY = _ref56.offsetY, blurRadius = _ref56.blurRadius, fontSize = _ref56.fontSize;
17021
17114
  if (offsetX > blurRadius || offsetY > blurRadius) {
17022
17115
  return new color_default(0, 0, 0, 0);
17023
17116
  }
@@ -17034,19 +17127,16 @@
17034
17127
  return .185 / (relativeBlur + .4);
17035
17128
  }
17036
17129
  var get_text_shadow_colors_default = getTextShadowColors;
17037
- function elmPartiallyObscured(elm, bgElm, bgColor) {
17038
- var obscured = elm !== bgElm && !visually_contains_default(elm, bgElm) && bgColor.alpha !== 0;
17039
- if (obscured) {
17040
- incomplete_data_default.set('bgColor', 'elmPartiallyObscured');
17041
- }
17042
- return obscured;
17043
- }
17044
- function getBackgroundColor(elm) {
17130
+ function _getBackgroundColor(elm) {
17131
+ var _bgColors;
17045
17132
  var bgElms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
17046
17133
  var shadowOutlineEmMax = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : .1;
17047
17134
  var bgColors = get_text_shadow_colors_default(elm, {
17048
17135
  minRatio: shadowOutlineEmMax
17049
17136
  });
17137
+ if (bgColors.length) {
17138
+ bgColors = [ bgColors.reduce(flatten_shadow_colors_default) ];
17139
+ }
17050
17140
  var elmStack = get_background_stack_default(elm);
17051
17141
  (elmStack || []).some(function(bgElm) {
17052
17142
  var bgElmStyle = window.getComputedStyle(bgElm);
@@ -17058,7 +17148,7 @@
17058
17148
  }
17059
17149
  if (bgColor.alpha !== 0) {
17060
17150
  bgElms.push(bgElm);
17061
- bgColors.push(bgColor);
17151
+ bgColors.unshift(bgColor);
17062
17152
  return bgColor.alpha === 1;
17063
17153
  } else {
17064
17154
  return false;
@@ -17067,11 +17157,40 @@
17067
17157
  if (bgColors === null || elmStack === null) {
17068
17158
  return null;
17069
17159
  }
17070
- bgColors.push(new color_default(255, 255, 255, 1));
17071
- var colors = bgColors.reduce(flatten_colors_default);
17160
+ var pageBgs = getPageBackgroundColors(elm, elmStack.includes(document.body));
17161
+ (_bgColors = bgColors).unshift.apply(_bgColors, _toConsumableArray(pageBgs));
17162
+ var colors = bgColors.reduce(function(bgColor, fgColor) {
17163
+ return flatten_colors_default(fgColor, bgColor);
17164
+ });
17072
17165
  return colors;
17073
17166
  }
17074
- var get_background_color_default = getBackgroundColor;
17167
+ function elmPartiallyObscured(elm, bgElm, bgColor) {
17168
+ var obscured = elm !== bgElm && !_visuallyContains(elm, bgElm) && bgColor.alpha !== 0;
17169
+ if (obscured) {
17170
+ incomplete_data_default.set('bgColor', 'elmPartiallyObscured');
17171
+ }
17172
+ return obscured;
17173
+ }
17174
+ function getPageBackgroundColors(elm, stackContainsBody) {
17175
+ var pageColors = [];
17176
+ if (!stackContainsBody) {
17177
+ var html = document.documentElement;
17178
+ var body = document.body;
17179
+ var htmlStyle = window.getComputedStyle(html);
17180
+ var bodyStyle = window.getComputedStyle(body);
17181
+ var htmlBgColor = get_own_background_color_default(htmlStyle);
17182
+ var bodyBgColor = get_own_background_color_default(bodyStyle);
17183
+ var bodyBgColorApplies = bodyBgColor.alpha !== 0 && _visuallyContains(elm, body);
17184
+ if (bodyBgColor.alpha !== 0 && htmlBgColor.alpha === 0 || bodyBgColorApplies && bodyBgColor.alpha !== 1) {
17185
+ pageColors.unshift(bodyBgColor);
17186
+ }
17187
+ if (htmlBgColor.alpha !== 0 && (!bodyBgColorApplies || bodyBgColorApplies && bodyBgColor.alpha !== 1)) {
17188
+ pageColors.unshift(htmlBgColor);
17189
+ }
17190
+ }
17191
+ pageColors.unshift(new color_default(255, 255, 255, 1));
17192
+ return pageColors;
17193
+ }
17075
17194
  function getContrast(bgColor, fgColor) {
17076
17195
  if (!fgColor || !bgColor) {
17077
17196
  return null;
@@ -17110,7 +17229,7 @@
17110
17229
  return fgColor;
17111
17230
  }
17112
17231
  if (!bgColor) {
17113
- bgColor = get_background_color_default(node, []);
17232
+ bgColor = _getBackgroundColor(node, []);
17114
17233
  }
17115
17234
  if (bgColor === null) {
17116
17235
  var reason = incomplete_data_default.get('bgColor');
@@ -17121,7 +17240,7 @@
17121
17240
  var textShadowColors = get_text_shadow_colors_default(node, {
17122
17241
  minRatio: 0
17123
17242
  });
17124
- return [ fgColor ].concat(_toConsumableArray(textShadowColors), [ bgColor ]).reduce(flatten_colors_default);
17243
+ return [ fgColor ].concat(_toConsumableArray(textShadowColors), [ bgColor ]).reduce(flatten_shadow_colors_default);
17125
17244
  }
17126
17245
  return flatten_colors_default(fgColor, bgColor);
17127
17246
  }
@@ -17161,7 +17280,7 @@
17161
17280
  return void 0;
17162
17281
  }
17163
17282
  var bgNodes = [];
17164
- var bgColor = get_background_color_default(node, bgNodes, shadowOutlineEmMax);
17283
+ var bgColor = _getBackgroundColor(node, bgNodes, shadowOutlineEmMax);
17165
17284
  var fgColor = get_foreground_color_default(node, false, bgColor);
17166
17285
  var shadowColors = get_text_shadow_colors_default(node, {
17167
17286
  minRatio: .001,
@@ -17177,7 +17296,7 @@
17177
17296
  if (shadowColors.length === 0) {
17178
17297
  contrast = get_contrast_default(bgColor, fgColor);
17179
17298
  } else if (fgColor && bgColor) {
17180
- shadowColor = [].concat(_toConsumableArray(shadowColors), [ bgColor ]).reduce(flatten_colors_default);
17299
+ shadowColor = [].concat(_toConsumableArray(shadowColors), [ bgColor ]).reduce(flatten_shadow_colors_default);
17181
17300
  var bgContrast = get_contrast_default(bgColor, shadowColor);
17182
17301
  var fgContrast = get_contrast_default(shadowColor, fgColor);
17183
17302
  contrast = Math.max(bgContrast, fgContrast);
@@ -17185,7 +17304,7 @@
17185
17304
  }
17186
17305
  var ptSize = Math.ceil(fontSize * 72) / 96;
17187
17306
  var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
17188
- var _ref56 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref56.expected, minThreshold = _ref56.minThreshold, maxThreshold = _ref56.maxThreshold;
17307
+ var _ref57 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref57.expected, minThreshold = _ref57.minThreshold, maxThreshold = _ref57.maxThreshold;
17189
17308
  var isValid = contrast > expected;
17190
17309
  if (typeof minThreshold === 'number' && contrast < minThreshold || typeof maxThreshold === 'number' && contrast > maxThreshold) {
17191
17310
  return true;
@@ -17194,14 +17313,14 @@
17194
17313
  var missing;
17195
17314
  if (bgColor === null) {
17196
17315
  missing = incomplete_data_default.get('bgColor');
17197
- } else {
17316
+ } else if (!isValid) {
17198
17317
  missing = contrastContributor;
17199
17318
  }
17200
17319
  var equalRatio = truncatedResult === 1;
17201
17320
  var shortTextContent = visibleText.length === 1;
17202
17321
  if (equalRatio) {
17203
17322
  missing = incomplete_data_default.set('bgColor', 'equalRatio');
17204
- } else if (shortTextContent && !ignoreLength) {
17323
+ } else if (!isValid && shortTextContent && !ignoreLength) {
17205
17324
  missing = 'shortTextContent';
17206
17325
  }
17207
17326
  this.data({
@@ -17225,8 +17344,8 @@
17225
17344
  }
17226
17345
  return isValid;
17227
17346
  }
17228
- function findPseudoElement(vNode, _ref57) {
17229
- var _ref57$pseudoSizeThre = _ref57.pseudoSizeThreshold, pseudoSizeThreshold = _ref57$pseudoSizeThre === void 0 ? .25 : _ref57$pseudoSizeThre, _ref57$ignorePseudo = _ref57.ignorePseudo, ignorePseudo = _ref57$ignorePseudo === void 0 ? false : _ref57$ignorePseudo;
17347
+ function findPseudoElement(vNode, _ref58) {
17348
+ 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;
17230
17349
  if (ignorePseudo) {
17231
17350
  return;
17232
17351
  }
@@ -17268,7 +17387,7 @@
17268
17387
  }
17269
17388
  function parseUnit(str) {
17270
17389
  var unitRegex = /^([0-9.]+)([a-z]+)$/i;
17271
- var _ref58 = str.match(unitRegex) || [], _ref59 = _slicedToArray(_ref58, 3), _ref59$ = _ref59[1], value = _ref59$ === void 0 ? '' : _ref59$, _ref59$2 = _ref59[2], unit = _ref59$2 === void 0 ? '' : _ref59$2;
17390
+ 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;
17272
17391
  return {
17273
17392
  value: parseFloat(value),
17274
17393
  unit: unit.toLowerCase()
@@ -17313,8 +17432,8 @@
17313
17432
  incomplete_data_default.clear();
17314
17433
  return void 0;
17315
17434
  }
17316
- nodeColor = get_background_color_default(node);
17317
- parentColor = get_background_color_default(parentBlock);
17435
+ nodeColor = _getBackgroundColor(node);
17436
+ parentColor = _getBackgroundColor(parentBlock);
17318
17437
  if (!nodeColor || !parentColor || getContrast2(nodeColor, parentColor) >= 3) {
17319
17438
  var reason;
17320
17439
  if (!nodeColor || !parentColor) {
@@ -17511,14 +17630,14 @@
17511
17630
  }
17512
17631
  function getHeadingOrder(results) {
17513
17632
  results = _toConsumableArray(results);
17514
- results.sort(function(_ref60, _ref61) {
17515
- var nodeA = _ref60.node;
17516
- var nodeB = _ref61.node;
17633
+ results.sort(function(_ref61, _ref62) {
17634
+ var nodeA = _ref61.node;
17635
+ var nodeB = _ref62.node;
17517
17636
  return nodeA.ancestry.length - nodeB.ancestry.length;
17518
17637
  });
17519
17638
  var headingOrder = results.reduce(mergeHeadingOrder, []);
17520
- return headingOrder.filter(function(_ref62) {
17521
- var level = _ref62.level;
17639
+ return headingOrder.filter(function(_ref63) {
17640
+ var level = _ref63.level;
17522
17641
  return level !== -1;
17523
17642
  });
17524
17643
  }
@@ -17569,7 +17688,7 @@
17569
17688
  var headingRole = role && role.includes('heading');
17570
17689
  var ariaHeadingLevel = vNode.attr('aria-level');
17571
17690
  var ariaLevel = parseInt(ariaHeadingLevel, 10);
17572
- var _ref63 = vNode.props.nodeName.match(/h(\d)/) || [], _ref64 = _slicedToArray(_ref63, 2), headingLevel = _ref64[1];
17691
+ var _ref64 = vNode.props.nodeName.match(/h(\d)/) || [], _ref65 = _slicedToArray(_ref64, 2), headingLevel = _ref65[1];
17573
17692
  if (!headingRole) {
17574
17693
  return -1;
17575
17694
  }
@@ -17635,8 +17754,8 @@
17635
17754
  if (results.length < 2) {
17636
17755
  return results;
17637
17756
  }
17638
- var incompleteResults = results.filter(function(_ref65) {
17639
- var result = _ref65.result;
17757
+ var incompleteResults = results.filter(function(_ref66) {
17758
+ var result = _ref66.result;
17640
17759
  return result !== void 0;
17641
17760
  });
17642
17761
  var uniqueResults = [];
@@ -17648,12 +17767,12 @@
17648
17767
  if (nameMap[name]) {
17649
17768
  return 'continue';
17650
17769
  }
17651
- var sameNameResults = incompleteResults.filter(function(_ref66, resultNum) {
17652
- var data2 = _ref66.data;
17770
+ var sameNameResults = incompleteResults.filter(function(_ref67, resultNum) {
17771
+ var data2 = _ref67.data;
17653
17772
  return data2.name === name && resultNum !== index;
17654
17773
  });
17655
- var isSameUrl = sameNameResults.every(function(_ref67) {
17656
- var data2 = _ref67.data;
17774
+ var isSameUrl = sameNameResults.every(function(_ref68) {
17775
+ var data2 = _ref68.data;
17657
17776
  return isIdenticalObject(data2.urlProps, urlProps);
17658
17777
  });
17659
17778
  if (sameNameResults.length && !isSameUrl) {
@@ -17783,7 +17902,7 @@
17783
17902
  function internalLinkPresentEvaluate(node, options, virtualNode) {
17784
17903
  var links = query_selector_all_default(virtualNode, 'a[href]');
17785
17904
  return links.some(function(vLink) {
17786
- return /^#[^/!]/.test(vLink.actualNode.getAttribute('href'));
17905
+ return /^#[^/!]/.test(vLink.attr('href'));
17787
17906
  });
17788
17907
  }
17789
17908
  var internal_link_present_evaluate_default = internalLinkPresentEvaluate;
@@ -17854,6 +17973,13 @@
17854
17973
  var currStyle = getStyleValues(node);
17855
17974
  var nextStyle = nextSibling ? getStyleValues(nextSibling) : null;
17856
17975
  var prevStyle = prevSibling ? getStyleValues(prevSibling) : null;
17976
+ var optionsPassLength = options.passLength;
17977
+ var optionsFailLength = options.failLength;
17978
+ var headingLength = node.textContent.trim().length;
17979
+ var paragraphLength = nextSibling === null || nextSibling === void 0 ? void 0 : nextSibling.textContent.trim().length;
17980
+ if (headingLength > paragraphLength * optionsPassLength) {
17981
+ return true;
17982
+ }
17857
17983
  if (!nextStyle || !isHeaderStyle(currStyle, nextStyle, margins)) {
17858
17984
  return true;
17859
17985
  }
@@ -17864,6 +17990,9 @@
17864
17990
  if (prevStyle && !isHeaderStyle(currStyle, prevStyle, margins)) {
17865
17991
  return void 0;
17866
17992
  }
17993
+ if (headingLength > paragraphLength * optionsFailLength) {
17994
+ return void 0;
17995
+ }
17867
17996
  return false;
17868
17997
  }
17869
17998
  var p_as_heading_evaluate_default = pAsHeadingEvaluate;
@@ -17899,8 +18028,8 @@
17899
18028
  } else if (node !== document.body && has_content_default(node, true)) {
17900
18029
  return [ virtualNode ];
17901
18030
  } else {
17902
- return virtualNode.children.filter(function(_ref68) {
17903
- var actualNode = _ref68.actualNode;
18031
+ return virtualNode.children.filter(function(_ref69) {
18032
+ var actualNode = _ref69.actualNode;
17904
18033
  return actualNode.nodeType === 1;
17905
18034
  }).map(function(vNode) {
17906
18035
  return findRegionlessElms(vNode, options);
@@ -18083,8 +18212,8 @@
18083
18212
  if (!virtualNode.children) {
18084
18213
  return void 0;
18085
18214
  }
18086
- var titleNode = virtualNode.children.find(function(_ref69) {
18087
- var props = _ref69.props;
18215
+ var titleNode = virtualNode.children.find(function(_ref70) {
18216
+ var props = _ref70.props;
18088
18217
  return props.nodeName === 'title';
18089
18218
  });
18090
18219
  if (!titleNode) {
@@ -18107,8 +18236,8 @@
18107
18236
  }
18108
18237
  var svg_non_empty_title_evaluate_default = svgNonEmptyTitleEvaluate;
18109
18238
  function cssOrientationLockEvaluate(node, options, virtualNode, context5) {
18110
- var _ref70 = context5 || {}, _ref70$cssom = _ref70.cssom, cssom = _ref70$cssom === void 0 ? void 0 : _ref70$cssom;
18111
- var _ref71 = options || {}, _ref71$degreeThreshol = _ref71.degreeThreshold, degreeThreshold = _ref71$degreeThreshol === void 0 ? 0 : _ref71$degreeThreshol;
18239
+ var _ref71 = context5 || {}, _ref71$cssom = _ref71.cssom, cssom = _ref71$cssom === void 0 ? void 0 : _ref71$cssom;
18240
+ var _ref72 = options || {}, _ref72$degreeThreshol = _ref72.degreeThreshold, degreeThreshold = _ref72$degreeThreshol === void 0 ? 0 : _ref72$degreeThreshol;
18112
18241
  if (!cssom || !cssom.length) {
18113
18242
  return void 0;
18114
18243
  }
@@ -18122,8 +18251,8 @@
18122
18251
  if (!orientationRules.length) {
18123
18252
  return 'continue';
18124
18253
  }
18125
- orientationRules.forEach(function(_ref72) {
18126
- var cssRules = _ref72.cssRules;
18254
+ orientationRules.forEach(function(_ref73) {
18255
+ var cssRules = _ref73.cssRules;
18127
18256
  Array.from(cssRules).forEach(function(cssRule) {
18128
18257
  var locked = getIsOrientationLocked(cssRule);
18129
18258
  if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
@@ -18148,8 +18277,8 @@
18148
18277
  }
18149
18278
  return false;
18150
18279
  function groupCssomByDocument(cssObjectModel) {
18151
- return cssObjectModel.reduce(function(out, _ref73) {
18152
- var sheet = _ref73.sheet, root = _ref73.root, shadowId = _ref73.shadowId;
18280
+ return cssObjectModel.reduce(function(out, _ref74) {
18281
+ var sheet = _ref74.sheet, root = _ref74.root, shadowId = _ref74.shadowId;
18153
18282
  var key = shadowId ? shadowId : 'topDocument';
18154
18283
  if (!out[key]) {
18155
18284
  out[key] = {
@@ -18165,15 +18294,15 @@
18165
18294
  return out;
18166
18295
  }, {});
18167
18296
  }
18168
- function isMediaRuleWithOrientation(_ref74) {
18169
- var type = _ref74.type, cssText = _ref74.cssText;
18297
+ function isMediaRuleWithOrientation(_ref75) {
18298
+ var type = _ref75.type, cssText = _ref75.cssText;
18170
18299
  if (type !== 4) {
18171
18300
  return false;
18172
18301
  }
18173
18302
  return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
18174
18303
  }
18175
- function getIsOrientationLocked(_ref75) {
18176
- var selectorText = _ref75.selectorText, style = _ref75.style;
18304
+ function getIsOrientationLocked(_ref76) {
18305
+ var selectorText = _ref76.selectorText, style = _ref76.style;
18177
18306
  if (!selectorText || style.length <= 0) {
18178
18307
  return false;
18179
18308
  }
@@ -18220,7 +18349,7 @@
18220
18349
  }
18221
18350
  }
18222
18351
  function getAngleInDegrees(angleWithUnit) {
18223
- var _ref76 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref77 = _slicedToArray(_ref76, 1), unit = _ref77[0];
18352
+ var _ref77 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref78 = _slicedToArray(_ref77, 1), unit = _ref78[0];
18224
18353
  if (!unit) {
18225
18354
  return;
18226
18355
  }
@@ -18269,7 +18398,7 @@
18269
18398
  }
18270
18399
  var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
18271
18400
  function metaViewportScaleEvaluate(node, options, virtualNode) {
18272
- var _ref78 = options || {}, _ref78$scaleMinimum = _ref78.scaleMinimum, scaleMinimum = _ref78$scaleMinimum === void 0 ? 2 : _ref78$scaleMinimum, _ref78$lowerBound = _ref78.lowerBound, lowerBound = _ref78$lowerBound === void 0 ? false : _ref78$lowerBound;
18401
+ 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;
18273
18402
  var content = virtualNode.attr('content') || '';
18274
18403
  if (!content) {
18275
18404
  return true;
@@ -18385,8 +18514,8 @@
18385
18514
  if (!tabbableElements || !tabbableElements.length) {
18386
18515
  return true;
18387
18516
  }
18388
- var relatedNodes = tabbableElements.reduce(function(out, _ref79) {
18389
- var el = _ref79.actualNode;
18517
+ var relatedNodes = tabbableElements.reduce(function(out, _ref80) {
18518
+ var el = _ref80.actualNode;
18390
18519
  var nodeName2 = el.nodeName.toUpperCase();
18391
18520
  if (elementsThatCanBeDisabled.includes(nodeName2)) {
18392
18521
  out.push(el);
@@ -18425,8 +18554,8 @@
18425
18554
  }
18426
18555
  var focusable_element_evaluate_default = focusableElementEvaluate;
18427
18556
  function focusableModalOpenEvaluate(node, options, virtualNode) {
18428
- var tabbableElements = virtualNode.tabbableElements.map(function(_ref80) {
18429
- var actualNode = _ref80.actualNode;
18557
+ var tabbableElements = virtualNode.tabbableElements.map(function(_ref81) {
18558
+ var actualNode = _ref81.actualNode;
18430
18559
  return actualNode;
18431
18560
  });
18432
18561
  if (!tabbableElements || !tabbableElements.length) {
@@ -18458,8 +18587,8 @@
18458
18587
  if (!tabbableElements || !tabbableElements.length) {
18459
18588
  return true;
18460
18589
  }
18461
- var relatedNodes = tabbableElements.reduce(function(out, _ref81) {
18462
- var el = _ref81.actualNode;
18590
+ var relatedNodes = tabbableElements.reduce(function(out, _ref82) {
18591
+ var el = _ref82.actualNode;
18463
18592
  var nodeName2 = el.nodeName.toUpperCase();
18464
18593
  if (!elementsThatCanBeDisabled.includes(nodeName2)) {
18465
18594
  out.push(el);
@@ -18641,7 +18770,7 @@
18641
18770
  return sanitize_default(noUnicodeStr);
18642
18771
  }
18643
18772
  function labelContentNameMismatchEvaluate(node, options, virtualNode) {
18644
- var _ref82 = options || {}, pixelThreshold = _ref82.pixelThreshold, occuranceThreshold = _ref82.occuranceThreshold;
18773
+ var _ref83 = options || {}, pixelThreshold = _ref83.pixelThreshold, occuranceThreshold = _ref83.occuranceThreshold;
18645
18774
  var accText = accessible_text_default(node).toLowerCase();
18646
18775
  if (is_human_interpretable_default(accText) < 1) {
18647
18776
  return void 0;
@@ -19391,7 +19520,7 @@
19391
19520
  if (!role || [ 'none', 'presentation' ].includes(role)) {
19392
19521
  return true;
19393
19522
  }
19394
- var _ref83 = aria_roles_default[role] || {}, accessibleNameRequired = _ref83.accessibleNameRequired;
19523
+ var _ref84 = aria_roles_default[role] || {}, accessibleNameRequired = _ref84.accessibleNameRequired;
19395
19524
  if (accessibleNameRequired || is_focusable_default(virtualNode)) {
19396
19525
  return true;
19397
19526
  }
@@ -20522,10 +20651,10 @@
20522
20651
  } else if ([ 'tag', 'tags', void 0 ].includes(only.type)) {
20523
20652
  only.type = 'tag';
20524
20653
  var unmatchedTags = only.values.filter(function(tag) {
20525
- return !tags.includes(tag);
20654
+ return !tags.includes(tag) && !/wcag2[1-3]a{1,3}/.test(tag);
20526
20655
  });
20527
20656
  if (unmatchedTags.length !== 0) {
20528
- log_default('Could not find tags `' + unmatchedTags.join('`, `') + '`');
20657
+ axe.log('Could not find tags `' + unmatchedTags.join('`, `') + '`');
20529
20658
  }
20530
20659
  } else {
20531
20660
  throw new Error('Unknown runOnly type \''.concat(only.type, '\''));
@@ -20622,8 +20751,8 @@
20622
20751
  });
20623
20752
  };
20624
20753
  }
20625
- function getHelpUrl(_ref84, ruleId, version) {
20626
- var brand = _ref84.brand, application = _ref84.application, lang = _ref84.lang;
20754
+ function getHelpUrl(_ref85, ruleId, version) {
20755
+ var brand = _ref85.brand, application = _ref85.application, lang = _ref85.lang;
20627
20756
  return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
20628
20757
  }
20629
20758
  var audit_default = Audit;
@@ -20649,6 +20778,7 @@
20649
20778
  var es6_promise = __toModule(require_es6_promise());
20650
20779
  var typedarray = __toModule(require_typedarray());
20651
20780
  var weakmap_polyfill = __toModule(require_weakmap_polyfill());
20781
+ dot2['default'].templateSettings.strip = false;
20652
20782
  if (!('Promise' in window)) {
20653
20783
  es6_promise['default'].polyfill();
20654
20784
  }
@@ -21036,9 +21166,9 @@
21036
21166
  });
21037
21167
  }
21038
21168
  var run_virtual_rule_default = runVirtualRule;
21039
- function normalizeRunParams(_ref85) {
21040
- var _ref87, _options$reporter, _axe$_audit;
21041
- var _ref86 = _slicedToArray(_ref85, 3), context5 = _ref86[0], options = _ref86[1], callback = _ref86[2];
21169
+ function normalizeRunParams(_ref86) {
21170
+ var _ref88, _options$reporter, _axe$_audit;
21171
+ var _ref87 = _slicedToArray(_ref86, 3), context5 = _ref87[0], options = _ref87[1], callback = _ref87[2];
21042
21172
  var typeErr = new TypeError('axe.run arguments are invalid');
21043
21173
  if (!isContext(context5)) {
21044
21174
  if (callback !== void 0) {
@@ -21059,7 +21189,7 @@
21059
21189
  throw typeErr;
21060
21190
  }
21061
21191
  options = clone_default(options);
21062
- options.reporter = (_ref87 = (_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 && _ref87 !== void 0 ? _ref87 : 'v1';
21192
+ 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';
21063
21193
  return {
21064
21194
  context: context5,
21065
21195
  options: options,
@@ -21184,14 +21314,14 @@
21184
21314
  return new Promise(function(res, rej) {
21185
21315
  axe._audit.run(contextObj, options, res, rej);
21186
21316
  }).then(function(results) {
21187
- results = results.map(function(_ref88) {
21188
- var nodes = _ref88.nodes, result = _objectWithoutProperties(_ref88, _excluded8);
21317
+ results = results.map(function(_ref89) {
21318
+ var nodes = _ref89.nodes, result = _objectWithoutProperties(_ref89, _excluded8);
21189
21319
  return _extends({
21190
21320
  nodes: nodes.map(serializeNode)
21191
21321
  }, result);
21192
21322
  });
21193
- var frames = contextObj.frames.map(function(_ref89) {
21194
- var node = _ref89.node;
21323
+ var frames = contextObj.frames.map(function(_ref90) {
21324
+ var node = _ref90.node;
21195
21325
  return new dq_element_default(node, options).toJSON();
21196
21326
  });
21197
21327
  var environmentData;
@@ -21208,13 +21338,13 @@
21208
21338
  teardown_default();
21209
21339
  });
21210
21340
  }
21211
- function serializeNode(_ref90) {
21212
- var node = _ref90.node, nodeResult = _objectWithoutProperties(_ref90, _excluded9);
21341
+ function serializeNode(_ref91) {
21342
+ var node = _ref91.node, nodeResult = _objectWithoutProperties(_ref91, _excluded9);
21213
21343
  nodeResult.node = node.toJSON();
21214
21344
  for (var _i28 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i28 < _arr2.length; _i28++) {
21215
21345
  var type = _arr2[_i28];
21216
- nodeResult[type] = nodeResult[type].map(function(_ref91) {
21217
- var relatedNodes = _ref91.relatedNodes, checkResult = _objectWithoutProperties(_ref91, _excluded10);
21346
+ nodeResult[type] = nodeResult[type].map(function(_ref92) {
21347
+ var relatedNodes = _ref92.relatedNodes, checkResult = _objectWithoutProperties(_ref92, _excluded10);
21218
21348
  return _extends({}, checkResult, {
21219
21349
  relatedNodes: relatedNodes.map(function(node2) {
21220
21350
  return node2.toJSON();
@@ -21225,14 +21355,14 @@
21225
21355
  return nodeResult;
21226
21356
  }
21227
21357
  function finishRun(partialResults) {
21228
- var _ref93, _options$reporter2, _axe$_audit2;
21358
+ var _ref94, _options$reporter2, _axe$_audit2;
21229
21359
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
21230
21360
  options = clone_default(options);
21231
- var _ref92 = partialResults.find(function(r) {
21361
+ var _ref93 = partialResults.find(function(r) {
21232
21362
  return r.environmentData;
21233
- }) || {}, environmentData = _ref92.environmentData;
21363
+ }) || {}, environmentData = _ref93.environmentData;
21234
21364
  axe._audit.normalizeOptions(options);
21235
- options.reporter = (_ref93 = (_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 && _ref93 !== void 0 ? _ref93 : 'v1';
21365
+ 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';
21236
21366
  setFrameSpec(partialResults);
21237
21367
  var results = merge_results_default(partialResults);
21238
21368
  results = axe._audit.after(results, options);
@@ -21262,8 +21392,8 @@
21262
21392
  _iterator4.f();
21263
21393
  }
21264
21394
  }
21265
- function getMergedFrameSpecs(_ref94) {
21266
- var childFrameSpecs = _ref94.frames, parentFrameSpec = _ref94.frameSpec;
21395
+ function getMergedFrameSpecs(_ref95) {
21396
+ var childFrameSpecs = _ref95.frames, parentFrameSpec = _ref95.frameSpec;
21267
21397
  if (!parentFrameSpec) {
21268
21398
  return childFrameSpecs;
21269
21399
  }
@@ -21326,9 +21456,9 @@
21326
21456
  for (var _i29 = 0, _types = types; _i29 < _types.length; _i29++) {
21327
21457
  var type = _types[_i29];
21328
21458
  if (transformedResult[type] && Array.isArray(transformedResult[type])) {
21329
- transformedResult[type] = transformedResult[type].map(function(_ref95) {
21459
+ transformedResult[type] = transformedResult[type].map(function(_ref96) {
21330
21460
  var _node;
21331
- var node = _ref95.node, typeResult = _objectWithoutProperties(_ref95, _excluded13);
21461
+ var node = _ref96.node, typeResult = _objectWithoutProperties(_ref96, _excluded13);
21332
21462
  node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
21333
21463
  return _extends({
21334
21464
  node: node
@@ -21403,6 +21533,9 @@
21403
21533
  Rule: rule_default,
21404
21534
  metadataFunctionMap: metadata_function_map_default
21405
21535
  };
21536
+ axe._thisWillBeDeletedDoNotUse['public'] = {
21537
+ reporters: reporters
21538
+ };
21406
21539
  axe.imports = imports_exports;
21407
21540
  axe.cleanup = cleanup_default;
21408
21541
  axe.configure = configure_default;
@@ -21494,7 +21627,7 @@
21494
21627
  },
21495
21628
  'aria-roledescription': {
21496
21629
  description: 'Ensure aria-roledescription is only used on elements with an implicit or explicit role',
21497
- help: 'Use aria-roledescription on elements with a semantic role'
21630
+ help: 'aria-roledescription must be on elements with a semantic role'
21498
21631
  },
21499
21632
  'aria-roles': {
21500
21633
  description: 'Ensures all elements with a role attribute use a valid value',
@@ -21506,7 +21639,7 @@
21506
21639
  },
21507
21640
  'aria-toggle-field-name': {
21508
21641
  description: 'Ensures every ARIA toggle field has an accessible name',
21509
- help: 'ARIA toggle fields have an accessible name'
21642
+ help: 'ARIA toggle fields must have an accessible name'
21510
21643
  },
21511
21644
  'aria-tooltip-name': {
21512
21645
  description: 'Ensures every ARIA tooltip node has an accessible name',
@@ -21554,7 +21687,7 @@
21554
21687
  },
21555
21688
  'css-orientation-lock': {
21556
21689
  description: 'Ensures content is not locked to any specific display orientation, and the content is operable in all display orientations',
21557
- help: 'CSS Media queries are not used to lock display orientation'
21690
+ help: 'CSS Media queries must not lock display orientation'
21558
21691
  },
21559
21692
  'definition-list': {
21560
21693
  description: 'Ensures <dl> elements are structured correctly',
@@ -21589,8 +21722,8 @@
21589
21722
  help: 'Table header text must not be empty'
21590
21723
  },
21591
21724
  'focus-order-semantics': {
21592
- description: 'Ensures elements in the focus order have an appropriate role',
21593
- help: 'Elements in the focus order need a role appropriate for interactive content'
21725
+ description: 'Ensures elements in the focus order have a role appropriate for interactive content',
21726
+ help: 'Elements in the focus order should have an appropriate role'
21594
21727
  },
21595
21728
  'form-field-multiple-labels': {
21596
21729
  description: 'Ensures form field does not have multiple label elements',
@@ -21618,7 +21751,7 @@
21618
21751
  },
21619
21752
  'hidden-content': {
21620
21753
  description: 'Informs users about hidden content.',
21621
- help: 'Hidden content on the page cannot be analyzed'
21754
+ help: 'Hidden content on the page should be analyzed'
21622
21755
  },
21623
21756
  'html-has-lang': {
21624
21757
  description: 'Ensures every HTML document has a lang attribute',
@@ -21634,7 +21767,7 @@
21634
21767
  },
21635
21768
  'identical-links-same-purpose': {
21636
21769
  description: 'Ensure that links with the same accessible name serve a similar purpose',
21637
- help: 'Links with the same name have a similar purpose'
21770
+ help: 'Links with the same name must have a similar purpose'
21638
21771
  },
21639
21772
  'image-alt': {
21640
21773
  description: 'Ensures <img> elements have alternate text or a role of none or presentation',
@@ -21657,7 +21790,7 @@
21657
21790
  help: 'Elements must have their visible text as part of their accessible name'
21658
21791
  },
21659
21792
  'label-title-only': {
21660
- description: 'Ensures that every form element is not solely labeled using the title or aria-describedby attributes',
21793
+ description: 'Ensures that every form element has a visible label and is not solely labeled using hidden labels, or the title or aria-describedby attributes',
21661
21794
  help: 'Form elements should have a visible label'
21662
21795
  },
21663
21796
  label: {
@@ -21701,8 +21834,8 @@
21701
21834
  description: 'Landmarks should have a unique role or role/label/title (i.e. accessible name) combination'
21702
21835
  },
21703
21836
  'link-in-text-block': {
21704
- description: 'Links can be distinguished without relying on color',
21705
- help: 'Links must be distinguished from surrounding text in a way that does not rely on color'
21837
+ description: 'Ensure links are distinguished from surrounding text in a way that does not rely on color',
21838
+ help: 'Links must be distinguishable without relying on color'
21706
21839
  },
21707
21840
  'link-name': {
21708
21841
  description: 'Ensures links have discernible text',
@@ -21733,20 +21866,20 @@
21733
21866
  help: 'Zooming and scaling should not be disabled'
21734
21867
  },
21735
21868
  'nested-interactive': {
21736
- description: 'Nested interactive controls are not announced by screen readers',
21737
- help: 'Ensure interactive controls are not nested'
21869
+ description: 'Ensure controls are not nested as they are not announced by screen readers',
21870
+ help: 'Interactive controls must not be nested'
21738
21871
  },
21739
21872
  'no-autoplay-audio': {
21740
21873
  description: 'Ensures <video> or <audio> elements do not autoplay audio for more than 3 seconds without a control mechanism to stop or mute the audio',
21741
- help: '<video> or <audio> elements do not autoplay audio'
21874
+ help: '<video> or <audio> elements must not play automatically'
21742
21875
  },
21743
21876
  'object-alt': {
21744
21877
  description: 'Ensures <object> elements have alternate text',
21745
21878
  help: '<object> elements must have alternate text'
21746
21879
  },
21747
21880
  'p-as-heading': {
21748
- description: 'Ensure p elements are not used to style headings',
21749
- help: 'Bold, italic text and font-size are not used to style p elements as a heading'
21881
+ description: 'Ensure bold, italic text and font-size is not used to style <p> elements as a heading',
21882
+ help: 'Styled <p> elements must not be used as headings'
21750
21883
  },
21751
21884
  'page-has-heading-one': {
21752
21885
  description: 'Ensure that the page, or at least one of its frames contains a level-one heading',
@@ -21762,15 +21895,15 @@
21762
21895
  },
21763
21896
  'role-img-alt': {
21764
21897
  description: 'Ensures [role=\'img\'] elements have alternate text',
21765
- help: '[role=\'img\'] elements have an alternative text'
21898
+ help: '[role=\'img\'] elements must have an alternative text'
21766
21899
  },
21767
21900
  'scope-attr-valid': {
21768
21901
  description: 'Ensures the scope attribute is used correctly on tables',
21769
21902
  help: 'scope attribute should be used correctly'
21770
21903
  },
21771
21904
  'scrollable-region-focusable': {
21772
- description: 'Elements that have scrollable content must be accessible by keyboard',
21773
- help: 'Ensure that scrollable region has keyboard access'
21905
+ description: 'Ensure elements that have scrollable content are accessible by keyboard',
21906
+ help: 'Scrollable region must have keyboard access'
21774
21907
  },
21775
21908
  'select-name': {
21776
21909
  description: 'Ensures select element has an accessible name',
@@ -21785,32 +21918,32 @@
21785
21918
  help: 'The skip-link target should exist and be focusable'
21786
21919
  },
21787
21920
  'svg-img-alt': {
21788
- description: 'Ensures svg elements with an img, graphics-document or graphics-symbol role have an accessible text',
21789
- help: 'svg elements with an img role have an alternative text'
21921
+ description: 'Ensures <svg> elements with an img, graphics-document or graphics-symbol role have an accessible text',
21922
+ help: '<svg> elements with an img role must have an alternative text'
21790
21923
  },
21791
21924
  tabindex: {
21792
21925
  description: 'Ensures tabindex attribute values are not greater than 0',
21793
21926
  help: 'Elements should not have tabindex greater than zero'
21794
21927
  },
21795
21928
  'table-duplicate-name': {
21796
- description: 'Ensure that tables do not have the same summary and caption',
21797
- help: 'The <caption> element should not contain the same text as the summary attribute'
21929
+ description: 'Ensure the <caption> element does not contain the same text as the summary attribute',
21930
+ help: 'tables should not have the same summary and caption'
21798
21931
  },
21799
21932
  'table-fake-caption': {
21800
21933
  description: 'Ensure that tables with a caption use the <caption> element.',
21801
21934
  help: 'Data or header cells must not be used to give caption to a data table.'
21802
21935
  },
21803
21936
  'td-has-header': {
21804
- description: 'Ensure that each non-empty data cell in a large table has one or more table headers',
21805
- help: 'All non-empty td element in table larger than 3 by 3 must have an associated table header'
21937
+ description: 'Ensure that each non-empty data cell in a <table> larger than 3 by 3 has one or more table headers',
21938
+ help: 'Non-empty <td> elements in larger <table> must have an associated table header'
21806
21939
  },
21807
21940
  'td-headers-attr': {
21808
- description: 'Ensure that each cell in a table using the headers refers to another cell in that table',
21809
- help: 'All cells in a table element that use the headers attribute must only refer to other cells of that same table'
21941
+ description: 'Ensure that each cell in a table that uses the headers attribute refers only to other cells in that table',
21942
+ help: 'Table cells that use the headers attribute must only refer to cells in the same table'
21810
21943
  },
21811
21944
  'th-has-data-cells': {
21812
- description: 'Ensure that each table header in a data table refers to data cells',
21813
- help: 'All th elements and elements with role=columnheader/rowheader must have data cells they describe'
21945
+ description: 'Ensure that <th> elements and elements with role=columnheader/rowheader have data cells they describe',
21946
+ help: 'Table headers in a data table must refer to data cells'
21814
21947
  },
21815
21948
  'valid-lang': {
21816
21949
  description: 'Ensures lang attributes have valid values',
@@ -21862,7 +21995,8 @@
21862
21995
  pass: 'aria-errormessage exists and references elements visible to screen readers that use a supported aria-errormessage technique',
21863
21996
  fail: {
21864
21997
  singular: 'aria-errormessage value `${data.values}` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)',
21865
- plural: 'aria-errormessage values `${data.values}` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)'
21998
+ plural: 'aria-errormessage values `${data.values}` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)',
21999
+ hidden: 'aria-errormessage value `${data.values}` cannot reference a hidden element'
21866
22000
  },
21867
22001
  incomplete: {
21868
22002
  singular: 'ensure aria-errormessage value `${data.values}` references an existing element',
@@ -21889,8 +22023,8 @@
21889
22023
  impact: 'serious',
21890
22024
  messages: {
21891
22025
  pass: 'ARIA attribute is allowed',
21892
- fail: 'ARIA attribute cannot be used, add a role attribute or use a different element: ${data.values}',
21893
- incomplete: 'ARIA attribute is not well supported on the element and the text content will be used instead: ${data.values}'
22026
+ fail: 'ARIA attribute: ${data.values} is not allowed. Use a different role attribute or element.',
22027
+ incomplete: 'ARIA attribute: ${data.values} is not well supported. Use a different role attribute or element.'
21894
22028
  }
21895
22029
  },
21896
22030
  'aria-required-attr': {
@@ -22430,7 +22564,8 @@
22430
22564
  impact: 'serious',
22431
22565
  messages: {
22432
22566
  pass: '<p> elements are not styled as headings',
22433
- fail: 'Heading elements should be used instead of styled p elements'
22567
+ fail: 'Heading elements should be used instead of styled <p> elements',
22568
+ incomplete: 'Unable to determine if <p> elements are styled as headings'
22434
22569
  }
22435
22570
  },
22436
22571
  region: {
@@ -22757,7 +22892,12 @@
22757
22892
  tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
22758
22893
  actIds: [ '5c01ea' ],
22759
22894
  all: [],
22760
- any: [ 'aria-allowed-attr' ],
22895
+ any: [ {
22896
+ options: {
22897
+ validTreeRowAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-level' ]
22898
+ },
22899
+ id: 'aria-allowed-attr'
22900
+ } ],
22761
22901
  none: [ 'aria-unsupported-attr', {
22762
22902
  options: {
22763
22903
  elementsAllowedAriaLabel: [ 'applet', 'input' ]
@@ -23002,7 +23142,12 @@
23002
23142
  matches: 'autocomplete-matches',
23003
23143
  tags: [ 'cat.forms', 'wcag21aa', 'wcag135' ],
23004
23144
  actIds: [ '73f2c2' ],
23005
- all: [ 'autocomplete-valid' ],
23145
+ all: [ {
23146
+ options: {
23147
+ stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null' ]
23148
+ },
23149
+ id: 'autocomplete-valid'
23150
+ } ],
23006
23151
  any: [],
23007
23152
  none: []
23008
23153
  }, {
@@ -23297,7 +23442,7 @@
23297
23442
  selector: 'a[href], area[href], [role="link"]',
23298
23443
  excludeHidden: false,
23299
23444
  matches: 'identical-links-same-purpose-matches',
23300
- tags: [ 'cat.semantics', 'wcag2aaa', 'wcag249', 'best-practice' ],
23445
+ tags: [ 'cat.semantics', 'wcag2aaa', 'wcag249' ],
23301
23446
  actIds: [ 'b20e66', 'fd3a94' ],
23302
23447
  all: [ 'identical-links-same-purpose' ],
23303
23448
  any: [],
@@ -23544,7 +23689,7 @@
23544
23689
  id: 'meta-refresh',
23545
23690
  selector: 'meta[http-equiv="refresh"]',
23546
23691
  excludeHidden: false,
23547
- tags: [ 'cat.time-and-media', 'wcag2a', 'wcag2aaa', 'wcag221', 'wcag224', 'wcag325' ],
23692
+ tags: [ 'cat.time-and-media', 'wcag2a', 'wcag221', 'wcag224', 'wcag325' ],
23548
23693
  all: [],
23549
23694
  any: [ 'meta-refresh' ],
23550
23695
  none: []
@@ -23634,7 +23779,9 @@
23634
23779
  size: 1.15
23635
23780
  }, {
23636
23781
  size: 1.4
23637
- } ]
23782
+ } ],
23783
+ passLength: 1,
23784
+ failLength: .5
23638
23785
  },
23639
23786
  id: 'p-as-heading'
23640
23787
  } ],
@@ -23823,7 +23970,10 @@
23823
23970
  evaluate: 'abstractrole-evaluate'
23824
23971
  }, {
23825
23972
  id: 'aria-allowed-attr',
23826
- evaluate: 'aria-allowed-attr-evaluate'
23973
+ evaluate: 'aria-allowed-attr-evaluate',
23974
+ options: {
23975
+ validTreeRowAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-level' ]
23976
+ }
23827
23977
  }, {
23828
23978
  id: 'aria-allowed-role',
23829
23979
  evaluate: 'aria-allowed-role-evaluate',
@@ -23936,7 +24086,10 @@
23936
24086
  deprecated: true
23937
24087
  }, {
23938
24088
  id: 'autocomplete-valid',
23939
- evaluate: 'autocomplete-valid-evaluate'
24089
+ evaluate: 'autocomplete-valid-evaluate',
24090
+ options: {
24091
+ stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null' ]
24092
+ }
23940
24093
  }, {
23941
24094
  id: 'accesskeys',
23942
24095
  evaluate: 'accesskeys-evaluate',
@@ -24154,7 +24307,9 @@
24154
24307
  size: 1.15
24155
24308
  }, {
24156
24309
  size: 1.4
24157
- } ]
24310
+ } ],
24311
+ passLength: 1,
24312
+ failLength: .5
24158
24313
  }
24159
24314
  }, {
24160
24315
  id: 'region',