axe-core 4.3.3 → 4.3.5-canary.1f01309

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.1f01309
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.1f01309';
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;
@@ -5257,7 +5257,7 @@
5257
5257
  };
5258
5258
  }
5259
5259
  function isRespondableMessage(postedMessage) {
5260
- return _typeof(postedMessage) === 'object' && typeof postedMessage.channelId === 'string' && postedMessage.source === getSource();
5260
+ return postedMessage !== null && _typeof(postedMessage) === 'object' && typeof postedMessage.channelId === 'string' && postedMessage.source === getSource();
5261
5261
  }
5262
5262
  function buildErrorObject(error) {
5263
5263
  var msg = error.message || 'Unknown error occurred';
@@ -5511,25 +5511,30 @@
5511
5511
  }
5512
5512
  function messageHandler(_ref2, topicHandler) {
5513
5513
  var origin = _ref2.origin, dataString = _ref2.data, win = _ref2.source;
5514
- var data2 = parseMessage(dataString) || {};
5515
- var channelId = data2.channelId, message = data2.message, messageId = data2.messageId;
5516
- if (!originIsAllowed(origin) || !isNewMessage(messageId)) {
5517
- return;
5518
- }
5519
- if (message instanceof Error && win.parent !== window) {
5520
- axe.log(message);
5521
- return false;
5522
- }
5523
5514
  try {
5524
- if (data2.topic) {
5525
- var responder = createResponder(win, channelId);
5526
- assertIsParentWindow(win);
5527
- topicHandler(data2, responder);
5528
- } else {
5529
- callReplyHandler(win, data2);
5515
+ var data2 = parseMessage(dataString) || {};
5516
+ var channelId = data2.channelId, message = data2.message, messageId = data2.messageId;
5517
+ if (!originIsAllowed(origin) || !isNewMessage(messageId)) {
5518
+ return;
5519
+ }
5520
+ if (message instanceof Error && win.parent !== window) {
5521
+ axe.log(message);
5522
+ return false;
5523
+ }
5524
+ try {
5525
+ if (data2.topic) {
5526
+ var responder = createResponder(win, channelId);
5527
+ assertIsParentWindow(win);
5528
+ topicHandler(data2, responder);
5529
+ } else {
5530
+ callReplyHandler(win, data2);
5531
+ }
5532
+ } catch (error) {
5533
+ processError(win, error, channelId);
5530
5534
  }
5531
5535
  } catch (error) {
5532
- processError(win, error, channelId);
5536
+ axe.log(error);
5537
+ return false;
5533
5538
  }
5534
5539
  }
5535
5540
  function callReplyHandler(win, data2) {
@@ -5945,23 +5950,23 @@
5945
5950
  var xhtml;
5946
5951
  var ignoredAttributes = [ 'class', 'style', 'id', 'selected', 'checked', 'disabled', 'tabindex', 'aria-checked', 'aria-selected', 'aria-invalid', 'aria-activedescendant', 'aria-busy', 'aria-disabled', 'aria-expanded', 'aria-grabbed', 'aria-pressed', 'aria-valuenow' ];
5947
5952
  var MAXATTRIBUTELENGTH = 31;
5953
+ var attrCharsRegex = /([\\"])/g;
5954
+ var newlineChars = /(\r\n|\r|\n)/g;
5955
+ function escapeAttribute(str) {
5956
+ return str.replace(attrCharsRegex, '\\$1').replace(newlineChars, '\\a ');
5957
+ }
5948
5958
  function getAttributeNameValue(node, at) {
5949
5959
  var name = at.name;
5950
5960
  var atnv;
5951
5961
  if (name.indexOf('href') !== -1 || name.indexOf('src') !== -1) {
5952
5962
  var friendly = get_friendly_uri_end_default(node.getAttribute(name));
5953
5963
  if (friendly) {
5954
- var value = encodeURI(friendly);
5955
- if (value) {
5956
- atnv = escape_selector_default(at.name) + '$="' + escape_selector_default(value) + '"';
5957
- } else {
5958
- return;
5959
- }
5964
+ atnv = escape_selector_default(at.name) + '$="' + escapeAttribute(friendly) + '"';
5960
5965
  } else {
5961
- atnv = escape_selector_default(at.name) + '="' + escape_selector_default(node.getAttribute(name)) + '"';
5966
+ atnv = escape_selector_default(at.name) + '="' + escapeAttribute(node.getAttribute(name)) + '"';
5962
5967
  }
5963
5968
  } else {
5964
- atnv = escape_selector_default(name) + '="' + escape_selector_default(at.value) + '"';
5969
+ atnv = escape_selector_default(name) + '="' + escapeAttribute(at.value) + '"';
5965
5970
  }
5966
5971
  return atnv;
5967
5972
  }
@@ -6365,7 +6370,15 @@
6365
6370
  checkResult.data = data2;
6366
6371
  },
6367
6372
  relatedNodes: function relatedNodes(nodes) {
6373
+ if (!window.Node) {
6374
+ return;
6375
+ }
6368
6376
  nodes = nodes instanceof window.Node ? [ nodes ] : to_array_default(nodes);
6377
+ if (!nodes.every(function(node) {
6378
+ return node instanceof window.Node || node.actualNode;
6379
+ })) {
6380
+ return;
6381
+ }
6369
6382
  checkResult.relatedNodes = nodes.map(function(element) {
6370
6383
  return new dq_element_default(element, options);
6371
6384
  });
@@ -6762,6 +6775,7 @@
6762
6775
  return new Error(message + ': ' + (selector || node));
6763
6776
  }
6764
6777
  function sendCommandToFrame(node, parameters, resolve, reject) {
6778
+ var _parameters$options$p, _parameters$options;
6765
6779
  var win = node.contentWindow;
6766
6780
  if (!win) {
6767
6781
  log_default('Frame does not have a content window', node);
@@ -6776,7 +6790,7 @@
6776
6790
  reject(err('No response from frame', node));
6777
6791
  }
6778
6792
  }, 0);
6779
- }, 500);
6793
+ }, (_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
6794
  _respondable(win, 'axe.ping', null, void 0, function() {
6781
6795
  clearTimeout(timeout);
6782
6796
  var frameWaitTime = parameters.options && parameters.options.frameWaitTime || 6e4;
@@ -7096,7 +7110,7 @@
7096
7110
  return url_props_from_attribute_default;
7097
7111
  },
7098
7112
  visuallyContains: function visuallyContains() {
7099
- return visually_contains_default;
7113
+ return _visuallyContains;
7100
7114
  },
7101
7115
  visuallyOverlaps: function visuallyOverlaps() {
7102
7116
  return visually_overlaps_default;
@@ -7325,13 +7339,14 @@
7325
7339
  });
7326
7340
  }
7327
7341
  function isVisible(el, screenReader, recursed) {
7342
+ var _window$Node;
7328
7343
  if (!el) {
7329
7344
  throw new TypeError('Cannot determine if element is visible for non-DOM nodes');
7330
7345
  }
7331
7346
  var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
7332
7347
  el = vNode ? vNode.actualNode : el;
7333
7348
  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;
7349
+ 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
7350
  var nodeType = vNode ? vNode.props.nodeType : el.nodeType;
7336
7351
  var nodeName2 = vNode ? vNode.props.nodeName : el.nodeName.toLowerCase();
7337
7352
  if (vNode && typeof vNode[cacheName] !== 'undefined') {
@@ -7374,9 +7389,12 @@
7374
7389
  return false;
7375
7390
  }
7376
7391
  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)) {
7392
+ var elWidth = parseInt(style.getPropertyValue('width'));
7393
+ var scroll = get_scroll_default(el);
7394
+ var scrollableWithZeroHeight = scroll && elHeight === 0;
7395
+ var scrollableWithZeroWidth = scroll && elWidth === 0;
7396
+ var posAbsoluteOverflowHiddenAndSmall = style.getPropertyValue('position') === 'absolute' && (elHeight < 2 || elWidth < 2) && style.getPropertyValue('overflow') === 'hidden';
7397
+ if (!screenReader && (isClipped(style) || style.getPropertyValue('opacity') === '0' || scrollableWithZeroHeight || scrollableWithZeroWidth || posAbsoluteOverflowHiddenAndSmall)) {
7380
7398
  return false;
7381
7399
  }
7382
7400
  if (!recursed && (style.getPropertyValue('visibility') === 'hidden' || !screenReader && is_offscreen_default(el))) {
@@ -7394,6 +7412,90 @@
7394
7412
  }
7395
7413
  var is_visible_default = isVisible;
7396
7414
  var gridSize = 200;
7415
+ function createGrid() {
7416
+ var root = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body;
7417
+ var rootGrid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
7418
+ container: null,
7419
+ cells: []
7420
+ };
7421
+ var parentVNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
7422
+ if (!parentVNode) {
7423
+ var vNode = get_node_from_tree_default(document.documentElement);
7424
+ if (!vNode) {
7425
+ vNode = new virtual_node_default(document.documentElement);
7426
+ }
7427
+ vNode._stackingOrder = [ 0 ];
7428
+ addNodeToGrid(rootGrid, vNode);
7429
+ if (get_scroll_default(vNode.actualNode)) {
7430
+ var subGrid = {
7431
+ container: vNode,
7432
+ cells: []
7433
+ };
7434
+ vNode._subGrid = subGrid;
7435
+ }
7436
+ }
7437
+ var treeWalker = document.createTreeWalker(root, window.NodeFilter.SHOW_ELEMENT, null, false);
7438
+ var node = parentVNode ? treeWalker.nextNode() : treeWalker.currentNode;
7439
+ while (node) {
7440
+ var _vNode = get_node_from_tree_default(node);
7441
+ if (node.parentElement) {
7442
+ parentVNode = get_node_from_tree_default(node.parentElement);
7443
+ } else if (node.parentNode && get_node_from_tree_default(node.parentNode)) {
7444
+ parentVNode = get_node_from_tree_default(node.parentNode);
7445
+ }
7446
+ if (!_vNode) {
7447
+ _vNode = new axe.VirtualNode(node, parentVNode);
7448
+ }
7449
+ _vNode._stackingOrder = getStackingOrder(_vNode, parentVNode);
7450
+ var scrollRegionParent = findScrollRegionParent(_vNode, parentVNode);
7451
+ var grid = scrollRegionParent ? scrollRegionParent._subGrid : rootGrid;
7452
+ if (get_scroll_default(_vNode.actualNode)) {
7453
+ var _subGrid = {
7454
+ container: _vNode,
7455
+ cells: []
7456
+ };
7457
+ _vNode._subGrid = _subGrid;
7458
+ }
7459
+ var rect = _vNode.boundingClientRect;
7460
+ if (rect.width !== 0 && rect.height !== 0 && is_visible_default(node)) {
7461
+ addNodeToGrid(grid, _vNode);
7462
+ }
7463
+ if (is_shadow_root_default(node)) {
7464
+ createGrid(node.shadowRoot, grid, _vNode);
7465
+ }
7466
+ node = treeWalker.nextNode();
7467
+ }
7468
+ }
7469
+ function getRectStack(grid, rect) {
7470
+ var _grid$cells$row$col$f, _grid$cells$row$col;
7471
+ var recursed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
7472
+ var x = rect.left + rect.width / 2;
7473
+ var y = rect.top + rect.height / 2;
7474
+ var row = y / gridSize | 0;
7475
+ var col = x / gridSize | 0;
7476
+ if (row > grid.cells.length || col > grid.numCols) {
7477
+ throw new Error('Element midpoint exceeds the grid bounds');
7478
+ }
7479
+ 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) {
7480
+ return gridCellNode.clientRects.find(function(clientRect) {
7481
+ var rectX = clientRect.left;
7482
+ var rectY = clientRect.top;
7483
+ return x <= rectX + clientRect.width && x >= rectX && y <= rectY + clientRect.height && y >= rectY;
7484
+ });
7485
+ })) !== null && _grid$cells$row$col$f !== void 0 ? _grid$cells$row$col$f : [];
7486
+ var gridContainer = grid.container;
7487
+ if (gridContainer) {
7488
+ stack = getRectStack(gridContainer._grid, gridContainer.boundingClientRect, true).concat(stack);
7489
+ }
7490
+ if (!recursed) {
7491
+ stack = stack.sort(visuallySort).map(function(vNode) {
7492
+ return vNode.actualNode;
7493
+ }).concat(document.documentElement).filter(function(node, index, array) {
7494
+ return array.indexOf(node) === index;
7495
+ });
7496
+ }
7497
+ return stack;
7498
+ }
7397
7499
  function isStackingContext(vNode, parentVNode) {
7398
7500
  var position = vNode.getComputedStylePropertyValue('position');
7399
7501
  var zIndex = vNode.getComputedStylePropertyValue('z-index');
@@ -7477,21 +7579,21 @@
7477
7579
  return floated;
7478
7580
  }
7479
7581
  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;
7582
+ if (vNode.getComputedStylePropertyValue('display').indexOf('inline') !== -1) {
7583
+ return 2;
7584
+ }
7585
+ if (isFloated(vNode)) {
7586
+ return 1;
7488
7587
  }
7489
- return 3;
7588
+ return 0;
7490
7589
  }
7491
7590
  function visuallySort(a, b) {
7492
- for (var _i5 = 0; _i5 < a._stackingOrder.length; _i5++) {
7591
+ var length = Math.max(a._stackingOrder.length, b._stackingOrder.length);
7592
+ for (var _i5 = 0; _i5 < length; _i5++) {
7493
7593
  if (typeof b._stackingOrder[_i5] === 'undefined') {
7494
7594
  return -1;
7595
+ } else if (typeof a._stackingOrder[_i5] === 'undefined') {
7596
+ return 1;
7495
7597
  }
7496
7598
  if (b._stackingOrder[_i5] > a._stackingOrder[_i5]) {
7497
7599
  return 1;
@@ -7537,11 +7639,25 @@
7537
7639
  function getStackingOrder(vNode, parentVNode) {
7538
7640
  var stackingOrder = parentVNode._stackingOrder.slice();
7539
7641
  var zIndex = vNode.getComputedStylePropertyValue('z-index');
7540
- if (zIndex !== 'auto') {
7642
+ var positioned = vNode.getComputedStylePropertyValue('position') !== 'static';
7643
+ var floated = vNode.getComputedStylePropertyValue('float') !== 'none';
7644
+ if (positioned && ![ 'auto', '0' ].includes(zIndex)) {
7645
+ while (stackingOrder.find(function(value) {
7646
+ return value % 1 !== 0;
7647
+ })) {
7648
+ var index = stackingOrder.findIndex(function(value) {
7649
+ return value % 1 !== 0;
7650
+ });
7651
+ stackingOrder.splice(index, 1);
7652
+ }
7541
7653
  stackingOrder[stackingOrder.length - 1] = parseInt(zIndex);
7542
7654
  }
7543
7655
  if (isStackingContext(vNode, parentVNode)) {
7544
7656
  stackingOrder.push(0);
7657
+ } else if (positioned) {
7658
+ stackingOrder.push(.5);
7659
+ } else if (floated) {
7660
+ stackingOrder.push(.25);
7545
7661
  }
7546
7662
  return stackingOrder;
7547
7663
  }
@@ -7549,14 +7665,14 @@
7549
7665
  var scrollRegionParent = null;
7550
7666
  var checkedNodes = [ vNode ];
7551
7667
  while (parentVNode) {
7552
- if (parentVNode._scrollRegionParent) {
7553
- scrollRegionParent = parentVNode._scrollRegionParent;
7554
- break;
7555
- }
7556
7668
  if (get_scroll_default(parentVNode.actualNode)) {
7557
7669
  scrollRegionParent = parentVNode;
7558
7670
  break;
7559
7671
  }
7672
+ if (parentVNode._scrollRegionParent) {
7673
+ scrollRegionParent = parentVNode._scrollRegionParent;
7674
+ break;
7675
+ }
7560
7676
  checkedNodes.push(parentVNode);
7561
7677
  parentVNode = get_node_from_tree_default(parentVNode.actualNode.parentElement || parentVNode.actualNode.parentNode);
7562
7678
  }
@@ -7568,12 +7684,14 @@
7568
7684
  function addNodeToGrid(grid, vNode) {
7569
7685
  vNode._grid = grid;
7570
7686
  vNode.clientRects.forEach(function(rect) {
7687
+ var _grid$numCols;
7571
7688
  var x = rect.left;
7572
7689
  var y = rect.top;
7573
7690
  var startRow = y / gridSize | 0;
7574
7691
  var startCol = x / gridSize | 0;
7575
7692
  var endRow = (y + rect.height) / gridSize | 0;
7576
7693
  var endCol = (x + rect.width) / gridSize | 0;
7694
+ grid.numCols = Math.max((_grid$numCols = grid.numCols) !== null && _grid$numCols !== void 0 ? _grid$numCols : 0, endCol);
7577
7695
  for (var row = startRow; row <= endRow; row++) {
7578
7696
  grid.cells[row] = grid.cells[row] || [];
7579
7697
  for (var col = startCol; col <= endCol; col++) {
@@ -7585,86 +7703,6 @@
7585
7703
  }
7586
7704
  });
7587
7705
  }
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
7706
  function getElementStack(node) {
7669
7707
  if (!cache_default.get('gridCreated')) {
7670
7708
  createGrid();
@@ -7808,7 +7846,7 @@
7808
7846
  ref = idrefs_default(virtualNode.actualNode, 'aria-labelledby');
7809
7847
  candidate = ref.map(function(thing) {
7810
7848
  var vNode = get_node_from_tree_default(thing);
7811
- return vNode ? visible_virtual_default(vNode, true) : '';
7849
+ return vNode ? visible_virtual_default(vNode) : '';
7812
7850
  }).join(' ').trim();
7813
7851
  if (candidate) {
7814
7852
  return candidate;
@@ -7827,8 +7865,8 @@
7827
7865
  var hiddenTextElms = [ 'HEAD', 'TITLE', 'TEMPLATE', 'SCRIPT', 'STYLE', 'IFRAME', 'OBJECT', 'VIDEO', 'AUDIO', 'NOSCRIPT' ];
7828
7866
  function hasChildTextNodes(elm) {
7829
7867
  if (!hiddenTextElms.includes(elm.actualNode.nodeName.toUpperCase())) {
7830
- return elm.children.some(function(_ref9) {
7831
- var actualNode = _ref9.actualNode;
7868
+ return elm.children.some(function(_ref10) {
7869
+ var actualNode = _ref10.actualNode;
7832
7870
  return actualNode.nodeType === 3 && actualNode.nodeValue.trim();
7833
7871
  });
7834
7872
  }
@@ -8449,6 +8487,11 @@
8449
8487
  allowedAttrs: [ 'aria-expanded' ],
8450
8488
  superclassRole: [ 'landmark' ]
8451
8489
  },
8490
+ comment: {
8491
+ type: 'structure',
8492
+ allowedAttrs: [ 'aria-level', 'aria-posinset', 'aria-setsize' ],
8493
+ superclassRole: [ 'article' ]
8494
+ },
8452
8495
  definition: {
8453
8496
  type: 'structure',
8454
8497
  allowedAttrs: [ 'aria-expanded' ],
@@ -8560,7 +8603,7 @@
8560
8603
  },
8561
8604
  listbox: {
8562
8605
  type: 'composite',
8563
- requiredOwned: [ 'option' ],
8606
+ requiredOwned: [ 'group', 'option' ],
8564
8607
  allowedAttrs: [ 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
8565
8608
  superclassRole: [ 'select' ],
8566
8609
  accessibleNameRequired: true
@@ -8639,6 +8682,11 @@
8639
8682
  accessibleNameRequired: true,
8640
8683
  childrenPresentational: true
8641
8684
  },
8685
+ mark: {
8686
+ type: 'structure',
8687
+ superclassRole: [ 'section' ],
8688
+ prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
8689
+ },
8642
8690
  navigation: {
8643
8691
  type: 'landmark',
8644
8692
  allowedAttrs: [ 'aria-expanded' ],
@@ -8656,7 +8704,7 @@
8656
8704
  },
8657
8705
  option: {
8658
8706
  type: 'widget',
8659
- requiredContext: [ 'listbox' ],
8707
+ requiredContext: [ 'group', 'listbox' ],
8660
8708
  allowedAttrs: [ 'aria-selected', 'aria-checked', 'aria-posinset', 'aria-setsize' ],
8661
8709
  superclassRole: [ 'input' ],
8662
8710
  accessibleNameRequired: true,
@@ -8818,6 +8866,12 @@
8818
8866
  nameFromContent: true,
8819
8867
  childrenPresentational: true
8820
8868
  },
8869
+ suggestion: {
8870
+ type: 'structure',
8871
+ requiredOwned: [ 'insertion', 'deletion' ],
8872
+ superclassRole: [ 'section' ],
8873
+ prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
8874
+ },
8821
8875
  tab: {
8822
8876
  type: 'widget',
8823
8877
  requiredContext: [ 'tablist' ],
@@ -9407,11 +9461,13 @@
9407
9461
  img: {
9408
9462
  variant: {
9409
9463
  nonEmptyAlt: {
9410
- matches: {
9464
+ matches: [ {
9411
9465
  attributes: {
9412
9466
  alt: '/.+/'
9413
9467
  }
9414
- },
9468
+ }, {
9469
+ hasAccessibleName: true
9470
+ } ],
9415
9471
  allowedRoles: [ 'button', 'checkbox', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'scrollbar', 'separator', 'slider', 'switch', 'tab', 'treeitem', 'doc-cover' ]
9416
9472
  },
9417
9473
  usemap: {
@@ -9692,7 +9748,7 @@
9692
9748
  },
9693
9749
  section: {
9694
9750
  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' ],
9751
+ 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
9752
  shadowRoot: true
9697
9753
  },
9698
9754
  select: {
@@ -9836,7 +9892,7 @@
9836
9892
  },
9837
9893
  wbr: {
9838
9894
  contentTypes: [ 'phrasing', 'flow' ],
9839
- allowedRoles: true
9895
+ allowedRoles: [ 'presentation', 'none' ]
9840
9896
  }
9841
9897
  };
9842
9898
  var html_elms_default = htmlElms;
@@ -10028,8 +10084,8 @@
10028
10084
  }
10029
10085
  return parseFloat(value);
10030
10086
  }
10031
- function hslToRgb(_ref10) {
10032
- var _ref11 = _slicedToArray(_ref10, 4), hue = _ref11[0], saturation = _ref11[1], lightness = _ref11[2], alpha = _ref11[3];
10087
+ function hslToRgb(_ref11) {
10088
+ var _ref12 = _slicedToArray(_ref11, 4), hue = _ref12[0], saturation = _ref12[1], lightness = _ref12[2], alpha = _ref12[3];
10033
10089
  saturation /= 255;
10034
10090
  lightness /= 255;
10035
10091
  var high = (1 - Math.abs(2 * lightness - 1)) * saturation;
@@ -10049,8 +10105,8 @@
10049
10105
  } else {
10050
10106
  colors = [ high, 0, low ];
10051
10107
  }
10052
- return colors.map(function(color10) {
10053
- return Math.round((color10 + base) * 255);
10108
+ return colors.map(function(color11) {
10109
+ return Math.round((color11 + base) * 255);
10054
10110
  }).concat(alpha);
10055
10111
  }
10056
10112
  function Color(red, green, blue, alpha) {
@@ -10068,7 +10124,7 @@
10068
10124
  var colorFnRegex = /^((?:rgb|hsl)a?)\s*\(([^\)]*)\)/i;
10069
10125
  this.parseString = function parseString(colorString) {
10070
10126
  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];
10127
+ var _ref13 = standards_default.cssColors[colorString] || [ 0, 0, 0 ], _ref14 = _slicedToArray(_ref13, 3), red2 = _ref14[0], green2 = _ref14[1], blue2 = _ref14[2];
10072
10128
  this.red = red2;
10073
10129
  this.green = green2;
10074
10130
  this.blue = blue2;
@@ -10118,7 +10174,7 @@
10118
10174
  }
10119
10175
  };
10120
10176
  this.parseColorFnString = function parseColorFnString(colorString) {
10121
- var _ref14 = colorString.match(colorFnRegex) || [], _ref15 = _slicedToArray(_ref14, 3), colorFunc = _ref15[1], colorValStr = _ref15[2];
10177
+ var _ref15 = colorString.match(colorFnRegex) || [], _ref16 = _slicedToArray(_ref15, 3), colorFunc = _ref16[1], colorValStr = _ref16[2];
10122
10178
  if (!colorFunc || !colorValStr) {
10123
10179
  return;
10124
10180
  }
@@ -10201,6 +10257,17 @@
10201
10257
  return finalElements;
10202
10258
  }
10203
10259
  var reduce_to_elements_below_floating_default = reduceToElementsBelowFloating;
10260
+ function _visuallyContains(node, parent) {
10261
+ var parentScrollAncestor = getScrollAncestor(parent);
10262
+ do {
10263
+ var nextScrollAncestor = getScrollAncestor(node);
10264
+ if (nextScrollAncestor === parentScrollAncestor || nextScrollAncestor === parent) {
10265
+ return contains2(node, parent);
10266
+ }
10267
+ node = nextScrollAncestor;
10268
+ } while (node);
10269
+ return false;
10270
+ }
10204
10271
  function getScrollAncestor(node) {
10205
10272
  var vNode = get_node_from_tree_default(node);
10206
10273
  var ancestor = vNode.parent;
@@ -10212,47 +10279,30 @@
10212
10279
  }
10213
10280
  }
10214
10281
  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
10282
  var style = window.getComputedStyle(parent);
10283
+ var overflow = style.getPropertyValue('overflow');
10233
10284
  if (style.getPropertyValue('display') === 'inline') {
10234
10285
  return true;
10235
10286
  }
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;
10287
+ var clientRects = Array.from(node.getClientRects());
10288
+ var boundingRect = parent.getBoundingClientRect();
10289
+ var rect = {
10290
+ left: boundingRect.left,
10291
+ top: boundingRect.top,
10292
+ width: boundingRect.width,
10293
+ height: boundingRect.height
10294
+ };
10295
+ if ([ 'scroll', 'auto' ].includes(overflow) || parent instanceof window.HTMLHtmlElement) {
10296
+ rect.width = parent.scrollWidth;
10297
+ rect.height = parent.scrollHeight;
10238
10298
  }
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;
10299
+ if (clientRects.length === 1 && overflow === 'hidden' && style.getPropertyValue('white-space') === 'nowrap') {
10300
+ clientRects[0] = rect;
10241
10301
  }
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;
10302
+ return clientRects.some(function(clientRect) {
10303
+ 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));
10304
+ });
10254
10305
  }
10255
- var visually_contains_default = visuallyContains;
10256
10306
  function shadowElementsFromPoint(nodeX, nodeY) {
10257
10307
  var root = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : document;
10258
10308
  var i = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
@@ -10265,7 +10315,7 @@
10265
10315
  if (is_shadow_root_default(elm)) {
10266
10316
  var shadowStack = shadowElementsFromPoint(nodeX, nodeY, elm.shadowRoot, i + 1);
10267
10317
  stack = stack.concat(shadowStack);
10268
- if (stack.length && visually_contains_default(stack[0], elm)) {
10318
+ if (stack.length && _visuallyContains(stack[0], elm)) {
10269
10319
  stack.push(elm);
10270
10320
  }
10271
10321
  } else {
@@ -10407,7 +10457,7 @@
10407
10457
  key: 'props',
10408
10458
  get: function get() {
10409
10459
  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;
10460
+ 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
10461
  this._cache.props = {
10412
10462
  nodeType: nodeType,
10413
10463
  nodeName: this._isXHTML ? nodeName2 : nodeName2.toLowerCase(),
@@ -10415,7 +10465,8 @@
10415
10465
  type: this._type,
10416
10466
  multiple: multiple,
10417
10467
  nodeValue: nodeValue,
10418
- value: value
10468
+ value: value,
10469
+ selected: selected
10419
10470
  };
10420
10471
  }
10421
10472
  return this._cache.props;
@@ -10795,7 +10846,7 @@
10795
10846
  return {};
10796
10847
  }
10797
10848
  var navigator = win.navigator, innerHeight = win.innerHeight, innerWidth = win.innerWidth;
10798
- var _ref16 = getOrientation(win) || {}, angle = _ref16.angle, type = _ref16.type;
10849
+ var _ref17 = getOrientation(win) || {}, angle = _ref17.angle, type = _ref17.type;
10799
10850
  return {
10800
10851
  userAgent: navigator.userAgent,
10801
10852
  windowWidth: innerWidth,
@@ -10804,12 +10855,12 @@
10804
10855
  orientationType: type
10805
10856
  };
10806
10857
  }
10807
- function getOrientation(_ref17) {
10808
- var screen = _ref17.screen;
10858
+ function getOrientation(_ref18) {
10859
+ var screen = _ref18.screen;
10809
10860
  return screen.orientation || screen.msOrientation || screen.mozOrientation;
10810
10861
  }
10811
- function createFrameContext(frame, _ref18) {
10812
- var focusable = _ref18.focusable, page = _ref18.page;
10862
+ function createFrameContext(frame, _ref19) {
10863
+ var focusable = _ref19.focusable, page = _ref19.page;
10813
10864
  return {
10814
10865
  node: frame,
10815
10866
  include: [],
@@ -10847,8 +10898,8 @@
10847
10898
  }
10848
10899
  context5.frames.push(createFrameContext(frame, context5));
10849
10900
  }
10850
- function isPageContext(_ref19) {
10851
- var include = _ref19.include;
10901
+ function isPageContext(_ref20) {
10902
+ var include = _ref20.include;
10852
10903
  return include.length === 1 && include[0].actualNode === document.documentElement;
10853
10904
  }
10854
10905
  function pushUniqueFrameSelector(context5, type, selectorArray) {
@@ -10948,8 +10999,8 @@
10948
10999
  });
10949
11000
  }
10950
11001
  }
10951
- function getRootNode2(_ref20) {
10952
- var include = _ref20.include, exclude = _ref20.exclude;
11002
+ function getRootNode2(_ref21) {
11003
+ var include = _ref21.include, exclude = _ref21.exclude;
10953
11004
  var selectors = Array.from(include).concat(Array.from(exclude));
10954
11005
  for (var i = 0; i < selectors.length; ++i) {
10955
11006
  var item = selectors[i];
@@ -10997,9 +11048,13 @@
10997
11048
  this.include.sort(node_sorter_default);
10998
11049
  }
10999
11050
  function _getFrameContexts(context5) {
11051
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
11052
+ if (options.iframes === false) {
11053
+ return [];
11054
+ }
11000
11055
  var _Context = new Context(context5), frames = _Context.frames;
11001
- return frames.map(function(_ref21) {
11002
- var node = _ref21.node, frameContext = _objectWithoutProperties(_ref21, _excluded2);
11056
+ return frames.map(function(_ref22) {
11057
+ var node = _ref22.node, frameContext = _objectWithoutProperties(_ref22, _excluded2);
11003
11058
  frameContext.initiator = false;
11004
11059
  var frameSelector = _getAncestry(node);
11005
11060
  return {
@@ -11684,8 +11739,8 @@
11684
11739
  return matchExpressions(domTree, expressions, filter);
11685
11740
  }
11686
11741
  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;
11742
+ function preloadCssom(_ref23) {
11743
+ var _ref23$treeRoot = _ref23.treeRoot, treeRoot = _ref23$treeRoot === void 0 ? axe._tree[0] : _ref23$treeRoot;
11689
11744
  var rootNodes = getAllRootNodesInTree(treeRoot);
11690
11745
  if (!rootNodes.length) {
11691
11746
  return Promise.resolve();
@@ -11715,8 +11770,8 @@
11715
11770
  }
11716
11771
  function getCssomForAllRootNodes(rootNodes, convertDataToStylesheet) {
11717
11772
  var promises = [];
11718
- rootNodes.forEach(function(_ref23, index) {
11719
- var rootNode = _ref23.rootNode, shadowId = _ref23.shadowId;
11773
+ rootNodes.forEach(function(_ref24, index) {
11774
+ var rootNode = _ref24.rootNode, shadowId = _ref24.shadowId;
11720
11775
  var sheets = getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet);
11721
11776
  if (!sheets) {
11722
11777
  return Promise.all(promises);
@@ -11797,10 +11852,10 @@
11797
11852
  return true;
11798
11853
  });
11799
11854
  }
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;
11855
+ function preloadMedia(_ref25) {
11856
+ var _ref25$treeRoot = _ref25.treeRoot, treeRoot = _ref25$treeRoot === void 0 ? axe._tree[0] : _ref25$treeRoot;
11857
+ var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(_ref26) {
11858
+ var actualNode = _ref26.actualNode;
11804
11859
  if (actualNode.hasAttribute('src')) {
11805
11860
  return !!actualNode.getAttribute('src');
11806
11861
  }
@@ -11812,8 +11867,8 @@
11812
11867
  }
11813
11868
  return true;
11814
11869
  });
11815
- return Promise.all(mediaVirtualNodes.map(function(_ref26) {
11816
- var actualNode = _ref26.actualNode;
11870
+ return Promise.all(mediaVirtualNodes.map(function(_ref27) {
11871
+ var actualNode = _ref27.actualNode;
11817
11872
  return isMediaElementReady(actualNode);
11818
11873
  }));
11819
11874
  }
@@ -12108,8 +12163,8 @@
12108
12163
  }
12109
12164
  }
12110
12165
  function setScrollState(scrollState) {
12111
- scrollState.forEach(function(_ref28) {
12112
- var elm = _ref28.elm, top = _ref28.top, left = _ref28.left;
12166
+ scrollState.forEach(function(_ref29) {
12167
+ var elm = _ref29.elm, top = _ref29.top, left = _ref29.left;
12113
12168
  return setScroll(elm, top, left);
12114
12169
  });
12115
12170
  }
@@ -12220,9 +12275,9 @@
12220
12275
  nodeTypeToName[nodeNamesToTypes[nodeName2]] = nodeName2;
12221
12276
  });
12222
12277
  function normaliseProps(serialNode) {
12223
- var _serialNode$nodeName, _ref29, _serialNode$nodeType;
12278
+ var _serialNode$nodeName, _ref30, _serialNode$nodeType;
12224
12279
  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;
12280
+ var nodeType = (_ref30 = (_serialNode$nodeType = serialNode.nodeType) !== null && _serialNode$nodeType !== void 0 ? _serialNode$nodeType : nodeNamesToTypes[serialNode.nodeName]) !== null && _ref30 !== void 0 ? _ref30 : 1;
12226
12281
  assert_default(typeof nodeType === 'number', 'nodeType has to be a number, got \''.concat(nodeType, '\''));
12227
12282
  assert_default(typeof nodeName2 === 'string', 'nodeName has to be a string, got \''.concat(nodeName2, '\''));
12228
12283
  nodeName2 = nodeName2.toLowerCase();
@@ -12243,8 +12298,8 @@
12243
12298
  delete props.attributes;
12244
12299
  return Object.freeze(props);
12245
12300
  }
12246
- function normaliseAttrs(_ref30) {
12247
- var _ref30$attributes = _ref30.attributes, attributes4 = _ref30$attributes === void 0 ? {} : _ref30$attributes;
12301
+ function normaliseAttrs(_ref31) {
12302
+ var _ref31$attributes = _ref31.attributes, attributes4 = _ref31$attributes === void 0 ? {} : _ref31$attributes;
12248
12303
  var attrMap = {
12249
12304
  htmlFor: 'for',
12250
12305
  className: 'class'
@@ -12386,7 +12441,7 @@
12386
12441
  }
12387
12442
  var is_unsupported_role_default = isUnsupportedRole;
12388
12443
  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;
12444
+ 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
12445
  var roleDefinition = standards_default.ariaRoles[role];
12391
12446
  var isRoleUnsupported = is_unsupported_role_default(role);
12392
12447
  if (!roleDefinition || flagUnsupported && isRoleUnsupported) {
@@ -12396,7 +12451,7 @@
12396
12451
  }
12397
12452
  var is_valid_role_default = isValidRole;
12398
12453
  function getExplicitRole(vNode) {
12399
- var _ref32 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, fallback = _ref32.fallback, abstracts = _ref32.abstracts, dpub = _ref32.dpub;
12454
+ var _ref33 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, fallback = _ref33.fallback, abstracts = _ref33.abstracts, dpub = _ref33.dpub;
12400
12455
  vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
12401
12456
  if (vNode.props.nodeType !== 1) {
12402
12457
  return null;
@@ -12667,6 +12722,10 @@
12667
12722
  return matcher === someString;
12668
12723
  }
12669
12724
  var from_primative_default = fromPrimative;
12725
+ function hasAccessibleName2(vNode, matcher) {
12726
+ return from_primative_default(!!accessible_text_virtual_default(vNode), matcher);
12727
+ }
12728
+ var has_accessible_name_default = hasAccessibleName2;
12670
12729
  function fromFunction(getValue, matcher) {
12671
12730
  var matcherType = _typeof(matcher);
12672
12731
  if (matcherType !== 'object' || Array.isArray(matcher) || matcher instanceof RegExp) {
@@ -12719,6 +12778,7 @@
12719
12778
  }
12720
12779
  var semantic_role_default = semanticRole;
12721
12780
  var matchers = {
12781
+ hasAccessibleName: has_accessible_name_default,
12722
12782
  attributes: attributes_default,
12723
12783
  condition: condition_default,
12724
12784
  explicitRole: explicit_role_default,
@@ -12753,6 +12813,7 @@
12753
12813
  return from_definition_default(vNode, definition);
12754
12814
  }
12755
12815
  var matches_default2 = matches5;
12816
+ matches_default2.hasAccessibleName = has_accessible_name_default;
12756
12817
  matches_default2.attributes = attributes_default;
12757
12818
  matches_default2.condition = condition_default;
12758
12819
  matches_default2.explicitRole = explicit_role_default;
@@ -12765,6 +12826,7 @@
12765
12826
  matches_default2.semanticRole = semantic_role_default;
12766
12827
  var matches_default3 = matches_default2;
12767
12828
  function getElementSpec(vNode) {
12829
+ var _ref34 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref34$noMatchAccessi = _ref34.noMatchAccessibleName, noMatchAccessibleName = _ref34$noMatchAccessi === void 0 ? false : _ref34$noMatchAccessi;
12768
12830
  var standard = standards_default.htmlElms[vNode.props.nodeName];
12769
12831
  if (!standard) {
12770
12832
  return {};
@@ -12778,6 +12840,12 @@
12778
12840
  continue;
12779
12841
  }
12780
12842
  var _variant$variantName = variant[variantName], matches14 = _variant$variantName.matches, props = _objectWithoutProperties(_variant$variantName, _excluded4);
12843
+ var matchProperties = Array.isArray(matches14) ? matches14 : [ matches14 ];
12844
+ for (var _i12 = 0; _i12 < matchProperties.length && noMatchAccessibleName; _i12++) {
12845
+ if (matchProperties[_i12].hasOwnProperty('hasAccessibleName')) {
12846
+ return standard;
12847
+ }
12848
+ }
12781
12849
  if (matches_default3(vNode, matches14)) {
12782
12850
  for (var propName in props) {
12783
12851
  if (props.hasOwnProperty(propName)) {
@@ -12795,7 +12863,7 @@
12795
12863
  }
12796
12864
  var get_element_spec_default = getElementSpec;
12797
12865
  function implicitRole2(node) {
12798
- var _ref33 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref33.chromium;
12866
+ var _ref35 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref35.chromium;
12799
12867
  var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
12800
12868
  node = vNode.actualNode;
12801
12869
  if (!vNode) {
@@ -12845,8 +12913,8 @@
12845
12913
  }
12846
12914
  return getInheritedRole(vNode.parent, explicitRoleOptions);
12847
12915
  }
12848
- function resolveImplicitRole(vNode, _ref34) {
12849
- var chromium = _ref34.chromium, explicitRoleOptions = _objectWithoutProperties(_ref34, _excluded5);
12916
+ function resolveImplicitRole(vNode, _ref36) {
12917
+ var chromium = _ref36.chromium, explicitRoleOptions = _objectWithoutProperties(_ref36, _excluded5);
12850
12918
  var implicitRole3 = implicit_role_default(vNode, {
12851
12919
  chromium: chromium
12852
12920
  });
@@ -12866,8 +12934,8 @@
12866
12934
  return hasGlobalAria || is_focusable_default(vNode);
12867
12935
  }
12868
12936
  function resolveRole(node) {
12869
- var _ref35 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12870
- var noImplicit = _ref35.noImplicit, roleOptions = _objectWithoutProperties(_ref35, _excluded6);
12937
+ var _ref37 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12938
+ var noImplicit = _ref37.noImplicit, roleOptions = _objectWithoutProperties(_ref37, _excluded6);
12871
12939
  var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
12872
12940
  if (vNode.props.nodeType !== 1) {
12873
12941
  return null;
@@ -12885,8 +12953,8 @@
12885
12953
  return explicitRole2;
12886
12954
  }
12887
12955
  function getRole(node) {
12888
- var _ref36 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12889
- var noPresentational = _ref36.noPresentational, options = _objectWithoutProperties(_ref36, _excluded7);
12956
+ var _ref38 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12957
+ var noPresentational = _ref38.noPresentational, options = _objectWithoutProperties(_ref38, _excluded7);
12890
12958
  var role = resolveRole(node, options);
12891
12959
  if (noPresentational && [ 'presentation', 'none' ].includes(role)) {
12892
12960
  return null;
@@ -12907,7 +12975,7 @@
12907
12975
  }
12908
12976
  var title_text_default = titleText;
12909
12977
  function namedFromContents(vNode) {
12910
- var _ref37 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref37.strict;
12978
+ var _ref39 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref39.strict;
12911
12979
  vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
12912
12980
  if (vNode.props.nodeType !== 1) {
12913
12981
  return false;
@@ -12944,7 +13012,9 @@
12944
13012
  var alreadyProcessed2 = accessible_text_virtual_default.alreadyProcessed;
12945
13013
  context5.startNode = context5.startNode || virtualNode;
12946
13014
  var _context = context5, strict = _context.strict, inControlContext = _context.inControlContext, inLabelledByContext = _context.inLabelledByContext;
12947
- var _get_element_spec_def2 = get_element_spec_default(virtualNode), contentTypes = _get_element_spec_def2.contentTypes;
13015
+ var _get_element_spec_def2 = get_element_spec_default(virtualNode, {
13016
+ noMatchAccessibleName: true
13017
+ }), contentTypes = _get_element_spec_def2.contentTypes;
12948
13018
  if (alreadyProcessed2(virtualNode, context5) || virtualNode.props.nodeType !== 1 || contentTypes !== null && contentTypes !== void 0 && contentTypes.includes('embedded')) {
12949
13019
  return '';
12950
13020
  }
@@ -13030,12 +13100,12 @@
13030
13100
  button: ''
13031
13101
  };
13032
13102
  var nativeTextMethods = {
13033
- valueText: function valueText(_ref38) {
13034
- var actualNode = _ref38.actualNode;
13103
+ valueText: function valueText(_ref40) {
13104
+ var actualNode = _ref40.actualNode;
13035
13105
  return actualNode.value || '';
13036
13106
  },
13037
- buttonDefaultText: function buttonDefaultText(_ref39) {
13038
- var actualNode = _ref39.actualNode;
13107
+ buttonDefaultText: function buttonDefaultText(_ref41) {
13108
+ var actualNode = _ref41.actualNode;
13039
13109
  return defaultButtonValues[actualNode.type] || '';
13040
13110
  },
13041
13111
  tableCaptionText: descendantText.bind(null, 'caption'),
@@ -13055,8 +13125,8 @@
13055
13125
  function attrText(attr, vNode) {
13056
13126
  return vNode.attr(attr) || '';
13057
13127
  }
13058
- function descendantText(nodeName2, _ref40, context5) {
13059
- var actualNode = _ref40.actualNode;
13128
+ function descendantText(nodeName2, _ref42, context5) {
13129
+ var actualNode = _ref42.actualNode;
13060
13130
  nodeName2 = nodeName2.toLowerCase();
13061
13131
  var nodeNames2 = [ nodeName2, actualNode.nodeName.toLowerCase() ].join(',');
13062
13132
  var candidate = actualNode.querySelector(nodeNames2);
@@ -13082,7 +13152,9 @@
13082
13152
  return accName;
13083
13153
  }
13084
13154
  function findTextMethods(virtualNode) {
13085
- var elmSpec = get_element_spec_default(virtualNode);
13155
+ var elmSpec = get_element_spec_default(virtualNode, {
13156
+ noMatchAccessibleName: true
13157
+ });
13086
13158
  var methods = elmSpec.namingMethods || [];
13087
13159
  return methods.map(function(methodName) {
13088
13160
  return native_text_methods_default[methodName];
@@ -13169,7 +13241,7 @@
13169
13241
  }
13170
13242
  var options = query_selector_all_default(vNode, 'option');
13171
13243
  var selectedOptions = options.filter(function(option) {
13172
- return option.hasAttr('selected');
13244
+ return option.props.selected;
13173
13245
  });
13174
13246
  if (!selectedOptions.length) {
13175
13247
  selectedOptions.push(options[0]);
@@ -13250,8 +13322,8 @@
13250
13322
  }
13251
13323
  return virtualNode.props.nodeValue;
13252
13324
  }
13253
- function shouldIgnoreHidden(_ref41, context5) {
13254
- var actualNode = _ref41.actualNode;
13325
+ function shouldIgnoreHidden(_ref43, context5) {
13326
+ var actualNode = _ref43.actualNode;
13255
13327
  if (!actualNode) {
13256
13328
  return false;
13257
13329
  }
@@ -13542,7 +13614,7 @@
13542
13614
  locations: [ 'billing', 'shipping' ]
13543
13615
  };
13544
13616
  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;
13617
+ var _ref44 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref44$looseTyped = _ref44.looseTyped, looseTyped = _ref44$looseTyped === void 0 ? false : _ref44$looseTyped, _ref44$stateTerms = _ref44.stateTerms, stateTerms = _ref44$stateTerms === void 0 ? [] : _ref44$stateTerms, _ref44$locations = _ref44.locations, locations = _ref44$locations === void 0 ? [] : _ref44$locations, _ref44$qualifiers = _ref44.qualifiers, qualifiers = _ref44$qualifiers === void 0 ? [] : _ref44$qualifiers, _ref44$standaloneTerm = _ref44.standaloneTerms, standaloneTerms = _ref44$standaloneTerm === void 0 ? [] : _ref44$standaloneTerm, _ref44$qualifiedTerms = _ref44.qualifiedTerms, qualifiedTerms = _ref44$qualifiedTerms === void 0 ? [] : _ref44$qualifiedTerms;
13546
13618
  autocompleteValue = autocompleteValue.toLowerCase().trim();
13547
13619
  stateTerms = stateTerms.concat(_autocomplete.stateTerms);
13548
13620
  if (stateTerms.includes(autocompleteValue) || autocompleteValue === '') {
@@ -13693,8 +13765,8 @@
13693
13765
  idRefs[id] = idRefs[id] || [];
13694
13766
  idRefs[id].push(node);
13695
13767
  }
13696
- for (var _i12 = 0; _i12 < refAttrs.length; ++_i12) {
13697
- var attr = refAttrs[_i12];
13768
+ for (var _i13 = 0; _i13 < refAttrs.length; ++_i13) {
13769
+ var attr = refAttrs[_i13];
13698
13770
  var attrValue = sanitize_default(node.getAttribute(attr) || '');
13699
13771
  if (!attrValue) {
13700
13772
  continue;
@@ -13706,8 +13778,8 @@
13706
13778
  }
13707
13779
  }
13708
13780
  }
13709
- for (var _i13 = 0; _i13 < node.children.length; _i13++) {
13710
- cacheIdRefs(node.children[_i13], idRefs, refAttrs);
13781
+ for (var _i14 = 0; _i14 < node.children.length; _i14++) {
13782
+ cacheIdRefs(node.children[_i14], idRefs, refAttrs);
13711
13783
  }
13712
13784
  }
13713
13785
  function getAccessibleRefs(node) {
@@ -15567,8 +15639,8 @@
15567
15639
  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
15640
  } ];
15569
15641
  lookupTable.evaluateRoleForElement = {
15570
- A: function A(_ref43) {
15571
- var node = _ref43.node, out = _ref43.out;
15642
+ A: function A(_ref45) {
15643
+ var node = _ref45.node, out = _ref45.out;
15572
15644
  if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
15573
15645
  return true;
15574
15646
  }
@@ -15577,19 +15649,19 @@
15577
15649
  }
15578
15650
  return true;
15579
15651
  },
15580
- AREA: function AREA(_ref44) {
15581
- var node = _ref44.node;
15652
+ AREA: function AREA(_ref46) {
15653
+ var node = _ref46.node;
15582
15654
  return !node.href;
15583
15655
  },
15584
- BUTTON: function BUTTON(_ref45) {
15585
- var node = _ref45.node, role = _ref45.role, out = _ref45.out;
15656
+ BUTTON: function BUTTON(_ref47) {
15657
+ var node = _ref47.node, role = _ref47.role, out = _ref47.out;
15586
15658
  if (node.getAttribute('type') === 'menu') {
15587
15659
  return role === 'menuitem';
15588
15660
  }
15589
15661
  return out;
15590
15662
  },
15591
- IMG: function IMG(_ref46) {
15592
- var node = _ref46.node, role = _ref46.role, out = _ref46.out;
15663
+ IMG: function IMG(_ref48) {
15664
+ var node = _ref48.node, role = _ref48.role, out = _ref48.out;
15593
15665
  switch (node.alt) {
15594
15666
  case null:
15595
15667
  return out;
@@ -15601,8 +15673,8 @@
15601
15673
  return role !== 'presentation' && role !== 'none';
15602
15674
  }
15603
15675
  },
15604
- INPUT: function INPUT(_ref47) {
15605
- var node = _ref47.node, role = _ref47.role, out = _ref47.out;
15676
+ INPUT: function INPUT(_ref49) {
15677
+ var node = _ref49.node, role = _ref49.role, out = _ref49.out;
15606
15678
  switch (node.type) {
15607
15679
  case 'button':
15608
15680
  case 'image':
@@ -15632,32 +15704,32 @@
15632
15704
  return false;
15633
15705
  }
15634
15706
  },
15635
- LI: function LI(_ref48) {
15636
- var node = _ref48.node, out = _ref48.out;
15707
+ LI: function LI(_ref50) {
15708
+ var node = _ref50.node, out = _ref50.out;
15637
15709
  var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
15638
15710
  if (hasImplicitListitemRole) {
15639
15711
  return out;
15640
15712
  }
15641
15713
  return true;
15642
15714
  },
15643
- MENU: function MENU(_ref49) {
15644
- var node = _ref49.node;
15715
+ MENU: function MENU(_ref51) {
15716
+ var node = _ref51.node;
15645
15717
  if (node.getAttribute('type') === 'context') {
15646
15718
  return false;
15647
15719
  }
15648
15720
  return true;
15649
15721
  },
15650
- OPTION: function OPTION(_ref50) {
15651
- var node = _ref50.node;
15722
+ OPTION: function OPTION(_ref52) {
15723
+ var node = _ref52.node;
15652
15724
  var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
15653
15725
  return !withinOptionList;
15654
15726
  },
15655
- SELECT: function SELECT(_ref51) {
15656
- var node = _ref51.node, role = _ref51.role;
15727
+ SELECT: function SELECT(_ref53) {
15728
+ var node = _ref53.node, role = _ref53.role;
15657
15729
  return !node.multiple && node.size <= 1 && role === 'menu';
15658
15730
  },
15659
- SVG: function SVG(_ref52) {
15660
- var node = _ref52.node, out = _ref52.out;
15731
+ SVG: function SVG(_ref54) {
15732
+ var node = _ref54.node, out = _ref54.out;
15661
15733
  if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
15662
15734
  return true;
15663
15735
  }
@@ -15785,10 +15857,36 @@
15785
15857
  if (Array.isArray(options[role])) {
15786
15858
  allowed = unique_array_default(options[role].concat(allowed));
15787
15859
  }
15860
+ var tableMap = cache_default.get('aria-allowed-attr-table');
15861
+ if (!tableMap) {
15862
+ tableMap = new WeakMap();
15863
+ cache_default.set('aria-allowed-attr-table', tableMap);
15864
+ }
15865
+ function validateRowAttrs() {
15866
+ if (virtualNode.parent && role === 'row') {
15867
+ var table5 = closest_default(virtualNode, 'table, [role="treegrid"], [role="table"], [role="grid"]');
15868
+ var tableRole = tableMap.get(table5);
15869
+ if (table5 && !tableRole) {
15870
+ tableRole = get_role_default(table5);
15871
+ tableMap.set(table5, tableRole);
15872
+ }
15873
+ if ([ 'table', 'grid' ].includes(tableRole) && role === 'row') {
15874
+ return true;
15875
+ }
15876
+ }
15877
+ }
15878
+ var ariaAttr = Array.isArray(options.validTreeRowAttrs) ? options.validTreeRowAttrs : [];
15879
+ var preChecks = {};
15880
+ ariaAttr.forEach(function(attr) {
15881
+ preChecks[attr] = validateRowAttrs;
15882
+ });
15788
15883
  if (role && allowed) {
15789
- for (var _i14 = 0; _i14 < attrs.length; _i14++) {
15790
- var attrName = attrs[_i14];
15791
- if (validate_attr_default(attrName) && !allowed.includes(attrName)) {
15884
+ for (var _i15 = 0; _i15 < attrs.length; _i15++) {
15885
+ var _preChecks$attrName;
15886
+ var attrName = attrs[_i15];
15887
+ if (validate_attr_default(attrName) && (_preChecks$attrName = preChecks[attrName]) !== null && _preChecks$attrName !== void 0 && _preChecks$attrName.call(preChecks)) {
15888
+ invalid.push(attrName + '="' + virtualNode.attr(attrName) + '"');
15889
+ } else if (validate_attr_default(attrName) && !allowed.includes(attrName)) {
15792
15890
  invalid.push(attrName + '="' + virtualNode.attr(attrName) + '"');
15793
15891
  }
15794
15892
  }
@@ -15845,6 +15943,13 @@
15845
15943
  return void 0;
15846
15944
  }
15847
15945
  if (idref) {
15946
+ if (!is_visible_default(idref, true)) {
15947
+ this.data({
15948
+ messageKey: 'hidden',
15949
+ values: token_list_default(attr2)
15950
+ });
15951
+ return false;
15952
+ }
15848
15953
  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
15954
  }
15850
15955
  return;
@@ -15936,8 +16041,8 @@
15936
16041
  required = unique_array_default(options[role], required);
15937
16042
  }
15938
16043
  if (role && required) {
15939
- for (var _i15 = 0, l = required.length; _i15 < l; _i15++) {
15940
- var attr = required[_i15];
16044
+ for (var _i16 = 0, l = required.length; _i16 < l; _i16++) {
16045
+ var attr = required[_i16];
15941
16046
  if (!virtualNode.attr(attr) && !(elmSpec.implicitAttrs && typeof elmSpec.implicitAttrs[attr] !== 'undefined')) {
15942
16047
  missing.push(attr);
15943
16048
  }
@@ -15958,8 +16063,8 @@
15958
16063
  function getOwnedRoles(virtualNode, required) {
15959
16064
  var ownedRoles = [];
15960
16065
  var ownedElements = get_owned_virtual_default(virtualNode);
15961
- var _loop4 = function _loop4(_i16) {
15962
- var ownedElement = ownedElements[_i16];
16066
+ var _loop4 = function _loop4(_i17) {
16067
+ var ownedElement = ownedElements[_i17];
15963
16068
  var role = get_role_default(ownedElement, {
15964
16069
  noPresentational: true
15965
16070
  });
@@ -15971,14 +16076,14 @@
15971
16076
  ownedRoles.push(role);
15972
16077
  }
15973
16078
  };
15974
- for (var _i16 = 0; _i16 < ownedElements.length; _i16++) {
15975
- _loop4(_i16);
16079
+ for (var _i17 = 0; _i17 < ownedElements.length; _i17++) {
16080
+ _loop4(_i17);
15976
16081
  }
15977
16082
  return ownedRoles;
15978
16083
  }
15979
16084
  function missingRequiredChildren(virtualNode, role, required, ownedRoles) {
15980
- for (var _i17 = 0; _i17 < ownedRoles.length; _i17++) {
15981
- var ownedRole = ownedRoles[_i17];
16085
+ for (var _i18 = 0; _i18 < ownedRoles.length; _i18++) {
16086
+ var ownedRole = ownedRoles[_i18];
15982
16087
  if (required.includes(ownedRole)) {
15983
16088
  required = required.filter(function(requiredRole) {
15984
16089
  return requiredRole !== ownedRole;
@@ -16065,8 +16170,8 @@
16065
16170
  }
16066
16171
  var owners = getAriaOwners(node);
16067
16172
  if (owners) {
16068
- for (var _i18 = 0, l = owners.length; _i18 < l; _i18++) {
16069
- missingParents = getMissingContext(get_node_from_tree_default(owners[_i18]), ownGroupRoles, missingParents, true);
16173
+ for (var _i19 = 0, l = owners.length; _i19 < l; _i19++) {
16174
+ missingParents = getMissingContext(get_node_from_tree_default(owners[_i19]), ownGroupRoles, missingParents, true);
16070
16175
  if (!missingParents) {
16071
16176
  return true;
16072
16177
  }
@@ -16774,8 +16879,11 @@
16774
16879
  flattenColors: function flattenColors() {
16775
16880
  return flatten_colors_default;
16776
16881
  },
16882
+ flattenShadowColors: function flattenShadowColors() {
16883
+ return flatten_shadow_colors_default;
16884
+ },
16777
16885
  getBackgroundColor: function getBackgroundColor() {
16778
- return get_background_color_default;
16886
+ return _getBackgroundColor;
16779
16887
  },
16780
16888
  getBackgroundStack: function getBackgroundStack() {
16781
16889
  return get_background_stack_default;
@@ -16891,7 +16999,24 @@
16891
16999
  return null;
16892
17000
  }
16893
17001
  var filtered_rect_stack_default = filteredRectStack;
17002
+ var blendFunctions = {
17003
+ normal: function normal(Cb, Cs) {
17004
+ return Cs;
17005
+ }
17006
+ };
17007
+ function simpleAlphaCompositing(Cs, \u03b1s, Cb, \u03b1b, blendMode) {
17008
+ return Math.round(\u03b1s * (1 - \u03b1b) * Cs + \u03b1s * \u03b1b * blendFunctions[blendMode](Cb, Cs) + (1 - \u03b1s) * \u03b1b * Cb);
17009
+ }
16894
17010
  function flattenColors(fgColor, bgColor) {
17011
+ var blendMode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'normal';
17012
+ var r = simpleAlphaCompositing(fgColor.red, fgColor.alpha, bgColor.red, bgColor.alpha, blendMode);
17013
+ var g = simpleAlphaCompositing(fgColor.green, fgColor.alpha, bgColor.green, bgColor.alpha, blendMode);
17014
+ var b = simpleAlphaCompositing(fgColor.blue, fgColor.alpha, bgColor.blue, bgColor.alpha, blendMode);
17015
+ var a = Math.max(0, Math.min(fgColor.alpha + bgColor.alpha * (1 - fgColor.alpha), 1));
17016
+ return new color_default(r, g, b, a);
17017
+ }
17018
+ var flatten_colors_default = flattenColors;
17019
+ function flattenColors2(fgColor, bgColor) {
16895
17020
  var alpha = fgColor.alpha;
16896
17021
  var r = (1 - alpha) * bgColor.red + alpha * fgColor.red;
16897
17022
  var g = (1 - alpha) * bgColor.green + alpha * fgColor.green;
@@ -16899,7 +17024,7 @@
16899
17024
  var a = fgColor.alpha + bgColor.alpha * (1 - fgColor.alpha);
16900
17025
  return new color_default(r, g, b, a);
16901
17026
  }
16902
- var flatten_colors_default = flattenColors;
17027
+ var flatten_shadow_colors_default = flattenColors2;
16903
17028
  function contentOverlapping(targetElement, bgNode) {
16904
17029
  var targetRect = targetElement.getClientRects()[0];
16905
17030
  var obscuringElements = shadow_elements_from_point_default(targetRect.left, targetRect.top);
@@ -16928,13 +17053,17 @@
16928
17053
  function sortPageBackground(elmStack) {
16929
17054
  var bodyIndex = elmStack.indexOf(document.body);
16930
17055
  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) {
17056
+ var htmlBgColor = get_own_background_color_default(window.getComputedStyle(document.documentElement));
17057
+ if (bodyIndex > 1 && htmlBgColor.alpha === 0 && !element_has_image_default(document.documentElement)) {
16933
17058
  if (bodyIndex > 1) {
16934
17059
  bgNodes.splice(bodyIndex, 1);
17060
+ bgNodes.push(document.body);
17061
+ }
17062
+ var htmlIndex = bgNodes.indexOf(document.documentElement);
17063
+ if (htmlIndex > 0) {
17064
+ bgNodes.splice(htmlIndex, 1);
17065
+ bgNodes.push(document.documentElement);
16935
17066
  }
16936
- bgNodes.splice(elmStack.indexOf(document.documentElement), 1);
16937
- bgNodes.push(document.body);
16938
17067
  }
16939
17068
  return bgNodes;
16940
17069
  }
@@ -16954,7 +17083,7 @@
16954
17083
  }
16955
17084
  var get_background_stack_default = getBackgroundStack;
16956
17085
  function getTextShadowColors(node) {
16957
- var _ref53 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref53.minRatio, maxRatio = _ref53.maxRatio;
17086
+ var _ref55 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref55.minRatio, maxRatio = _ref55.maxRatio;
16958
17087
  var style = window.getComputedStyle(node);
16959
17088
  var textShadow = style.getPropertyValue('text-shadow');
16960
17089
  if (textShadow === 'none') {
@@ -16965,19 +17094,19 @@
16965
17094
  assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
16966
17095
  var shadowColors = [];
16967
17096
  var shadows = parseTextShadows(textShadow);
16968
- shadows.forEach(function(_ref54) {
16969
- var colorStr = _ref54.colorStr, pixels = _ref54.pixels;
17097
+ shadows.forEach(function(_ref56) {
17098
+ var colorStr = _ref56.colorStr, pixels = _ref56.pixels;
16970
17099
  colorStr = colorStr || style.getPropertyValue('color');
16971
17100
  var _pixels = _slicedToArray(pixels, 3), offsetY = _pixels[0], offsetX = _pixels[1], _pixels$ = _pixels[2], blurRadius = _pixels$ === void 0 ? 0 : _pixels$;
16972
17101
  if ((!minRatio || blurRadius >= fontSize * minRatio) && (!maxRatio || blurRadius < fontSize * maxRatio)) {
16973
- var color10 = textShadowColor({
17102
+ var color11 = textShadowColor({
16974
17103
  colorStr: colorStr,
16975
17104
  offsetY: offsetY,
16976
17105
  offsetX: offsetX,
16977
17106
  blurRadius: blurRadius,
16978
17107
  fontSize: fontSize
16979
17108
  });
16980
- shadowColors.push(color10);
17109
+ shadowColors.push(color11);
16981
17110
  }
16982
17111
  });
16983
17112
  return shadowColors;
@@ -17016,8 +17145,8 @@
17016
17145
  }
17017
17146
  return shadows;
17018
17147
  }
17019
- function textShadowColor(_ref55) {
17020
- var colorStr = _ref55.colorStr, offsetX = _ref55.offsetX, offsetY = _ref55.offsetY, blurRadius = _ref55.blurRadius, fontSize = _ref55.fontSize;
17148
+ function textShadowColor(_ref57) {
17149
+ var colorStr = _ref57.colorStr, offsetX = _ref57.offsetX, offsetY = _ref57.offsetY, blurRadius = _ref57.blurRadius, fontSize = _ref57.fontSize;
17021
17150
  if (offsetX > blurRadius || offsetY > blurRadius) {
17022
17151
  return new color_default(0, 0, 0, 0);
17023
17152
  }
@@ -17034,19 +17163,16 @@
17034
17163
  return .185 / (relativeBlur + .4);
17035
17164
  }
17036
17165
  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) {
17166
+ function _getBackgroundColor(elm) {
17167
+ var _bgColors;
17045
17168
  var bgElms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
17046
17169
  var shadowOutlineEmMax = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : .1;
17047
17170
  var bgColors = get_text_shadow_colors_default(elm, {
17048
17171
  minRatio: shadowOutlineEmMax
17049
17172
  });
17173
+ if (bgColors.length) {
17174
+ bgColors = [ bgColors.reduce(flatten_shadow_colors_default) ];
17175
+ }
17050
17176
  var elmStack = get_background_stack_default(elm);
17051
17177
  (elmStack || []).some(function(bgElm) {
17052
17178
  var bgElmStyle = window.getComputedStyle(bgElm);
@@ -17058,7 +17184,7 @@
17058
17184
  }
17059
17185
  if (bgColor.alpha !== 0) {
17060
17186
  bgElms.push(bgElm);
17061
- bgColors.push(bgColor);
17187
+ bgColors.unshift(bgColor);
17062
17188
  return bgColor.alpha === 1;
17063
17189
  } else {
17064
17190
  return false;
@@ -17067,11 +17193,40 @@
17067
17193
  if (bgColors === null || elmStack === null) {
17068
17194
  return null;
17069
17195
  }
17070
- bgColors.push(new color_default(255, 255, 255, 1));
17071
- var colors = bgColors.reduce(flatten_colors_default);
17196
+ var pageBgs = getPageBackgroundColors(elm, elmStack.includes(document.body));
17197
+ (_bgColors = bgColors).unshift.apply(_bgColors, _toConsumableArray(pageBgs));
17198
+ var colors = bgColors.reduce(function(bgColor, fgColor) {
17199
+ return flatten_colors_default(fgColor, bgColor);
17200
+ });
17072
17201
  return colors;
17073
17202
  }
17074
- var get_background_color_default = getBackgroundColor;
17203
+ function elmPartiallyObscured(elm, bgElm, bgColor) {
17204
+ var obscured = elm !== bgElm && !_visuallyContains(elm, bgElm) && bgColor.alpha !== 0;
17205
+ if (obscured) {
17206
+ incomplete_data_default.set('bgColor', 'elmPartiallyObscured');
17207
+ }
17208
+ return obscured;
17209
+ }
17210
+ function getPageBackgroundColors(elm, stackContainsBody) {
17211
+ var pageColors = [];
17212
+ if (!stackContainsBody) {
17213
+ var html = document.documentElement;
17214
+ var body = document.body;
17215
+ var htmlStyle = window.getComputedStyle(html);
17216
+ var bodyStyle = window.getComputedStyle(body);
17217
+ var htmlBgColor = get_own_background_color_default(htmlStyle);
17218
+ var bodyBgColor = get_own_background_color_default(bodyStyle);
17219
+ var bodyBgColorApplies = bodyBgColor.alpha !== 0 && _visuallyContains(elm, body);
17220
+ if (bodyBgColor.alpha !== 0 && htmlBgColor.alpha === 0 || bodyBgColorApplies && bodyBgColor.alpha !== 1) {
17221
+ pageColors.unshift(bodyBgColor);
17222
+ }
17223
+ if (htmlBgColor.alpha !== 0 && (!bodyBgColorApplies || bodyBgColorApplies && bodyBgColor.alpha !== 1)) {
17224
+ pageColors.unshift(htmlBgColor);
17225
+ }
17226
+ }
17227
+ pageColors.unshift(new color_default(255, 255, 255, 1));
17228
+ return pageColors;
17229
+ }
17075
17230
  function getContrast(bgColor, fgColor) {
17076
17231
  if (!fgColor || !bgColor) {
17077
17232
  return null;
@@ -17110,7 +17265,7 @@
17110
17265
  return fgColor;
17111
17266
  }
17112
17267
  if (!bgColor) {
17113
- bgColor = get_background_color_default(node, []);
17268
+ bgColor = _getBackgroundColor(node, []);
17114
17269
  }
17115
17270
  if (bgColor === null) {
17116
17271
  var reason = incomplete_data_default.get('bgColor');
@@ -17121,7 +17276,7 @@
17121
17276
  var textShadowColors = get_text_shadow_colors_default(node, {
17122
17277
  minRatio: 0
17123
17278
  });
17124
- return [ fgColor ].concat(_toConsumableArray(textShadowColors), [ bgColor ]).reduce(flatten_colors_default);
17279
+ return [ fgColor ].concat(_toConsumableArray(textShadowColors), [ bgColor ]).reduce(flatten_shadow_colors_default);
17125
17280
  }
17126
17281
  return flatten_colors_default(fgColor, bgColor);
17127
17282
  }
@@ -17161,7 +17316,7 @@
17161
17316
  return void 0;
17162
17317
  }
17163
17318
  var bgNodes = [];
17164
- var bgColor = get_background_color_default(node, bgNodes, shadowOutlineEmMax);
17319
+ var bgColor = _getBackgroundColor(node, bgNodes, shadowOutlineEmMax);
17165
17320
  var fgColor = get_foreground_color_default(node, false, bgColor);
17166
17321
  var shadowColors = get_text_shadow_colors_default(node, {
17167
17322
  minRatio: .001,
@@ -17177,7 +17332,7 @@
17177
17332
  if (shadowColors.length === 0) {
17178
17333
  contrast = get_contrast_default(bgColor, fgColor);
17179
17334
  } else if (fgColor && bgColor) {
17180
- shadowColor = [].concat(_toConsumableArray(shadowColors), [ bgColor ]).reduce(flatten_colors_default);
17335
+ shadowColor = [].concat(_toConsumableArray(shadowColors), [ bgColor ]).reduce(flatten_shadow_colors_default);
17181
17336
  var bgContrast = get_contrast_default(bgColor, shadowColor);
17182
17337
  var fgContrast = get_contrast_default(shadowColor, fgColor);
17183
17338
  contrast = Math.max(bgContrast, fgContrast);
@@ -17185,7 +17340,7 @@
17185
17340
  }
17186
17341
  var ptSize = Math.ceil(fontSize * 72) / 96;
17187
17342
  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;
17343
+ var _ref58 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref58.expected, minThreshold = _ref58.minThreshold, maxThreshold = _ref58.maxThreshold;
17189
17344
  var isValid = contrast > expected;
17190
17345
  if (typeof minThreshold === 'number' && contrast < minThreshold || typeof maxThreshold === 'number' && contrast > maxThreshold) {
17191
17346
  return true;
@@ -17194,14 +17349,14 @@
17194
17349
  var missing;
17195
17350
  if (bgColor === null) {
17196
17351
  missing = incomplete_data_default.get('bgColor');
17197
- } else {
17352
+ } else if (!isValid) {
17198
17353
  missing = contrastContributor;
17199
17354
  }
17200
17355
  var equalRatio = truncatedResult === 1;
17201
17356
  var shortTextContent = visibleText.length === 1;
17202
17357
  if (equalRatio) {
17203
17358
  missing = incomplete_data_default.set('bgColor', 'equalRatio');
17204
- } else if (shortTextContent && !ignoreLength) {
17359
+ } else if (!isValid && shortTextContent && !ignoreLength) {
17205
17360
  missing = 'shortTextContent';
17206
17361
  }
17207
17362
  this.data({
@@ -17225,8 +17380,8 @@
17225
17380
  }
17226
17381
  return isValid;
17227
17382
  }
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;
17383
+ function findPseudoElement(vNode, _ref59) {
17384
+ var _ref59$pseudoSizeThre = _ref59.pseudoSizeThreshold, pseudoSizeThreshold = _ref59$pseudoSizeThre === void 0 ? .25 : _ref59$pseudoSizeThre, _ref59$ignorePseudo = _ref59.ignorePseudo, ignorePseudo = _ref59$ignorePseudo === void 0 ? false : _ref59$ignorePseudo;
17230
17385
  if (ignorePseudo) {
17231
17386
  return;
17232
17387
  }
@@ -17268,7 +17423,7 @@
17268
17423
  }
17269
17424
  function parseUnit(str) {
17270
17425
  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;
17426
+ var _ref60 = str.match(unitRegex) || [], _ref61 = _slicedToArray(_ref60, 3), _ref61$ = _ref61[1], value = _ref61$ === void 0 ? '' : _ref61$, _ref61$2 = _ref61[2], unit = _ref61$2 === void 0 ? '' : _ref61$2;
17272
17427
  return {
17273
17428
  value: parseFloat(value),
17274
17429
  unit: unit.toLowerCase()
@@ -17313,8 +17468,8 @@
17313
17468
  incomplete_data_default.clear();
17314
17469
  return void 0;
17315
17470
  }
17316
- nodeColor = get_background_color_default(node);
17317
- parentColor = get_background_color_default(parentBlock);
17471
+ nodeColor = _getBackgroundColor(node);
17472
+ parentColor = _getBackgroundColor(parentBlock);
17318
17473
  if (!nodeColor || !parentColor || getContrast2(nodeColor, parentColor) >= 3) {
17319
17474
  var reason;
17320
17475
  if (!nodeColor || !parentColor) {
@@ -17511,14 +17666,14 @@
17511
17666
  }
17512
17667
  function getHeadingOrder(results) {
17513
17668
  results = _toConsumableArray(results);
17514
- results.sort(function(_ref60, _ref61) {
17515
- var nodeA = _ref60.node;
17516
- var nodeB = _ref61.node;
17669
+ results.sort(function(_ref62, _ref63) {
17670
+ var nodeA = _ref62.node;
17671
+ var nodeB = _ref63.node;
17517
17672
  return nodeA.ancestry.length - nodeB.ancestry.length;
17518
17673
  });
17519
17674
  var headingOrder = results.reduce(mergeHeadingOrder, []);
17520
- return headingOrder.filter(function(_ref62) {
17521
- var level = _ref62.level;
17675
+ return headingOrder.filter(function(_ref64) {
17676
+ var level = _ref64.level;
17522
17677
  return level !== -1;
17523
17678
  });
17524
17679
  }
@@ -17569,7 +17724,7 @@
17569
17724
  var headingRole = role && role.includes('heading');
17570
17725
  var ariaHeadingLevel = vNode.attr('aria-level');
17571
17726
  var ariaLevel = parseInt(ariaHeadingLevel, 10);
17572
- var _ref63 = vNode.props.nodeName.match(/h(\d)/) || [], _ref64 = _slicedToArray(_ref63, 2), headingLevel = _ref64[1];
17727
+ var _ref65 = vNode.props.nodeName.match(/h(\d)/) || [], _ref66 = _slicedToArray(_ref65, 2), headingLevel = _ref66[1];
17573
17728
  if (!headingRole) {
17574
17729
  return -1;
17575
17730
  }
@@ -17635,8 +17790,8 @@
17635
17790
  if (results.length < 2) {
17636
17791
  return results;
17637
17792
  }
17638
- var incompleteResults = results.filter(function(_ref65) {
17639
- var result = _ref65.result;
17793
+ var incompleteResults = results.filter(function(_ref67) {
17794
+ var result = _ref67.result;
17640
17795
  return result !== void 0;
17641
17796
  });
17642
17797
  var uniqueResults = [];
@@ -17648,12 +17803,12 @@
17648
17803
  if (nameMap[name]) {
17649
17804
  return 'continue';
17650
17805
  }
17651
- var sameNameResults = incompleteResults.filter(function(_ref66, resultNum) {
17652
- var data2 = _ref66.data;
17806
+ var sameNameResults = incompleteResults.filter(function(_ref68, resultNum) {
17807
+ var data2 = _ref68.data;
17653
17808
  return data2.name === name && resultNum !== index;
17654
17809
  });
17655
- var isSameUrl = sameNameResults.every(function(_ref67) {
17656
- var data2 = _ref67.data;
17810
+ var isSameUrl = sameNameResults.every(function(_ref69) {
17811
+ var data2 = _ref69.data;
17657
17812
  return isIdenticalObject(data2.urlProps, urlProps);
17658
17813
  });
17659
17814
  if (sameNameResults.length && !isSameUrl) {
@@ -17783,7 +17938,7 @@
17783
17938
  function internalLinkPresentEvaluate(node, options, virtualNode) {
17784
17939
  var links = query_selector_all_default(virtualNode, 'a[href]');
17785
17940
  return links.some(function(vLink) {
17786
- return /^#[^/!]/.test(vLink.actualNode.getAttribute('href'));
17941
+ return /^#[^/!]/.test(vLink.attr('href'));
17787
17942
  });
17788
17943
  }
17789
17944
  var internal_link_present_evaluate_default = internalLinkPresentEvaluate;
@@ -17814,16 +17969,16 @@
17814
17969
  var outerText = elm.textContent.trim();
17815
17970
  var innerText = outerText;
17816
17971
  while (innerText === outerText && nextNode !== void 0) {
17817
- var _i19 = -1;
17972
+ var _i20 = -1;
17818
17973
  elm = nextNode;
17819
17974
  if (elm.children.length === 0) {
17820
17975
  return elm;
17821
17976
  }
17822
17977
  do {
17823
- _i19++;
17824
- innerText = elm.children[_i19].textContent.trim();
17825
- } while (innerText === '' && _i19 + 1 < elm.children.length);
17826
- nextNode = elm.children[_i19];
17978
+ _i20++;
17979
+ innerText = elm.children[_i20].textContent.trim();
17980
+ } while (innerText === '' && _i20 + 1 < elm.children.length);
17981
+ nextNode = elm.children[_i20];
17827
17982
  }
17828
17983
  return elm;
17829
17984
  }
@@ -17854,6 +18009,13 @@
17854
18009
  var currStyle = getStyleValues(node);
17855
18010
  var nextStyle = nextSibling ? getStyleValues(nextSibling) : null;
17856
18011
  var prevStyle = prevSibling ? getStyleValues(prevSibling) : null;
18012
+ var optionsPassLength = options.passLength;
18013
+ var optionsFailLength = options.failLength;
18014
+ var headingLength = node.textContent.trim().length;
18015
+ var paragraphLength = nextSibling === null || nextSibling === void 0 ? void 0 : nextSibling.textContent.trim().length;
18016
+ if (headingLength > paragraphLength * optionsPassLength) {
18017
+ return true;
18018
+ }
17857
18019
  if (!nextStyle || !isHeaderStyle(currStyle, nextStyle, margins)) {
17858
18020
  return true;
17859
18021
  }
@@ -17864,6 +18026,9 @@
17864
18026
  if (prevStyle && !isHeaderStyle(currStyle, prevStyle, margins)) {
17865
18027
  return void 0;
17866
18028
  }
18029
+ if (headingLength > paragraphLength * optionsFailLength) {
18030
+ return void 0;
18031
+ }
17867
18032
  return false;
17868
18033
  }
17869
18034
  var p_as_heading_evaluate_default = pAsHeadingEvaluate;
@@ -17899,8 +18064,8 @@
17899
18064
  } else if (node !== document.body && has_content_default(node, true)) {
17900
18065
  return [ virtualNode ];
17901
18066
  } else {
17902
- return virtualNode.children.filter(function(_ref68) {
17903
- var actualNode = _ref68.actualNode;
18067
+ return virtualNode.children.filter(function(_ref70) {
18068
+ var actualNode = _ref70.actualNode;
17904
18069
  return actualNode.nodeType === 1;
17905
18070
  }).map(function(vNode) {
17906
18071
  return findRegionlessElms(vNode, options);
@@ -18083,8 +18248,8 @@
18083
18248
  if (!virtualNode.children) {
18084
18249
  return void 0;
18085
18250
  }
18086
- var titleNode = virtualNode.children.find(function(_ref69) {
18087
- var props = _ref69.props;
18251
+ var titleNode = virtualNode.children.find(function(_ref71) {
18252
+ var props = _ref71.props;
18088
18253
  return props.nodeName === 'title';
18089
18254
  });
18090
18255
  if (!titleNode) {
@@ -18107,8 +18272,8 @@
18107
18272
  }
18108
18273
  var svg_non_empty_title_evaluate_default = svgNonEmptyTitleEvaluate;
18109
18274
  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;
18275
+ var _ref72 = context5 || {}, _ref72$cssom = _ref72.cssom, cssom = _ref72$cssom === void 0 ? void 0 : _ref72$cssom;
18276
+ var _ref73 = options || {}, _ref73$degreeThreshol = _ref73.degreeThreshold, degreeThreshold = _ref73$degreeThreshol === void 0 ? 0 : _ref73$degreeThreshol;
18112
18277
  if (!cssom || !cssom.length) {
18113
18278
  return void 0;
18114
18279
  }
@@ -18116,14 +18281,14 @@
18116
18281
  var relatedElements = [];
18117
18282
  var rulesGroupByDocumentFragment = groupCssomByDocument(cssom);
18118
18283
  var _loop6 = function _loop6() {
18119
- var key = _Object$keys2[_i20];
18284
+ var key = _Object$keys2[_i21];
18120
18285
  var _rulesGroupByDocument = rulesGroupByDocumentFragment[key], root = _rulesGroupByDocument.root, rules = _rulesGroupByDocument.rules;
18121
18286
  var orientationRules = rules.filter(isMediaRuleWithOrientation);
18122
18287
  if (!orientationRules.length) {
18123
18288
  return 'continue';
18124
18289
  }
18125
- orientationRules.forEach(function(_ref72) {
18126
- var cssRules = _ref72.cssRules;
18290
+ orientationRules.forEach(function(_ref74) {
18291
+ var cssRules = _ref74.cssRules;
18127
18292
  Array.from(cssRules).forEach(function(cssRule) {
18128
18293
  var locked = getIsOrientationLocked(cssRule);
18129
18294
  if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
@@ -18134,7 +18299,7 @@
18134
18299
  });
18135
18300
  });
18136
18301
  };
18137
- for (var _i20 = 0, _Object$keys2 = Object.keys(rulesGroupByDocumentFragment); _i20 < _Object$keys2.length; _i20++) {
18302
+ for (var _i21 = 0, _Object$keys2 = Object.keys(rulesGroupByDocumentFragment); _i21 < _Object$keys2.length; _i21++) {
18138
18303
  var _ret3 = _loop6();
18139
18304
  if (_ret3 === 'continue') {
18140
18305
  continue;
@@ -18148,8 +18313,8 @@
18148
18313
  }
18149
18314
  return false;
18150
18315
  function groupCssomByDocument(cssObjectModel) {
18151
- return cssObjectModel.reduce(function(out, _ref73) {
18152
- var sheet = _ref73.sheet, root = _ref73.root, shadowId = _ref73.shadowId;
18316
+ return cssObjectModel.reduce(function(out, _ref75) {
18317
+ var sheet = _ref75.sheet, root = _ref75.root, shadowId = _ref75.shadowId;
18153
18318
  var key = shadowId ? shadowId : 'topDocument';
18154
18319
  if (!out[key]) {
18155
18320
  out[key] = {
@@ -18165,15 +18330,15 @@
18165
18330
  return out;
18166
18331
  }, {});
18167
18332
  }
18168
- function isMediaRuleWithOrientation(_ref74) {
18169
- var type = _ref74.type, cssText = _ref74.cssText;
18333
+ function isMediaRuleWithOrientation(_ref76) {
18334
+ var type = _ref76.type, cssText = _ref76.cssText;
18170
18335
  if (type !== 4) {
18171
18336
  return false;
18172
18337
  }
18173
18338
  return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
18174
18339
  }
18175
- function getIsOrientationLocked(_ref75) {
18176
- var selectorText = _ref75.selectorText, style = _ref75.style;
18340
+ function getIsOrientationLocked(_ref77) {
18341
+ var selectorText = _ref77.selectorText, style = _ref77.style;
18177
18342
  if (!selectorText || style.length <= 0) {
18178
18343
  return false;
18179
18344
  }
@@ -18220,7 +18385,7 @@
18220
18385
  }
18221
18386
  }
18222
18387
  function getAngleInDegrees(angleWithUnit) {
18223
- var _ref76 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref77 = _slicedToArray(_ref76, 1), unit = _ref77[0];
18388
+ var _ref78 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref79 = _slicedToArray(_ref78, 1), unit = _ref79[0];
18224
18389
  if (!unit) {
18225
18390
  return;
18226
18391
  }
@@ -18269,7 +18434,7 @@
18269
18434
  }
18270
18435
  var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
18271
18436
  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;
18437
+ var _ref80 = options || {}, _ref80$scaleMinimum = _ref80.scaleMinimum, scaleMinimum = _ref80$scaleMinimum === void 0 ? 2 : _ref80$scaleMinimum, _ref80$lowerBound = _ref80.lowerBound, lowerBound = _ref80$lowerBound === void 0 ? false : _ref80$lowerBound;
18273
18438
  var content = virtualNode.attr('content') || '';
18274
18439
  if (!content) {
18275
18440
  return true;
@@ -18385,8 +18550,8 @@
18385
18550
  if (!tabbableElements || !tabbableElements.length) {
18386
18551
  return true;
18387
18552
  }
18388
- var relatedNodes = tabbableElements.reduce(function(out, _ref79) {
18389
- var el = _ref79.actualNode;
18553
+ var relatedNodes = tabbableElements.reduce(function(out, _ref81) {
18554
+ var el = _ref81.actualNode;
18390
18555
  var nodeName2 = el.nodeName.toUpperCase();
18391
18556
  if (elementsThatCanBeDisabled.includes(nodeName2)) {
18392
18557
  out.push(el);
@@ -18425,8 +18590,8 @@
18425
18590
  }
18426
18591
  var focusable_element_evaluate_default = focusableElementEvaluate;
18427
18592
  function focusableModalOpenEvaluate(node, options, virtualNode) {
18428
- var tabbableElements = virtualNode.tabbableElements.map(function(_ref80) {
18429
- var actualNode = _ref80.actualNode;
18593
+ var tabbableElements = virtualNode.tabbableElements.map(function(_ref82) {
18594
+ var actualNode = _ref82.actualNode;
18430
18595
  return actualNode;
18431
18596
  });
18432
18597
  if (!tabbableElements || !tabbableElements.length) {
@@ -18458,8 +18623,8 @@
18458
18623
  if (!tabbableElements || !tabbableElements.length) {
18459
18624
  return true;
18460
18625
  }
18461
- var relatedNodes = tabbableElements.reduce(function(out, _ref81) {
18462
- var el = _ref81.actualNode;
18626
+ var relatedNodes = tabbableElements.reduce(function(out, _ref83) {
18627
+ var el = _ref83.actualNode;
18463
18628
  var nodeName2 = el.nodeName.toUpperCase();
18464
18629
  if (!elementsThatCanBeDisabled.includes(nodeName2)) {
18465
18630
  out.push(el);
@@ -18507,7 +18672,7 @@
18507
18672
  return focusableDescendants(child);
18508
18673
  });
18509
18674
  }
18510
- function noFocusbleContentEvaluate(node, options, virtualNode) {
18675
+ function frameFocusableContentEvaluate(node, options, virtualNode) {
18511
18676
  if (!virtualNode.children) {
18512
18677
  return void 0;
18513
18678
  }
@@ -18519,7 +18684,51 @@
18519
18684
  return void 0;
18520
18685
  }
18521
18686
  }
18522
- var no_focusable_content_evaluate_default = noFocusbleContentEvaluate;
18687
+ var frame_focusable_content_evaluate_default = frameFocusableContentEvaluate;
18688
+ function noFocusableContentEvaluate(node, options, virtualNode) {
18689
+ if (!virtualNode.children) {
18690
+ return void 0;
18691
+ }
18692
+ try {
18693
+ var focusableDescendants2 = getFocusableDescendants(virtualNode);
18694
+ if (!focusableDescendants2.length) {
18695
+ return true;
18696
+ }
18697
+ var notHiddenElements = focusableDescendants2.filter(usesUnreliableHidingStrategy);
18698
+ if (notHiddenElements.length > 0) {
18699
+ this.data({
18700
+ messageKey: 'notHidden'
18701
+ });
18702
+ this.relatedNodes(notHiddenElements);
18703
+ } else {
18704
+ this.relatedNodes(focusableDescendants2);
18705
+ }
18706
+ return false;
18707
+ } catch (e) {
18708
+ return void 0;
18709
+ }
18710
+ }
18711
+ function getFocusableDescendants(vNode) {
18712
+ if (!vNode.children) {
18713
+ if (vNode.props.nodeType === 1) {
18714
+ throw new Error('Cannot determine children');
18715
+ }
18716
+ return [];
18717
+ }
18718
+ var retVal = [];
18719
+ vNode.children.forEach(function(child) {
18720
+ if (is_focusable_default(child)) {
18721
+ retVal.push(child);
18722
+ } else {
18723
+ retVal.push.apply(retVal, _toConsumableArray(getFocusableDescendants(child)));
18724
+ }
18725
+ });
18726
+ return retVal;
18727
+ }
18728
+ function usesUnreliableHidingStrategy(vNode) {
18729
+ var tabIndex = parseInt(vNode.attr('tabindex'), 10);
18730
+ return !isNaN(tabIndex) && tabIndex < 0;
18731
+ }
18523
18732
  function tabindexEvaluate(node, options, virtualNode) {
18524
18733
  var tabIndex = parseInt(virtualNode.attr('tabindex'), 10);
18525
18734
  return isNaN(tabIndex) ? true : tabIndex <= 0;
@@ -18641,7 +18850,7 @@
18641
18850
  return sanitize_default(noUnicodeStr);
18642
18851
  }
18643
18852
  function labelContentNameMismatchEvaluate(node, options, virtualNode) {
18644
- var _ref82 = options || {}, pixelThreshold = _ref82.pixelThreshold, occuranceThreshold = _ref82.occuranceThreshold;
18853
+ var _ref84 = options || {}, pixelThreshold = _ref84.pixelThreshold, occuranceThreshold = _ref84.occuranceThreshold;
18645
18854
  var accText = accessible_text_default(node).toLowerCase();
18646
18855
  if (is_human_interpretable_default(accText) < 1) {
18647
18856
  return void 0;
@@ -19009,8 +19218,8 @@
19009
19218
  var aria46 = /^aria-/;
19010
19219
  var attrs = virtualNode.attrNames;
19011
19220
  if (attrs.length) {
19012
- for (var _i21 = 0, l = attrs.length; _i21 < l; _i21++) {
19013
- if (aria46.test(attrs[_i21])) {
19221
+ for (var _i22 = 0, l = attrs.length; _i22 < l; _i22++) {
19222
+ if (aria46.test(attrs[_i22])) {
19014
19223
  return true;
19015
19224
  }
19016
19225
  }
@@ -19391,7 +19600,7 @@
19391
19600
  if (!role || [ 'none', 'presentation' ].includes(role)) {
19392
19601
  return true;
19393
19602
  }
19394
- var _ref83 = aria_roles_default[role] || {}, accessibleNameRequired = _ref83.accessibleNameRequired;
19603
+ var _ref85 = aria_roles_default[role] || {}, accessibleNameRequired = _ref85.accessibleNameRequired;
19395
19604
  if (accessibleNameRequired || is_focusable_default(virtualNode)) {
19396
19605
  return true;
19397
19606
  }
@@ -19554,7 +19763,8 @@
19554
19763
  'focusable-no-name-evaluate': focusable_no_name_evaluate_default,
19555
19764
  'focusable-not-tabbable-evaluate': focusable_not_tabbable_evaluate_default,
19556
19765
  'landmark-is-top-level-evaluate': landmark_is_top_level_evaluate_default,
19557
- 'no-focusable-content-evaluate': no_focusable_content_evaluate_default,
19766
+ 'frame-focusable-content-evaluate': frame_focusable_content_evaluate_default,
19767
+ 'no-focusable-content-evaluate': noFocusableContentEvaluate,
19558
19768
  'tabindex-evaluate': tabindex_evaluate_default,
19559
19769
  'alt-space-value-evaluate': alt_space_value_evaluate_default,
19560
19770
  'duplicate-img-label-evaluate': duplicate_img_label_evaluate_default,
@@ -20206,8 +20416,8 @@
20206
20416
  lang: this.lang
20207
20417
  };
20208
20418
  var checkIDs = Object.keys(this.data.checks);
20209
- for (var _i22 = 0; _i22 < checkIDs.length; _i22++) {
20210
- var id = checkIDs[_i22];
20419
+ for (var _i23 = 0; _i23 < checkIDs.length; _i23++) {
20420
+ var id = checkIDs[_i23];
20211
20421
  var check4 = this.data.checks[id];
20212
20422
  var _check4$messages = check4.messages, pass = _check4$messages.pass, fail = _check4$messages.fail, incomplete = _check4$messages.incomplete;
20213
20423
  locale.checks[id] = {
@@ -20217,8 +20427,8 @@
20217
20427
  };
20218
20428
  }
20219
20429
  var ruleIDs = Object.keys(this.data.rules);
20220
- for (var _i23 = 0; _i23 < ruleIDs.length; _i23++) {
20221
- var _id = ruleIDs[_i23];
20430
+ for (var _i24 = 0; _i24 < ruleIDs.length; _i24++) {
20431
+ var _id = ruleIDs[_i24];
20222
20432
  var rule3 = this.data.rules[_id];
20223
20433
  var description = rule3.description, help = rule3.help;
20224
20434
  locale.rules[_id] = {
@@ -20227,8 +20437,8 @@
20227
20437
  };
20228
20438
  }
20229
20439
  var failureSummaries = Object.keys(this.data.failureSummaries);
20230
- for (var _i24 = 0; _i24 < failureSummaries.length; _i24++) {
20231
- var type = failureSummaries[_i24];
20440
+ for (var _i25 = 0; _i25 < failureSummaries.length; _i25++) {
20441
+ var type = failureSummaries[_i25];
20232
20442
  var failureSummary2 = this.data.failureSummaries[type];
20233
20443
  var failureMessage = failureSummary2.failureMessage;
20234
20444
  locale.failureSummaries[type] = {
@@ -20251,8 +20461,8 @@
20251
20461
  key: '_applyCheckLocale',
20252
20462
  value: function _applyCheckLocale(checks) {
20253
20463
  var keys = Object.keys(checks);
20254
- for (var _i25 = 0; _i25 < keys.length; _i25++) {
20255
- var id = keys[_i25];
20464
+ for (var _i26 = 0; _i26 < keys.length; _i26++) {
20465
+ var id = keys[_i26];
20256
20466
  if (!this.data.checks[id]) {
20257
20467
  throw new Error('Locale provided for unknown check: "'.concat(id, '"'));
20258
20468
  }
@@ -20263,8 +20473,8 @@
20263
20473
  key: '_applyRuleLocale',
20264
20474
  value: function _applyRuleLocale(rules) {
20265
20475
  var keys = Object.keys(rules);
20266
- for (var _i26 = 0; _i26 < keys.length; _i26++) {
20267
- var id = keys[_i26];
20476
+ for (var _i27 = 0; _i27 < keys.length; _i27++) {
20477
+ var id = keys[_i27];
20268
20478
  if (!this.data.rules[id]) {
20269
20479
  throw new Error('Locale provided for unknown rule: "'.concat(id, '"'));
20270
20480
  }
@@ -20275,8 +20485,8 @@
20275
20485
  key: '_applyFailureSummaries',
20276
20486
  value: function _applyFailureSummaries(messages) {
20277
20487
  var keys = Object.keys(messages);
20278
- for (var _i27 = 0; _i27 < keys.length; _i27++) {
20279
- var key = keys[_i27];
20488
+ for (var _i28 = 0; _i28 < keys.length; _i28++) {
20489
+ var key = keys[_i28];
20280
20490
  if (!this.data.failureSummaries[key]) {
20281
20491
  throw new Error('Locale provided for unknown failureMessage: "'.concat(key, '"'));
20282
20492
  }
@@ -20522,10 +20732,10 @@
20522
20732
  } else if ([ 'tag', 'tags', void 0 ].includes(only.type)) {
20523
20733
  only.type = 'tag';
20524
20734
  var unmatchedTags = only.values.filter(function(tag) {
20525
- return !tags.includes(tag);
20735
+ return !tags.includes(tag) && !/wcag2[1-3]a{1,3}/.test(tag);
20526
20736
  });
20527
20737
  if (unmatchedTags.length !== 0) {
20528
- log_default('Could not find tags `' + unmatchedTags.join('`, `') + '`');
20738
+ axe.log('Could not find tags `' + unmatchedTags.join('`, `') + '`');
20529
20739
  }
20530
20740
  } else {
20531
20741
  throw new Error('Unknown runOnly type \''.concat(only.type, '\''));
@@ -20547,6 +20757,9 @@
20547
20757
  brand: this.brand,
20548
20758
  application: this.application
20549
20759
  };
20760
+ if (typeof branding === 'string') {
20761
+ this.application = branding;
20762
+ }
20550
20763
  if (branding && branding.hasOwnProperty('brand') && branding.brand && typeof branding.brand === 'string') {
20551
20764
  this.brand = branding.brand;
20552
20765
  }
@@ -20622,8 +20835,8 @@
20622
20835
  });
20623
20836
  };
20624
20837
  }
20625
- function getHelpUrl(_ref84, ruleId, version) {
20626
- var brand = _ref84.brand, application = _ref84.application, lang = _ref84.lang;
20838
+ function getHelpUrl(_ref86, ruleId, version) {
20839
+ var brand = _ref86.brand, application = _ref86.application, lang = _ref86.lang;
20627
20840
  return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
20628
20841
  }
20629
20842
  var audit_default = Audit;
@@ -20649,6 +20862,7 @@
20649
20862
  var es6_promise = __toModule(require_es6_promise());
20650
20863
  var typedarray = __toModule(require_typedarray());
20651
20864
  var weakmap_polyfill = __toModule(require_weakmap_polyfill());
20865
+ dot2['default'].templateSettings.strip = false;
20652
20866
  if (!('Promise' in window)) {
20653
20867
  es6_promise['default'].polyfill();
20654
20868
  }
@@ -21036,9 +21250,9 @@
21036
21250
  });
21037
21251
  }
21038
21252
  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];
21253
+ function normalizeRunParams(_ref87) {
21254
+ var _ref89, _options$reporter, _axe$_audit;
21255
+ var _ref88 = _slicedToArray(_ref87, 3), context5 = _ref88[0], options = _ref88[1], callback = _ref88[2];
21042
21256
  var typeErr = new TypeError('axe.run arguments are invalid');
21043
21257
  if (!isContext(context5)) {
21044
21258
  if (callback !== void 0) {
@@ -21059,7 +21273,7 @@
21059
21273
  throw typeErr;
21060
21274
  }
21061
21275
  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';
21276
+ options.reporter = (_ref89 = (_options$reporter = options.reporter) !== null && _options$reporter !== void 0 ? _options$reporter : (_axe$_audit = axe._audit) === null || _axe$_audit === void 0 ? void 0 : _axe$_audit.reporter) !== null && _ref89 !== void 0 ? _ref89 : 'v1';
21063
21277
  return {
21064
21278
  context: context5,
21065
21279
  options: options,
@@ -21184,14 +21398,14 @@
21184
21398
  return new Promise(function(res, rej) {
21185
21399
  axe._audit.run(contextObj, options, res, rej);
21186
21400
  }).then(function(results) {
21187
- results = results.map(function(_ref88) {
21188
- var nodes = _ref88.nodes, result = _objectWithoutProperties(_ref88, _excluded8);
21401
+ results = results.map(function(_ref90) {
21402
+ var nodes = _ref90.nodes, result = _objectWithoutProperties(_ref90, _excluded8);
21189
21403
  return _extends({
21190
21404
  nodes: nodes.map(serializeNode)
21191
21405
  }, result);
21192
21406
  });
21193
- var frames = contextObj.frames.map(function(_ref89) {
21194
- var node = _ref89.node;
21407
+ var frames = contextObj.frames.map(function(_ref91) {
21408
+ var node = _ref91.node;
21195
21409
  return new dq_element_default(node, options).toJSON();
21196
21410
  });
21197
21411
  var environmentData;
@@ -21208,13 +21422,13 @@
21208
21422
  teardown_default();
21209
21423
  });
21210
21424
  }
21211
- function serializeNode(_ref90) {
21212
- var node = _ref90.node, nodeResult = _objectWithoutProperties(_ref90, _excluded9);
21425
+ function serializeNode(_ref92) {
21426
+ var node = _ref92.node, nodeResult = _objectWithoutProperties(_ref92, _excluded9);
21213
21427
  nodeResult.node = node.toJSON();
21214
- for (var _i28 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i28 < _arr2.length; _i28++) {
21215
- var type = _arr2[_i28];
21216
- nodeResult[type] = nodeResult[type].map(function(_ref91) {
21217
- var relatedNodes = _ref91.relatedNodes, checkResult = _objectWithoutProperties(_ref91, _excluded10);
21428
+ for (var _i29 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i29 < _arr2.length; _i29++) {
21429
+ var type = _arr2[_i29];
21430
+ nodeResult[type] = nodeResult[type].map(function(_ref93) {
21431
+ var relatedNodes = _ref93.relatedNodes, checkResult = _objectWithoutProperties(_ref93, _excluded10);
21218
21432
  return _extends({}, checkResult, {
21219
21433
  relatedNodes: relatedNodes.map(function(node2) {
21220
21434
  return node2.toJSON();
@@ -21225,14 +21439,14 @@
21225
21439
  return nodeResult;
21226
21440
  }
21227
21441
  function finishRun(partialResults) {
21228
- var _ref93, _options$reporter2, _axe$_audit2;
21442
+ var _ref95, _options$reporter2, _axe$_audit2;
21229
21443
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
21230
21444
  options = clone_default(options);
21231
- var _ref92 = partialResults.find(function(r) {
21445
+ var _ref94 = partialResults.find(function(r) {
21232
21446
  return r.environmentData;
21233
- }) || {}, environmentData = _ref92.environmentData;
21447
+ }) || {}, environmentData = _ref94.environmentData;
21234
21448
  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';
21449
+ options.reporter = (_ref95 = (_options$reporter2 = options.reporter) !== null && _options$reporter2 !== void 0 ? _options$reporter2 : (_axe$_audit2 = axe._audit) === null || _axe$_audit2 === void 0 ? void 0 : _axe$_audit2.reporter) !== null && _ref95 !== void 0 ? _ref95 : 'v1';
21236
21450
  setFrameSpec(partialResults);
21237
21451
  var results = merge_results_default(partialResults);
21238
21452
  results = axe._audit.after(results, options);
@@ -21262,8 +21476,8 @@
21262
21476
  _iterator4.f();
21263
21477
  }
21264
21478
  }
21265
- function getMergedFrameSpecs(_ref94) {
21266
- var childFrameSpecs = _ref94.frames, parentFrameSpec = _ref94.frameSpec;
21479
+ function getMergedFrameSpecs(_ref96) {
21480
+ var childFrameSpecs = _ref96.frames, parentFrameSpec = _ref96.frameSpec;
21267
21481
  if (!parentFrameSpec) {
21268
21482
  return childFrameSpecs;
21269
21483
  }
@@ -21323,12 +21537,12 @@
21323
21537
  var transformedResults = results.map(function(result) {
21324
21538
  var transformedResult = _extends({}, result);
21325
21539
  var types = [ 'passes', 'violations', 'incomplete', 'inapplicable' ];
21326
- for (var _i29 = 0, _types = types; _i29 < _types.length; _i29++) {
21327
- var type = _types[_i29];
21540
+ for (var _i30 = 0, _types = types; _i30 < _types.length; _i30++) {
21541
+ var type = _types[_i30];
21328
21542
  if (transformedResult[type] && Array.isArray(transformedResult[type])) {
21329
- transformedResult[type] = transformedResult[type].map(function(_ref95) {
21543
+ transformedResult[type] = transformedResult[type].map(function(_ref97) {
21330
21544
  var _node;
21331
- var node = _ref95.node, typeResult = _objectWithoutProperties(_ref95, _excluded13);
21545
+ var node = _ref97.node, typeResult = _objectWithoutProperties(_ref97, _excluded13);
21332
21546
  node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
21333
21547
  return _extends({
21334
21548
  node: node
@@ -21403,6 +21617,9 @@
21403
21617
  Rule: rule_default,
21404
21618
  metadataFunctionMap: metadata_function_map_default
21405
21619
  };
21620
+ axe._thisWillBeDeletedDoNotUse['public'] = {
21621
+ reporters: reporters
21622
+ };
21406
21623
  axe.imports = imports_exports;
21407
21624
  axe.cleanup = cleanup_default;
21408
21625
  axe.configure = configure_default;
@@ -21494,7 +21711,7 @@
21494
21711
  },
21495
21712
  'aria-roledescription': {
21496
21713
  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'
21714
+ help: 'aria-roledescription must be on elements with a semantic role'
21498
21715
  },
21499
21716
  'aria-roles': {
21500
21717
  description: 'Ensures all elements with a role attribute use a valid value',
@@ -21506,7 +21723,7 @@
21506
21723
  },
21507
21724
  'aria-toggle-field-name': {
21508
21725
  description: 'Ensures every ARIA toggle field has an accessible name',
21509
- help: 'ARIA toggle fields have an accessible name'
21726
+ help: 'ARIA toggle fields must have an accessible name'
21510
21727
  },
21511
21728
  'aria-tooltip-name': {
21512
21729
  description: 'Ensures every ARIA tooltip node has an accessible name',
@@ -21554,7 +21771,7 @@
21554
21771
  },
21555
21772
  'css-orientation-lock': {
21556
21773
  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'
21774
+ help: 'CSS Media queries must not lock display orientation'
21558
21775
  },
21559
21776
  'definition-list': {
21560
21777
  description: 'Ensures <dl> elements are structured correctly',
@@ -21589,8 +21806,8 @@
21589
21806
  help: 'Table header text must not be empty'
21590
21807
  },
21591
21808
  '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'
21809
+ description: 'Ensures elements in the focus order have a role appropriate for interactive content',
21810
+ help: 'Elements in the focus order should have an appropriate role'
21594
21811
  },
21595
21812
  'form-field-multiple-labels': {
21596
21813
  description: 'Ensures form field does not have multiple label elements',
@@ -21618,7 +21835,7 @@
21618
21835
  },
21619
21836
  'hidden-content': {
21620
21837
  description: 'Informs users about hidden content.',
21621
- help: 'Hidden content on the page cannot be analyzed'
21838
+ help: 'Hidden content on the page should be analyzed'
21622
21839
  },
21623
21840
  'html-has-lang': {
21624
21841
  description: 'Ensures every HTML document has a lang attribute',
@@ -21634,7 +21851,7 @@
21634
21851
  },
21635
21852
  'identical-links-same-purpose': {
21636
21853
  description: 'Ensure that links with the same accessible name serve a similar purpose',
21637
- help: 'Links with the same name have a similar purpose'
21854
+ help: 'Links with the same name must have a similar purpose'
21638
21855
  },
21639
21856
  'image-alt': {
21640
21857
  description: 'Ensures <img> elements have alternate text or a role of none or presentation',
@@ -21657,7 +21874,7 @@
21657
21874
  help: 'Elements must have their visible text as part of their accessible name'
21658
21875
  },
21659
21876
  'label-title-only': {
21660
- description: 'Ensures that every form element is not solely labeled using the title or aria-describedby attributes',
21877
+ 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
21878
  help: 'Form elements should have a visible label'
21662
21879
  },
21663
21880
  label: {
@@ -21701,8 +21918,8 @@
21701
21918
  description: 'Landmarks should have a unique role or role/label/title (i.e. accessible name) combination'
21702
21919
  },
21703
21920
  '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'
21921
+ description: 'Ensure links are distinguished from surrounding text in a way that does not rely on color',
21922
+ help: 'Links must be distinguishable without relying on color'
21706
21923
  },
21707
21924
  'link-name': {
21708
21925
  description: 'Ensures links have discernible text',
@@ -21733,20 +21950,20 @@
21733
21950
  help: 'Zooming and scaling should not be disabled'
21734
21951
  },
21735
21952
  'nested-interactive': {
21736
- description: 'Nested interactive controls are not announced by screen readers',
21737
- help: 'Ensure interactive controls are not nested'
21953
+ description: 'Ensures interactive controls are not nested as they are not always announced by screen readers or can cause focus problems for assistive technologies',
21954
+ help: 'Interactive controls must not be nested'
21738
21955
  },
21739
21956
  'no-autoplay-audio': {
21740
21957
  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'
21958
+ help: '<video> or <audio> elements must not play automatically'
21742
21959
  },
21743
21960
  'object-alt': {
21744
21961
  description: 'Ensures <object> elements have alternate text',
21745
21962
  help: '<object> elements must have alternate text'
21746
21963
  },
21747
21964
  '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'
21965
+ description: 'Ensure bold, italic text and font-size is not used to style <p> elements as a heading',
21966
+ help: 'Styled <p> elements must not be used as headings'
21750
21967
  },
21751
21968
  'page-has-heading-one': {
21752
21969
  description: 'Ensure that the page, or at least one of its frames contains a level-one heading',
@@ -21762,15 +21979,15 @@
21762
21979
  },
21763
21980
  'role-img-alt': {
21764
21981
  description: 'Ensures [role=\'img\'] elements have alternate text',
21765
- help: '[role=\'img\'] elements have an alternative text'
21982
+ help: '[role=\'img\'] elements must have an alternative text'
21766
21983
  },
21767
21984
  'scope-attr-valid': {
21768
21985
  description: 'Ensures the scope attribute is used correctly on tables',
21769
21986
  help: 'scope attribute should be used correctly'
21770
21987
  },
21771
21988
  'scrollable-region-focusable': {
21772
- description: 'Elements that have scrollable content must be accessible by keyboard',
21773
- help: 'Ensure that scrollable region has keyboard access'
21989
+ description: 'Ensure elements that have scrollable content are accessible by keyboard',
21990
+ help: 'Scrollable region must have keyboard access'
21774
21991
  },
21775
21992
  'select-name': {
21776
21993
  description: 'Ensures select element has an accessible name',
@@ -21785,32 +22002,32 @@
21785
22002
  help: 'The skip-link target should exist and be focusable'
21786
22003
  },
21787
22004
  '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'
22005
+ description: 'Ensures <svg> elements with an img, graphics-document or graphics-symbol role have an accessible text',
22006
+ help: '<svg> elements with an img role must have an alternative text'
21790
22007
  },
21791
22008
  tabindex: {
21792
22009
  description: 'Ensures tabindex attribute values are not greater than 0',
21793
22010
  help: 'Elements should not have tabindex greater than zero'
21794
22011
  },
21795
22012
  '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'
22013
+ description: 'Ensure the <caption> element does not contain the same text as the summary attribute',
22014
+ help: 'tables should not have the same summary and caption'
21798
22015
  },
21799
22016
  'table-fake-caption': {
21800
22017
  description: 'Ensure that tables with a caption use the <caption> element.',
21801
22018
  help: 'Data or header cells must not be used to give caption to a data table.'
21802
22019
  },
21803
22020
  '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'
22021
+ description: 'Ensure that each non-empty data cell in a <table> larger than 3 by 3 has one or more table headers',
22022
+ help: 'Non-empty <td> elements in larger <table> must have an associated table header'
21806
22023
  },
21807
22024
  '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'
22025
+ description: 'Ensure that each cell in a table that uses the headers attribute refers only to other cells in that table',
22026
+ help: 'Table cells that use the headers attribute must only refer to cells in the same table'
21810
22027
  },
21811
22028
  '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'
22029
+ description: 'Ensure that <th> elements and elements with role=columnheader/rowheader have data cells they describe',
22030
+ help: 'Table headers in a data table must refer to data cells'
21814
22031
  },
21815
22032
  'valid-lang': {
21816
22033
  description: 'Ensures lang attributes have valid values',
@@ -21862,7 +22079,8 @@
21862
22079
  pass: 'aria-errormessage exists and references elements visible to screen readers that use a supported aria-errormessage technique',
21863
22080
  fail: {
21864
22081
  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.)'
22082
+ plural: 'aria-errormessage values `${data.values}` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)',
22083
+ hidden: 'aria-errormessage value `${data.values}` cannot reference a hidden element'
21866
22084
  },
21867
22085
  incomplete: {
21868
22086
  singular: 'ensure aria-errormessage value `${data.values}` references an existing element',
@@ -21889,8 +22107,8 @@
21889
22107
  impact: 'serious',
21890
22108
  messages: {
21891
22109
  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}'
22110
+ fail: 'ARIA attribute: ${data.values} is not allowed. Use a different role attribute or element.',
22111
+ incomplete: 'ARIA attribute: ${data.values} is not well supported. Use a different role attribute or element.'
21894
22112
  }
21895
22113
  },
21896
22114
  'aria-required-attr': {
@@ -22154,7 +22372,10 @@
22154
22372
  impact: 'serious',
22155
22373
  messages: {
22156
22374
  pass: 'Element does not have focusable descendants',
22157
- fail: 'Element has focusable descendants',
22375
+ fail: {
22376
+ default: 'Element has focusable descendants',
22377
+ notHidden: 'Using a negative tabindex on an element inside an interactive control does not prevent assistive technologies from focusing the element (even with \'aria-hidden=true\')'
22378
+ },
22158
22379
  incomplete: 'Could not determine if element has descendants'
22159
22380
  }
22160
22381
  },
@@ -22430,7 +22651,8 @@
22430
22651
  impact: 'serious',
22431
22652
  messages: {
22432
22653
  pass: '<p> elements are not styled as headings',
22433
- fail: 'Heading elements should be used instead of styled p elements'
22654
+ fail: 'Heading elements should be used instead of styled <p> elements',
22655
+ incomplete: 'Unable to determine if <p> elements are styled as headings'
22434
22656
  }
22435
22657
  },
22436
22658
  region: {
@@ -22757,7 +22979,12 @@
22757
22979
  tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
22758
22980
  actIds: [ '5c01ea' ],
22759
22981
  all: [],
22760
- any: [ 'aria-allowed-attr' ],
22982
+ any: [ {
22983
+ options: {
22984
+ validTreeRowAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-level' ]
22985
+ },
22986
+ id: 'aria-allowed-attr'
22987
+ } ],
22761
22988
  none: [ 'aria-unsupported-attr', {
22762
22989
  options: {
22763
22990
  elementsAllowedAriaLabel: [ 'applet', 'input' ]
@@ -23002,7 +23229,12 @@
23002
23229
  matches: 'autocomplete-matches',
23003
23230
  tags: [ 'cat.forms', 'wcag21aa', 'wcag135' ],
23004
23231
  actIds: [ '73f2c2' ],
23005
- all: [ 'autocomplete-valid' ],
23232
+ all: [ {
23233
+ options: {
23234
+ stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null' ]
23235
+ },
23236
+ id: 'autocomplete-valid'
23237
+ } ],
23006
23238
  any: [],
23007
23239
  none: []
23008
23240
  }, {
@@ -23297,7 +23529,7 @@
23297
23529
  selector: 'a[href], area[href], [role="link"]',
23298
23530
  excludeHidden: false,
23299
23531
  matches: 'identical-links-same-purpose-matches',
23300
- tags: [ 'cat.semantics', 'wcag2aaa', 'wcag249', 'best-practice' ],
23532
+ tags: [ 'cat.semantics', 'wcag2aaa', 'wcag249' ],
23301
23533
  actIds: [ 'b20e66', 'fd3a94' ],
23302
23534
  all: [ 'identical-links-same-purpose' ],
23303
23535
  any: [],
@@ -23544,7 +23776,7 @@
23544
23776
  id: 'meta-refresh',
23545
23777
  selector: 'meta[http-equiv="refresh"]',
23546
23778
  excludeHidden: false,
23547
- tags: [ 'cat.time-and-media', 'wcag2a', 'wcag2aaa', 'wcag221', 'wcag224', 'wcag325' ],
23779
+ tags: [ 'cat.time-and-media', 'wcag2a', 'wcag221', 'wcag224', 'wcag325' ],
23548
23780
  all: [],
23549
23781
  any: [ 'meta-refresh' ],
23550
23782
  none: []
@@ -23634,7 +23866,9 @@
23634
23866
  size: 1.15
23635
23867
  }, {
23636
23868
  size: 1.4
23637
- } ]
23869
+ } ],
23870
+ passLength: 1,
23871
+ failLength: .5
23638
23872
  },
23639
23873
  id: 'p-as-heading'
23640
23874
  } ],
@@ -23823,7 +24057,10 @@
23823
24057
  evaluate: 'abstractrole-evaluate'
23824
24058
  }, {
23825
24059
  id: 'aria-allowed-attr',
23826
- evaluate: 'aria-allowed-attr-evaluate'
24060
+ evaluate: 'aria-allowed-attr-evaluate',
24061
+ options: {
24062
+ validTreeRowAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-level' ]
24063
+ }
23827
24064
  }, {
23828
24065
  id: 'aria-allowed-role',
23829
24066
  evaluate: 'aria-allowed-role-evaluate',
@@ -23936,7 +24173,10 @@
23936
24173
  deprecated: true
23937
24174
  }, {
23938
24175
  id: 'autocomplete-valid',
23939
- evaluate: 'autocomplete-valid-evaluate'
24176
+ evaluate: 'autocomplete-valid-evaluate',
24177
+ options: {
24178
+ stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null' ]
24179
+ }
23940
24180
  }, {
23941
24181
  id: 'accesskeys',
23942
24182
  evaluate: 'accesskeys-evaluate',
@@ -23961,7 +24201,7 @@
23961
24201
  evaluate: 'focusable-not-tabbable-evaluate'
23962
24202
  }, {
23963
24203
  id: 'frame-focusable-content',
23964
- evaluate: 'no-focusable-content-evaluate'
24204
+ evaluate: 'frame-focusable-content-evaluate'
23965
24205
  }, {
23966
24206
  id: 'landmark-is-top-level',
23967
24207
  evaluate: 'landmark-is-top-level-evaluate'
@@ -24154,7 +24394,9 @@
24154
24394
  size: 1.15
24155
24395
  }, {
24156
24396
  size: 1.4
24157
- } ]
24397
+ } ],
24398
+ passLength: 1,
24399
+ failLength: .5
24158
24400
  }
24159
24401
  }, {
24160
24402
  id: 'region',