axe-core 4.6.1 → 4.6.2-canary.273c971
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 +342 -293
- package/axe.min.js +3 -3
- package/package.json +27 -27
- package/sri-history.json +341 -333
package/axe.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! axe v4.6.
|
|
2
|
-
* Copyright (c)
|
|
1
|
+
/*! axe v4.6.2-canary.273c971
|
|
2
|
+
* Copyright (c) 2023 Deque Systems, Inc.
|
|
3
3
|
*
|
|
4
4
|
* Your use of this Source Code Form is subject to the terms of the Mozilla Public
|
|
5
5
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}, _typeof(obj);
|
|
23
23
|
}
|
|
24
24
|
var axe = axe || {};
|
|
25
|
-
axe.version = '4.6.
|
|
25
|
+
axe.version = '4.6.2-canary.273c971';
|
|
26
26
|
if (typeof define === 'function' && define.amd) {
|
|
27
27
|
define('axe-core', [], function() {
|
|
28
28
|
return axe;
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
|
|
55
55
|
}
|
|
56
56
|
function _defineProperty(obj, key, value) {
|
|
57
|
+
key = _toPropertyKey(key);
|
|
57
58
|
if (key in obj) {
|
|
58
59
|
Object.defineProperty(obj, key, {
|
|
59
60
|
value: value,
|
|
@@ -215,36 +216,34 @@
|
|
|
215
216
|
throw new TypeError('Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
|
216
217
|
}
|
|
217
218
|
function _iterableToArrayLimit(arr, i) {
|
|
218
|
-
var _i =
|
|
219
|
-
if (
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
var _arr = [];
|
|
223
|
-
var _n = true;
|
|
224
|
-
var _d = false;
|
|
225
|
-
var _s, _e;
|
|
226
|
-
try {
|
|
227
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
228
|
-
_arr.push(_s.value);
|
|
229
|
-
if (i && _arr.length === i) {
|
|
230
|
-
break;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
} catch (err) {
|
|
234
|
-
_d = true;
|
|
235
|
-
_e = err;
|
|
236
|
-
} finally {
|
|
219
|
+
var _i = null == arr ? null : 'undefined' != typeof Symbol && arr[Symbol.iterator] || arr['@@iterator'];
|
|
220
|
+
if (null != _i) {
|
|
221
|
+
var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1;
|
|
237
222
|
try {
|
|
238
|
-
if (
|
|
239
|
-
_i
|
|
223
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
224
|
+
if (Object(_i) !== _i) {
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
_n = !1;
|
|
228
|
+
} else {
|
|
229
|
+
for (;!(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
|
|
230
|
+
}
|
|
240
231
|
}
|
|
232
|
+
} catch (err) {
|
|
233
|
+
_d = !0, _e = err;
|
|
241
234
|
} finally {
|
|
242
|
-
|
|
243
|
-
|
|
235
|
+
try {
|
|
236
|
+
if (!_n && null != _i['return'] && (_r = _i['return'](), Object(_r) !== _r)) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
} finally {
|
|
240
|
+
if (_d) {
|
|
241
|
+
throw _e;
|
|
242
|
+
}
|
|
244
243
|
}
|
|
245
244
|
}
|
|
245
|
+
return _arr;
|
|
246
246
|
}
|
|
247
|
-
return _arr;
|
|
248
247
|
}
|
|
249
248
|
function _arrayWithHoles(arr) {
|
|
250
249
|
if (Array.isArray(arr)) {
|
|
@@ -264,7 +263,7 @@
|
|
|
264
263
|
if ('value' in descriptor) {
|
|
265
264
|
descriptor.writable = true;
|
|
266
265
|
}
|
|
267
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
266
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
268
267
|
}
|
|
269
268
|
}
|
|
270
269
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
@@ -279,6 +278,24 @@
|
|
|
279
278
|
});
|
|
280
279
|
return Constructor;
|
|
281
280
|
}
|
|
281
|
+
function _toPropertyKey(arg) {
|
|
282
|
+
var key = _toPrimitive(arg, 'string');
|
|
283
|
+
return _typeof(key) === 'symbol' ? key : String(key);
|
|
284
|
+
}
|
|
285
|
+
function _toPrimitive(input, hint) {
|
|
286
|
+
if (_typeof(input) !== 'object' || input === null) {
|
|
287
|
+
return input;
|
|
288
|
+
}
|
|
289
|
+
var prim = input[Symbol.toPrimitive];
|
|
290
|
+
if (prim !== undefined) {
|
|
291
|
+
var res = prim.call(input, hint || 'default');
|
|
292
|
+
if (_typeof(res) !== 'object') {
|
|
293
|
+
return res;
|
|
294
|
+
}
|
|
295
|
+
throw new TypeError('@@toPrimitive must return a primitive value.');
|
|
296
|
+
}
|
|
297
|
+
return (hint === 'string' ? String : Number)(input);
|
|
298
|
+
}
|
|
282
299
|
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
283
300
|
var it = typeof Symbol !== 'undefined' && o[Symbol.iterator] || o['@@iterator'];
|
|
284
301
|
if (!it) {
|
|
@@ -4218,10 +4235,10 @@
|
|
|
4218
4235
|
});
|
|
4219
4236
|
});
|
|
4220
4237
|
var require_typedarray = __commonJS(function(exports) {
|
|
4221
|
-
var undefined2 = void 0;
|
|
4222
4238
|
var MAX_ARRAY_LENGTH = 1e5;
|
|
4223
4239
|
var ECMAScript = function() {
|
|
4224
|
-
var opts = Object.prototype.toString
|
|
4240
|
+
var opts = Object.prototype.toString;
|
|
4241
|
+
var ophop = Object.prototype.hasOwnProperty;
|
|
4225
4242
|
return {
|
|
4226
4243
|
Class: function Class(v) {
|
|
4227
4244
|
return opts.call(v).replace(/^\[object *|\]$/g, '');
|
|
@@ -4250,19 +4267,21 @@
|
|
|
4250
4267
|
var min = Math.min;
|
|
4251
4268
|
var pow = Math.pow;
|
|
4252
4269
|
var round = Math.round;
|
|
4253
|
-
function
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4270
|
+
function clamp2(v, minimum, max) {
|
|
4271
|
+
return v < minimum ? minimum : v > max ? max : v;
|
|
4272
|
+
}
|
|
4273
|
+
var getOwnPropNames = Object.getOwnPropertyNames || function(o) {
|
|
4274
|
+
if (o !== Object(o)) {
|
|
4275
|
+
throw new TypeError('Object.getOwnPropertyNames called on non-object');
|
|
4276
|
+
}
|
|
4277
|
+
var props = [], p;
|
|
4278
|
+
for (p in o) {
|
|
4279
|
+
if (ECMAScript.HasOwnProperty(o, p)) {
|
|
4280
|
+
props.push(p);
|
|
4263
4281
|
}
|
|
4264
4282
|
}
|
|
4265
|
-
|
|
4283
|
+
return props;
|
|
4284
|
+
};
|
|
4266
4285
|
var defineProp;
|
|
4267
4286
|
if (Object.defineProperty && function() {
|
|
4268
4287
|
try {
|
|
@@ -4290,18 +4309,19 @@
|
|
|
4290
4309
|
return o;
|
|
4291
4310
|
};
|
|
4292
4311
|
}
|
|
4293
|
-
|
|
4294
|
-
if (
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4312
|
+
function configureProperties(obj) {
|
|
4313
|
+
if (getOwnPropNames && defineProp) {
|
|
4314
|
+
var props = getOwnPropNames(obj), i;
|
|
4315
|
+
for (i = 0; i < props.length; i += 1) {
|
|
4316
|
+
defineProp(obj, props[i], {
|
|
4317
|
+
value: obj[props[i]],
|
|
4318
|
+
writable: false,
|
|
4319
|
+
enumerable: false,
|
|
4320
|
+
configurable: false
|
|
4321
|
+
});
|
|
4301
4322
|
}
|
|
4302
4323
|
}
|
|
4303
|
-
|
|
4304
|
-
};
|
|
4324
|
+
}
|
|
4305
4325
|
function makeArrayAccessors(obj) {
|
|
4306
4326
|
if (!defineProp) {
|
|
4307
4327
|
return;
|
|
@@ -4375,13 +4395,15 @@
|
|
|
4375
4395
|
return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32);
|
|
4376
4396
|
}
|
|
4377
4397
|
function packIEEE754(v, ebits, fbits) {
|
|
4378
|
-
var bias = (1 << ebits - 1) - 1
|
|
4398
|
+
var bias = (1 << ebits - 1) - 1;
|
|
4399
|
+
var s, e, f, i, bits, str, bytes;
|
|
4379
4400
|
function roundToEven(n) {
|
|
4380
|
-
var w = floor(n)
|
|
4381
|
-
|
|
4401
|
+
var w = floor(n);
|
|
4402
|
+
var fl = n - w;
|
|
4403
|
+
if (fl < .5) {
|
|
4382
4404
|
return w;
|
|
4383
4405
|
}
|
|
4384
|
-
if (
|
|
4406
|
+
if (fl > .5) {
|
|
4385
4407
|
return w + 1;
|
|
4386
4408
|
}
|
|
4387
4409
|
return w % 2 ? w + 1 : w;
|
|
@@ -4455,14 +4477,13 @@
|
|
|
4455
4477
|
e = parseInt(str.substring(1, 1 + ebits), 2);
|
|
4456
4478
|
f = parseInt(str.substring(1 + ebits), 2);
|
|
4457
4479
|
if (e === (1 << ebits) - 1) {
|
|
4458
|
-
return f
|
|
4480
|
+
return f === 0 ? s * Infinity : NaN;
|
|
4459
4481
|
} else if (e > 0) {
|
|
4460
4482
|
return s * pow(2, e - bias) * (1 + f / pow(2, fbits));
|
|
4461
4483
|
} else if (f !== 0) {
|
|
4462
4484
|
return s * pow(2, -(bias - 1)) * (f / pow(2, fbits));
|
|
4463
|
-
} else {
|
|
4464
|
-
return s < 0 ? -0 : 0;
|
|
4465
4485
|
}
|
|
4486
|
+
return s < 0 ? -0 : 0;
|
|
4466
4487
|
}
|
|
4467
4488
|
function unpackF64(b) {
|
|
4468
4489
|
return unpackIEEE754(b, 11, 52);
|
|
@@ -4477,7 +4498,7 @@
|
|
|
4477
4498
|
return packIEEE754(v, 8, 23);
|
|
4478
4499
|
}
|
|
4479
4500
|
(function() {
|
|
4480
|
-
|
|
4501
|
+
function ArrayBuffer(length) {
|
|
4481
4502
|
length = ECMAScript.ToInt32(length);
|
|
4482
4503
|
if (length < 0) {
|
|
4483
4504
|
throw new RangeError('ArrayBuffer size is not a small enough positive integer');
|
|
@@ -4490,9 +4511,9 @@
|
|
|
4490
4511
|
this._bytes[i] = 0;
|
|
4491
4512
|
}
|
|
4492
4513
|
configureProperties(this);
|
|
4493
|
-
}
|
|
4514
|
+
}
|
|
4494
4515
|
exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer;
|
|
4495
|
-
|
|
4516
|
+
function ArrayBufferView() {}
|
|
4496
4517
|
function makeConstructor(bytesPerElement, pack, unpack) {
|
|
4497
4518
|
var _ctor;
|
|
4498
4519
|
_ctor = function ctor(buffer, byteOffset, length) {
|
|
@@ -4564,10 +4585,10 @@
|
|
|
4564
4585
|
}
|
|
4565
4586
|
index = ECMAScript.ToUint32(index);
|
|
4566
4587
|
if (index >= this.length) {
|
|
4567
|
-
return
|
|
4588
|
+
return void 0;
|
|
4568
4589
|
}
|
|
4569
|
-
var bytes = []
|
|
4570
|
-
for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; i < this.BYTES_PER_ELEMENT; i += 1,
|
|
4590
|
+
var bytes = [];
|
|
4591
|
+
for (var i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; i < this.BYTES_PER_ELEMENT; i += 1,
|
|
4571
4592
|
o += 1) {
|
|
4572
4593
|
bytes.push(this.buffer._bytes[o]);
|
|
4573
4594
|
}
|
|
@@ -4579,13 +4600,14 @@
|
|
|
4579
4600
|
throw new SyntaxError('Not enough arguments');
|
|
4580
4601
|
}
|
|
4581
4602
|
index = ECMAScript.ToUint32(index);
|
|
4582
|
-
if (index
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4603
|
+
if (index < this.length) {
|
|
4604
|
+
var bytes = this._pack(value);
|
|
4605
|
+
var i;
|
|
4606
|
+
var o;
|
|
4607
|
+
for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; i < this.BYTES_PER_ELEMENT; i += 1,
|
|
4608
|
+
o += 1) {
|
|
4609
|
+
this.buffer._bytes[o] = bytes[i];
|
|
4610
|
+
}
|
|
4589
4611
|
}
|
|
4590
4612
|
};
|
|
4591
4613
|
_ctor.prototype.set = function(index, value) {
|
|
@@ -4631,9 +4653,6 @@
|
|
|
4631
4653
|
}
|
|
4632
4654
|
};
|
|
4633
4655
|
_ctor.prototype.subarray = function(start, end) {
|
|
4634
|
-
function clamp2(v, min2, max) {
|
|
4635
|
-
return v < min2 ? min2 : v > max ? max : v;
|
|
4636
|
-
}
|
|
4637
4656
|
start = ECMAScript.ToInt32(start);
|
|
4638
4657
|
end = ECMAScript.ToInt32(end);
|
|
4639
4658
|
if (arguments.length < 1) {
|
|
@@ -4685,7 +4704,7 @@
|
|
|
4685
4704
|
var u16array = new exports.Uint16Array([ 4660 ]), u8array = new exports.Uint8Array(u16array.buffer);
|
|
4686
4705
|
return r(u8array, 0) === 18;
|
|
4687
4706
|
}();
|
|
4688
|
-
|
|
4707
|
+
function DataView(buffer, byteOffset, byteLength) {
|
|
4689
4708
|
if (arguments.length === 0) {
|
|
4690
4709
|
buffer = new exports.ArrayBuffer(0);
|
|
4691
4710
|
} else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) {
|
|
@@ -4705,7 +4724,7 @@
|
|
|
4705
4724
|
throw new RangeError('byteOffset and length reference an area beyond the end of the buffer');
|
|
4706
4725
|
}
|
|
4707
4726
|
configureProperties(this);
|
|
4708
|
-
}
|
|
4727
|
+
}
|
|
4709
4728
|
function makeGetter(arrayType) {
|
|
4710
4729
|
return function(byteOffset, littleEndian) {
|
|
4711
4730
|
byteOffset = ECMAScript.ToUint32(byteOffset);
|
|
@@ -7037,6 +7056,9 @@
|
|
|
7037
7056
|
findUpVirtual: function findUpVirtual() {
|
|
7038
7057
|
return find_up_virtual_default;
|
|
7039
7058
|
},
|
|
7059
|
+
focusDisabled: function focusDisabled() {
|
|
7060
|
+
return focus_disabled_default;
|
|
7061
|
+
},
|
|
7040
7062
|
getComposedParent: function getComposedParent() {
|
|
7041
7063
|
return get_composed_parent_default;
|
|
7042
7064
|
},
|
|
@@ -7106,6 +7128,9 @@
|
|
|
7106
7128
|
isInTextBlock: function isInTextBlock() {
|
|
7107
7129
|
return is_in_text_block_default;
|
|
7108
7130
|
},
|
|
7131
|
+
isInert: function isInert() {
|
|
7132
|
+
return _isInert;
|
|
7133
|
+
},
|
|
7109
7134
|
isModalOpen: function isModalOpen() {
|
|
7110
7135
|
return is_modal_open_default;
|
|
7111
7136
|
},
|
|
@@ -7553,7 +7578,11 @@
|
|
|
7553
7578
|
var node = parentVNode ? treeWalker.nextNode() : treeWalker.currentNode;
|
|
7554
7579
|
while (node) {
|
|
7555
7580
|
var _vNode = get_node_from_tree_default(node);
|
|
7556
|
-
if (
|
|
7581
|
+
if (_vNode && _vNode.parent) {
|
|
7582
|
+
parentVNode = _vNode.parent;
|
|
7583
|
+
} else if (node.assignedSlot) {
|
|
7584
|
+
parentVNode = get_node_from_tree_default(node.assignedSlot);
|
|
7585
|
+
} else if (node.parentElement) {
|
|
7557
7586
|
parentVNode = get_node_from_tree_default(node.parentElement);
|
|
7558
7587
|
} else if (node.parentNode && get_node_from_tree_default(node.parentNode)) {
|
|
7559
7588
|
parentVNode = get_node_from_tree_default(node.parentNode);
|
|
@@ -7815,6 +7844,66 @@
|
|
|
7815
7844
|
}
|
|
7816
7845
|
return hasFixedPosition(vNode.parent);
|
|
7817
7846
|
});
|
|
7847
|
+
function _isInert(vNode) {
|
|
7848
|
+
var _ref17 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, skipAncestors = _ref17.skipAncestors;
|
|
7849
|
+
if (skipAncestors) {
|
|
7850
|
+
return isInertSelf(vNode);
|
|
7851
|
+
}
|
|
7852
|
+
return isInertAncestors(vNode);
|
|
7853
|
+
}
|
|
7854
|
+
var isInertSelf = memoize_default(function isInertSelfMemoized(vNode) {
|
|
7855
|
+
return vNode.hasAttr('inert');
|
|
7856
|
+
});
|
|
7857
|
+
var isInertAncestors = memoize_default(function isInertAncestorsMemoized(vNode) {
|
|
7858
|
+
if (isInertSelf(vNode)) {
|
|
7859
|
+
return true;
|
|
7860
|
+
}
|
|
7861
|
+
if (!vNode.parent) {
|
|
7862
|
+
return false;
|
|
7863
|
+
}
|
|
7864
|
+
return isInertAncestors(vNode.parent);
|
|
7865
|
+
});
|
|
7866
|
+
var allowedDisabledNodeNames = [ 'button', 'command', 'fieldset', 'keygen', 'optgroup', 'option', 'select', 'textarea', 'input' ];
|
|
7867
|
+
function isDisabledAttrAllowed(nodeName2) {
|
|
7868
|
+
return allowedDisabledNodeNames.includes(nodeName2);
|
|
7869
|
+
}
|
|
7870
|
+
function focusDisabled(el) {
|
|
7871
|
+
var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
|
|
7872
|
+
if (isDisabledAttrAllowed(vNode.props.nodeName) && vNode.hasAttr('disabled') || _isInert(vNode)) {
|
|
7873
|
+
return true;
|
|
7874
|
+
}
|
|
7875
|
+
var parentNode = vNode.parent;
|
|
7876
|
+
var ancestors = [];
|
|
7877
|
+
var fieldsetDisabled = false;
|
|
7878
|
+
while (parentNode && parentNode.shadowId === vNode.shadowId && !fieldsetDisabled) {
|
|
7879
|
+
ancestors.push(parentNode);
|
|
7880
|
+
if (parentNode.props.nodeName === 'legend') {
|
|
7881
|
+
break;
|
|
7882
|
+
}
|
|
7883
|
+
if (parentNode._inDisabledFieldset !== void 0) {
|
|
7884
|
+
fieldsetDisabled = parentNode._inDisabledFieldset;
|
|
7885
|
+
break;
|
|
7886
|
+
}
|
|
7887
|
+
if (parentNode.props.nodeName === 'fieldset' && parentNode.hasAttr('disabled')) {
|
|
7888
|
+
fieldsetDisabled = true;
|
|
7889
|
+
}
|
|
7890
|
+
parentNode = parentNode.parent;
|
|
7891
|
+
}
|
|
7892
|
+
ancestors.forEach(function(ancestor) {
|
|
7893
|
+
return ancestor._inDisabledFieldset = fieldsetDisabled;
|
|
7894
|
+
});
|
|
7895
|
+
if (fieldsetDisabled) {
|
|
7896
|
+
return true;
|
|
7897
|
+
}
|
|
7898
|
+
if (vNode.props.nodeName !== 'area') {
|
|
7899
|
+
if (!vNode.actualNode) {
|
|
7900
|
+
return false;
|
|
7901
|
+
}
|
|
7902
|
+
return _isHiddenForEveryone(vNode);
|
|
7903
|
+
}
|
|
7904
|
+
return false;
|
|
7905
|
+
}
|
|
7906
|
+
var focus_disabled_default = focusDisabled;
|
|
7818
7907
|
var angularSkipLinkRegex = /^\/\#/;
|
|
7819
7908
|
var angularRouterLinkRegex = /^#[!/]/;
|
|
7820
7909
|
function _isCurrentPageLink(anchor) {
|
|
@@ -7994,8 +8083,8 @@
|
|
|
7994
8083
|
function getFarthestPoint(rectA, rectB) {
|
|
7995
8084
|
var dimensionProps = [ [ 'x', 'left', 'right', 'width' ], [ 'y', 'top', 'bottom', 'height' ] ];
|
|
7996
8085
|
var farthestPoint = {};
|
|
7997
|
-
dimensionProps.forEach(function(
|
|
7998
|
-
var
|
|
8086
|
+
dimensionProps.forEach(function(_ref18) {
|
|
8087
|
+
var _ref19 = _slicedToArray(_ref18, 4), axis = _ref19[0], start = _ref19[1], end = _ref19[2], diameter = _ref19[3];
|
|
7999
8088
|
if (rectB[start] < rectA[start] && rectB[end] > rectA[end]) {
|
|
8000
8089
|
farthestPoint[axis] = rectA[start] + rectA[diameter] / 2;
|
|
8001
8090
|
return;
|
|
@@ -8011,8 +8100,8 @@
|
|
|
8011
8100
|
});
|
|
8012
8101
|
return farthestPoint;
|
|
8013
8102
|
}
|
|
8014
|
-
function getClosestPoint(
|
|
8015
|
-
var x =
|
|
8103
|
+
function getClosestPoint(_ref20, ownRect, adjacentRect) {
|
|
8104
|
+
var x = _ref20.x, y = _ref20.y;
|
|
8016
8105
|
if (pointInRect({
|
|
8017
8106
|
x: x,
|
|
8018
8107
|
y: y
|
|
@@ -8067,12 +8156,12 @@
|
|
|
8067
8156
|
}
|
|
8068
8157
|
return Math.sqrt(Math.pow(xDistance, 2) + Math.pow(yDistance, 2));
|
|
8069
8158
|
}
|
|
8070
|
-
function pointInRect(
|
|
8071
|
-
var x =
|
|
8159
|
+
function pointInRect(_ref21, rect) {
|
|
8160
|
+
var x = _ref21.x, y = _ref21.y;
|
|
8072
8161
|
return y >= rect.top && x <= rect.right && y <= rect.bottom && x >= rect.left;
|
|
8073
8162
|
}
|
|
8074
|
-
function getCornerInAdjacentRect(
|
|
8075
|
-
var x =
|
|
8163
|
+
function getCornerInAdjacentRect(_ref22, ownRect, adjacentRect) {
|
|
8164
|
+
var x = _ref22.x, y = _ref22.y;
|
|
8076
8165
|
var closestX, closestY;
|
|
8077
8166
|
if (x === ownRect.left && ownRect.right < adjacentRect.right) {
|
|
8078
8167
|
closestX = ownRect.right;
|
|
@@ -8109,8 +8198,8 @@
|
|
|
8109
8198
|
};
|
|
8110
8199
|
}
|
|
8111
8200
|
}
|
|
8112
|
-
function _getRectCenter(
|
|
8113
|
-
var left =
|
|
8201
|
+
function _getRectCenter(_ref23) {
|
|
8202
|
+
var left = _ref23.left, top = _ref23.top, width = _ref23.width, height = _ref23.height;
|
|
8114
8203
|
return new window.DOMPoint(left + width / 2, top + height / 2);
|
|
8115
8204
|
}
|
|
8116
8205
|
function _hasVisualOverlap(vNodeA, vNodeB) {
|
|
@@ -10272,7 +10361,7 @@
|
|
|
10272
10361
|
}
|
|
10273
10362
|
var is_unsupported_role_default = isUnsupportedRole;
|
|
10274
10363
|
function isValidRole(role) {
|
|
10275
|
-
var
|
|
10364
|
+
var _ref24 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, allowAbstract = _ref24.allowAbstract, _ref24$flagUnsupporte = _ref24.flagUnsupported, flagUnsupported = _ref24$flagUnsupporte === void 0 ? false : _ref24$flagUnsupporte;
|
|
10276
10365
|
var roleDefinition = standards_default.ariaRoles[role];
|
|
10277
10366
|
var isRoleUnsupported = is_unsupported_role_default(role);
|
|
10278
10367
|
if (!roleDefinition || flagUnsupported && isRoleUnsupported) {
|
|
@@ -10282,7 +10371,7 @@
|
|
|
10282
10371
|
}
|
|
10283
10372
|
var is_valid_role_default = isValidRole;
|
|
10284
10373
|
function getExplicitRole(vNode) {
|
|
10285
|
-
var
|
|
10374
|
+
var _ref25 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, fallback = _ref25.fallback, abstracts = _ref25.abstracts, dpub = _ref25.dpub;
|
|
10286
10375
|
vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
|
|
10287
10376
|
if (vNode.props.nodeType !== 1) {
|
|
10288
10377
|
return null;
|
|
@@ -10420,47 +10509,6 @@
|
|
|
10420
10509
|
return str.replace(/\r\n/g, '\n').replace(/\u00A0/g, ' ').replace(/[\s]{2,}/g, ' ').trim();
|
|
10421
10510
|
}
|
|
10422
10511
|
var sanitize_default = sanitize;
|
|
10423
|
-
var allowedDisabledNodeNames = [ 'button', 'command', 'fieldset', 'keygen', 'optgroup', 'option', 'select', 'textarea', 'input' ];
|
|
10424
|
-
function isDisabledAttrAllowed(nodeName2) {
|
|
10425
|
-
return allowedDisabledNodeNames.includes(nodeName2);
|
|
10426
|
-
}
|
|
10427
|
-
function focusDisabled(el) {
|
|
10428
|
-
var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
|
|
10429
|
-
if (isDisabledAttrAllowed(vNode.props.nodeName) && vNode.hasAttr('disabled')) {
|
|
10430
|
-
return true;
|
|
10431
|
-
}
|
|
10432
|
-
var parentNode = vNode.parent;
|
|
10433
|
-
var ancestors = [];
|
|
10434
|
-
var fieldsetDisabled = false;
|
|
10435
|
-
while (parentNode && parentNode.shadowId === vNode.shadowId && !fieldsetDisabled) {
|
|
10436
|
-
ancestors.push(parentNode);
|
|
10437
|
-
if (parentNode.props.nodeName === 'legend') {
|
|
10438
|
-
break;
|
|
10439
|
-
}
|
|
10440
|
-
if (parentNode._inDisabledFieldset !== void 0) {
|
|
10441
|
-
fieldsetDisabled = parentNode._inDisabledFieldset;
|
|
10442
|
-
break;
|
|
10443
|
-
}
|
|
10444
|
-
if (parentNode.props.nodeName === 'fieldset' && parentNode.hasAttr('disabled')) {
|
|
10445
|
-
fieldsetDisabled = true;
|
|
10446
|
-
}
|
|
10447
|
-
parentNode = parentNode.parent;
|
|
10448
|
-
}
|
|
10449
|
-
ancestors.forEach(function(ancestor) {
|
|
10450
|
-
return ancestor._inDisabledFieldset = fieldsetDisabled;
|
|
10451
|
-
});
|
|
10452
|
-
if (fieldsetDisabled) {
|
|
10453
|
-
return true;
|
|
10454
|
-
}
|
|
10455
|
-
if (vNode.props.nodeName !== 'area') {
|
|
10456
|
-
if (!vNode.actualNode) {
|
|
10457
|
-
return false;
|
|
10458
|
-
}
|
|
10459
|
-
return _isHiddenForEveryone(vNode);
|
|
10460
|
-
}
|
|
10461
|
-
return false;
|
|
10462
|
-
}
|
|
10463
|
-
var focus_disabled_default = focusDisabled;
|
|
10464
10512
|
function isNativelyFocusable(el) {
|
|
10465
10513
|
var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
|
|
10466
10514
|
if (!vNode || focus_disabled_default(vNode)) {
|
|
@@ -10761,7 +10809,7 @@
|
|
|
10761
10809
|
matches_default2.semanticRole = semantic_role_default;
|
|
10762
10810
|
var matches_default3 = matches_default2;
|
|
10763
10811
|
function getElementSpec(vNode) {
|
|
10764
|
-
var
|
|
10812
|
+
var _ref26 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref26$noMatchAccessi = _ref26.noMatchAccessibleName, noMatchAccessibleName = _ref26$noMatchAccessi === void 0 ? false : _ref26$noMatchAccessi;
|
|
10765
10813
|
var standard = standards_default.htmlElms[vNode.props.nodeName];
|
|
10766
10814
|
if (!standard) {
|
|
10767
10815
|
return {};
|
|
@@ -10798,7 +10846,7 @@
|
|
|
10798
10846
|
}
|
|
10799
10847
|
var get_element_spec_default = getElementSpec;
|
|
10800
10848
|
function implicitRole2(node) {
|
|
10801
|
-
var
|
|
10849
|
+
var _ref27 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref27.chromium;
|
|
10802
10850
|
var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
|
|
10803
10851
|
node = vNode.actualNode;
|
|
10804
10852
|
if (!vNode) {
|
|
@@ -10851,8 +10899,8 @@
|
|
|
10851
10899
|
}
|
|
10852
10900
|
return getInheritedRole(vNode.parent, explicitRoleOptions);
|
|
10853
10901
|
}
|
|
10854
|
-
function resolveImplicitRole(vNode,
|
|
10855
|
-
var chromium =
|
|
10902
|
+
function resolveImplicitRole(vNode, _ref28) {
|
|
10903
|
+
var chromium = _ref28.chromium, explicitRoleOptions = _objectWithoutProperties(_ref28, _excluded4);
|
|
10856
10904
|
var implicitRole3 = implicit_role_default(vNode, {
|
|
10857
10905
|
chromium: chromium
|
|
10858
10906
|
});
|
|
@@ -10872,8 +10920,8 @@
|
|
|
10872
10920
|
return hasGlobalAria || _isFocusable(vNode);
|
|
10873
10921
|
}
|
|
10874
10922
|
function resolveRole(node) {
|
|
10875
|
-
var
|
|
10876
|
-
var noImplicit =
|
|
10923
|
+
var _ref29 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
10924
|
+
var noImplicit = _ref29.noImplicit, roleOptions = _objectWithoutProperties(_ref29, _excluded5);
|
|
10877
10925
|
var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
|
|
10878
10926
|
if (vNode.props.nodeType !== 1) {
|
|
10879
10927
|
return null;
|
|
@@ -10891,8 +10939,8 @@
|
|
|
10891
10939
|
return explicitRole2;
|
|
10892
10940
|
}
|
|
10893
10941
|
function getRole(node) {
|
|
10894
|
-
var
|
|
10895
|
-
var noPresentational =
|
|
10942
|
+
var _ref30 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
10943
|
+
var noPresentational = _ref30.noPresentational, options = _objectWithoutProperties(_ref30, _excluded6);
|
|
10896
10944
|
var role = resolveRole(node, options);
|
|
10897
10945
|
if (noPresentational && [ 'presentation', 'none' ].includes(role)) {
|
|
10898
10946
|
return null;
|
|
@@ -10913,7 +10961,7 @@
|
|
|
10913
10961
|
}
|
|
10914
10962
|
var title_text_default = titleText;
|
|
10915
10963
|
function namedFromContents(vNode) {
|
|
10916
|
-
var
|
|
10964
|
+
var _ref31 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref31.strict;
|
|
10917
10965
|
vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
|
|
10918
10966
|
if (vNode.props.nodeType !== 1) {
|
|
10919
10967
|
return false;
|
|
@@ -11038,12 +11086,12 @@
|
|
|
11038
11086
|
button: ''
|
|
11039
11087
|
};
|
|
11040
11088
|
var nativeTextMethods = {
|
|
11041
|
-
valueText: function valueText(
|
|
11042
|
-
var actualNode =
|
|
11089
|
+
valueText: function valueText(_ref32) {
|
|
11090
|
+
var actualNode = _ref32.actualNode;
|
|
11043
11091
|
return actualNode.value || '';
|
|
11044
11092
|
},
|
|
11045
|
-
buttonDefaultText: function buttonDefaultText(
|
|
11046
|
-
var actualNode =
|
|
11093
|
+
buttonDefaultText: function buttonDefaultText(_ref33) {
|
|
11094
|
+
var actualNode = _ref33.actualNode;
|
|
11047
11095
|
return defaultButtonValues[actualNode.type] || '';
|
|
11048
11096
|
},
|
|
11049
11097
|
tableCaptionText: descendantText.bind(null, 'caption'),
|
|
@@ -11063,8 +11111,8 @@
|
|
|
11063
11111
|
function attrText(attr, vNode) {
|
|
11064
11112
|
return vNode.attr(attr) || '';
|
|
11065
11113
|
}
|
|
11066
|
-
function descendantText(nodeName2,
|
|
11067
|
-
var actualNode =
|
|
11114
|
+
function descendantText(nodeName2, _ref34, context) {
|
|
11115
|
+
var actualNode = _ref34.actualNode;
|
|
11068
11116
|
nodeName2 = nodeName2.toLowerCase();
|
|
11069
11117
|
var nodeNames2 = [ nodeName2, actualNode.nodeName.toLowerCase() ].join(',');
|
|
11070
11118
|
var candidate = actualNode.querySelector(nodeNames2);
|
|
@@ -11108,7 +11156,9 @@
|
|
|
11108
11156
|
return isVisibleToScreenReadersVirtual(vNode);
|
|
11109
11157
|
}
|
|
11110
11158
|
var isVisibleToScreenReadersVirtual = memoize_default(function isVisibleToScreenReadersMemoized(vNode, isAncestor) {
|
|
11111
|
-
if (ariaHidden(vNode)
|
|
11159
|
+
if (ariaHidden(vNode) || _isInert(vNode, {
|
|
11160
|
+
skipAncestors: true
|
|
11161
|
+
})) {
|
|
11112
11162
|
return false;
|
|
11113
11163
|
}
|
|
11114
11164
|
if (vNode.actualNode && vNode.props.nodeName === 'area') {
|
|
@@ -11493,7 +11543,7 @@
|
|
|
11493
11543
|
locations: [ 'billing', 'shipping' ]
|
|
11494
11544
|
};
|
|
11495
11545
|
function isValidAutocomplete(autocompleteValue) {
|
|
11496
|
-
var
|
|
11546
|
+
var _ref35 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref35$looseTyped = _ref35.looseTyped, looseTyped = _ref35$looseTyped === void 0 ? false : _ref35$looseTyped, _ref35$stateTerms = _ref35.stateTerms, stateTerms = _ref35$stateTerms === void 0 ? [] : _ref35$stateTerms, _ref35$locations = _ref35.locations, locations = _ref35$locations === void 0 ? [] : _ref35$locations, _ref35$qualifiers = _ref35.qualifiers, qualifiers = _ref35$qualifiers === void 0 ? [] : _ref35$qualifiers, _ref35$standaloneTerm = _ref35.standaloneTerms, standaloneTerms = _ref35$standaloneTerm === void 0 ? [] : _ref35$standaloneTerm, _ref35$qualifiedTerms = _ref35.qualifiedTerms, qualifiedTerms = _ref35$qualifiedTerms === void 0 ? [] : _ref35$qualifiedTerms;
|
|
11497
11547
|
autocompleteValue = autocompleteValue.toLowerCase().trim();
|
|
11498
11548
|
stateTerms = stateTerms.concat(_autocomplete.stateTerms);
|
|
11499
11549
|
if (stateTerms.includes(autocompleteValue) || autocompleteValue === '') {
|
|
@@ -11752,8 +11802,8 @@
|
|
|
11752
11802
|
if (hiddenTextElms.includes(elm.props.nodeName)) {
|
|
11753
11803
|
return false;
|
|
11754
11804
|
}
|
|
11755
|
-
return elm.children.some(function(
|
|
11756
|
-
var props =
|
|
11805
|
+
return elm.children.some(function(_ref36) {
|
|
11806
|
+
var props = _ref36.props;
|
|
11757
11807
|
return props.nodeType === 3 && props.nodeValue.trim();
|
|
11758
11808
|
});
|
|
11759
11809
|
}
|
|
@@ -12065,8 +12115,8 @@
|
|
|
12065
12115
|
}
|
|
12066
12116
|
return parseFloat(value);
|
|
12067
12117
|
}
|
|
12068
|
-
function hslToRgb(
|
|
12069
|
-
var
|
|
12118
|
+
function hslToRgb(_ref37) {
|
|
12119
|
+
var _ref38 = _slicedToArray(_ref37, 4), hue = _ref38[0], saturation = _ref38[1], lightness = _ref38[2], alpha = _ref38[3];
|
|
12070
12120
|
saturation /= 255;
|
|
12071
12121
|
lightness /= 255;
|
|
12072
12122
|
var high = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
@@ -12115,7 +12165,7 @@
|
|
|
12115
12165
|
var colorFnRegex = /^((?:rgb|hsl)a?)\s*\(([^\)]*)\)/i;
|
|
12116
12166
|
this.parseString = function parseString(colorString) {
|
|
12117
12167
|
if (standards_default.cssColors[colorString] || colorString === 'transparent') {
|
|
12118
|
-
var
|
|
12168
|
+
var _ref39 = standards_default.cssColors[colorString] || [ 0, 0, 0 ], _ref40 = _slicedToArray(_ref39, 3), red2 = _ref40[0], green2 = _ref40[1], blue2 = _ref40[2];
|
|
12119
12169
|
this.red = red2;
|
|
12120
12170
|
this.green = green2;
|
|
12121
12171
|
this.blue = blue2;
|
|
@@ -12165,7 +12215,7 @@
|
|
|
12165
12215
|
}
|
|
12166
12216
|
};
|
|
12167
12217
|
this.parseColorFnString = function parseColorFnString(colorString) {
|
|
12168
|
-
var
|
|
12218
|
+
var _ref41 = colorString.match(colorFnRegex) || [], _ref42 = _slicedToArray(_ref41, 3), colorFunc = _ref42[1], colorValStr = _ref42[2];
|
|
12169
12219
|
if (!colorFunc || !colorValStr) {
|
|
12170
12220
|
return;
|
|
12171
12221
|
}
|
|
@@ -12275,8 +12325,8 @@
|
|
|
12275
12325
|
if (!refs || !refs.length) {
|
|
12276
12326
|
return false;
|
|
12277
12327
|
}
|
|
12278
|
-
return refs.some(function(
|
|
12279
|
-
var actualNode =
|
|
12328
|
+
return refs.some(function(_ref43) {
|
|
12329
|
+
var actualNode = _ref43.actualNode;
|
|
12280
12330
|
return isVisible(actualNode, screenReader, recursed);
|
|
12281
12331
|
});
|
|
12282
12332
|
}
|
|
@@ -12288,7 +12338,7 @@
|
|
|
12288
12338
|
var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
|
|
12289
12339
|
el = vNode ? vNode.actualNode : el;
|
|
12290
12340
|
var cacheName = '_isVisible' + (screenReader ? 'ScreenReader' : '');
|
|
12291
|
-
var
|
|
12341
|
+
var _ref44 = (_window$Node2 = window.Node) !== null && _window$Node2 !== void 0 ? _window$Node2 : {}, DOCUMENT_NODE = _ref44.DOCUMENT_NODE, DOCUMENT_FRAGMENT_NODE = _ref44.DOCUMENT_FRAGMENT_NODE;
|
|
12292
12342
|
var nodeType = vNode ? vNode.props.nodeType : el.nodeType;
|
|
12293
12343
|
var nodeName2 = vNode ? vNode.props.nodeName : el.nodeName.toLowerCase();
|
|
12294
12344
|
if (vNode && typeof vNode[cacheName] !== 'undefined') {
|
|
@@ -13099,7 +13149,7 @@
|
|
|
13099
13149
|
return {};
|
|
13100
13150
|
}
|
|
13101
13151
|
var navigator = win.navigator, innerHeight = win.innerHeight, innerWidth = win.innerWidth;
|
|
13102
|
-
var
|
|
13152
|
+
var _ref45 = getOrientation(win) || {}, angle = _ref45.angle, type = _ref45.type;
|
|
13103
13153
|
return {
|
|
13104
13154
|
userAgent: navigator.userAgent,
|
|
13105
13155
|
windowWidth: innerWidth,
|
|
@@ -13108,12 +13158,12 @@
|
|
|
13108
13158
|
orientationType: type
|
|
13109
13159
|
};
|
|
13110
13160
|
}
|
|
13111
|
-
function getOrientation(
|
|
13112
|
-
var screen =
|
|
13161
|
+
function getOrientation(_ref46) {
|
|
13162
|
+
var screen = _ref46.screen;
|
|
13113
13163
|
return screen.orientation || screen.msOrientation || screen.mozOrientation;
|
|
13114
13164
|
}
|
|
13115
|
-
function createFrameContext(frame,
|
|
13116
|
-
var focusable =
|
|
13165
|
+
function createFrameContext(frame, _ref47) {
|
|
13166
|
+
var focusable = _ref47.focusable, page = _ref47.page;
|
|
13117
13167
|
return {
|
|
13118
13168
|
node: frame,
|
|
13119
13169
|
include: [],
|
|
@@ -13352,8 +13402,8 @@
|
|
|
13352
13402
|
}
|
|
13353
13403
|
context.frames.push(createFrameContext(frame, context));
|
|
13354
13404
|
}
|
|
13355
|
-
function isPageContext(
|
|
13356
|
-
var include =
|
|
13405
|
+
function isPageContext(_ref48) {
|
|
13406
|
+
var include = _ref48.include;
|
|
13357
13407
|
return include.length === 1 && include[0].actualNode === document.documentElement;
|
|
13358
13408
|
}
|
|
13359
13409
|
function validateContext(context) {
|
|
@@ -13362,8 +13412,8 @@
|
|
|
13362
13412
|
throw new Error('No elements found for include in ' + env + ' Context');
|
|
13363
13413
|
}
|
|
13364
13414
|
}
|
|
13365
|
-
function getRootNode2(
|
|
13366
|
-
var include =
|
|
13415
|
+
function getRootNode2(_ref49) {
|
|
13416
|
+
var include = _ref49.include, exclude = _ref49.exclude;
|
|
13367
13417
|
var selectors = Array.from(include).concat(Array.from(exclude));
|
|
13368
13418
|
for (var _i13 = 0; _i13 < selectors.length; _i13++) {
|
|
13369
13419
|
var item = selectors[_i13];
|
|
@@ -13382,8 +13432,8 @@
|
|
|
13382
13432
|
return [];
|
|
13383
13433
|
}
|
|
13384
13434
|
var _Context = new Context(context), frames = _Context.frames;
|
|
13385
|
-
return frames.map(function(
|
|
13386
|
-
var node =
|
|
13435
|
+
return frames.map(function(_ref50) {
|
|
13436
|
+
var node = _ref50.node, frameContext = _objectWithoutProperties(_ref50, _excluded7);
|
|
13387
13437
|
frameContext.initiator = false;
|
|
13388
13438
|
var frameSelector = _getAncestry(node);
|
|
13389
13439
|
return {
|
|
@@ -13532,8 +13582,8 @@
|
|
|
13532
13582
|
return !!standards_default.htmlElms[nodeName2];
|
|
13533
13583
|
}
|
|
13534
13584
|
var is_html_element_default = isHtmlElement;
|
|
13535
|
-
function _isNodeInContext(node,
|
|
13536
|
-
var
|
|
13585
|
+
function _isNodeInContext(node, _ref51) {
|
|
13586
|
+
var _ref51$include = _ref51.include, include = _ref51$include === void 0 ? [] : _ref51$include, _ref51$exclude = _ref51.exclude, exclude = _ref51$exclude === void 0 ? [] : _ref51$exclude;
|
|
13537
13587
|
var filterInclude = include.filter(function(candidate) {
|
|
13538
13588
|
return _contains(candidate, node);
|
|
13539
13589
|
});
|
|
@@ -14086,8 +14136,8 @@
|
|
|
14086
14136
|
return matchExpressions(domTree, expressions, filter);
|
|
14087
14137
|
}
|
|
14088
14138
|
var query_selector_all_filter_default = querySelectorAllFilter;
|
|
14089
|
-
function preloadCssom(
|
|
14090
|
-
var
|
|
14139
|
+
function preloadCssom(_ref52) {
|
|
14140
|
+
var _ref52$treeRoot = _ref52.treeRoot, treeRoot = _ref52$treeRoot === void 0 ? axe._tree[0] : _ref52$treeRoot;
|
|
14091
14141
|
var rootNodes = getAllRootNodesInTree(treeRoot);
|
|
14092
14142
|
if (!rootNodes.length) {
|
|
14093
14143
|
return Promise.resolve();
|
|
@@ -14117,8 +14167,8 @@
|
|
|
14117
14167
|
}
|
|
14118
14168
|
function getCssomForAllRootNodes(rootNodes, convertDataToStylesheet) {
|
|
14119
14169
|
var promises = [];
|
|
14120
|
-
rootNodes.forEach(function(
|
|
14121
|
-
var rootNode =
|
|
14170
|
+
rootNodes.forEach(function(_ref53, index) {
|
|
14171
|
+
var rootNode = _ref53.rootNode, shadowId = _ref53.shadowId;
|
|
14122
14172
|
var sheets = getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet);
|
|
14123
14173
|
if (!sheets) {
|
|
14124
14174
|
return Promise.all(promises);
|
|
@@ -14202,10 +14252,10 @@
|
|
|
14202
14252
|
return true;
|
|
14203
14253
|
});
|
|
14204
14254
|
}
|
|
14205
|
-
function preloadMedia(
|
|
14206
|
-
var
|
|
14207
|
-
var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(
|
|
14208
|
-
var actualNode =
|
|
14255
|
+
function preloadMedia(_ref54) {
|
|
14256
|
+
var _ref54$treeRoot = _ref54.treeRoot, treeRoot = _ref54$treeRoot === void 0 ? axe._tree[0] : _ref54$treeRoot;
|
|
14257
|
+
var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(_ref55) {
|
|
14258
|
+
var actualNode = _ref55.actualNode;
|
|
14209
14259
|
if (actualNode.hasAttribute('src')) {
|
|
14210
14260
|
return !!actualNode.getAttribute('src');
|
|
14211
14261
|
}
|
|
@@ -14217,8 +14267,8 @@
|
|
|
14217
14267
|
}
|
|
14218
14268
|
return true;
|
|
14219
14269
|
});
|
|
14220
|
-
return Promise.all(mediaVirtualNodes.map(function(
|
|
14221
|
-
var actualNode =
|
|
14270
|
+
return Promise.all(mediaVirtualNodes.map(function(_ref56) {
|
|
14271
|
+
var actualNode = _ref56.actualNode;
|
|
14222
14272
|
return isMediaElementReady(actualNode);
|
|
14223
14273
|
}));
|
|
14224
14274
|
}
|
|
@@ -14523,8 +14573,8 @@
|
|
|
14523
14573
|
}
|
|
14524
14574
|
}
|
|
14525
14575
|
function setScrollState(scrollState) {
|
|
14526
|
-
scrollState.forEach(function(
|
|
14527
|
-
var elm =
|
|
14576
|
+
scrollState.forEach(function(_ref58) {
|
|
14577
|
+
var elm = _ref58.elm, top = _ref58.top, left = _ref58.left;
|
|
14528
14578
|
return setScroll(elm, top, left);
|
|
14529
14579
|
});
|
|
14530
14580
|
}
|
|
@@ -14552,8 +14602,8 @@
|
|
|
14552
14602
|
}
|
|
14553
14603
|
return selectAllRecursive(selectorArr, doc);
|
|
14554
14604
|
}
|
|
14555
|
-
function selectAllRecursive(
|
|
14556
|
-
var
|
|
14605
|
+
function selectAllRecursive(_ref59, doc) {
|
|
14606
|
+
var _ref60 = _toArray(_ref59), selectorStr = _ref60[0], restSelector = _ref60.slice(1);
|
|
14557
14607
|
var elms = doc.querySelectorAll(selectorStr);
|
|
14558
14608
|
if (restSelector.length === 0) {
|
|
14559
14609
|
return Array.from(elms);
|
|
@@ -14657,9 +14707,9 @@
|
|
|
14657
14707
|
nodeTypeToName[nodeNamesToTypes[nodeName2]] = nodeName2;
|
|
14658
14708
|
});
|
|
14659
14709
|
function normaliseProps(serialNode) {
|
|
14660
|
-
var _serialNode$nodeName,
|
|
14710
|
+
var _serialNode$nodeName, _ref61, _serialNode$nodeType;
|
|
14661
14711
|
var nodeName2 = (_serialNode$nodeName = serialNode.nodeName) !== null && _serialNode$nodeName !== void 0 ? _serialNode$nodeName : nodeTypeToName[serialNode.nodeType];
|
|
14662
|
-
var nodeType = (
|
|
14712
|
+
var nodeType = (_ref61 = (_serialNode$nodeType = serialNode.nodeType) !== null && _serialNode$nodeType !== void 0 ? _serialNode$nodeType : nodeNamesToTypes[serialNode.nodeName]) !== null && _ref61 !== void 0 ? _ref61 : 1;
|
|
14663
14713
|
assert_default(typeof nodeType === 'number', 'nodeType has to be a number, got \''.concat(nodeType, '\''));
|
|
14664
14714
|
assert_default(typeof nodeName2 === 'string', 'nodeName has to be a string, got \''.concat(nodeName2, '\''));
|
|
14665
14715
|
nodeName2 = nodeName2.toLowerCase();
|
|
@@ -14680,8 +14730,8 @@
|
|
|
14680
14730
|
delete props.attributes;
|
|
14681
14731
|
return Object.freeze(props);
|
|
14682
14732
|
}
|
|
14683
|
-
function normaliseAttrs(
|
|
14684
|
-
var
|
|
14733
|
+
function normaliseAttrs(_ref62) {
|
|
14734
|
+
var _ref62$attributes = _ref62.attributes, attributes2 = _ref62$attributes === void 0 ? {} : _ref62$attributes;
|
|
14685
14735
|
var attrMap = {
|
|
14686
14736
|
htmlFor: 'for',
|
|
14687
14737
|
className: 'class'
|
|
@@ -16869,8 +16919,8 @@
|
|
|
16869
16919
|
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' ]
|
|
16870
16920
|
} ];
|
|
16871
16921
|
lookupTable.evaluateRoleForElement = {
|
|
16872
|
-
A: function A(
|
|
16873
|
-
var node =
|
|
16922
|
+
A: function A(_ref63) {
|
|
16923
|
+
var node = _ref63.node, out = _ref63.out;
|
|
16874
16924
|
if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
|
|
16875
16925
|
return true;
|
|
16876
16926
|
}
|
|
@@ -16879,19 +16929,19 @@
|
|
|
16879
16929
|
}
|
|
16880
16930
|
return true;
|
|
16881
16931
|
},
|
|
16882
|
-
AREA: function AREA(
|
|
16883
|
-
var node =
|
|
16932
|
+
AREA: function AREA(_ref64) {
|
|
16933
|
+
var node = _ref64.node;
|
|
16884
16934
|
return !node.href;
|
|
16885
16935
|
},
|
|
16886
|
-
BUTTON: function BUTTON(
|
|
16887
|
-
var node =
|
|
16936
|
+
BUTTON: function BUTTON(_ref65) {
|
|
16937
|
+
var node = _ref65.node, role = _ref65.role, out = _ref65.out;
|
|
16888
16938
|
if (node.getAttribute('type') === 'menu') {
|
|
16889
16939
|
return role === 'menuitem';
|
|
16890
16940
|
}
|
|
16891
16941
|
return out;
|
|
16892
16942
|
},
|
|
16893
|
-
IMG: function IMG(
|
|
16894
|
-
var node =
|
|
16943
|
+
IMG: function IMG(_ref66) {
|
|
16944
|
+
var node = _ref66.node, role = _ref66.role, out = _ref66.out;
|
|
16895
16945
|
switch (node.alt) {
|
|
16896
16946
|
case null:
|
|
16897
16947
|
return out;
|
|
@@ -16903,8 +16953,8 @@
|
|
|
16903
16953
|
return role !== 'presentation' && role !== 'none';
|
|
16904
16954
|
}
|
|
16905
16955
|
},
|
|
16906
|
-
INPUT: function INPUT(
|
|
16907
|
-
var node =
|
|
16956
|
+
INPUT: function INPUT(_ref67) {
|
|
16957
|
+
var node = _ref67.node, role = _ref67.role, out = _ref67.out;
|
|
16908
16958
|
switch (node.type) {
|
|
16909
16959
|
case 'button':
|
|
16910
16960
|
case 'image':
|
|
@@ -16934,32 +16984,32 @@
|
|
|
16934
16984
|
return false;
|
|
16935
16985
|
}
|
|
16936
16986
|
},
|
|
16937
|
-
LI: function LI(
|
|
16938
|
-
var node =
|
|
16987
|
+
LI: function LI(_ref68) {
|
|
16988
|
+
var node = _ref68.node, out = _ref68.out;
|
|
16939
16989
|
var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
|
|
16940
16990
|
if (hasImplicitListitemRole) {
|
|
16941
16991
|
return out;
|
|
16942
16992
|
}
|
|
16943
16993
|
return true;
|
|
16944
16994
|
},
|
|
16945
|
-
MENU: function MENU(
|
|
16946
|
-
var node =
|
|
16995
|
+
MENU: function MENU(_ref69) {
|
|
16996
|
+
var node = _ref69.node;
|
|
16947
16997
|
if (node.getAttribute('type') === 'context') {
|
|
16948
16998
|
return false;
|
|
16949
16999
|
}
|
|
16950
17000
|
return true;
|
|
16951
17001
|
},
|
|
16952
|
-
OPTION: function OPTION(
|
|
16953
|
-
var node =
|
|
17002
|
+
OPTION: function OPTION(_ref70) {
|
|
17003
|
+
var node = _ref70.node;
|
|
16954
17004
|
var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
|
|
16955
17005
|
return !withinOptionList;
|
|
16956
17006
|
},
|
|
16957
|
-
SELECT: function SELECT(
|
|
16958
|
-
var node =
|
|
17007
|
+
SELECT: function SELECT(_ref71) {
|
|
17008
|
+
var node = _ref71.node, role = _ref71.role;
|
|
16959
17009
|
return !node.multiple && node.size <= 1 && role === 'menu';
|
|
16960
17010
|
},
|
|
16961
|
-
SVG: function SVG(
|
|
16962
|
-
var node =
|
|
17011
|
+
SVG: function SVG(_ref72) {
|
|
17012
|
+
var node = _ref72.node, out = _ref72.out;
|
|
16963
17013
|
if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
|
|
16964
17014
|
return true;
|
|
16965
17015
|
}
|
|
@@ -17368,13 +17418,13 @@
|
|
|
17368
17418
|
return true;
|
|
17369
17419
|
}
|
|
17370
17420
|
var ownedRoles = getOwnedRoles(virtualNode, required);
|
|
17371
|
-
var unallowed = ownedRoles.filter(function(
|
|
17372
|
-
var role2 =
|
|
17421
|
+
var unallowed = ownedRoles.filter(function(_ref73) {
|
|
17422
|
+
var role2 = _ref73.role;
|
|
17373
17423
|
return !required.includes(role2);
|
|
17374
17424
|
});
|
|
17375
17425
|
if (unallowed.length) {
|
|
17376
|
-
this.relatedNodes(unallowed.map(function(
|
|
17377
|
-
var ownedElement =
|
|
17426
|
+
this.relatedNodes(unallowed.map(function(_ref74) {
|
|
17427
|
+
var ownedElement = _ref74.ownedElement;
|
|
17378
17428
|
return ownedElement;
|
|
17379
17429
|
}));
|
|
17380
17430
|
this.data({
|
|
@@ -17976,7 +18026,7 @@
|
|
|
17976
18026
|
return true;
|
|
17977
18027
|
}
|
|
17978
18028
|
function getTextShadowColors(node) {
|
|
17979
|
-
var
|
|
18029
|
+
var _ref75 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref75.minRatio, maxRatio = _ref75.maxRatio;
|
|
17980
18030
|
var style = window.getComputedStyle(node);
|
|
17981
18031
|
var textShadow = style.getPropertyValue('text-shadow');
|
|
17982
18032
|
if (textShadow === 'none') {
|
|
@@ -17987,8 +18037,8 @@
|
|
|
17987
18037
|
assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
|
|
17988
18038
|
var shadowColors = [];
|
|
17989
18039
|
var shadows = parseTextShadows(textShadow);
|
|
17990
|
-
shadows.forEach(function(
|
|
17991
|
-
var colorStr =
|
|
18040
|
+
shadows.forEach(function(_ref76) {
|
|
18041
|
+
var colorStr = _ref76.colorStr, pixels = _ref76.pixels;
|
|
17992
18042
|
colorStr = colorStr || style.getPropertyValue('color');
|
|
17993
18043
|
var _pixels = _slicedToArray(pixels, 3), offsetY = _pixels[0], offsetX = _pixels[1], _pixels$ = _pixels[2], blurRadius = _pixels$ === void 0 ? 0 : _pixels$;
|
|
17994
18044
|
if ((!minRatio || blurRadius >= fontSize * minRatio) && (!maxRatio || blurRadius < fontSize * maxRatio)) {
|
|
@@ -18038,8 +18088,8 @@
|
|
|
18038
18088
|
}
|
|
18039
18089
|
return shadows;
|
|
18040
18090
|
}
|
|
18041
|
-
function textShadowColor(
|
|
18042
|
-
var colorStr =
|
|
18091
|
+
function textShadowColor(_ref77) {
|
|
18092
|
+
var colorStr = _ref77.colorStr, offsetX = _ref77.offsetX, offsetY = _ref77.offsetY, blurRadius = _ref77.blurRadius, fontSize = _ref77.fontSize;
|
|
18043
18093
|
if (offsetX > blurRadius || offsetY > blurRadius) {
|
|
18044
18094
|
return new color_default(0, 0, 0, 0);
|
|
18045
18095
|
}
|
|
@@ -18127,16 +18177,15 @@
|
|
|
18127
18177
|
function fullyEncompasses(node, rects) {
|
|
18128
18178
|
rects = Array.isArray(rects) ? rects : [ rects ];
|
|
18129
18179
|
var nodeRect = node.getBoundingClientRect();
|
|
18180
|
+
var right = nodeRect.right, bottom = nodeRect.bottom;
|
|
18130
18181
|
var style = window.getComputedStyle(node);
|
|
18131
18182
|
var overflow = style.getPropertyValue('overflow');
|
|
18132
18183
|
if ([ 'scroll', 'auto' ].includes(overflow) || node instanceof window.HTMLHtmlElement) {
|
|
18133
|
-
nodeRect.
|
|
18134
|
-
nodeRect.
|
|
18135
|
-
nodeRect.right = nodeRect.left + nodeRect.width;
|
|
18136
|
-
nodeRect.bottom = nodeRect.top + nodeRect.height;
|
|
18184
|
+
right = nodeRect.left + node.scrollWidth;
|
|
18185
|
+
bottom = nodeRect.top + node.scrollHeight;
|
|
18137
18186
|
}
|
|
18138
18187
|
return rects.every(function(rect) {
|
|
18139
|
-
return rect.top >= nodeRect.top && rect.bottom <=
|
|
18188
|
+
return rect.top >= nodeRect.top && rect.bottom <= bottom && rect.left >= nodeRect.left && rect.right <= right;
|
|
18140
18189
|
});
|
|
18141
18190
|
}
|
|
18142
18191
|
function normalizeBlendMode(blendmode) {
|
|
@@ -18217,8 +18266,8 @@
|
|
|
18217
18266
|
function getTextColor(nodeStyle) {
|
|
18218
18267
|
return new color_default().parseString(nodeStyle.getPropertyValue('-webkit-text-fill-color') || nodeStyle.getPropertyValue('color'));
|
|
18219
18268
|
}
|
|
18220
|
-
function getStrokeColor(nodeStyle,
|
|
18221
|
-
var
|
|
18269
|
+
function getStrokeColor(nodeStyle, _ref78) {
|
|
18270
|
+
var _ref78$textStrokeEmMi = _ref78.textStrokeEmMin, textStrokeEmMin = _ref78$textStrokeEmMi === void 0 ? 0 : _ref78$textStrokeEmMi;
|
|
18222
18271
|
var strokeWidth = parseFloat(nodeStyle.getPropertyValue('-webkit-text-stroke-width'));
|
|
18223
18272
|
if (strokeWidth === 0) {
|
|
18224
18273
|
return null;
|
|
@@ -18280,7 +18329,7 @@
|
|
|
18280
18329
|
var bold = parseFloat(fontWeight) >= boldValue || fontWeight === 'bold';
|
|
18281
18330
|
var ptSize = Math.ceil(fontSize * 72) / 96;
|
|
18282
18331
|
var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
|
|
18283
|
-
var
|
|
18332
|
+
var _ref79 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref79.expected, minThreshold = _ref79.minThreshold, maxThreshold = _ref79.maxThreshold;
|
|
18284
18333
|
var pseudoElm = findPseudoElement(virtualNode, {
|
|
18285
18334
|
ignorePseudo: ignorePseudo,
|
|
18286
18335
|
pseudoSizeThreshold: pseudoSizeThreshold
|
|
@@ -18359,8 +18408,8 @@
|
|
|
18359
18408
|
}
|
|
18360
18409
|
return isValid;
|
|
18361
18410
|
}
|
|
18362
|
-
function findPseudoElement(vNode,
|
|
18363
|
-
var
|
|
18411
|
+
function findPseudoElement(vNode, _ref80) {
|
|
18412
|
+
var _ref80$pseudoSizeThre = _ref80.pseudoSizeThreshold, pseudoSizeThreshold = _ref80$pseudoSizeThre === void 0 ? .25 : _ref80$pseudoSizeThre, _ref80$ignorePseudo = _ref80.ignorePseudo, ignorePseudo = _ref80$ignorePseudo === void 0 ? false : _ref80$ignorePseudo;
|
|
18364
18413
|
if (ignorePseudo) {
|
|
18365
18414
|
return;
|
|
18366
18415
|
}
|
|
@@ -18402,7 +18451,7 @@
|
|
|
18402
18451
|
}
|
|
18403
18452
|
function parseUnit(str) {
|
|
18404
18453
|
var unitRegex = /^([0-9.]+)([a-z]+)$/i;
|
|
18405
|
-
var
|
|
18454
|
+
var _ref81 = str.match(unitRegex) || [], _ref82 = _slicedToArray(_ref81, 3), _ref82$ = _ref82[1], value = _ref82$ === void 0 ? '' : _ref82$, _ref82$2 = _ref82[2], unit = _ref82$2 === void 0 ? '' : _ref82$2;
|
|
18406
18455
|
return {
|
|
18407
18456
|
value: parseFloat(value),
|
|
18408
18457
|
unit: unit.toLowerCase()
|
|
@@ -18743,8 +18792,8 @@
|
|
|
18743
18792
|
}
|
|
18744
18793
|
var focusable_element_evaluate_default = focusableElementEvaluate;
|
|
18745
18794
|
function focusableModalOpenEvaluate(node, options, virtualNode) {
|
|
18746
|
-
var tabbableElements = virtualNode.tabbableElements.map(function(
|
|
18747
|
-
var actualNode =
|
|
18795
|
+
var tabbableElements = virtualNode.tabbableElements.map(function(_ref83) {
|
|
18796
|
+
var actualNode = _ref83.actualNode;
|
|
18748
18797
|
return actualNode;
|
|
18749
18798
|
});
|
|
18750
18799
|
if (!tabbableElements || !tabbableElements.length) {
|
|
@@ -19225,8 +19274,8 @@
|
|
|
19225
19274
|
this.relatedNodes(relatedNodes);
|
|
19226
19275
|
return true;
|
|
19227
19276
|
}
|
|
19228
|
-
function getInvalidSelector(vChild, nested,
|
|
19229
|
-
var
|
|
19277
|
+
function getInvalidSelector(vChild, nested, _ref84) {
|
|
19278
|
+
var _ref84$validRoles = _ref84.validRoles, validRoles = _ref84$validRoles === void 0 ? [] : _ref84$validRoles, _ref84$validNodeNames = _ref84.validNodeNames, validNodeNames = _ref84$validNodeNames === void 0 ? [] : _ref84$validNodeNames;
|
|
19230
19279
|
var _vChild$props = vChild.props, nodeName2 = _vChild$props.nodeName, nodeType = _vChild$props.nodeType, nodeValue = _vChild$props.nodeValue;
|
|
19231
19280
|
var selector = nested ? 'div > ' : '';
|
|
19232
19281
|
if (nodeType === 3 && nodeValue.trim() !== '') {
|
|
@@ -19459,8 +19508,8 @@
|
|
|
19459
19508
|
}
|
|
19460
19509
|
var no_autoplay_audio_evaluate_default = noAutoplayAudioEvaluate;
|
|
19461
19510
|
function cssOrientationLockEvaluate(node, options, virtualNode, context) {
|
|
19462
|
-
var
|
|
19463
|
-
var
|
|
19511
|
+
var _ref85 = context || {}, _ref85$cssom = _ref85.cssom, cssom = _ref85$cssom === void 0 ? void 0 : _ref85$cssom;
|
|
19512
|
+
var _ref86 = options || {}, _ref86$degreeThreshol = _ref86.degreeThreshold, degreeThreshold = _ref86$degreeThreshol === void 0 ? 0 : _ref86$degreeThreshol;
|
|
19464
19513
|
if (!cssom || !cssom.length) {
|
|
19465
19514
|
return void 0;
|
|
19466
19515
|
}
|
|
@@ -19474,8 +19523,8 @@
|
|
|
19474
19523
|
if (!orientationRules.length) {
|
|
19475
19524
|
return 'continue';
|
|
19476
19525
|
}
|
|
19477
|
-
orientationRules.forEach(function(
|
|
19478
|
-
var cssRules =
|
|
19526
|
+
orientationRules.forEach(function(_ref87) {
|
|
19527
|
+
var cssRules = _ref87.cssRules;
|
|
19479
19528
|
Array.from(cssRules).forEach(function(cssRule) {
|
|
19480
19529
|
var locked = getIsOrientationLocked(cssRule);
|
|
19481
19530
|
if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
|
|
@@ -19500,8 +19549,8 @@
|
|
|
19500
19549
|
}
|
|
19501
19550
|
return false;
|
|
19502
19551
|
function groupCssomByDocument(cssObjectModel) {
|
|
19503
|
-
return cssObjectModel.reduce(function(out,
|
|
19504
|
-
var sheet =
|
|
19552
|
+
return cssObjectModel.reduce(function(out, _ref88) {
|
|
19553
|
+
var sheet = _ref88.sheet, root = _ref88.root, shadowId = _ref88.shadowId;
|
|
19505
19554
|
var key = shadowId ? shadowId : 'topDocument';
|
|
19506
19555
|
if (!out[key]) {
|
|
19507
19556
|
out[key] = {
|
|
@@ -19517,15 +19566,15 @@
|
|
|
19517
19566
|
return out;
|
|
19518
19567
|
}, {});
|
|
19519
19568
|
}
|
|
19520
|
-
function isMediaRuleWithOrientation(
|
|
19521
|
-
var type =
|
|
19569
|
+
function isMediaRuleWithOrientation(_ref89) {
|
|
19570
|
+
var type = _ref89.type, cssText = _ref89.cssText;
|
|
19522
19571
|
if (type !== 4) {
|
|
19523
19572
|
return false;
|
|
19524
19573
|
}
|
|
19525
19574
|
return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
|
|
19526
19575
|
}
|
|
19527
|
-
function getIsOrientationLocked(
|
|
19528
|
-
var selectorText =
|
|
19576
|
+
function getIsOrientationLocked(_ref90) {
|
|
19577
|
+
var selectorText = _ref90.selectorText, style = _ref90.style;
|
|
19529
19578
|
if (!selectorText || style.length <= 0) {
|
|
19530
19579
|
return false;
|
|
19531
19580
|
}
|
|
@@ -19572,7 +19621,7 @@
|
|
|
19572
19621
|
}
|
|
19573
19622
|
}
|
|
19574
19623
|
function getAngleInDegrees(angleWithUnit) {
|
|
19575
|
-
var
|
|
19624
|
+
var _ref91 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref92 = _slicedToArray(_ref91, 1), unit = _ref92[0];
|
|
19576
19625
|
if (!unit) {
|
|
19577
19626
|
return;
|
|
19578
19627
|
}
|
|
@@ -19621,7 +19670,7 @@
|
|
|
19621
19670
|
}
|
|
19622
19671
|
var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
|
|
19623
19672
|
function metaViewportScaleEvaluate(node, options, virtualNode) {
|
|
19624
|
-
var
|
|
19673
|
+
var _ref93 = options || {}, _ref93$scaleMinimum = _ref93.scaleMinimum, scaleMinimum = _ref93$scaleMinimum === void 0 ? 2 : _ref93$scaleMinimum, _ref93$lowerBound = _ref93.lowerBound, lowerBound = _ref93$lowerBound === void 0 ? false : _ref93$lowerBound;
|
|
19625
19674
|
var content = virtualNode.attr('content') || '';
|
|
19626
19675
|
if (!content) {
|
|
19627
19676
|
return true;
|
|
@@ -19696,8 +19745,8 @@
|
|
|
19696
19745
|
});
|
|
19697
19746
|
return true;
|
|
19698
19747
|
}
|
|
19699
|
-
this.relatedNodes(closeNeighbors.map(function(
|
|
19700
|
-
var actualNode =
|
|
19748
|
+
this.relatedNodes(closeNeighbors.map(function(_ref94) {
|
|
19749
|
+
var actualNode = _ref94.actualNode;
|
|
19701
19750
|
return actualNode;
|
|
19702
19751
|
}));
|
|
19703
19752
|
if (!closeNeighbors.some(_isInTabOrder)) {
|
|
@@ -19802,8 +19851,8 @@
|
|
|
19802
19851
|
if (obscuredNodes.length === 0) {
|
|
19803
19852
|
return null;
|
|
19804
19853
|
}
|
|
19805
|
-
var obscuringRects = obscuredNodes.map(function(
|
|
19806
|
-
var rect =
|
|
19854
|
+
var obscuringRects = obscuredNodes.map(function(_ref95) {
|
|
19855
|
+
var rect = _ref95.boundingClientRect;
|
|
19807
19856
|
return rect;
|
|
19808
19857
|
});
|
|
19809
19858
|
var unobscuredRects = _splitRects(nodeRect, obscuringRects);
|
|
@@ -19843,13 +19892,13 @@
|
|
|
19843
19892
|
function isDescendantNotInTabOrder(vAncestor, vNode) {
|
|
19844
19893
|
return vAncestor.actualNode.contains(vNode.actualNode) && !_isInTabOrder(vNode);
|
|
19845
19894
|
}
|
|
19846
|
-
function rectHasMinimumSize(minSize,
|
|
19847
|
-
var width =
|
|
19895
|
+
function rectHasMinimumSize(minSize, _ref96) {
|
|
19896
|
+
var width = _ref96.width, height = _ref96.height;
|
|
19848
19897
|
return width + roundingMargin2 >= minSize && height + roundingMargin2 >= minSize;
|
|
19849
19898
|
}
|
|
19850
19899
|
function mapActualNodes(vNodes) {
|
|
19851
|
-
return vNodes.map(function(
|
|
19852
|
-
var actualNode =
|
|
19900
|
+
return vNodes.map(function(_ref97) {
|
|
19901
|
+
var actualNode = _ref97.actualNode;
|
|
19853
19902
|
return actualNode;
|
|
19854
19903
|
});
|
|
19855
19904
|
}
|
|
@@ -19875,14 +19924,14 @@
|
|
|
19875
19924
|
}
|
|
19876
19925
|
function getHeadingOrder(results) {
|
|
19877
19926
|
results = _toConsumableArray(results);
|
|
19878
|
-
results.sort(function(
|
|
19879
|
-
var nodeA =
|
|
19880
|
-
var nodeB =
|
|
19927
|
+
results.sort(function(_ref98, _ref99) {
|
|
19928
|
+
var nodeA = _ref98.node;
|
|
19929
|
+
var nodeB = _ref99.node;
|
|
19881
19930
|
return nodeA.ancestry.length - nodeB.ancestry.length;
|
|
19882
19931
|
});
|
|
19883
19932
|
var headingOrder = results.reduce(mergeHeadingOrder, []);
|
|
19884
|
-
return headingOrder.filter(function(
|
|
19885
|
-
var level =
|
|
19933
|
+
return headingOrder.filter(function(_ref100) {
|
|
19934
|
+
var level = _ref100.level;
|
|
19886
19935
|
return level !== -1;
|
|
19887
19936
|
});
|
|
19888
19937
|
}
|
|
@@ -19933,7 +19982,7 @@
|
|
|
19933
19982
|
var headingRole = role && role.includes('heading');
|
|
19934
19983
|
var ariaHeadingLevel = vNode.attr('aria-level');
|
|
19935
19984
|
var ariaLevel = parseInt(ariaHeadingLevel, 10);
|
|
19936
|
-
var
|
|
19985
|
+
var _ref101 = vNode.props.nodeName.match(/h(\d)/) || [], _ref102 = _slicedToArray(_ref101, 2), headingLevel = _ref102[1];
|
|
19937
19986
|
if (!headingRole) {
|
|
19938
19987
|
return -1;
|
|
19939
19988
|
}
|
|
@@ -19997,8 +20046,8 @@
|
|
|
19997
20046
|
if (results.length < 2) {
|
|
19998
20047
|
return results;
|
|
19999
20048
|
}
|
|
20000
|
-
var incompleteResults = results.filter(function(
|
|
20001
|
-
var result =
|
|
20049
|
+
var incompleteResults = results.filter(function(_ref103) {
|
|
20050
|
+
var result = _ref103.result;
|
|
20002
20051
|
return result !== void 0;
|
|
20003
20052
|
});
|
|
20004
20053
|
var uniqueResults = [];
|
|
@@ -20010,12 +20059,12 @@
|
|
|
20010
20059
|
if (nameMap[name]) {
|
|
20011
20060
|
return 'continue';
|
|
20012
20061
|
}
|
|
20013
|
-
var sameNameResults = incompleteResults.filter(function(
|
|
20014
|
-
var data2 =
|
|
20062
|
+
var sameNameResults = incompleteResults.filter(function(_ref104, resultNum) {
|
|
20063
|
+
var data2 = _ref104.data;
|
|
20015
20064
|
return data2.name === name && resultNum !== index;
|
|
20016
20065
|
});
|
|
20017
|
-
var isSameUrl = sameNameResults.every(function(
|
|
20018
|
-
var data2 =
|
|
20066
|
+
var isSameUrl = sameNameResults.every(function(_ref105) {
|
|
20067
|
+
var data2 = _ref105.data;
|
|
20019
20068
|
return isIdenticalObject(data2.urlProps, urlProps);
|
|
20020
20069
|
});
|
|
20021
20070
|
if (sameNameResults.length && !isSameUrl) {
|
|
@@ -20434,7 +20483,7 @@
|
|
|
20434
20483
|
var separatorRegex = /[;,\s]/;
|
|
20435
20484
|
var validRedirectNumRegex = /^[0-9.]+$/;
|
|
20436
20485
|
function metaRefreshEvaluate(node, options, virtualNode) {
|
|
20437
|
-
var
|
|
20486
|
+
var _ref106 = options || {}, minDelay = _ref106.minDelay, maxDelay = _ref106.maxDelay;
|
|
20438
20487
|
var content = (virtualNode.attr('content') || '').trim();
|
|
20439
20488
|
var _content$split = content.split(separatorRegex), _content$split2 = _slicedToArray(_content$split, 1), redirectStr = _content$split2[0];
|
|
20440
20489
|
if (!redirectStr.match(validRedirectNumRegex)) {
|
|
@@ -20606,8 +20655,8 @@
|
|
|
20606
20655
|
} else if (node !== document.body && has_content_default(node, true)) {
|
|
20607
20656
|
return [ virtualNode ];
|
|
20608
20657
|
} else {
|
|
20609
|
-
return virtualNode.children.filter(function(
|
|
20610
|
-
var actualNode =
|
|
20658
|
+
return virtualNode.children.filter(function(_ref107) {
|
|
20659
|
+
var actualNode = _ref107.actualNode;
|
|
20611
20660
|
return actualNode.nodeType === 1;
|
|
20612
20661
|
}).map(function(vNode) {
|
|
20613
20662
|
return findRegionlessElms(vNode, options);
|
|
@@ -20760,8 +20809,8 @@
|
|
|
20760
20809
|
}
|
|
20761
20810
|
return false;
|
|
20762
20811
|
}
|
|
20763
|
-
function getNumberValue(domNode,
|
|
20764
|
-
var cssProperty =
|
|
20812
|
+
function getNumberValue(domNode, _ref108) {
|
|
20813
|
+
var cssProperty = _ref108.cssProperty, absoluteValues = _ref108.absoluteValues, normalValue = _ref108.normalValue;
|
|
20765
20814
|
var computedStyle = window.getComputedStyle(domNode);
|
|
20766
20815
|
var cssPropValue = computedStyle.getPropertyValue(cssProperty);
|
|
20767
20816
|
if (cssPropValue === 'normal') {
|
|
@@ -20838,8 +20887,8 @@
|
|
|
20838
20887
|
if (!virtualNode.children) {
|
|
20839
20888
|
return void 0;
|
|
20840
20889
|
}
|
|
20841
|
-
var titleNode = virtualNode.children.find(function(
|
|
20842
|
-
var props =
|
|
20890
|
+
var titleNode = virtualNode.children.find(function(_ref109) {
|
|
20891
|
+
var props = _ref109.props;
|
|
20843
20892
|
return props.nodeName === 'title';
|
|
20844
20893
|
});
|
|
20845
20894
|
if (!titleNode) {
|
|
@@ -21426,7 +21475,7 @@
|
|
|
21426
21475
|
if (!role || [ 'none', 'presentation' ].includes(role)) {
|
|
21427
21476
|
return true;
|
|
21428
21477
|
}
|
|
21429
|
-
var
|
|
21478
|
+
var _ref110 = aria_roles_default[role] || {}, accessibleNameRequired = _ref110.accessibleNameRequired;
|
|
21430
21479
|
if (accessibleNameRequired || _isFocusable(virtualNode)) {
|
|
21431
21480
|
return true;
|
|
21432
21481
|
}
|
|
@@ -22753,8 +22802,8 @@
|
|
|
22753
22802
|
});
|
|
22754
22803
|
};
|
|
22755
22804
|
}
|
|
22756
|
-
function getHelpUrl(
|
|
22757
|
-
var brand =
|
|
22805
|
+
function getHelpUrl(_ref111, ruleId, version) {
|
|
22806
|
+
var brand = _ref111.brand, application = _ref111.application, lang = _ref111.lang;
|
|
22758
22807
|
return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
|
|
22759
22808
|
}
|
|
22760
22809
|
var audit_default = Audit;
|
|
@@ -22970,9 +23019,9 @@
|
|
|
22970
23019
|
toolOptions: options
|
|
22971
23020
|
});
|
|
22972
23021
|
}
|
|
22973
|
-
function normalizeRunParams(
|
|
22974
|
-
var
|
|
22975
|
-
var
|
|
23022
|
+
function normalizeRunParams(_ref112) {
|
|
23023
|
+
var _ref114, _options$reporter, _axe$_audit;
|
|
23024
|
+
var _ref113 = _slicedToArray(_ref112, 3), context = _ref113[0], options = _ref113[1], callback = _ref113[2];
|
|
22976
23025
|
var typeErr = new TypeError('axe.run arguments are invalid');
|
|
22977
23026
|
if (!isContextSpec(context)) {
|
|
22978
23027
|
if (callback !== void 0) {
|
|
@@ -22993,7 +23042,7 @@
|
|
|
22993
23042
|
throw typeErr;
|
|
22994
23043
|
}
|
|
22995
23044
|
options = clone_default(options);
|
|
22996
|
-
options.reporter = (
|
|
23045
|
+
options.reporter = (_ref114 = (_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 && _ref114 !== void 0 ? _ref114 : 'v1';
|
|
22997
23046
|
return {
|
|
22998
23047
|
context: context,
|
|
22999
23048
|
options: options,
|
|
@@ -23098,14 +23147,14 @@
|
|
|
23098
23147
|
return new Promise(function(res, rej) {
|
|
23099
23148
|
axe._audit.run(contextObj, options, res, rej);
|
|
23100
23149
|
}).then(function(results) {
|
|
23101
|
-
results = results.map(function(
|
|
23102
|
-
var nodes =
|
|
23150
|
+
results = results.map(function(_ref115) {
|
|
23151
|
+
var nodes = _ref115.nodes, result = _objectWithoutProperties(_ref115, _excluded8);
|
|
23103
23152
|
return _extends({
|
|
23104
23153
|
nodes: nodes.map(serializeNode)
|
|
23105
23154
|
}, result);
|
|
23106
23155
|
});
|
|
23107
|
-
var frames = contextObj.frames.map(function(
|
|
23108
|
-
var node =
|
|
23156
|
+
var frames = contextObj.frames.map(function(_ref116) {
|
|
23157
|
+
var node = _ref116.node;
|
|
23109
23158
|
return new dq_element_default(node, options).toJSON();
|
|
23110
23159
|
});
|
|
23111
23160
|
var environmentData;
|
|
@@ -23125,13 +23174,13 @@
|
|
|
23125
23174
|
return Promise.reject(err2);
|
|
23126
23175
|
});
|
|
23127
23176
|
}
|
|
23128
|
-
function serializeNode(
|
|
23129
|
-
var node =
|
|
23177
|
+
function serializeNode(_ref117) {
|
|
23178
|
+
var node = _ref117.node, nodeResult = _objectWithoutProperties(_ref117, _excluded9);
|
|
23130
23179
|
nodeResult.node = node.toJSON();
|
|
23131
23180
|
for (var _i33 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i33 < _arr2.length; _i33++) {
|
|
23132
23181
|
var type = _arr2[_i33];
|
|
23133
|
-
nodeResult[type] = nodeResult[type].map(function(
|
|
23134
|
-
var relatedNodes =
|
|
23182
|
+
nodeResult[type] = nodeResult[type].map(function(_ref118) {
|
|
23183
|
+
var relatedNodes = _ref118.relatedNodes, checkResult = _objectWithoutProperties(_ref118, _excluded10);
|
|
23135
23184
|
return _extends({}, checkResult, {
|
|
23136
23185
|
relatedNodes: relatedNodes.map(function(node2) {
|
|
23137
23186
|
return node2.toJSON();
|
|
@@ -23142,14 +23191,14 @@
|
|
|
23142
23191
|
return nodeResult;
|
|
23143
23192
|
}
|
|
23144
23193
|
function finishRun(partialResults) {
|
|
23145
|
-
var
|
|
23194
|
+
var _ref120, _options$reporter2, _axe$_audit2;
|
|
23146
23195
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
23147
23196
|
options = clone_default(options);
|
|
23148
|
-
var
|
|
23197
|
+
var _ref119 = partialResults.find(function(r) {
|
|
23149
23198
|
return r.environmentData;
|
|
23150
|
-
}) || {}, environmentData =
|
|
23199
|
+
}) || {}, environmentData = _ref119.environmentData;
|
|
23151
23200
|
axe._audit.normalizeOptions(options);
|
|
23152
|
-
options.reporter = (
|
|
23201
|
+
options.reporter = (_ref120 = (_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 && _ref120 !== void 0 ? _ref120 : 'v1';
|
|
23153
23202
|
setFrameSpec(partialResults);
|
|
23154
23203
|
var results = merge_results_default(partialResults);
|
|
23155
23204
|
results = axe._audit.after(results, options);
|
|
@@ -23179,8 +23228,8 @@
|
|
|
23179
23228
|
_iterator12.f();
|
|
23180
23229
|
}
|
|
23181
23230
|
}
|
|
23182
|
-
function getMergedFrameSpecs(
|
|
23183
|
-
var childFrameSpecs =
|
|
23231
|
+
function getMergedFrameSpecs(_ref121) {
|
|
23232
|
+
var childFrameSpecs = _ref121.frames, parentFrameSpec = _ref121.frameSpec;
|
|
23184
23233
|
if (!parentFrameSpec) {
|
|
23185
23234
|
return childFrameSpecs;
|
|
23186
23235
|
}
|
|
@@ -23243,9 +23292,9 @@
|
|
|
23243
23292
|
for (var _i34 = 0, _types = types; _i34 < _types.length; _i34++) {
|
|
23244
23293
|
var type = _types[_i34];
|
|
23245
23294
|
if (transformedResult[type] && Array.isArray(transformedResult[type])) {
|
|
23246
|
-
transformedResult[type] = transformedResult[type].map(function(
|
|
23295
|
+
transformedResult[type] = transformedResult[type].map(function(_ref122) {
|
|
23247
23296
|
var _node;
|
|
23248
|
-
var node =
|
|
23297
|
+
var node = _ref122.node, typeResult = _objectWithoutProperties(_ref122, _excluded13);
|
|
23249
23298
|
node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
|
|
23250
23299
|
return _extends({
|
|
23251
23300
|
node: node
|