axe-core 4.6.2 → 4.6.3-canary.4b513d3
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/README.md +1 -1
- package/axe.js +369 -299
- package/axe.min.js +2 -2
- package/package.json +27 -27
- package/sri-history.json +345 -337
package/axe.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! axe v4.6.
|
|
1
|
+
/*! axe v4.6.3-canary.4b513d3
|
|
2
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
|
|
@@ -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.3-canary.4b513d3';
|
|
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) {
|
|
@@ -8830,13 +8919,13 @@
|
|
|
8830
8919
|
},
|
|
8831
8920
|
menu: {
|
|
8832
8921
|
type: 'composite',
|
|
8833
|
-
requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox', 'menu' ],
|
|
8922
|
+
requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox', 'menu', 'separator' ],
|
|
8834
8923
|
allowedAttrs: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
|
|
8835
8924
|
superclassRole: [ 'select' ]
|
|
8836
8925
|
},
|
|
8837
8926
|
menubar: {
|
|
8838
8927
|
type: 'composite',
|
|
8839
|
-
requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox', 'menu' ],
|
|
8928
|
+
requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox', 'menu', 'separator' ],
|
|
8840
8929
|
allowedAttrs: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
|
|
8841
8930
|
superclassRole: [ 'menu' ]
|
|
8842
8931
|
},
|
|
@@ -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 === '') {
|
|
@@ -11504,6 +11554,12 @@
|
|
|
11504
11554
|
standaloneTerms = standaloneTerms.concat(_autocomplete.standaloneTerms);
|
|
11505
11555
|
qualifiedTerms = qualifiedTerms.concat(_autocomplete.qualifiedTerms);
|
|
11506
11556
|
var autocompleteTerms = autocompleteValue.split(/\s+/g);
|
|
11557
|
+
if (autocompleteTerms[autocompleteTerms.length - 1] === 'webauthn') {
|
|
11558
|
+
autocompleteTerms.pop();
|
|
11559
|
+
if (autocompleteTerms.length === 0) {
|
|
11560
|
+
return false;
|
|
11561
|
+
}
|
|
11562
|
+
}
|
|
11507
11563
|
if (!looseTyped) {
|
|
11508
11564
|
if (autocompleteTerms[0].length > 8 && autocompleteTerms[0].substr(0, 8) === 'section-') {
|
|
11509
11565
|
autocompleteTerms.shift();
|
|
@@ -11752,8 +11808,8 @@
|
|
|
11752
11808
|
if (hiddenTextElms.includes(elm.props.nodeName)) {
|
|
11753
11809
|
return false;
|
|
11754
11810
|
}
|
|
11755
|
-
return elm.children.some(function(
|
|
11756
|
-
var props =
|
|
11811
|
+
return elm.children.some(function(_ref36) {
|
|
11812
|
+
var props = _ref36.props;
|
|
11757
11813
|
return props.nodeType === 3 && props.nodeValue.trim();
|
|
11758
11814
|
});
|
|
11759
11815
|
}
|
|
@@ -12065,8 +12121,8 @@
|
|
|
12065
12121
|
}
|
|
12066
12122
|
return parseFloat(value);
|
|
12067
12123
|
}
|
|
12068
|
-
function hslToRgb(
|
|
12069
|
-
var
|
|
12124
|
+
function hslToRgb(_ref37) {
|
|
12125
|
+
var _ref38 = _slicedToArray(_ref37, 4), hue = _ref38[0], saturation = _ref38[1], lightness = _ref38[2], alpha = _ref38[3];
|
|
12070
12126
|
saturation /= 255;
|
|
12071
12127
|
lightness /= 255;
|
|
12072
12128
|
var high = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
@@ -12115,7 +12171,7 @@
|
|
|
12115
12171
|
var colorFnRegex = /^((?:rgb|hsl)a?)\s*\(([^\)]*)\)/i;
|
|
12116
12172
|
this.parseString = function parseString(colorString) {
|
|
12117
12173
|
if (standards_default.cssColors[colorString] || colorString === 'transparent') {
|
|
12118
|
-
var
|
|
12174
|
+
var _ref39 = standards_default.cssColors[colorString] || [ 0, 0, 0 ], _ref40 = _slicedToArray(_ref39, 3), red2 = _ref40[0], green2 = _ref40[1], blue2 = _ref40[2];
|
|
12119
12175
|
this.red = red2;
|
|
12120
12176
|
this.green = green2;
|
|
12121
12177
|
this.blue = blue2;
|
|
@@ -12165,7 +12221,7 @@
|
|
|
12165
12221
|
}
|
|
12166
12222
|
};
|
|
12167
12223
|
this.parseColorFnString = function parseColorFnString(colorString) {
|
|
12168
|
-
var
|
|
12224
|
+
var _ref41 = colorString.match(colorFnRegex) || [], _ref42 = _slicedToArray(_ref41, 3), colorFunc = _ref42[1], colorValStr = _ref42[2];
|
|
12169
12225
|
if (!colorFunc || !colorValStr) {
|
|
12170
12226
|
return;
|
|
12171
12227
|
}
|
|
@@ -12275,8 +12331,8 @@
|
|
|
12275
12331
|
if (!refs || !refs.length) {
|
|
12276
12332
|
return false;
|
|
12277
12333
|
}
|
|
12278
|
-
return refs.some(function(
|
|
12279
|
-
var actualNode =
|
|
12334
|
+
return refs.some(function(_ref43) {
|
|
12335
|
+
var actualNode = _ref43.actualNode;
|
|
12280
12336
|
return isVisible(actualNode, screenReader, recursed);
|
|
12281
12337
|
});
|
|
12282
12338
|
}
|
|
@@ -12288,7 +12344,7 @@
|
|
|
12288
12344
|
var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
|
|
12289
12345
|
el = vNode ? vNode.actualNode : el;
|
|
12290
12346
|
var cacheName = '_isVisible' + (screenReader ? 'ScreenReader' : '');
|
|
12291
|
-
var
|
|
12347
|
+
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
12348
|
var nodeType = vNode ? vNode.props.nodeType : el.nodeType;
|
|
12293
12349
|
var nodeName2 = vNode ? vNode.props.nodeName : el.nodeName.toLowerCase();
|
|
12294
12350
|
if (vNode && typeof vNode[cacheName] !== 'undefined') {
|
|
@@ -13099,7 +13155,7 @@
|
|
|
13099
13155
|
return {};
|
|
13100
13156
|
}
|
|
13101
13157
|
var navigator = win.navigator, innerHeight = win.innerHeight, innerWidth = win.innerWidth;
|
|
13102
|
-
var
|
|
13158
|
+
var _ref45 = getOrientation(win) || {}, angle = _ref45.angle, type = _ref45.type;
|
|
13103
13159
|
return {
|
|
13104
13160
|
userAgent: navigator.userAgent,
|
|
13105
13161
|
windowWidth: innerWidth,
|
|
@@ -13108,12 +13164,12 @@
|
|
|
13108
13164
|
orientationType: type
|
|
13109
13165
|
};
|
|
13110
13166
|
}
|
|
13111
|
-
function getOrientation(
|
|
13112
|
-
var screen =
|
|
13167
|
+
function getOrientation(_ref46) {
|
|
13168
|
+
var screen = _ref46.screen;
|
|
13113
13169
|
return screen.orientation || screen.msOrientation || screen.mozOrientation;
|
|
13114
13170
|
}
|
|
13115
|
-
function createFrameContext(frame,
|
|
13116
|
-
var focusable =
|
|
13171
|
+
function createFrameContext(frame, _ref47) {
|
|
13172
|
+
var focusable = _ref47.focusable, page = _ref47.page;
|
|
13117
13173
|
return {
|
|
13118
13174
|
node: frame,
|
|
13119
13175
|
include: [],
|
|
@@ -13352,8 +13408,8 @@
|
|
|
13352
13408
|
}
|
|
13353
13409
|
context.frames.push(createFrameContext(frame, context));
|
|
13354
13410
|
}
|
|
13355
|
-
function isPageContext(
|
|
13356
|
-
var include =
|
|
13411
|
+
function isPageContext(_ref48) {
|
|
13412
|
+
var include = _ref48.include;
|
|
13357
13413
|
return include.length === 1 && include[0].actualNode === document.documentElement;
|
|
13358
13414
|
}
|
|
13359
13415
|
function validateContext(context) {
|
|
@@ -13362,8 +13418,8 @@
|
|
|
13362
13418
|
throw new Error('No elements found for include in ' + env + ' Context');
|
|
13363
13419
|
}
|
|
13364
13420
|
}
|
|
13365
|
-
function getRootNode2(
|
|
13366
|
-
var include =
|
|
13421
|
+
function getRootNode2(_ref49) {
|
|
13422
|
+
var include = _ref49.include, exclude = _ref49.exclude;
|
|
13367
13423
|
var selectors = Array.from(include).concat(Array.from(exclude));
|
|
13368
13424
|
for (var _i13 = 0; _i13 < selectors.length; _i13++) {
|
|
13369
13425
|
var item = selectors[_i13];
|
|
@@ -13382,8 +13438,8 @@
|
|
|
13382
13438
|
return [];
|
|
13383
13439
|
}
|
|
13384
13440
|
var _Context = new Context(context), frames = _Context.frames;
|
|
13385
|
-
return frames.map(function(
|
|
13386
|
-
var node =
|
|
13441
|
+
return frames.map(function(_ref50) {
|
|
13442
|
+
var node = _ref50.node, frameContext = _objectWithoutProperties(_ref50, _excluded7);
|
|
13387
13443
|
frameContext.initiator = false;
|
|
13388
13444
|
var frameSelector = _getAncestry(node);
|
|
13389
13445
|
return {
|
|
@@ -13532,8 +13588,8 @@
|
|
|
13532
13588
|
return !!standards_default.htmlElms[nodeName2];
|
|
13533
13589
|
}
|
|
13534
13590
|
var is_html_element_default = isHtmlElement;
|
|
13535
|
-
function _isNodeInContext(node,
|
|
13536
|
-
var
|
|
13591
|
+
function _isNodeInContext(node, _ref51) {
|
|
13592
|
+
var _ref51$include = _ref51.include, include = _ref51$include === void 0 ? [] : _ref51$include, _ref51$exclude = _ref51.exclude, exclude = _ref51$exclude === void 0 ? [] : _ref51$exclude;
|
|
13537
13593
|
var filterInclude = include.filter(function(candidate) {
|
|
13538
13594
|
return _contains(candidate, node);
|
|
13539
13595
|
});
|
|
@@ -14086,8 +14142,8 @@
|
|
|
14086
14142
|
return matchExpressions(domTree, expressions, filter);
|
|
14087
14143
|
}
|
|
14088
14144
|
var query_selector_all_filter_default = querySelectorAllFilter;
|
|
14089
|
-
function preloadCssom(
|
|
14090
|
-
var
|
|
14145
|
+
function preloadCssom(_ref52) {
|
|
14146
|
+
var _ref52$treeRoot = _ref52.treeRoot, treeRoot = _ref52$treeRoot === void 0 ? axe._tree[0] : _ref52$treeRoot;
|
|
14091
14147
|
var rootNodes = getAllRootNodesInTree(treeRoot);
|
|
14092
14148
|
if (!rootNodes.length) {
|
|
14093
14149
|
return Promise.resolve();
|
|
@@ -14117,8 +14173,8 @@
|
|
|
14117
14173
|
}
|
|
14118
14174
|
function getCssomForAllRootNodes(rootNodes, convertDataToStylesheet) {
|
|
14119
14175
|
var promises = [];
|
|
14120
|
-
rootNodes.forEach(function(
|
|
14121
|
-
var rootNode =
|
|
14176
|
+
rootNodes.forEach(function(_ref53, index) {
|
|
14177
|
+
var rootNode = _ref53.rootNode, shadowId = _ref53.shadowId;
|
|
14122
14178
|
var sheets = getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet);
|
|
14123
14179
|
if (!sheets) {
|
|
14124
14180
|
return Promise.all(promises);
|
|
@@ -14202,10 +14258,10 @@
|
|
|
14202
14258
|
return true;
|
|
14203
14259
|
});
|
|
14204
14260
|
}
|
|
14205
|
-
function preloadMedia(
|
|
14206
|
-
var
|
|
14207
|
-
var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(
|
|
14208
|
-
var actualNode =
|
|
14261
|
+
function preloadMedia(_ref54) {
|
|
14262
|
+
var _ref54$treeRoot = _ref54.treeRoot, treeRoot = _ref54$treeRoot === void 0 ? axe._tree[0] : _ref54$treeRoot;
|
|
14263
|
+
var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(_ref55) {
|
|
14264
|
+
var actualNode = _ref55.actualNode;
|
|
14209
14265
|
if (actualNode.hasAttribute('src')) {
|
|
14210
14266
|
return !!actualNode.getAttribute('src');
|
|
14211
14267
|
}
|
|
@@ -14217,8 +14273,8 @@
|
|
|
14217
14273
|
}
|
|
14218
14274
|
return true;
|
|
14219
14275
|
});
|
|
14220
|
-
return Promise.all(mediaVirtualNodes.map(function(
|
|
14221
|
-
var actualNode =
|
|
14276
|
+
return Promise.all(mediaVirtualNodes.map(function(_ref56) {
|
|
14277
|
+
var actualNode = _ref56.actualNode;
|
|
14222
14278
|
return isMediaElementReady(actualNode);
|
|
14223
14279
|
}));
|
|
14224
14280
|
}
|
|
@@ -14523,8 +14579,8 @@
|
|
|
14523
14579
|
}
|
|
14524
14580
|
}
|
|
14525
14581
|
function setScrollState(scrollState) {
|
|
14526
|
-
scrollState.forEach(function(
|
|
14527
|
-
var elm =
|
|
14582
|
+
scrollState.forEach(function(_ref58) {
|
|
14583
|
+
var elm = _ref58.elm, top = _ref58.top, left = _ref58.left;
|
|
14528
14584
|
return setScroll(elm, top, left);
|
|
14529
14585
|
});
|
|
14530
14586
|
}
|
|
@@ -14552,8 +14608,8 @@
|
|
|
14552
14608
|
}
|
|
14553
14609
|
return selectAllRecursive(selectorArr, doc);
|
|
14554
14610
|
}
|
|
14555
|
-
function selectAllRecursive(
|
|
14556
|
-
var
|
|
14611
|
+
function selectAllRecursive(_ref59, doc) {
|
|
14612
|
+
var _ref60 = _toArray(_ref59), selectorStr = _ref60[0], restSelector = _ref60.slice(1);
|
|
14557
14613
|
var elms = doc.querySelectorAll(selectorStr);
|
|
14558
14614
|
if (restSelector.length === 0) {
|
|
14559
14615
|
return Array.from(elms);
|
|
@@ -14657,9 +14713,9 @@
|
|
|
14657
14713
|
nodeTypeToName[nodeNamesToTypes[nodeName2]] = nodeName2;
|
|
14658
14714
|
});
|
|
14659
14715
|
function normaliseProps(serialNode) {
|
|
14660
|
-
var _serialNode$nodeName,
|
|
14716
|
+
var _serialNode$nodeName, _ref61, _serialNode$nodeType;
|
|
14661
14717
|
var nodeName2 = (_serialNode$nodeName = serialNode.nodeName) !== null && _serialNode$nodeName !== void 0 ? _serialNode$nodeName : nodeTypeToName[serialNode.nodeType];
|
|
14662
|
-
var nodeType = (
|
|
14718
|
+
var nodeType = (_ref61 = (_serialNode$nodeType = serialNode.nodeType) !== null && _serialNode$nodeType !== void 0 ? _serialNode$nodeType : nodeNamesToTypes[serialNode.nodeName]) !== null && _ref61 !== void 0 ? _ref61 : 1;
|
|
14663
14719
|
assert_default(typeof nodeType === 'number', 'nodeType has to be a number, got \''.concat(nodeType, '\''));
|
|
14664
14720
|
assert_default(typeof nodeName2 === 'string', 'nodeName has to be a string, got \''.concat(nodeName2, '\''));
|
|
14665
14721
|
nodeName2 = nodeName2.toLowerCase();
|
|
@@ -14680,8 +14736,8 @@
|
|
|
14680
14736
|
delete props.attributes;
|
|
14681
14737
|
return Object.freeze(props);
|
|
14682
14738
|
}
|
|
14683
|
-
function normaliseAttrs(
|
|
14684
|
-
var
|
|
14739
|
+
function normaliseAttrs(_ref62) {
|
|
14740
|
+
var _ref62$attributes = _ref62.attributes, attributes2 = _ref62$attributes === void 0 ? {} : _ref62$attributes;
|
|
14685
14741
|
var attrMap = {
|
|
14686
14742
|
htmlFor: 'for',
|
|
14687
14743
|
className: 'class'
|
|
@@ -16869,8 +16925,8 @@
|
|
|
16869
16925
|
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
16926
|
} ];
|
|
16871
16927
|
lookupTable.evaluateRoleForElement = {
|
|
16872
|
-
A: function A(
|
|
16873
|
-
var node =
|
|
16928
|
+
A: function A(_ref63) {
|
|
16929
|
+
var node = _ref63.node, out = _ref63.out;
|
|
16874
16930
|
if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
|
|
16875
16931
|
return true;
|
|
16876
16932
|
}
|
|
@@ -16879,19 +16935,19 @@
|
|
|
16879
16935
|
}
|
|
16880
16936
|
return true;
|
|
16881
16937
|
},
|
|
16882
|
-
AREA: function AREA(
|
|
16883
|
-
var node =
|
|
16938
|
+
AREA: function AREA(_ref64) {
|
|
16939
|
+
var node = _ref64.node;
|
|
16884
16940
|
return !node.href;
|
|
16885
16941
|
},
|
|
16886
|
-
BUTTON: function BUTTON(
|
|
16887
|
-
var node =
|
|
16942
|
+
BUTTON: function BUTTON(_ref65) {
|
|
16943
|
+
var node = _ref65.node, role = _ref65.role, out = _ref65.out;
|
|
16888
16944
|
if (node.getAttribute('type') === 'menu') {
|
|
16889
16945
|
return role === 'menuitem';
|
|
16890
16946
|
}
|
|
16891
16947
|
return out;
|
|
16892
16948
|
},
|
|
16893
|
-
IMG: function IMG(
|
|
16894
|
-
var node =
|
|
16949
|
+
IMG: function IMG(_ref66) {
|
|
16950
|
+
var node = _ref66.node, role = _ref66.role, out = _ref66.out;
|
|
16895
16951
|
switch (node.alt) {
|
|
16896
16952
|
case null:
|
|
16897
16953
|
return out;
|
|
@@ -16903,8 +16959,8 @@
|
|
|
16903
16959
|
return role !== 'presentation' && role !== 'none';
|
|
16904
16960
|
}
|
|
16905
16961
|
},
|
|
16906
|
-
INPUT: function INPUT(
|
|
16907
|
-
var node =
|
|
16962
|
+
INPUT: function INPUT(_ref67) {
|
|
16963
|
+
var node = _ref67.node, role = _ref67.role, out = _ref67.out;
|
|
16908
16964
|
switch (node.type) {
|
|
16909
16965
|
case 'button':
|
|
16910
16966
|
case 'image':
|
|
@@ -16934,32 +16990,32 @@
|
|
|
16934
16990
|
return false;
|
|
16935
16991
|
}
|
|
16936
16992
|
},
|
|
16937
|
-
LI: function LI(
|
|
16938
|
-
var node =
|
|
16993
|
+
LI: function LI(_ref68) {
|
|
16994
|
+
var node = _ref68.node, out = _ref68.out;
|
|
16939
16995
|
var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
|
|
16940
16996
|
if (hasImplicitListitemRole) {
|
|
16941
16997
|
return out;
|
|
16942
16998
|
}
|
|
16943
16999
|
return true;
|
|
16944
17000
|
},
|
|
16945
|
-
MENU: function MENU(
|
|
16946
|
-
var node =
|
|
17001
|
+
MENU: function MENU(_ref69) {
|
|
17002
|
+
var node = _ref69.node;
|
|
16947
17003
|
if (node.getAttribute('type') === 'context') {
|
|
16948
17004
|
return false;
|
|
16949
17005
|
}
|
|
16950
17006
|
return true;
|
|
16951
17007
|
},
|
|
16952
|
-
OPTION: function OPTION(
|
|
16953
|
-
var node =
|
|
17008
|
+
OPTION: function OPTION(_ref70) {
|
|
17009
|
+
var node = _ref70.node;
|
|
16954
17010
|
var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
|
|
16955
17011
|
return !withinOptionList;
|
|
16956
17012
|
},
|
|
16957
|
-
SELECT: function SELECT(
|
|
16958
|
-
var node =
|
|
17013
|
+
SELECT: function SELECT(_ref71) {
|
|
17014
|
+
var node = _ref71.node, role = _ref71.role;
|
|
16959
17015
|
return !node.multiple && node.size <= 1 && role === 'menu';
|
|
16960
17016
|
},
|
|
16961
|
-
SVG: function SVG(
|
|
16962
|
-
var node =
|
|
17017
|
+
SVG: function SVG(_ref72) {
|
|
17018
|
+
var node = _ref72.node, out = _ref72.out;
|
|
16963
17019
|
if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
|
|
16964
17020
|
return true;
|
|
16965
17021
|
}
|
|
@@ -17368,13 +17424,13 @@
|
|
|
17368
17424
|
return true;
|
|
17369
17425
|
}
|
|
17370
17426
|
var ownedRoles = getOwnedRoles(virtualNode, required);
|
|
17371
|
-
var unallowed = ownedRoles.filter(function(
|
|
17372
|
-
var role2 =
|
|
17427
|
+
var unallowed = ownedRoles.filter(function(_ref73) {
|
|
17428
|
+
var role2 = _ref73.role;
|
|
17373
17429
|
return !required.includes(role2);
|
|
17374
17430
|
});
|
|
17375
17431
|
if (unallowed.length) {
|
|
17376
|
-
this.relatedNodes(unallowed.map(function(
|
|
17377
|
-
var ownedElement =
|
|
17432
|
+
this.relatedNodes(unallowed.map(function(_ref74) {
|
|
17433
|
+
var ownedElement = _ref74.ownedElement;
|
|
17378
17434
|
return ownedElement;
|
|
17379
17435
|
}));
|
|
17380
17436
|
this.data({
|
|
@@ -17976,7 +18032,7 @@
|
|
|
17976
18032
|
return true;
|
|
17977
18033
|
}
|
|
17978
18034
|
function getTextShadowColors(node) {
|
|
17979
|
-
var
|
|
18035
|
+
var _ref75 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref75.minRatio, maxRatio = _ref75.maxRatio;
|
|
17980
18036
|
var style = window.getComputedStyle(node);
|
|
17981
18037
|
var textShadow = style.getPropertyValue('text-shadow');
|
|
17982
18038
|
if (textShadow === 'none') {
|
|
@@ -17987,8 +18043,8 @@
|
|
|
17987
18043
|
assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
|
|
17988
18044
|
var shadowColors = [];
|
|
17989
18045
|
var shadows = parseTextShadows(textShadow);
|
|
17990
|
-
shadows.forEach(function(
|
|
17991
|
-
var colorStr =
|
|
18046
|
+
shadows.forEach(function(_ref76) {
|
|
18047
|
+
var colorStr = _ref76.colorStr, pixels = _ref76.pixels;
|
|
17992
18048
|
colorStr = colorStr || style.getPropertyValue('color');
|
|
17993
18049
|
var _pixels = _slicedToArray(pixels, 3), offsetY = _pixels[0], offsetX = _pixels[1], _pixels$ = _pixels[2], blurRadius = _pixels$ === void 0 ? 0 : _pixels$;
|
|
17994
18050
|
if ((!minRatio || blurRadius >= fontSize * minRatio) && (!maxRatio || blurRadius < fontSize * maxRatio)) {
|
|
@@ -18038,8 +18094,8 @@
|
|
|
18038
18094
|
}
|
|
18039
18095
|
return shadows;
|
|
18040
18096
|
}
|
|
18041
|
-
function textShadowColor(
|
|
18042
|
-
var colorStr =
|
|
18097
|
+
function textShadowColor(_ref77) {
|
|
18098
|
+
var colorStr = _ref77.colorStr, offsetX = _ref77.offsetX, offsetY = _ref77.offsetY, blurRadius = _ref77.blurRadius, fontSize = _ref77.fontSize;
|
|
18043
18099
|
if (offsetX > blurRadius || offsetY > blurRadius) {
|
|
18044
18100
|
return new color_default(0, 0, 0, 0);
|
|
18045
18101
|
}
|
|
@@ -18216,8 +18272,8 @@
|
|
|
18216
18272
|
function getTextColor(nodeStyle) {
|
|
18217
18273
|
return new color_default().parseString(nodeStyle.getPropertyValue('-webkit-text-fill-color') || nodeStyle.getPropertyValue('color'));
|
|
18218
18274
|
}
|
|
18219
|
-
function getStrokeColor(nodeStyle,
|
|
18220
|
-
var
|
|
18275
|
+
function getStrokeColor(nodeStyle, _ref78) {
|
|
18276
|
+
var _ref78$textStrokeEmMi = _ref78.textStrokeEmMin, textStrokeEmMin = _ref78$textStrokeEmMi === void 0 ? 0 : _ref78$textStrokeEmMi;
|
|
18221
18277
|
var strokeWidth = parseFloat(nodeStyle.getPropertyValue('-webkit-text-stroke-width'));
|
|
18222
18278
|
if (strokeWidth === 0) {
|
|
18223
18279
|
return null;
|
|
@@ -18279,7 +18335,7 @@
|
|
|
18279
18335
|
var bold = parseFloat(fontWeight) >= boldValue || fontWeight === 'bold';
|
|
18280
18336
|
var ptSize = Math.ceil(fontSize * 72) / 96;
|
|
18281
18337
|
var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
|
|
18282
|
-
var
|
|
18338
|
+
var _ref79 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref79.expected, minThreshold = _ref79.minThreshold, maxThreshold = _ref79.maxThreshold;
|
|
18283
18339
|
var pseudoElm = findPseudoElement(virtualNode, {
|
|
18284
18340
|
ignorePseudo: ignorePseudo,
|
|
18285
18341
|
pseudoSizeThreshold: pseudoSizeThreshold
|
|
@@ -18358,8 +18414,8 @@
|
|
|
18358
18414
|
}
|
|
18359
18415
|
return isValid;
|
|
18360
18416
|
}
|
|
18361
|
-
function findPseudoElement(vNode,
|
|
18362
|
-
var
|
|
18417
|
+
function findPseudoElement(vNode, _ref80) {
|
|
18418
|
+
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;
|
|
18363
18419
|
if (ignorePseudo) {
|
|
18364
18420
|
return;
|
|
18365
18421
|
}
|
|
@@ -18401,7 +18457,7 @@
|
|
|
18401
18457
|
}
|
|
18402
18458
|
function parseUnit(str) {
|
|
18403
18459
|
var unitRegex = /^([0-9.]+)([a-z]+)$/i;
|
|
18404
|
-
var
|
|
18460
|
+
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;
|
|
18405
18461
|
return {
|
|
18406
18462
|
value: parseFloat(value),
|
|
18407
18463
|
unit: unit.toLowerCase()
|
|
@@ -18418,7 +18474,7 @@
|
|
|
18418
18474
|
return blockLike2.indexOf(display) !== -1 || display.substr(0, 6) === 'table-';
|
|
18419
18475
|
}
|
|
18420
18476
|
function linkInTextBlockEvaluate(node, options) {
|
|
18421
|
-
var requiredContrastRatio = options.requiredContrastRatio;
|
|
18477
|
+
var requiredContrastRatio = options.requiredContrastRatio, allowSameColor = options.allowSameColor;
|
|
18422
18478
|
if (isBlock2(node)) {
|
|
18423
18479
|
return false;
|
|
18424
18480
|
}
|
|
@@ -18460,6 +18516,9 @@
|
|
|
18460
18516
|
if (!textContrast) {
|
|
18461
18517
|
return void 0;
|
|
18462
18518
|
}
|
|
18519
|
+
if (allowSameColor && textContrast === 1 && backgroundContrast === 1) {
|
|
18520
|
+
return true;
|
|
18521
|
+
}
|
|
18463
18522
|
if (textContrast === 1 && backgroundContrast > 1) {
|
|
18464
18523
|
this.data({
|
|
18465
18524
|
messageKey: 'bgContrast',
|
|
@@ -18742,8 +18801,8 @@
|
|
|
18742
18801
|
}
|
|
18743
18802
|
var focusable_element_evaluate_default = focusableElementEvaluate;
|
|
18744
18803
|
function focusableModalOpenEvaluate(node, options, virtualNode) {
|
|
18745
|
-
var tabbableElements = virtualNode.tabbableElements.map(function(
|
|
18746
|
-
var actualNode =
|
|
18804
|
+
var tabbableElements = virtualNode.tabbableElements.map(function(_ref83) {
|
|
18805
|
+
var actualNode = _ref83.actualNode;
|
|
18747
18806
|
return actualNode;
|
|
18748
18807
|
});
|
|
18749
18808
|
if (!tabbableElements || !tabbableElements.length) {
|
|
@@ -19224,8 +19283,8 @@
|
|
|
19224
19283
|
this.relatedNodes(relatedNodes);
|
|
19225
19284
|
return true;
|
|
19226
19285
|
}
|
|
19227
|
-
function getInvalidSelector(vChild, nested,
|
|
19228
|
-
var
|
|
19286
|
+
function getInvalidSelector(vChild, nested, _ref84) {
|
|
19287
|
+
var _ref84$validRoles = _ref84.validRoles, validRoles = _ref84$validRoles === void 0 ? [] : _ref84$validRoles, _ref84$validNodeNames = _ref84.validNodeNames, validNodeNames = _ref84$validNodeNames === void 0 ? [] : _ref84$validNodeNames;
|
|
19229
19288
|
var _vChild$props = vChild.props, nodeName2 = _vChild$props.nodeName, nodeType = _vChild$props.nodeType, nodeValue = _vChild$props.nodeValue;
|
|
19230
19289
|
var selector = nested ? 'div > ' : '';
|
|
19231
19290
|
if (nodeType === 3 && nodeValue.trim() !== '') {
|
|
@@ -19458,8 +19517,8 @@
|
|
|
19458
19517
|
}
|
|
19459
19518
|
var no_autoplay_audio_evaluate_default = noAutoplayAudioEvaluate;
|
|
19460
19519
|
function cssOrientationLockEvaluate(node, options, virtualNode, context) {
|
|
19461
|
-
var
|
|
19462
|
-
var
|
|
19520
|
+
var _ref85 = context || {}, _ref85$cssom = _ref85.cssom, cssom = _ref85$cssom === void 0 ? void 0 : _ref85$cssom;
|
|
19521
|
+
var _ref86 = options || {}, _ref86$degreeThreshol = _ref86.degreeThreshold, degreeThreshold = _ref86$degreeThreshol === void 0 ? 0 : _ref86$degreeThreshol;
|
|
19463
19522
|
if (!cssom || !cssom.length) {
|
|
19464
19523
|
return void 0;
|
|
19465
19524
|
}
|
|
@@ -19473,8 +19532,8 @@
|
|
|
19473
19532
|
if (!orientationRules.length) {
|
|
19474
19533
|
return 'continue';
|
|
19475
19534
|
}
|
|
19476
|
-
orientationRules.forEach(function(
|
|
19477
|
-
var cssRules =
|
|
19535
|
+
orientationRules.forEach(function(_ref87) {
|
|
19536
|
+
var cssRules = _ref87.cssRules;
|
|
19478
19537
|
Array.from(cssRules).forEach(function(cssRule) {
|
|
19479
19538
|
var locked = getIsOrientationLocked(cssRule);
|
|
19480
19539
|
if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
|
|
@@ -19499,8 +19558,8 @@
|
|
|
19499
19558
|
}
|
|
19500
19559
|
return false;
|
|
19501
19560
|
function groupCssomByDocument(cssObjectModel) {
|
|
19502
|
-
return cssObjectModel.reduce(function(out,
|
|
19503
|
-
var sheet =
|
|
19561
|
+
return cssObjectModel.reduce(function(out, _ref88) {
|
|
19562
|
+
var sheet = _ref88.sheet, root = _ref88.root, shadowId = _ref88.shadowId;
|
|
19504
19563
|
var key = shadowId ? shadowId : 'topDocument';
|
|
19505
19564
|
if (!out[key]) {
|
|
19506
19565
|
out[key] = {
|
|
@@ -19516,15 +19575,15 @@
|
|
|
19516
19575
|
return out;
|
|
19517
19576
|
}, {});
|
|
19518
19577
|
}
|
|
19519
|
-
function isMediaRuleWithOrientation(
|
|
19520
|
-
var type =
|
|
19578
|
+
function isMediaRuleWithOrientation(_ref89) {
|
|
19579
|
+
var type = _ref89.type, cssText = _ref89.cssText;
|
|
19521
19580
|
if (type !== 4) {
|
|
19522
19581
|
return false;
|
|
19523
19582
|
}
|
|
19524
19583
|
return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
|
|
19525
19584
|
}
|
|
19526
|
-
function getIsOrientationLocked(
|
|
19527
|
-
var selectorText =
|
|
19585
|
+
function getIsOrientationLocked(_ref90) {
|
|
19586
|
+
var selectorText = _ref90.selectorText, style = _ref90.style;
|
|
19528
19587
|
if (!selectorText || style.length <= 0) {
|
|
19529
19588
|
return false;
|
|
19530
19589
|
}
|
|
@@ -19571,7 +19630,7 @@
|
|
|
19571
19630
|
}
|
|
19572
19631
|
}
|
|
19573
19632
|
function getAngleInDegrees(angleWithUnit) {
|
|
19574
|
-
var
|
|
19633
|
+
var _ref91 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref92 = _slicedToArray(_ref91, 1), unit = _ref92[0];
|
|
19575
19634
|
if (!unit) {
|
|
19576
19635
|
return;
|
|
19577
19636
|
}
|
|
@@ -19620,7 +19679,7 @@
|
|
|
19620
19679
|
}
|
|
19621
19680
|
var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
|
|
19622
19681
|
function metaViewportScaleEvaluate(node, options, virtualNode) {
|
|
19623
|
-
var
|
|
19682
|
+
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;
|
|
19624
19683
|
var content = virtualNode.attr('content') || '';
|
|
19625
19684
|
if (!content) {
|
|
19626
19685
|
return true;
|
|
@@ -19695,8 +19754,8 @@
|
|
|
19695
19754
|
});
|
|
19696
19755
|
return true;
|
|
19697
19756
|
}
|
|
19698
|
-
this.relatedNodes(closeNeighbors.map(function(
|
|
19699
|
-
var actualNode =
|
|
19757
|
+
this.relatedNodes(closeNeighbors.map(function(_ref94) {
|
|
19758
|
+
var actualNode = _ref94.actualNode;
|
|
19700
19759
|
return actualNode;
|
|
19701
19760
|
}));
|
|
19702
19761
|
if (!closeNeighbors.some(_isInTabOrder)) {
|
|
@@ -19801,8 +19860,8 @@
|
|
|
19801
19860
|
if (obscuredNodes.length === 0) {
|
|
19802
19861
|
return null;
|
|
19803
19862
|
}
|
|
19804
|
-
var obscuringRects = obscuredNodes.map(function(
|
|
19805
|
-
var rect =
|
|
19863
|
+
var obscuringRects = obscuredNodes.map(function(_ref95) {
|
|
19864
|
+
var rect = _ref95.boundingClientRect;
|
|
19806
19865
|
return rect;
|
|
19807
19866
|
});
|
|
19808
19867
|
var unobscuredRects = _splitRects(nodeRect, obscuringRects);
|
|
@@ -19842,13 +19901,13 @@
|
|
|
19842
19901
|
function isDescendantNotInTabOrder(vAncestor, vNode) {
|
|
19843
19902
|
return vAncestor.actualNode.contains(vNode.actualNode) && !_isInTabOrder(vNode);
|
|
19844
19903
|
}
|
|
19845
|
-
function rectHasMinimumSize(minSize,
|
|
19846
|
-
var width =
|
|
19904
|
+
function rectHasMinimumSize(minSize, _ref96) {
|
|
19905
|
+
var width = _ref96.width, height = _ref96.height;
|
|
19847
19906
|
return width + roundingMargin2 >= minSize && height + roundingMargin2 >= minSize;
|
|
19848
19907
|
}
|
|
19849
19908
|
function mapActualNodes(vNodes) {
|
|
19850
|
-
return vNodes.map(function(
|
|
19851
|
-
var actualNode =
|
|
19909
|
+
return vNodes.map(function(_ref97) {
|
|
19910
|
+
var actualNode = _ref97.actualNode;
|
|
19852
19911
|
return actualNode;
|
|
19853
19912
|
});
|
|
19854
19913
|
}
|
|
@@ -19874,14 +19933,14 @@
|
|
|
19874
19933
|
}
|
|
19875
19934
|
function getHeadingOrder(results) {
|
|
19876
19935
|
results = _toConsumableArray(results);
|
|
19877
|
-
results.sort(function(
|
|
19878
|
-
var nodeA =
|
|
19879
|
-
var nodeB =
|
|
19936
|
+
results.sort(function(_ref98, _ref99) {
|
|
19937
|
+
var nodeA = _ref98.node;
|
|
19938
|
+
var nodeB = _ref99.node;
|
|
19880
19939
|
return nodeA.ancestry.length - nodeB.ancestry.length;
|
|
19881
19940
|
});
|
|
19882
19941
|
var headingOrder = results.reduce(mergeHeadingOrder, []);
|
|
19883
|
-
return headingOrder.filter(function(
|
|
19884
|
-
var level =
|
|
19942
|
+
return headingOrder.filter(function(_ref100) {
|
|
19943
|
+
var level = _ref100.level;
|
|
19885
19944
|
return level !== -1;
|
|
19886
19945
|
});
|
|
19887
19946
|
}
|
|
@@ -19932,7 +19991,7 @@
|
|
|
19932
19991
|
var headingRole = role && role.includes('heading');
|
|
19933
19992
|
var ariaHeadingLevel = vNode.attr('aria-level');
|
|
19934
19993
|
var ariaLevel = parseInt(ariaHeadingLevel, 10);
|
|
19935
|
-
var
|
|
19994
|
+
var _ref101 = vNode.props.nodeName.match(/h(\d)/) || [], _ref102 = _slicedToArray(_ref101, 2), headingLevel = _ref102[1];
|
|
19936
19995
|
if (!headingRole) {
|
|
19937
19996
|
return -1;
|
|
19938
19997
|
}
|
|
@@ -19996,8 +20055,8 @@
|
|
|
19996
20055
|
if (results.length < 2) {
|
|
19997
20056
|
return results;
|
|
19998
20057
|
}
|
|
19999
|
-
var incompleteResults = results.filter(function(
|
|
20000
|
-
var result =
|
|
20058
|
+
var incompleteResults = results.filter(function(_ref103) {
|
|
20059
|
+
var result = _ref103.result;
|
|
20001
20060
|
return result !== void 0;
|
|
20002
20061
|
});
|
|
20003
20062
|
var uniqueResults = [];
|
|
@@ -20009,12 +20068,12 @@
|
|
|
20009
20068
|
if (nameMap[name]) {
|
|
20010
20069
|
return 'continue';
|
|
20011
20070
|
}
|
|
20012
|
-
var sameNameResults = incompleteResults.filter(function(
|
|
20013
|
-
var data2 =
|
|
20071
|
+
var sameNameResults = incompleteResults.filter(function(_ref104, resultNum) {
|
|
20072
|
+
var data2 = _ref104.data;
|
|
20014
20073
|
return data2.name === name && resultNum !== index;
|
|
20015
20074
|
});
|
|
20016
|
-
var isSameUrl = sameNameResults.every(function(
|
|
20017
|
-
var data2 =
|
|
20075
|
+
var isSameUrl = sameNameResults.every(function(_ref105) {
|
|
20076
|
+
var data2 = _ref105.data;
|
|
20018
20077
|
return isIdenticalObject(data2.urlProps, urlProps);
|
|
20019
20078
|
});
|
|
20020
20079
|
if (sameNameResults.length && !isSameUrl) {
|
|
@@ -20433,7 +20492,7 @@
|
|
|
20433
20492
|
var separatorRegex = /[;,\s]/;
|
|
20434
20493
|
var validRedirectNumRegex = /^[0-9.]+$/;
|
|
20435
20494
|
function metaRefreshEvaluate(node, options, virtualNode) {
|
|
20436
|
-
var
|
|
20495
|
+
var _ref106 = options || {}, minDelay = _ref106.minDelay, maxDelay = _ref106.maxDelay;
|
|
20437
20496
|
var content = (virtualNode.attr('content') || '').trim();
|
|
20438
20497
|
var _content$split = content.split(separatorRegex), _content$split2 = _slicedToArray(_content$split, 1), redirectStr = _content$split2[0];
|
|
20439
20498
|
if (!redirectStr.match(validRedirectNumRegex)) {
|
|
@@ -20605,8 +20664,8 @@
|
|
|
20605
20664
|
} else if (node !== document.body && has_content_default(node, true)) {
|
|
20606
20665
|
return [ virtualNode ];
|
|
20607
20666
|
} else {
|
|
20608
|
-
return virtualNode.children.filter(function(
|
|
20609
|
-
var actualNode =
|
|
20667
|
+
return virtualNode.children.filter(function(_ref107) {
|
|
20668
|
+
var actualNode = _ref107.actualNode;
|
|
20610
20669
|
return actualNode.nodeType === 1;
|
|
20611
20670
|
}).map(function(vNode) {
|
|
20612
20671
|
return findRegionlessElms(vNode, options);
|
|
@@ -20759,8 +20818,8 @@
|
|
|
20759
20818
|
}
|
|
20760
20819
|
return false;
|
|
20761
20820
|
}
|
|
20762
|
-
function getNumberValue(domNode,
|
|
20763
|
-
var cssProperty =
|
|
20821
|
+
function getNumberValue(domNode, _ref108) {
|
|
20822
|
+
var cssProperty = _ref108.cssProperty, absoluteValues = _ref108.absoluteValues, normalValue = _ref108.normalValue;
|
|
20764
20823
|
var computedStyle = window.getComputedStyle(domNode);
|
|
20765
20824
|
var cssPropValue = computedStyle.getPropertyValue(cssProperty);
|
|
20766
20825
|
if (cssPropValue === 'normal') {
|
|
@@ -20837,8 +20896,8 @@
|
|
|
20837
20896
|
if (!virtualNode.children) {
|
|
20838
20897
|
return void 0;
|
|
20839
20898
|
}
|
|
20840
|
-
var titleNode = virtualNode.children.find(function(
|
|
20841
|
-
var props =
|
|
20899
|
+
var titleNode = virtualNode.children.find(function(_ref109) {
|
|
20900
|
+
var props = _ref109.props;
|
|
20842
20901
|
return props.nodeName === 'title';
|
|
20843
20902
|
});
|
|
20844
20903
|
if (!titleNode) {
|
|
@@ -21197,13 +21256,7 @@
|
|
|
21197
21256
|
if (ariaLabelledbyControls.length > 0 && ariaLabelledbyControls.every(is_disabled_default)) {
|
|
21198
21257
|
return false;
|
|
21199
21258
|
}
|
|
21200
|
-
|
|
21201
|
-
var removeUnicodeOptions = {
|
|
21202
|
-
emoji: true,
|
|
21203
|
-
nonBmp: false,
|
|
21204
|
-
punctuations: true
|
|
21205
|
-
};
|
|
21206
|
-
if (!visibleText || !remove_unicode_default(visibleText, removeUnicodeOptions)) {
|
|
21259
|
+
if (!hasRealTextChildren(virtualNode)) {
|
|
21207
21260
|
return false;
|
|
21208
21261
|
}
|
|
21209
21262
|
var range = document.createRange();
|
|
@@ -21223,6 +21276,20 @@
|
|
|
21223
21276
|
return false;
|
|
21224
21277
|
}
|
|
21225
21278
|
var color_contrast_matches_default = colorContrastMatches;
|
|
21279
|
+
var removeUnicodeOptions = {
|
|
21280
|
+
emoji: true,
|
|
21281
|
+
nonBmp: false,
|
|
21282
|
+
punctuations: true
|
|
21283
|
+
};
|
|
21284
|
+
function hasRealTextChildren(virtualNode) {
|
|
21285
|
+
var visibleText = visible_virtual_default(virtualNode, false, true);
|
|
21286
|
+
if (visibleText === '' || remove_unicode_default(visibleText, removeUnicodeOptions) === '') {
|
|
21287
|
+
return false;
|
|
21288
|
+
}
|
|
21289
|
+
return virtualNode.children.some(function(vChild) {
|
|
21290
|
+
return vChild.props.nodeName === '#text' && !is_icon_ligature_default(vChild);
|
|
21291
|
+
});
|
|
21292
|
+
}
|
|
21226
21293
|
function dataTableLargeMatches(node) {
|
|
21227
21294
|
if (is_data_table_default(node)) {
|
|
21228
21295
|
var tableArray = to_grid_default(node);
|
|
@@ -21425,7 +21492,7 @@
|
|
|
21425
21492
|
if (!role || [ 'none', 'presentation' ].includes(role)) {
|
|
21426
21493
|
return true;
|
|
21427
21494
|
}
|
|
21428
|
-
var
|
|
21495
|
+
var _ref110 = aria_roles_default[role] || {}, accessibleNameRequired = _ref110.accessibleNameRequired;
|
|
21429
21496
|
if (accessibleNameRequired || _isFocusable(virtualNode)) {
|
|
21430
21497
|
return true;
|
|
21431
21498
|
}
|
|
@@ -22752,8 +22819,8 @@
|
|
|
22752
22819
|
});
|
|
22753
22820
|
};
|
|
22754
22821
|
}
|
|
22755
|
-
function getHelpUrl(
|
|
22756
|
-
var brand =
|
|
22822
|
+
function getHelpUrl(_ref111, ruleId, version) {
|
|
22823
|
+
var brand = _ref111.brand, application = _ref111.application, lang = _ref111.lang;
|
|
22757
22824
|
return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
|
|
22758
22825
|
}
|
|
22759
22826
|
var audit_default = Audit;
|
|
@@ -22969,9 +23036,9 @@
|
|
|
22969
23036
|
toolOptions: options
|
|
22970
23037
|
});
|
|
22971
23038
|
}
|
|
22972
|
-
function normalizeRunParams(
|
|
22973
|
-
var
|
|
22974
|
-
var
|
|
23039
|
+
function normalizeRunParams(_ref112) {
|
|
23040
|
+
var _ref114, _options$reporter, _axe$_audit;
|
|
23041
|
+
var _ref113 = _slicedToArray(_ref112, 3), context = _ref113[0], options = _ref113[1], callback = _ref113[2];
|
|
22975
23042
|
var typeErr = new TypeError('axe.run arguments are invalid');
|
|
22976
23043
|
if (!isContextSpec(context)) {
|
|
22977
23044
|
if (callback !== void 0) {
|
|
@@ -22992,7 +23059,7 @@
|
|
|
22992
23059
|
throw typeErr;
|
|
22993
23060
|
}
|
|
22994
23061
|
options = clone_default(options);
|
|
22995
|
-
options.reporter = (
|
|
23062
|
+
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';
|
|
22996
23063
|
return {
|
|
22997
23064
|
context: context,
|
|
22998
23065
|
options: options,
|
|
@@ -23097,14 +23164,14 @@
|
|
|
23097
23164
|
return new Promise(function(res, rej) {
|
|
23098
23165
|
axe._audit.run(contextObj, options, res, rej);
|
|
23099
23166
|
}).then(function(results) {
|
|
23100
|
-
results = results.map(function(
|
|
23101
|
-
var nodes =
|
|
23167
|
+
results = results.map(function(_ref115) {
|
|
23168
|
+
var nodes = _ref115.nodes, result = _objectWithoutProperties(_ref115, _excluded8);
|
|
23102
23169
|
return _extends({
|
|
23103
23170
|
nodes: nodes.map(serializeNode)
|
|
23104
23171
|
}, result);
|
|
23105
23172
|
});
|
|
23106
|
-
var frames = contextObj.frames.map(function(
|
|
23107
|
-
var node =
|
|
23173
|
+
var frames = contextObj.frames.map(function(_ref116) {
|
|
23174
|
+
var node = _ref116.node;
|
|
23108
23175
|
return new dq_element_default(node, options).toJSON();
|
|
23109
23176
|
});
|
|
23110
23177
|
var environmentData;
|
|
@@ -23124,13 +23191,13 @@
|
|
|
23124
23191
|
return Promise.reject(err2);
|
|
23125
23192
|
});
|
|
23126
23193
|
}
|
|
23127
|
-
function serializeNode(
|
|
23128
|
-
var node =
|
|
23194
|
+
function serializeNode(_ref117) {
|
|
23195
|
+
var node = _ref117.node, nodeResult = _objectWithoutProperties(_ref117, _excluded9);
|
|
23129
23196
|
nodeResult.node = node.toJSON();
|
|
23130
23197
|
for (var _i33 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i33 < _arr2.length; _i33++) {
|
|
23131
23198
|
var type = _arr2[_i33];
|
|
23132
|
-
nodeResult[type] = nodeResult[type].map(function(
|
|
23133
|
-
var relatedNodes =
|
|
23199
|
+
nodeResult[type] = nodeResult[type].map(function(_ref118) {
|
|
23200
|
+
var relatedNodes = _ref118.relatedNodes, checkResult = _objectWithoutProperties(_ref118, _excluded10);
|
|
23134
23201
|
return _extends({}, checkResult, {
|
|
23135
23202
|
relatedNodes: relatedNodes.map(function(node2) {
|
|
23136
23203
|
return node2.toJSON();
|
|
@@ -23141,14 +23208,14 @@
|
|
|
23141
23208
|
return nodeResult;
|
|
23142
23209
|
}
|
|
23143
23210
|
function finishRun(partialResults) {
|
|
23144
|
-
var
|
|
23211
|
+
var _ref120, _options$reporter2, _axe$_audit2;
|
|
23145
23212
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
23146
23213
|
options = clone_default(options);
|
|
23147
|
-
var
|
|
23214
|
+
var _ref119 = partialResults.find(function(r) {
|
|
23148
23215
|
return r.environmentData;
|
|
23149
|
-
}) || {}, environmentData =
|
|
23216
|
+
}) || {}, environmentData = _ref119.environmentData;
|
|
23150
23217
|
axe._audit.normalizeOptions(options);
|
|
23151
|
-
options.reporter = (
|
|
23218
|
+
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';
|
|
23152
23219
|
setFrameSpec(partialResults);
|
|
23153
23220
|
var results = merge_results_default(partialResults);
|
|
23154
23221
|
results = axe._audit.after(results, options);
|
|
@@ -23178,8 +23245,8 @@
|
|
|
23178
23245
|
_iterator12.f();
|
|
23179
23246
|
}
|
|
23180
23247
|
}
|
|
23181
|
-
function getMergedFrameSpecs(
|
|
23182
|
-
var childFrameSpecs =
|
|
23248
|
+
function getMergedFrameSpecs(_ref121) {
|
|
23249
|
+
var childFrameSpecs = _ref121.frames, parentFrameSpec = _ref121.frameSpec;
|
|
23183
23250
|
if (!parentFrameSpec) {
|
|
23184
23251
|
return childFrameSpecs;
|
|
23185
23252
|
}
|
|
@@ -23242,9 +23309,9 @@
|
|
|
23242
23309
|
for (var _i34 = 0, _types = types; _i34 < _types.length; _i34++) {
|
|
23243
23310
|
var type = _types[_i34];
|
|
23244
23311
|
if (transformedResult[type] && Array.isArray(transformedResult[type])) {
|
|
23245
|
-
transformedResult[type] = transformedResult[type].map(function(
|
|
23312
|
+
transformedResult[type] = transformedResult[type].map(function(_ref122) {
|
|
23246
23313
|
var _node;
|
|
23247
|
-
var node =
|
|
23314
|
+
var node = _ref122.node, typeResult = _objectWithoutProperties(_ref122, _excluded13);
|
|
23248
23315
|
node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
|
|
23249
23316
|
return _extends({
|
|
23250
23317
|
node: node
|
|
@@ -25678,7 +25745,8 @@
|
|
|
25678
25745
|
all: [],
|
|
25679
25746
|
any: [ {
|
|
25680
25747
|
options: {
|
|
25681
|
-
requiredContrastRatio: 3
|
|
25748
|
+
requiredContrastRatio: 3,
|
|
25749
|
+
allowSameColor: true
|
|
25682
25750
|
},
|
|
25683
25751
|
id: 'link-in-text-block'
|
|
25684
25752
|
}, 'link-in-text-block-style' ],
|
|
@@ -25914,6 +25982,7 @@
|
|
|
25914
25982
|
none: []
|
|
25915
25983
|
}, {
|
|
25916
25984
|
id: 'scrollable-region-focusable',
|
|
25985
|
+
selector: '*:not(select,textarea)',
|
|
25917
25986
|
matches: 'scrollable-region-focusable-matches',
|
|
25918
25987
|
tags: [ 'cat.keyboard', 'wcag2a', 'wcag211' ],
|
|
25919
25988
|
actIds: [ '0ssw9k' ],
|
|
@@ -26201,7 +26270,8 @@
|
|
|
26201
26270
|
id: 'link-in-text-block',
|
|
26202
26271
|
evaluate: 'link-in-text-block-evaluate',
|
|
26203
26272
|
options: {
|
|
26204
|
-
requiredContrastRatio: 3
|
|
26273
|
+
requiredContrastRatio: 3,
|
|
26274
|
+
allowSameColor: true
|
|
26205
26275
|
}
|
|
26206
26276
|
}, {
|
|
26207
26277
|
id: 'autocomplete-appropriate',
|