axe-core 4.6.2 → 4.6.3-canary.04a4b5e
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.d.ts +77 -6
- package/axe.js +984 -624
- package/axe.min.js +2 -2
- package/locales/_template.json +5 -5
- package/package.json +29 -29
- package/sri-history.json +345 -337
package/axe.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! axe v4.6.
|
|
1
|
+
/*! axe v4.6.3-canary.04a4b5e
|
|
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.04a4b5e';
|
|
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
|
},
|
|
@@ -7049,6 +7071,9 @@
|
|
|
7049
7071
|
getElementStack: function getElementStack() {
|
|
7050
7072
|
return get_element_stack_default;
|
|
7051
7073
|
},
|
|
7074
|
+
getModalDialog: function getModalDialog() {
|
|
7075
|
+
return get_modal_dialog_default;
|
|
7076
|
+
},
|
|
7052
7077
|
getOverflowHiddenAncestors: function getOverflowHiddenAncestors() {
|
|
7053
7078
|
return get_overflow_hidden_ancestors_default;
|
|
7054
7079
|
},
|
|
@@ -7106,6 +7131,9 @@
|
|
|
7106
7131
|
isInTextBlock: function isInTextBlock() {
|
|
7107
7132
|
return is_in_text_block_default;
|
|
7108
7133
|
},
|
|
7134
|
+
isInert: function isInert() {
|
|
7135
|
+
return _isInert;
|
|
7136
|
+
},
|
|
7109
7137
|
isModalOpen: function isModalOpen() {
|
|
7110
7138
|
return is_modal_open_default;
|
|
7111
7139
|
},
|
|
@@ -7527,6 +7555,11 @@
|
|
|
7527
7555
|
var top = _ref14.top, right = _ref14.right, bottom = _ref14.bottom, left = _ref14.left;
|
|
7528
7556
|
return y >= top && x <= right && y <= bottom && x >= left;
|
|
7529
7557
|
}
|
|
7558
|
+
var ROOT_ORDER = 0;
|
|
7559
|
+
var DEFAULT_ORDER = .1;
|
|
7560
|
+
var FLOAT_ORDER = .2;
|
|
7561
|
+
var POSITION_STATIC_ORDER = .3;
|
|
7562
|
+
var nodeIndex = 0;
|
|
7530
7563
|
function _createGrid() {
|
|
7531
7564
|
var root = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body;
|
|
7532
7565
|
var rootGrid = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -7541,7 +7574,8 @@
|
|
|
7541
7574
|
if (!vNode) {
|
|
7542
7575
|
vNode = new virtual_node_default(document.documentElement);
|
|
7543
7576
|
}
|
|
7544
|
-
|
|
7577
|
+
nodeIndex = 0;
|
|
7578
|
+
vNode._stackingOrder = [ createContext(ROOT_ORDER, null) ];
|
|
7545
7579
|
(_rootGrid = rootGrid) !== null && _rootGrid !== void 0 ? _rootGrid : rootGrid = new Grid();
|
|
7546
7580
|
addNodeToGrid(rootGrid, vNode);
|
|
7547
7581
|
if (_getScroll(vNode.actualNode)) {
|
|
@@ -7553,7 +7587,11 @@
|
|
|
7553
7587
|
var node = parentVNode ? treeWalker.nextNode() : treeWalker.currentNode;
|
|
7554
7588
|
while (node) {
|
|
7555
7589
|
var _vNode = get_node_from_tree_default(node);
|
|
7556
|
-
if (
|
|
7590
|
+
if (_vNode && _vNode.parent) {
|
|
7591
|
+
parentVNode = _vNode.parent;
|
|
7592
|
+
} else if (node.assignedSlot) {
|
|
7593
|
+
parentVNode = get_node_from_tree_default(node.assignedSlot);
|
|
7594
|
+
} else if (node.parentElement) {
|
|
7557
7595
|
parentVNode = get_node_from_tree_default(node.parentElement);
|
|
7558
7596
|
} else if (node.parentNode && get_node_from_tree_default(node.parentNode)) {
|
|
7559
7597
|
parentVNode = get_node_from_tree_default(node.parentNode);
|
|
@@ -7561,7 +7599,7 @@
|
|
|
7561
7599
|
if (!_vNode) {
|
|
7562
7600
|
_vNode = new axe.VirtualNode(node, parentVNode);
|
|
7563
7601
|
}
|
|
7564
|
-
_vNode._stackingOrder =
|
|
7602
|
+
_vNode._stackingOrder = createStackingOrder(_vNode, parentVNode, nodeIndex++);
|
|
7565
7603
|
var scrollRegionParent = findScrollRegionParent(_vNode, parentVNode);
|
|
7566
7604
|
var grid = scrollRegionParent ? scrollRegionParent._subGrid : rootGrid;
|
|
7567
7605
|
if (_getScroll(_vNode.actualNode)) {
|
|
@@ -7637,39 +7675,60 @@
|
|
|
7637
7675
|
if ([ 'layout', 'paint', 'strict', 'content' ].includes(contain)) {
|
|
7638
7676
|
return true;
|
|
7639
7677
|
}
|
|
7640
|
-
if (zIndex !== 'auto' && parentVNode) {
|
|
7641
|
-
|
|
7642
|
-
if ([ 'flex', 'inline-flex', 'inline flex', 'grid', 'inline-grid', 'inline grid' ].includes(parentDsiplay)) {
|
|
7643
|
-
return true;
|
|
7644
|
-
}
|
|
7678
|
+
if (zIndex !== 'auto' && isFlexOrGridContainer(parentVNode)) {
|
|
7679
|
+
return true;
|
|
7645
7680
|
}
|
|
7646
7681
|
return false;
|
|
7647
7682
|
}
|
|
7648
|
-
function
|
|
7683
|
+
function isFlexOrGridContainer(vNode) {
|
|
7684
|
+
if (!vNode) {
|
|
7685
|
+
return false;
|
|
7686
|
+
}
|
|
7687
|
+
var display = vNode.getComputedStylePropertyValue('display');
|
|
7688
|
+
return [ 'flex', 'inline-flex', 'grid', 'inline-grid' ].includes(display);
|
|
7689
|
+
}
|
|
7690
|
+
function createStackingOrder(vNode, parentVNode, nodeIndex3) {
|
|
7649
7691
|
var stackingOrder = parentVNode._stackingOrder.slice();
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
return value % 1 !== 0;
|
|
7656
|
-
})) {
|
|
7657
|
-
var index = stackingOrder.findIndex(function(value) {
|
|
7658
|
-
return value % 1 !== 0;
|
|
7659
|
-
});
|
|
7660
|
-
stackingOrder.splice(index, 1);
|
|
7692
|
+
if (!isStackingContext(vNode, parentVNode)) {
|
|
7693
|
+
if (vNode.getComputedStylePropertyValue('position') !== 'static') {
|
|
7694
|
+
stackingOrder.push(createContext(POSITION_STATIC_ORDER, vNode));
|
|
7695
|
+
} else if (vNode.getComputedStylePropertyValue('float') !== 'none') {
|
|
7696
|
+
stackingOrder.push(createContext(FLOAT_ORDER, vNode));
|
|
7661
7697
|
}
|
|
7662
|
-
stackingOrder
|
|
7698
|
+
return stackingOrder;
|
|
7699
|
+
}
|
|
7700
|
+
var index = stackingOrder.findIndex(function(_ref15) {
|
|
7701
|
+
var value = _ref15.value;
|
|
7702
|
+
return [ ROOT_ORDER, FLOAT_ORDER, POSITION_STATIC_ORDER ].includes(value);
|
|
7703
|
+
});
|
|
7704
|
+
if (index !== -1) {
|
|
7705
|
+
stackingOrder.splice(index, stackingOrder.length - index);
|
|
7663
7706
|
}
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
stackingOrder
|
|
7668
|
-
} else if (floated) {
|
|
7669
|
-
stackingOrder.push(.25);
|
|
7707
|
+
var zIndex = getRealZIndex(vNode, parentVNode);
|
|
7708
|
+
if (![ 'auto', '0' ].includes(zIndex)) {
|
|
7709
|
+
stackingOrder.push(createContext(parseInt(zIndex), vNode));
|
|
7710
|
+
return stackingOrder;
|
|
7670
7711
|
}
|
|
7712
|
+
var _float = nodeIndex3.toString();
|
|
7713
|
+
while (_float.length < 10) {
|
|
7714
|
+
_float = '0' + _float;
|
|
7715
|
+
}
|
|
7716
|
+
stackingOrder.push(createContext(parseFloat(''.concat(DEFAULT_ORDER).concat(_float)), vNode));
|
|
7671
7717
|
return stackingOrder;
|
|
7672
7718
|
}
|
|
7719
|
+
function createContext(value, vNode) {
|
|
7720
|
+
return {
|
|
7721
|
+
value: value,
|
|
7722
|
+
vNode: vNode
|
|
7723
|
+
};
|
|
7724
|
+
}
|
|
7725
|
+
function getRealZIndex(vNode, parentVNode) {
|
|
7726
|
+
var position = vNode.getComputedStylePropertyValue('position');
|
|
7727
|
+
if (position === 'static' && !isFlexOrGridContainer(parentVNode)) {
|
|
7728
|
+
return 'auto';
|
|
7729
|
+
}
|
|
7730
|
+
return vNode.getComputedStylePropertyValue('z-index');
|
|
7731
|
+
}
|
|
7673
7732
|
function findScrollRegionParent(vNode, parentVNode) {
|
|
7674
7733
|
var scrollRegionParent = null;
|
|
7675
7734
|
var checkedNodes = [ vNode ];
|
|
@@ -7716,9 +7775,9 @@
|
|
|
7716
7775
|
}
|
|
7717
7776
|
}, {
|
|
7718
7777
|
key: 'getCellFromPoint',
|
|
7719
|
-
value: function getCellFromPoint(
|
|
7778
|
+
value: function getCellFromPoint(_ref16) {
|
|
7720
7779
|
var _this$cells, _row;
|
|
7721
|
-
var x =
|
|
7780
|
+
var x = _ref16.x, y = _ref16.y;
|
|
7722
7781
|
assert_default(this.boundaries, 'Grid does not have cells added');
|
|
7723
7782
|
var rowIndex = this.toGridIndex(y);
|
|
7724
7783
|
var colIndex = this.toGridIndex(x);
|
|
@@ -7748,8 +7807,8 @@
|
|
|
7748
7807
|
}
|
|
7749
7808
|
}, {
|
|
7750
7809
|
key: 'getGridPositionOfRect',
|
|
7751
|
-
value: function getGridPositionOfRect(
|
|
7752
|
-
var top =
|
|
7810
|
+
value: function getGridPositionOfRect(_ref17) {
|
|
7811
|
+
var top = _ref17.top, right = _ref17.right, bottom = _ref17.bottom, left = _ref17.left;
|
|
7753
7812
|
var margin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
7754
7813
|
top = this.toGridIndex(top - margin);
|
|
7755
7814
|
right = this.toGridIndex(right + margin - 1);
|
|
@@ -7815,6 +7874,148 @@
|
|
|
7815
7874
|
}
|
|
7816
7875
|
return hasFixedPosition(vNode.parent);
|
|
7817
7876
|
});
|
|
7877
|
+
function _getIntersectionRect(rect1, rect2) {
|
|
7878
|
+
var leftX = Math.max(rect1.left, rect2.left);
|
|
7879
|
+
var rightX = Math.min(rect1.right, rect2.right);
|
|
7880
|
+
var topY = Math.max(rect1.top, rect2.top);
|
|
7881
|
+
var bottomY = Math.min(rect1.bottom, rect2.bottom);
|
|
7882
|
+
if (leftX >= rightX || topY >= bottomY) {
|
|
7883
|
+
return null;
|
|
7884
|
+
}
|
|
7885
|
+
return new window.DOMRect(leftX, topY, rightX - leftX, bottomY - topY);
|
|
7886
|
+
}
|
|
7887
|
+
var getModalDialog = memoize_default(function getModalDialogMemoized() {
|
|
7888
|
+
var _dialogs$find;
|
|
7889
|
+
if (!axe._tree) {
|
|
7890
|
+
return null;
|
|
7891
|
+
}
|
|
7892
|
+
var dialogs = query_selector_all_filter_default(axe._tree[0], 'dialog[open]', function(vNode) {
|
|
7893
|
+
var rect = vNode.boundingClientRect;
|
|
7894
|
+
var stack = document.elementsFromPoint(rect.left + 1, rect.top + 1);
|
|
7895
|
+
return stack.includes(vNode.actualNode) && _isVisibleOnScreen(vNode);
|
|
7896
|
+
});
|
|
7897
|
+
if (!dialogs.length) {
|
|
7898
|
+
return null;
|
|
7899
|
+
}
|
|
7900
|
+
var modalDialog = dialogs.find(function(dialog) {
|
|
7901
|
+
var rect = dialog.boundingClientRect;
|
|
7902
|
+
var stack = document.elementsFromPoint(rect.left - 10, rect.top - 10);
|
|
7903
|
+
return stack.includes(dialog.actualNode);
|
|
7904
|
+
});
|
|
7905
|
+
if (modalDialog) {
|
|
7906
|
+
return modalDialog;
|
|
7907
|
+
}
|
|
7908
|
+
return (_dialogs$find = dialogs.find(function(dialog) {
|
|
7909
|
+
var _getNodeFromGrid;
|
|
7910
|
+
var _ref18 = (_getNodeFromGrid = getNodeFromGrid(dialog)) !== null && _getNodeFromGrid !== void 0 ? _getNodeFromGrid : {}, vNode = _ref18.vNode, rect = _ref18.rect;
|
|
7911
|
+
if (!vNode) {
|
|
7912
|
+
return false;
|
|
7913
|
+
}
|
|
7914
|
+
var stack = document.elementsFromPoint(rect.left + 1, rect.top + 1);
|
|
7915
|
+
return !stack.includes(vNode.actualNode);
|
|
7916
|
+
})) !== null && _dialogs$find !== void 0 ? _dialogs$find : null;
|
|
7917
|
+
});
|
|
7918
|
+
var get_modal_dialog_default = getModalDialog;
|
|
7919
|
+
function getNodeFromGrid(dialog) {
|
|
7920
|
+
_createGrid();
|
|
7921
|
+
var grid = axe._tree[0]._grid;
|
|
7922
|
+
var viewRect = new window.DOMRect(0, 0, window.innerWidth, window.innerHeight);
|
|
7923
|
+
if (!grid) {
|
|
7924
|
+
return;
|
|
7925
|
+
}
|
|
7926
|
+
for (var row = 0; row < grid.cells.length; row++) {
|
|
7927
|
+
var cols = grid.cells[row];
|
|
7928
|
+
if (!cols) {
|
|
7929
|
+
continue;
|
|
7930
|
+
}
|
|
7931
|
+
for (var col = 0; col < cols.length; col++) {
|
|
7932
|
+
var cells = cols[col];
|
|
7933
|
+
if (!cells) {
|
|
7934
|
+
continue;
|
|
7935
|
+
}
|
|
7936
|
+
for (var _i6 = 0; _i6 < cells.length; _i6++) {
|
|
7937
|
+
var vNode = cells[_i6];
|
|
7938
|
+
var rect = vNode.boundingClientRect;
|
|
7939
|
+
var intersection = _getIntersectionRect(rect, viewRect);
|
|
7940
|
+
if (vNode.props.nodeName !== 'html' && vNode !== dialog && vNode.getComputedStylePropertyValue('pointer-events') !== 'none' && intersection) {
|
|
7941
|
+
return {
|
|
7942
|
+
vNode: vNode,
|
|
7943
|
+
rect: intersection
|
|
7944
|
+
};
|
|
7945
|
+
}
|
|
7946
|
+
}
|
|
7947
|
+
}
|
|
7948
|
+
}
|
|
7949
|
+
}
|
|
7950
|
+
function _isInert(vNode) {
|
|
7951
|
+
var _ref19 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, skipAncestors = _ref19.skipAncestors, isAncestor = _ref19.isAncestor;
|
|
7952
|
+
if (skipAncestors) {
|
|
7953
|
+
return isInertSelf(vNode, isAncestor);
|
|
7954
|
+
}
|
|
7955
|
+
return isInertAncestors(vNode, isAncestor);
|
|
7956
|
+
}
|
|
7957
|
+
var isInertSelf = memoize_default(function isInertSelfMemoized(vNode, isAncestor) {
|
|
7958
|
+
if (vNode.hasAttr('inert')) {
|
|
7959
|
+
return true;
|
|
7960
|
+
}
|
|
7961
|
+
if (!isAncestor && vNode.actualNode) {
|
|
7962
|
+
var modalDialog = get_modal_dialog_default();
|
|
7963
|
+
if (modalDialog && !_contains(modalDialog, vNode)) {
|
|
7964
|
+
return true;
|
|
7965
|
+
}
|
|
7966
|
+
}
|
|
7967
|
+
return false;
|
|
7968
|
+
});
|
|
7969
|
+
var isInertAncestors = memoize_default(function isInertAncestorsMemoized(vNode, isAncestor) {
|
|
7970
|
+
if (isInertSelf(vNode, isAncestor)) {
|
|
7971
|
+
return true;
|
|
7972
|
+
}
|
|
7973
|
+
if (!vNode.parent) {
|
|
7974
|
+
return false;
|
|
7975
|
+
}
|
|
7976
|
+
return isInertAncestors(vNode.parent, true);
|
|
7977
|
+
});
|
|
7978
|
+
var allowedDisabledNodeNames = [ 'button', 'command', 'fieldset', 'keygen', 'optgroup', 'option', 'select', 'textarea', 'input' ];
|
|
7979
|
+
function isDisabledAttrAllowed(nodeName2) {
|
|
7980
|
+
return allowedDisabledNodeNames.includes(nodeName2);
|
|
7981
|
+
}
|
|
7982
|
+
function focusDisabled(el) {
|
|
7983
|
+
var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
|
|
7984
|
+
if (isDisabledAttrAllowed(vNode.props.nodeName) && vNode.hasAttr('disabled') || _isInert(vNode)) {
|
|
7985
|
+
return true;
|
|
7986
|
+
}
|
|
7987
|
+
var parentNode = vNode.parent;
|
|
7988
|
+
var ancestors = [];
|
|
7989
|
+
var fieldsetDisabled = false;
|
|
7990
|
+
while (parentNode && parentNode.shadowId === vNode.shadowId && !fieldsetDisabled) {
|
|
7991
|
+
ancestors.push(parentNode);
|
|
7992
|
+
if (parentNode.props.nodeName === 'legend') {
|
|
7993
|
+
break;
|
|
7994
|
+
}
|
|
7995
|
+
if (parentNode._inDisabledFieldset !== void 0) {
|
|
7996
|
+
fieldsetDisabled = parentNode._inDisabledFieldset;
|
|
7997
|
+
break;
|
|
7998
|
+
}
|
|
7999
|
+
if (parentNode.props.nodeName === 'fieldset' && parentNode.hasAttr('disabled')) {
|
|
8000
|
+
fieldsetDisabled = true;
|
|
8001
|
+
}
|
|
8002
|
+
parentNode = parentNode.parent;
|
|
8003
|
+
}
|
|
8004
|
+
ancestors.forEach(function(ancestor) {
|
|
8005
|
+
return ancestor._inDisabledFieldset = fieldsetDisabled;
|
|
8006
|
+
});
|
|
8007
|
+
if (fieldsetDisabled) {
|
|
8008
|
+
return true;
|
|
8009
|
+
}
|
|
8010
|
+
if (vNode.props.nodeName !== 'area') {
|
|
8011
|
+
if (!vNode.actualNode) {
|
|
8012
|
+
return false;
|
|
8013
|
+
}
|
|
8014
|
+
return _isHiddenForEveryone(vNode);
|
|
8015
|
+
}
|
|
8016
|
+
return false;
|
|
8017
|
+
}
|
|
8018
|
+
var focus_disabled_default = focusDisabled;
|
|
7818
8019
|
var angularSkipLinkRegex = /^\/\#/;
|
|
7819
8020
|
var angularRouterLinkRegex = /^#[!/]/;
|
|
7820
8021
|
function _isCurrentPageLink(anchor) {
|
|
@@ -7875,16 +8076,16 @@
|
|
|
7875
8076
|
function _visuallySort(a, b) {
|
|
7876
8077
|
_createGrid();
|
|
7877
8078
|
var length = Math.max(a._stackingOrder.length, b._stackingOrder.length);
|
|
7878
|
-
for (var
|
|
7879
|
-
if (typeof b._stackingOrder[
|
|
8079
|
+
for (var _i7 = 0; _i7 < length; _i7++) {
|
|
8080
|
+
if (typeof b._stackingOrder[_i7] === 'undefined') {
|
|
7880
8081
|
return -1;
|
|
7881
|
-
} else if (typeof a._stackingOrder[
|
|
8082
|
+
} else if (typeof a._stackingOrder[_i7] === 'undefined') {
|
|
7882
8083
|
return 1;
|
|
7883
8084
|
}
|
|
7884
|
-
if (b._stackingOrder[
|
|
8085
|
+
if (b._stackingOrder[_i7].value > a._stackingOrder[_i7].value) {
|
|
7885
8086
|
return 1;
|
|
7886
8087
|
}
|
|
7887
|
-
if (b._stackingOrder[
|
|
8088
|
+
if (b._stackingOrder[_i7].value < a._stackingOrder[_i7].value) {
|
|
7888
8089
|
return -1;
|
|
7889
8090
|
}
|
|
7890
8091
|
}
|
|
@@ -7974,16 +8175,6 @@
|
|
|
7974
8175
|
return _splitRects;
|
|
7975
8176
|
}
|
|
7976
8177
|
});
|
|
7977
|
-
function _getIntersectionRect(rect1, rect2) {
|
|
7978
|
-
var leftX = Math.max(rect1.left, rect2.left);
|
|
7979
|
-
var rightX = Math.min(rect1.right, rect2.right);
|
|
7980
|
-
var topY = Math.max(rect1.top, rect2.top);
|
|
7981
|
-
var bottomY = Math.min(rect1.bottom, rect2.bottom);
|
|
7982
|
-
if (leftX >= rightX || topY >= bottomY) {
|
|
7983
|
-
return null;
|
|
7984
|
-
}
|
|
7985
|
-
return new window.DOMRect(leftX, topY, rightX - leftX, bottomY - topY);
|
|
7986
|
-
}
|
|
7987
8178
|
function _getOffset(vNodeA, vNodeB) {
|
|
7988
8179
|
var rectA = vNodeA.boundingClientRect;
|
|
7989
8180
|
var rectB = vNodeB.boundingClientRect;
|
|
@@ -7994,8 +8185,8 @@
|
|
|
7994
8185
|
function getFarthestPoint(rectA, rectB) {
|
|
7995
8186
|
var dimensionProps = [ [ 'x', 'left', 'right', 'width' ], [ 'y', 'top', 'bottom', 'height' ] ];
|
|
7996
8187
|
var farthestPoint = {};
|
|
7997
|
-
dimensionProps.forEach(function(
|
|
7998
|
-
var
|
|
8188
|
+
dimensionProps.forEach(function(_ref20) {
|
|
8189
|
+
var _ref21 = _slicedToArray(_ref20, 4), axis = _ref21[0], start = _ref21[1], end = _ref21[2], diameter = _ref21[3];
|
|
7999
8190
|
if (rectB[start] < rectA[start] && rectB[end] > rectA[end]) {
|
|
8000
8191
|
farthestPoint[axis] = rectA[start] + rectA[diameter] / 2;
|
|
8001
8192
|
return;
|
|
@@ -8011,8 +8202,8 @@
|
|
|
8011
8202
|
});
|
|
8012
8203
|
return farthestPoint;
|
|
8013
8204
|
}
|
|
8014
|
-
function getClosestPoint(
|
|
8015
|
-
var x =
|
|
8205
|
+
function getClosestPoint(_ref22, ownRect, adjacentRect) {
|
|
8206
|
+
var x = _ref22.x, y = _ref22.y;
|
|
8016
8207
|
if (pointInRect({
|
|
8017
8208
|
x: x,
|
|
8018
8209
|
y: y
|
|
@@ -8067,12 +8258,12 @@
|
|
|
8067
8258
|
}
|
|
8068
8259
|
return Math.sqrt(Math.pow(xDistance, 2) + Math.pow(yDistance, 2));
|
|
8069
8260
|
}
|
|
8070
|
-
function pointInRect(
|
|
8071
|
-
var x =
|
|
8261
|
+
function pointInRect(_ref23, rect) {
|
|
8262
|
+
var x = _ref23.x, y = _ref23.y;
|
|
8072
8263
|
return y >= rect.top && x <= rect.right && y <= rect.bottom && x >= rect.left;
|
|
8073
8264
|
}
|
|
8074
|
-
function getCornerInAdjacentRect(
|
|
8075
|
-
var x =
|
|
8265
|
+
function getCornerInAdjacentRect(_ref24, ownRect, adjacentRect) {
|
|
8266
|
+
var x = _ref24.x, y = _ref24.y;
|
|
8076
8267
|
var closestX, closestY;
|
|
8077
8268
|
if (x === ownRect.left && ownRect.right < adjacentRect.right) {
|
|
8078
8269
|
closestX = ownRect.right;
|
|
@@ -8109,8 +8300,8 @@
|
|
|
8109
8300
|
};
|
|
8110
8301
|
}
|
|
8111
8302
|
}
|
|
8112
|
-
function _getRectCenter(
|
|
8113
|
-
var left =
|
|
8303
|
+
function _getRectCenter(_ref25) {
|
|
8304
|
+
var left = _ref25.left, top = _ref25.top, width = _ref25.width, height = _ref25.height;
|
|
8114
8305
|
return new window.DOMPoint(left + width / 2, top + height / 2);
|
|
8115
8306
|
}
|
|
8116
8307
|
function _hasVisualOverlap(vNodeA, vNodeB) {
|
|
@@ -8386,6 +8577,14 @@
|
|
|
8386
8577
|
type: 'nmtoken',
|
|
8387
8578
|
values: [ 'inline', 'list', 'both', 'none' ]
|
|
8388
8579
|
},
|
|
8580
|
+
'aria-braillelabel': {
|
|
8581
|
+
type: 'string',
|
|
8582
|
+
global: true
|
|
8583
|
+
},
|
|
8584
|
+
'aria-brailleroledescription': {
|
|
8585
|
+
type: 'string',
|
|
8586
|
+
global: true
|
|
8587
|
+
},
|
|
8389
8588
|
'aria-busy': {
|
|
8390
8589
|
type: 'boolean',
|
|
8391
8590
|
global: true
|
|
@@ -8422,6 +8621,11 @@
|
|
|
8422
8621
|
allowEmpty: true,
|
|
8423
8622
|
global: true
|
|
8424
8623
|
},
|
|
8624
|
+
'aria-description': {
|
|
8625
|
+
type: 'string',
|
|
8626
|
+
allowEmpty: true,
|
|
8627
|
+
global: true
|
|
8628
|
+
},
|
|
8425
8629
|
'aria-details': {
|
|
8426
8630
|
type: 'idref',
|
|
8427
8631
|
allowEmpty: true,
|
|
@@ -8702,6 +8906,7 @@
|
|
|
8702
8906
|
},
|
|
8703
8907
|
directory: {
|
|
8704
8908
|
type: 'structure',
|
|
8909
|
+
deprecated: true,
|
|
8705
8910
|
allowedAttrs: [ 'aria-expanded' ],
|
|
8706
8911
|
superclassRole: [ 'list' ],
|
|
8707
8912
|
nameFromContent: true
|
|
@@ -8830,13 +9035,13 @@
|
|
|
8830
9035
|
},
|
|
8831
9036
|
menu: {
|
|
8832
9037
|
type: 'composite',
|
|
8833
|
-
requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox', 'menu' ],
|
|
9038
|
+
requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox', 'menu', 'separator' ],
|
|
8834
9039
|
allowedAttrs: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
|
|
8835
9040
|
superclassRole: [ 'select' ]
|
|
8836
9041
|
},
|
|
8837
9042
|
menubar: {
|
|
8838
9043
|
type: 'composite',
|
|
8839
|
-
requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox', 'menu' ],
|
|
9044
|
+
requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox', 'menu', 'separator' ],
|
|
8840
9045
|
allowedAttrs: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
|
|
8841
9046
|
superclassRole: [ 'menu' ]
|
|
8842
9047
|
},
|
|
@@ -9511,6 +9716,7 @@
|
|
|
9511
9716
|
datalist: {
|
|
9512
9717
|
contentTypes: [ 'phrasing', 'flow' ],
|
|
9513
9718
|
allowedRoles: false,
|
|
9719
|
+
noAriaAttrs: true,
|
|
9514
9720
|
implicitAttrs: {
|
|
9515
9721
|
'aria-multiselectable': 'false'
|
|
9516
9722
|
}
|
|
@@ -10272,7 +10478,7 @@
|
|
|
10272
10478
|
}
|
|
10273
10479
|
var is_unsupported_role_default = isUnsupportedRole;
|
|
10274
10480
|
function isValidRole(role) {
|
|
10275
|
-
var
|
|
10481
|
+
var _ref26 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, allowAbstract = _ref26.allowAbstract, _ref26$flagUnsupporte = _ref26.flagUnsupported, flagUnsupported = _ref26$flagUnsupporte === void 0 ? false : _ref26$flagUnsupporte;
|
|
10276
10482
|
var roleDefinition = standards_default.ariaRoles[role];
|
|
10277
10483
|
var isRoleUnsupported = is_unsupported_role_default(role);
|
|
10278
10484
|
if (!roleDefinition || flagUnsupported && isRoleUnsupported) {
|
|
@@ -10282,7 +10488,7 @@
|
|
|
10282
10488
|
}
|
|
10283
10489
|
var is_valid_role_default = isValidRole;
|
|
10284
10490
|
function getExplicitRole(vNode) {
|
|
10285
|
-
var
|
|
10491
|
+
var _ref27 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, fallback = _ref27.fallback, abstracts = _ref27.abstracts, dpub = _ref27.dpub;
|
|
10286
10492
|
vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
|
|
10287
10493
|
if (vNode.props.nodeType !== 1) {
|
|
10288
10494
|
return null;
|
|
@@ -10420,47 +10626,6 @@
|
|
|
10420
10626
|
return str.replace(/\r\n/g, '\n').replace(/\u00A0/g, ' ').replace(/[\s]{2,}/g, ' ').trim();
|
|
10421
10627
|
}
|
|
10422
10628
|
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
10629
|
function isNativelyFocusable(el) {
|
|
10465
10630
|
var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
|
|
10466
10631
|
if (!vNode || focus_disabled_default(vNode)) {
|
|
@@ -10761,7 +10926,7 @@
|
|
|
10761
10926
|
matches_default2.semanticRole = semantic_role_default;
|
|
10762
10927
|
var matches_default3 = matches_default2;
|
|
10763
10928
|
function getElementSpec(vNode) {
|
|
10764
|
-
var
|
|
10929
|
+
var _ref28 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref28$noMatchAccessi = _ref28.noMatchAccessibleName, noMatchAccessibleName = _ref28$noMatchAccessi === void 0 ? false : _ref28$noMatchAccessi;
|
|
10765
10930
|
var standard = standards_default.htmlElms[vNode.props.nodeName];
|
|
10766
10931
|
if (!standard) {
|
|
10767
10932
|
return {};
|
|
@@ -10776,8 +10941,8 @@
|
|
|
10776
10941
|
}
|
|
10777
10942
|
var _variant$variantName = variant[variantName], matches4 = _variant$variantName.matches, props = _objectWithoutProperties(_variant$variantName, _excluded3);
|
|
10778
10943
|
var matchProperties = Array.isArray(matches4) ? matches4 : [ matches4 ];
|
|
10779
|
-
for (var
|
|
10780
|
-
if (matchProperties[
|
|
10944
|
+
for (var _i8 = 0; _i8 < matchProperties.length && noMatchAccessibleName; _i8++) {
|
|
10945
|
+
if (matchProperties[_i8].hasOwnProperty('hasAccessibleName')) {
|
|
10781
10946
|
return standard;
|
|
10782
10947
|
}
|
|
10783
10948
|
}
|
|
@@ -10798,7 +10963,7 @@
|
|
|
10798
10963
|
}
|
|
10799
10964
|
var get_element_spec_default = getElementSpec;
|
|
10800
10965
|
function implicitRole2(node) {
|
|
10801
|
-
var
|
|
10966
|
+
var _ref29 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref29.chromium;
|
|
10802
10967
|
var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
|
|
10803
10968
|
node = vNode.actualNode;
|
|
10804
10969
|
if (!vNode) {
|
|
@@ -10851,8 +11016,8 @@
|
|
|
10851
11016
|
}
|
|
10852
11017
|
return getInheritedRole(vNode.parent, explicitRoleOptions);
|
|
10853
11018
|
}
|
|
10854
|
-
function resolveImplicitRole(vNode,
|
|
10855
|
-
var chromium =
|
|
11019
|
+
function resolveImplicitRole(vNode, _ref30) {
|
|
11020
|
+
var chromium = _ref30.chromium, explicitRoleOptions = _objectWithoutProperties(_ref30, _excluded4);
|
|
10856
11021
|
var implicitRole3 = implicit_role_default(vNode, {
|
|
10857
11022
|
chromium: chromium
|
|
10858
11023
|
});
|
|
@@ -10872,8 +11037,8 @@
|
|
|
10872
11037
|
return hasGlobalAria || _isFocusable(vNode);
|
|
10873
11038
|
}
|
|
10874
11039
|
function resolveRole(node) {
|
|
10875
|
-
var
|
|
10876
|
-
var noImplicit =
|
|
11040
|
+
var _ref31 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11041
|
+
var noImplicit = _ref31.noImplicit, roleOptions = _objectWithoutProperties(_ref31, _excluded5);
|
|
10877
11042
|
var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
|
|
10878
11043
|
if (vNode.props.nodeType !== 1) {
|
|
10879
11044
|
return null;
|
|
@@ -10891,8 +11056,8 @@
|
|
|
10891
11056
|
return explicitRole2;
|
|
10892
11057
|
}
|
|
10893
11058
|
function getRole(node) {
|
|
10894
|
-
var
|
|
10895
|
-
var noPresentational =
|
|
11059
|
+
var _ref32 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11060
|
+
var noPresentational = _ref32.noPresentational, options = _objectWithoutProperties(_ref32, _excluded6);
|
|
10896
11061
|
var role = resolveRole(node, options);
|
|
10897
11062
|
if (noPresentational && [ 'presentation', 'none' ].includes(role)) {
|
|
10898
11063
|
return null;
|
|
@@ -10913,7 +11078,7 @@
|
|
|
10913
11078
|
}
|
|
10914
11079
|
var title_text_default = titleText;
|
|
10915
11080
|
function namedFromContents(vNode) {
|
|
10916
|
-
var
|
|
11081
|
+
var _ref33 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref33.strict;
|
|
10917
11082
|
vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
|
|
10918
11083
|
if (vNode.props.nodeType !== 1) {
|
|
10919
11084
|
return false;
|
|
@@ -11038,12 +11203,12 @@
|
|
|
11038
11203
|
button: ''
|
|
11039
11204
|
};
|
|
11040
11205
|
var nativeTextMethods = {
|
|
11041
|
-
valueText: function valueText(
|
|
11042
|
-
var actualNode =
|
|
11206
|
+
valueText: function valueText(_ref34) {
|
|
11207
|
+
var actualNode = _ref34.actualNode;
|
|
11043
11208
|
return actualNode.value || '';
|
|
11044
11209
|
},
|
|
11045
|
-
buttonDefaultText: function buttonDefaultText(
|
|
11046
|
-
var actualNode =
|
|
11210
|
+
buttonDefaultText: function buttonDefaultText(_ref35) {
|
|
11211
|
+
var actualNode = _ref35.actualNode;
|
|
11047
11212
|
return defaultButtonValues[actualNode.type] || '';
|
|
11048
11213
|
},
|
|
11049
11214
|
tableCaptionText: descendantText.bind(null, 'caption'),
|
|
@@ -11063,8 +11228,8 @@
|
|
|
11063
11228
|
function attrText(attr, vNode) {
|
|
11064
11229
|
return vNode.attr(attr) || '';
|
|
11065
11230
|
}
|
|
11066
|
-
function descendantText(nodeName2,
|
|
11067
|
-
var actualNode =
|
|
11231
|
+
function descendantText(nodeName2, _ref36, context) {
|
|
11232
|
+
var actualNode = _ref36.actualNode;
|
|
11068
11233
|
nodeName2 = nodeName2.toLowerCase();
|
|
11069
11234
|
var nodeNames2 = [ nodeName2, actualNode.nodeName.toLowerCase() ].join(',');
|
|
11070
11235
|
var candidate = actualNode.querySelector(nodeNames2);
|
|
@@ -11108,7 +11273,10 @@
|
|
|
11108
11273
|
return isVisibleToScreenReadersVirtual(vNode);
|
|
11109
11274
|
}
|
|
11110
11275
|
var isVisibleToScreenReadersVirtual = memoize_default(function isVisibleToScreenReadersMemoized(vNode, isAncestor) {
|
|
11111
|
-
if (ariaHidden(vNode)
|
|
11276
|
+
if (ariaHidden(vNode) || _isInert(vNode, {
|
|
11277
|
+
skipAncestors: true,
|
|
11278
|
+
isAncestor: isAncestor
|
|
11279
|
+
})) {
|
|
11112
11280
|
return false;
|
|
11113
11281
|
}
|
|
11114
11282
|
if (vNode.actualNode && vNode.props.nodeName === 'area') {
|
|
@@ -11308,7 +11476,9 @@
|
|
|
11308
11476
|
return false;
|
|
11309
11477
|
}
|
|
11310
11478
|
var canvasContext = cache_default.get('canvasContext', function() {
|
|
11311
|
-
return document.createElement('canvas').getContext('2d'
|
|
11479
|
+
return document.createElement('canvas').getContext('2d', {
|
|
11480
|
+
willReadFrequently: true
|
|
11481
|
+
});
|
|
11312
11482
|
});
|
|
11313
11483
|
var canvas = canvasContext.canvas;
|
|
11314
11484
|
if (!cache_default.get('fonts')) {
|
|
@@ -11493,7 +11663,7 @@
|
|
|
11493
11663
|
locations: [ 'billing', 'shipping' ]
|
|
11494
11664
|
};
|
|
11495
11665
|
function isValidAutocomplete(autocompleteValue) {
|
|
11496
|
-
var
|
|
11666
|
+
var _ref37 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref37$looseTyped = _ref37.looseTyped, looseTyped = _ref37$looseTyped === void 0 ? false : _ref37$looseTyped, _ref37$stateTerms = _ref37.stateTerms, stateTerms = _ref37$stateTerms === void 0 ? [] : _ref37$stateTerms, _ref37$locations = _ref37.locations, locations = _ref37$locations === void 0 ? [] : _ref37$locations, _ref37$qualifiers = _ref37.qualifiers, qualifiers = _ref37$qualifiers === void 0 ? [] : _ref37$qualifiers, _ref37$standaloneTerm = _ref37.standaloneTerms, standaloneTerms = _ref37$standaloneTerm === void 0 ? [] : _ref37$standaloneTerm, _ref37$qualifiedTerms = _ref37.qualifiedTerms, qualifiedTerms = _ref37$qualifiedTerms === void 0 ? [] : _ref37$qualifiedTerms;
|
|
11497
11667
|
autocompleteValue = autocompleteValue.toLowerCase().trim();
|
|
11498
11668
|
stateTerms = stateTerms.concat(_autocomplete.stateTerms);
|
|
11499
11669
|
if (stateTerms.includes(autocompleteValue) || autocompleteValue === '') {
|
|
@@ -11504,6 +11674,12 @@
|
|
|
11504
11674
|
standaloneTerms = standaloneTerms.concat(_autocomplete.standaloneTerms);
|
|
11505
11675
|
qualifiedTerms = qualifiedTerms.concat(_autocomplete.qualifiedTerms);
|
|
11506
11676
|
var autocompleteTerms = autocompleteValue.split(/\s+/g);
|
|
11677
|
+
if (autocompleteTerms[autocompleteTerms.length - 1] === 'webauthn') {
|
|
11678
|
+
autocompleteTerms.pop();
|
|
11679
|
+
if (autocompleteTerms.length === 0) {
|
|
11680
|
+
return false;
|
|
11681
|
+
}
|
|
11682
|
+
}
|
|
11507
11683
|
if (!looseTyped) {
|
|
11508
11684
|
if (autocompleteTerms[0].length > 8 && autocompleteTerms[0].substr(0, 8) === 'section-') {
|
|
11509
11685
|
autocompleteTerms.shift();
|
|
@@ -11752,8 +11928,8 @@
|
|
|
11752
11928
|
if (hiddenTextElms.includes(elm.props.nodeName)) {
|
|
11753
11929
|
return false;
|
|
11754
11930
|
}
|
|
11755
|
-
return elm.children.some(function(
|
|
11756
|
-
var props =
|
|
11931
|
+
return elm.children.some(function(_ref38) {
|
|
11932
|
+
var props = _ref38.props;
|
|
11757
11933
|
return props.nodeType === 3 && props.nodeValue.trim();
|
|
11758
11934
|
});
|
|
11759
11935
|
}
|
|
@@ -11954,8 +12130,8 @@
|
|
|
11954
12130
|
var stacks = points.map(function(point) {
|
|
11955
12131
|
return Array.from(document.elementsFromPoint(point.x, point.y));
|
|
11956
12132
|
});
|
|
11957
|
-
var _loop4 = function _loop4(
|
|
11958
|
-
var modalElement = stacks[
|
|
12133
|
+
var _loop4 = function _loop4(_i9) {
|
|
12134
|
+
var modalElement = stacks[_i9].find(function(elm) {
|
|
11959
12135
|
var style = window.getComputedStyle(elm);
|
|
11960
12136
|
return parseInt(style.width, 10) >= percentWidth && parseInt(style.height, 10) >= percentHeight && style.getPropertyValue('pointer-events') !== 'none' && (style.position === 'absolute' || style.position === 'fixed');
|
|
11961
12137
|
});
|
|
@@ -11968,8 +12144,8 @@
|
|
|
11968
12144
|
};
|
|
11969
12145
|
}
|
|
11970
12146
|
};
|
|
11971
|
-
for (var
|
|
11972
|
-
var _ret = _loop4(
|
|
12147
|
+
for (var _i9 = 0; _i9 < stacks.length; _i9++) {
|
|
12148
|
+
var _ret = _loop4(_i9);
|
|
11973
12149
|
if (_typeof(_ret) === 'object') {
|
|
11974
12150
|
return _ret.v;
|
|
11975
12151
|
}
|
|
@@ -12048,6 +12224,131 @@
|
|
|
12048
12224
|
return hasBgImage;
|
|
12049
12225
|
}
|
|
12050
12226
|
var element_has_image_default = elementHasImage;
|
|
12227
|
+
var hexRegex = /^#[0-9a-f]{3,8}$/i;
|
|
12228
|
+
var colorFnRegex = /^((?:rgb|hsl)a?)\s*\(([^\)]*)\)/i;
|
|
12229
|
+
var Color = function() {
|
|
12230
|
+
function Color(red, green, blue) {
|
|
12231
|
+
var alpha = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
12232
|
+
_classCallCheck(this, Color);
|
|
12233
|
+
this.red = red;
|
|
12234
|
+
this.green = green;
|
|
12235
|
+
this.blue = blue;
|
|
12236
|
+
this.alpha = alpha;
|
|
12237
|
+
}
|
|
12238
|
+
_createClass(Color, [ {
|
|
12239
|
+
key: 'toHexString',
|
|
12240
|
+
value: function toHexString() {
|
|
12241
|
+
var redString = Math.round(this.red).toString(16);
|
|
12242
|
+
var greenString = Math.round(this.green).toString(16);
|
|
12243
|
+
var blueString = Math.round(this.blue).toString(16);
|
|
12244
|
+
return '#' + (this.red > 15.5 ? redString : '0' + redString) + (this.green > 15.5 ? greenString : '0' + greenString) + (this.blue > 15.5 ? blueString : '0' + blueString);
|
|
12245
|
+
}
|
|
12246
|
+
}, {
|
|
12247
|
+
key: 'toJSON',
|
|
12248
|
+
value: function toJSON() {
|
|
12249
|
+
var red = this.red, green = this.green, blue = this.blue, alpha = this.alpha;
|
|
12250
|
+
return {
|
|
12251
|
+
red: red,
|
|
12252
|
+
green: green,
|
|
12253
|
+
blue: blue,
|
|
12254
|
+
alpha: alpha
|
|
12255
|
+
};
|
|
12256
|
+
}
|
|
12257
|
+
}, {
|
|
12258
|
+
key: 'parseString',
|
|
12259
|
+
value: function parseString(colorString) {
|
|
12260
|
+
if (standards_default.cssColors[colorString] || colorString === 'transparent') {
|
|
12261
|
+
var _ref39 = standards_default.cssColors[colorString] || [ 0, 0, 0 ], _ref40 = _slicedToArray(_ref39, 3), red = _ref40[0], green = _ref40[1], blue = _ref40[2];
|
|
12262
|
+
this.red = red;
|
|
12263
|
+
this.green = green;
|
|
12264
|
+
this.blue = blue;
|
|
12265
|
+
this.alpha = colorString === 'transparent' ? 0 : 1;
|
|
12266
|
+
return this;
|
|
12267
|
+
}
|
|
12268
|
+
if (colorString.match(colorFnRegex)) {
|
|
12269
|
+
this.parseColorFnString(colorString);
|
|
12270
|
+
return this;
|
|
12271
|
+
}
|
|
12272
|
+
if (colorString.match(hexRegex)) {
|
|
12273
|
+
this.parseHexString(colorString);
|
|
12274
|
+
return this;
|
|
12275
|
+
}
|
|
12276
|
+
throw new Error('Unable to parse color "'.concat(colorString, '"'));
|
|
12277
|
+
}
|
|
12278
|
+
}, {
|
|
12279
|
+
key: 'parseRgbString',
|
|
12280
|
+
value: function parseRgbString(colorString) {
|
|
12281
|
+
if (colorString === 'transparent') {
|
|
12282
|
+
this.red = 0;
|
|
12283
|
+
this.green = 0;
|
|
12284
|
+
this.blue = 0;
|
|
12285
|
+
this.alpha = 0;
|
|
12286
|
+
return;
|
|
12287
|
+
}
|
|
12288
|
+
this.parseColorFnString(colorString);
|
|
12289
|
+
}
|
|
12290
|
+
}, {
|
|
12291
|
+
key: 'parseHexString',
|
|
12292
|
+
value: function parseHexString(colorString) {
|
|
12293
|
+
if (!colorString.match(hexRegex) || [ 6, 8 ].includes(colorString.length)) {
|
|
12294
|
+
return;
|
|
12295
|
+
}
|
|
12296
|
+
colorString = colorString.replace('#', '');
|
|
12297
|
+
if (colorString.length < 6) {
|
|
12298
|
+
var _colorString = colorString, _colorString2 = _slicedToArray(_colorString, 4), r = _colorString2[0], g = _colorString2[1], b = _colorString2[2], a = _colorString2[3];
|
|
12299
|
+
colorString = r + r + g + g + b + b;
|
|
12300
|
+
if (a) {
|
|
12301
|
+
colorString += a + a;
|
|
12302
|
+
}
|
|
12303
|
+
}
|
|
12304
|
+
var aRgbHex = colorString.match(/.{1,2}/g);
|
|
12305
|
+
this.red = parseInt(aRgbHex[0], 16);
|
|
12306
|
+
this.green = parseInt(aRgbHex[1], 16);
|
|
12307
|
+
this.blue = parseInt(aRgbHex[2], 16);
|
|
12308
|
+
if (aRgbHex[3]) {
|
|
12309
|
+
this.alpha = parseInt(aRgbHex[3], 16) / 255;
|
|
12310
|
+
} else {
|
|
12311
|
+
this.alpha = 1;
|
|
12312
|
+
}
|
|
12313
|
+
}
|
|
12314
|
+
}, {
|
|
12315
|
+
key: 'parseColorFnString',
|
|
12316
|
+
value: function parseColorFnString(colorString) {
|
|
12317
|
+
var _ref41 = colorString.match(colorFnRegex) || [], _ref42 = _slicedToArray(_ref41, 3), colorFunc = _ref42[1], colorValStr = _ref42[2];
|
|
12318
|
+
if (!colorFunc || !colorValStr) {
|
|
12319
|
+
return;
|
|
12320
|
+
}
|
|
12321
|
+
var colorVals = colorValStr.split(/\s*[,\/\s]\s*/).map(function(str) {
|
|
12322
|
+
return str.replace(',', '').trim();
|
|
12323
|
+
}).filter(function(str) {
|
|
12324
|
+
return str !== '';
|
|
12325
|
+
});
|
|
12326
|
+
var colorNums = colorVals.map(function(val, index) {
|
|
12327
|
+
return convertColorVal(colorFunc, val, index);
|
|
12328
|
+
});
|
|
12329
|
+
if (colorFunc.substr(0, 3) === 'hsl') {
|
|
12330
|
+
colorNums = hslToRgb(colorNums);
|
|
12331
|
+
}
|
|
12332
|
+
this.red = colorNums[0];
|
|
12333
|
+
this.green = colorNums[1];
|
|
12334
|
+
this.blue = colorNums[2];
|
|
12335
|
+
this.alpha = typeof colorNums[3] === 'number' ? colorNums[3] : 1;
|
|
12336
|
+
}
|
|
12337
|
+
}, {
|
|
12338
|
+
key: 'getRelativeLuminance',
|
|
12339
|
+
value: function getRelativeLuminance() {
|
|
12340
|
+
var rSRGB = this.red / 255;
|
|
12341
|
+
var gSRGB = this.green / 255;
|
|
12342
|
+
var bSRGB = this.blue / 255;
|
|
12343
|
+
var r = rSRGB <= .03928 ? rSRGB / 12.92 : Math.pow((rSRGB + .055) / 1.055, 2.4);
|
|
12344
|
+
var g = gSRGB <= .03928 ? gSRGB / 12.92 : Math.pow((gSRGB + .055) / 1.055, 2.4);
|
|
12345
|
+
var b = bSRGB <= .03928 ? bSRGB / 12.92 : Math.pow((bSRGB + .055) / 1.055, 2.4);
|
|
12346
|
+
return .2126 * r + .7152 * g + .0722 * b;
|
|
12347
|
+
}
|
|
12348
|
+
} ]);
|
|
12349
|
+
return Color;
|
|
12350
|
+
}();
|
|
12351
|
+
var color_default = Color;
|
|
12051
12352
|
function convertColorVal(colorFunc, value, index) {
|
|
12052
12353
|
if (/%$/.test(value)) {
|
|
12053
12354
|
if (index === 3) {
|
|
@@ -12065,8 +12366,8 @@
|
|
|
12065
12366
|
}
|
|
12066
12367
|
return parseFloat(value);
|
|
12067
12368
|
}
|
|
12068
|
-
function hslToRgb(
|
|
12069
|
-
var
|
|
12369
|
+
function hslToRgb(_ref43) {
|
|
12370
|
+
var _ref44 = _slicedToArray(_ref43, 4), hue = _ref44[0], saturation = _ref44[1], lightness = _ref44[2], alpha = _ref44[3];
|
|
12070
12371
|
saturation /= 255;
|
|
12071
12372
|
lightness /= 255;
|
|
12072
12373
|
var high = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
@@ -12090,112 +12391,6 @@
|
|
|
12090
12391
|
return Math.round((color + base) * 255);
|
|
12091
12392
|
}).concat(alpha);
|
|
12092
12393
|
}
|
|
12093
|
-
function Color(red, green, blue) {
|
|
12094
|
-
var alpha = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
12095
|
-
this.red = red;
|
|
12096
|
-
this.green = green;
|
|
12097
|
-
this.blue = blue;
|
|
12098
|
-
this.alpha = alpha;
|
|
12099
|
-
this.toHexString = function toHexString() {
|
|
12100
|
-
var redString = Math.round(this.red).toString(16);
|
|
12101
|
-
var greenString = Math.round(this.green).toString(16);
|
|
12102
|
-
var blueString = Math.round(this.blue).toString(16);
|
|
12103
|
-
return '#' + (this.red > 15.5 ? redString : '0' + redString) + (this.green > 15.5 ? greenString : '0' + greenString) + (this.blue > 15.5 ? blueString : '0' + blueString);
|
|
12104
|
-
};
|
|
12105
|
-
this.toJSON = function toJSON() {
|
|
12106
|
-
var red2 = this.red, green2 = this.green, blue2 = this.blue, alpha2 = this.alpha;
|
|
12107
|
-
return {
|
|
12108
|
-
red: red2,
|
|
12109
|
-
green: green2,
|
|
12110
|
-
blue: blue2,
|
|
12111
|
-
alpha: alpha2
|
|
12112
|
-
};
|
|
12113
|
-
};
|
|
12114
|
-
var hexRegex = /^#[0-9a-f]{3,8}$/i;
|
|
12115
|
-
var colorFnRegex = /^((?:rgb|hsl)a?)\s*\(([^\)]*)\)/i;
|
|
12116
|
-
this.parseString = function parseString(colorString) {
|
|
12117
|
-
if (standards_default.cssColors[colorString] || colorString === 'transparent') {
|
|
12118
|
-
var _ref38 = standards_default.cssColors[colorString] || [ 0, 0, 0 ], _ref39 = _slicedToArray(_ref38, 3), red2 = _ref39[0], green2 = _ref39[1], blue2 = _ref39[2];
|
|
12119
|
-
this.red = red2;
|
|
12120
|
-
this.green = green2;
|
|
12121
|
-
this.blue = blue2;
|
|
12122
|
-
this.alpha = colorString === 'transparent' ? 0 : 1;
|
|
12123
|
-
return this;
|
|
12124
|
-
}
|
|
12125
|
-
if (colorString.match(colorFnRegex)) {
|
|
12126
|
-
this.parseColorFnString(colorString);
|
|
12127
|
-
return this;
|
|
12128
|
-
}
|
|
12129
|
-
if (colorString.match(hexRegex)) {
|
|
12130
|
-
this.parseHexString(colorString);
|
|
12131
|
-
return this;
|
|
12132
|
-
}
|
|
12133
|
-
throw new Error('Unable to parse color "'.concat(colorString, '"'));
|
|
12134
|
-
};
|
|
12135
|
-
this.parseRgbString = function parseRgbString(colorString) {
|
|
12136
|
-
if (colorString === 'transparent') {
|
|
12137
|
-
this.red = 0;
|
|
12138
|
-
this.green = 0;
|
|
12139
|
-
this.blue = 0;
|
|
12140
|
-
this.alpha = 0;
|
|
12141
|
-
return;
|
|
12142
|
-
}
|
|
12143
|
-
this.parseColorFnString(colorString);
|
|
12144
|
-
};
|
|
12145
|
-
this.parseHexString = function parseHexString(colorString) {
|
|
12146
|
-
if (!colorString.match(hexRegex) || [ 6, 8 ].includes(colorString.length)) {
|
|
12147
|
-
return;
|
|
12148
|
-
}
|
|
12149
|
-
colorString = colorString.replace('#', '');
|
|
12150
|
-
if (colorString.length < 6) {
|
|
12151
|
-
var _colorString = colorString, _colorString2 = _slicedToArray(_colorString, 4), r = _colorString2[0], g = _colorString2[1], b = _colorString2[2], a = _colorString2[3];
|
|
12152
|
-
colorString = r + r + g + g + b + b;
|
|
12153
|
-
if (a) {
|
|
12154
|
-
colorString += a + a;
|
|
12155
|
-
}
|
|
12156
|
-
}
|
|
12157
|
-
var aRgbHex = colorString.match(/.{1,2}/g);
|
|
12158
|
-
this.red = parseInt(aRgbHex[0], 16);
|
|
12159
|
-
this.green = parseInt(aRgbHex[1], 16);
|
|
12160
|
-
this.blue = parseInt(aRgbHex[2], 16);
|
|
12161
|
-
if (aRgbHex[3]) {
|
|
12162
|
-
this.alpha = parseInt(aRgbHex[3], 16) / 255;
|
|
12163
|
-
} else {
|
|
12164
|
-
this.alpha = 1;
|
|
12165
|
-
}
|
|
12166
|
-
};
|
|
12167
|
-
this.parseColorFnString = function parseColorFnString(colorString) {
|
|
12168
|
-
var _ref40 = colorString.match(colorFnRegex) || [], _ref41 = _slicedToArray(_ref40, 3), colorFunc = _ref41[1], colorValStr = _ref41[2];
|
|
12169
|
-
if (!colorFunc || !colorValStr) {
|
|
12170
|
-
return;
|
|
12171
|
-
}
|
|
12172
|
-
var colorVals = colorValStr.split(/\s*[,\/\s]\s*/).map(function(str) {
|
|
12173
|
-
return str.replace(',', '').trim();
|
|
12174
|
-
}).filter(function(str) {
|
|
12175
|
-
return str !== '';
|
|
12176
|
-
});
|
|
12177
|
-
var colorNums = colorVals.map(function(val, index) {
|
|
12178
|
-
return convertColorVal(colorFunc, val, index);
|
|
12179
|
-
});
|
|
12180
|
-
if (colorFunc.substr(0, 3) === 'hsl') {
|
|
12181
|
-
colorNums = hslToRgb(colorNums);
|
|
12182
|
-
}
|
|
12183
|
-
this.red = colorNums[0];
|
|
12184
|
-
this.green = colorNums[1];
|
|
12185
|
-
this.blue = colorNums[2];
|
|
12186
|
-
this.alpha = typeof colorNums[3] === 'number' ? colorNums[3] : 1;
|
|
12187
|
-
};
|
|
12188
|
-
this.getRelativeLuminance = function getRelativeLuminance() {
|
|
12189
|
-
var rSRGB = this.red / 255;
|
|
12190
|
-
var gSRGB = this.green / 255;
|
|
12191
|
-
var bSRGB = this.blue / 255;
|
|
12192
|
-
var r = rSRGB <= .03928 ? rSRGB / 12.92 : Math.pow((rSRGB + .055) / 1.055, 2.4);
|
|
12193
|
-
var g = gSRGB <= .03928 ? gSRGB / 12.92 : Math.pow((gSRGB + .055) / 1.055, 2.4);
|
|
12194
|
-
var b = bSRGB <= .03928 ? bSRGB / 12.92 : Math.pow((bSRGB + .055) / 1.055, 2.4);
|
|
12195
|
-
return .2126 * r + .7152 * g + .0722 * b;
|
|
12196
|
-
};
|
|
12197
|
-
}
|
|
12198
|
-
var color_default = Color;
|
|
12199
12394
|
function getOwnBackgroundColor(elmStyle) {
|
|
12200
12395
|
var bgColor = new color_default();
|
|
12201
12396
|
bgColor.parseString(elmStyle.getPropertyValue('background-color'));
|
|
@@ -12275,8 +12470,8 @@
|
|
|
12275
12470
|
if (!refs || !refs.length) {
|
|
12276
12471
|
return false;
|
|
12277
12472
|
}
|
|
12278
|
-
return refs.some(function(
|
|
12279
|
-
var actualNode =
|
|
12473
|
+
return refs.some(function(_ref45) {
|
|
12474
|
+
var actualNode = _ref45.actualNode;
|
|
12280
12475
|
return isVisible(actualNode, screenReader, recursed);
|
|
12281
12476
|
});
|
|
12282
12477
|
}
|
|
@@ -12288,7 +12483,7 @@
|
|
|
12288
12483
|
var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
|
|
12289
12484
|
el = vNode ? vNode.actualNode : el;
|
|
12290
12485
|
var cacheName = '_isVisible' + (screenReader ? 'ScreenReader' : '');
|
|
12291
|
-
var
|
|
12486
|
+
var _ref46 = (_window$Node2 = window.Node) !== null && _window$Node2 !== void 0 ? _window$Node2 : {}, DOCUMENT_NODE = _ref46.DOCUMENT_NODE, DOCUMENT_FRAGMENT_NODE = _ref46.DOCUMENT_FRAGMENT_NODE;
|
|
12292
12487
|
var nodeType = vNode ? vNode.props.nodeType : el.nodeType;
|
|
12293
12488
|
var nodeName2 = vNode ? vNode.props.nodeName : el.nodeName.toLowerCase();
|
|
12294
12489
|
if (vNode && typeof vNode[cacheName] !== 'undefined') {
|
|
@@ -12533,7 +12728,7 @@
|
|
|
12533
12728
|
}
|
|
12534
12729
|
var visually_overlaps_default = visuallyOverlaps;
|
|
12535
12730
|
var isXHTMLGlobal;
|
|
12536
|
-
var
|
|
12731
|
+
var nodeIndex2 = 0;
|
|
12537
12732
|
var VirtualNode = function(_abstract_virtual_nod) {
|
|
12538
12733
|
_inherits(VirtualNode, _abstract_virtual_nod);
|
|
12539
12734
|
var _super = _createSuper(VirtualNode);
|
|
@@ -12546,9 +12741,9 @@
|
|
|
12546
12741
|
_this.actualNode = node;
|
|
12547
12742
|
_this.parent = parent;
|
|
12548
12743
|
if (!parent) {
|
|
12549
|
-
|
|
12744
|
+
nodeIndex2 = 0;
|
|
12550
12745
|
}
|
|
12551
|
-
_this.nodeIndex =
|
|
12746
|
+
_this.nodeIndex = nodeIndex2++;
|
|
12552
12747
|
_this._isHidden = null;
|
|
12553
12748
|
_this._cache = {};
|
|
12554
12749
|
if (typeof isXHTMLGlobal === 'undefined') {
|
|
@@ -12679,8 +12874,8 @@
|
|
|
12679
12874
|
return;
|
|
12680
12875
|
}
|
|
12681
12876
|
var shadowId = domTree[0].shadowId;
|
|
12682
|
-
for (var
|
|
12683
|
-
if (expressions[
|
|
12877
|
+
for (var _i10 = 0; _i10 < expressions.length; _i10++) {
|
|
12878
|
+
if (expressions[_i10].length > 1 && expressions[_i10].some(function(expression) {
|
|
12684
12879
|
return isGlobalSelector(expression);
|
|
12685
12880
|
})) {
|
|
12686
12881
|
return;
|
|
@@ -12741,9 +12936,9 @@
|
|
|
12741
12936
|
nodes = nodes ? getSharedValues(_cachedNodes, nodes) : _cachedNodes;
|
|
12742
12937
|
}
|
|
12743
12938
|
if (exp.attributes) {
|
|
12744
|
-
for (var
|
|
12939
|
+
for (var _i11 = 0; _i11 < exp.attributes.length; _i11++) {
|
|
12745
12940
|
var _selectorMap;
|
|
12746
|
-
var attr = exp.attributes[
|
|
12941
|
+
var attr = exp.attributes[_i11];
|
|
12747
12942
|
if (attr.type === 'attrValue') {
|
|
12748
12943
|
isComplexSelector = true;
|
|
12749
12944
|
}
|
|
@@ -13099,7 +13294,7 @@
|
|
|
13099
13294
|
return {};
|
|
13100
13295
|
}
|
|
13101
13296
|
var navigator = win.navigator, innerHeight = win.innerHeight, innerWidth = win.innerWidth;
|
|
13102
|
-
var
|
|
13297
|
+
var _ref47 = getOrientation(win) || {}, angle = _ref47.angle, type = _ref47.type;
|
|
13103
13298
|
return {
|
|
13104
13299
|
userAgent: navigator.userAgent,
|
|
13105
13300
|
windowWidth: innerWidth,
|
|
@@ -13108,12 +13303,12 @@
|
|
|
13108
13303
|
orientationType: type
|
|
13109
13304
|
};
|
|
13110
13305
|
}
|
|
13111
|
-
function getOrientation(
|
|
13112
|
-
var screen =
|
|
13306
|
+
function getOrientation(_ref48) {
|
|
13307
|
+
var screen = _ref48.screen;
|
|
13113
13308
|
return screen.orientation || screen.msOrientation || screen.mozOrientation;
|
|
13114
13309
|
}
|
|
13115
|
-
function createFrameContext(frame,
|
|
13116
|
-
var focusable =
|
|
13310
|
+
function createFrameContext(frame, _ref49) {
|
|
13311
|
+
var focusable = _ref49.focusable, page = _ref49.page;
|
|
13117
13312
|
return {
|
|
13118
13313
|
node: frame,
|
|
13119
13314
|
include: [],
|
|
@@ -13180,8 +13375,8 @@
|
|
|
13180
13375
|
if (!isArrayLike(selectorList)) {
|
|
13181
13376
|
selectorList = [ selectorList ];
|
|
13182
13377
|
}
|
|
13183
|
-
for (var
|
|
13184
|
-
var normalizedSelector = normalizeContextSelector(selectorList[
|
|
13378
|
+
for (var _i12 = 0; _i12 < selectorList.length; _i12++) {
|
|
13379
|
+
var normalizedSelector = normalizeContextSelector(selectorList[_i12]);
|
|
13185
13380
|
if (normalizedSelector) {
|
|
13186
13381
|
normalizedList.push(normalizedSelector);
|
|
13187
13382
|
}
|
|
@@ -13277,8 +13472,8 @@
|
|
|
13277
13472
|
}
|
|
13278
13473
|
function parseSelectorArray(context, type) {
|
|
13279
13474
|
var result = [];
|
|
13280
|
-
for (var
|
|
13281
|
-
var item = context[type][
|
|
13475
|
+
for (var _i13 = 0, l = context[type].length; _i13 < l; _i13++) {
|
|
13476
|
+
var item = context[type][_i13];
|
|
13282
13477
|
if (item instanceof window.Node) {
|
|
13283
13478
|
if (item.documentElement instanceof window.Node) {
|
|
13284
13479
|
result.push(context.flatTree[0]);
|
|
@@ -13352,8 +13547,8 @@
|
|
|
13352
13547
|
}
|
|
13353
13548
|
context.frames.push(createFrameContext(frame, context));
|
|
13354
13549
|
}
|
|
13355
|
-
function isPageContext(
|
|
13356
|
-
var include =
|
|
13550
|
+
function isPageContext(_ref50) {
|
|
13551
|
+
var include = _ref50.include;
|
|
13357
13552
|
return include.length === 1 && include[0].actualNode === document.documentElement;
|
|
13358
13553
|
}
|
|
13359
13554
|
function validateContext(context) {
|
|
@@ -13362,11 +13557,11 @@
|
|
|
13362
13557
|
throw new Error('No elements found for include in ' + env + ' Context');
|
|
13363
13558
|
}
|
|
13364
13559
|
}
|
|
13365
|
-
function getRootNode2(
|
|
13366
|
-
var include =
|
|
13560
|
+
function getRootNode2(_ref51) {
|
|
13561
|
+
var include = _ref51.include, exclude = _ref51.exclude;
|
|
13367
13562
|
var selectors = Array.from(include).concat(Array.from(exclude));
|
|
13368
|
-
for (var
|
|
13369
|
-
var item = selectors[
|
|
13563
|
+
for (var _i14 = 0; _i14 < selectors.length; _i14++) {
|
|
13564
|
+
var item = selectors[_i14];
|
|
13370
13565
|
if (item instanceof window.Element) {
|
|
13371
13566
|
return item.ownerDocument.documentElement;
|
|
13372
13567
|
}
|
|
@@ -13382,8 +13577,8 @@
|
|
|
13382
13577
|
return [];
|
|
13383
13578
|
}
|
|
13384
13579
|
var _Context = new Context(context), frames = _Context.frames;
|
|
13385
|
-
return frames.map(function(
|
|
13386
|
-
var node =
|
|
13580
|
+
return frames.map(function(_ref52) {
|
|
13581
|
+
var node = _ref52.node, frameContext = _objectWithoutProperties(_ref52, _excluded7);
|
|
13387
13582
|
frameContext.initiator = false;
|
|
13388
13583
|
var frameSelector = _getAncestry(node);
|
|
13389
13584
|
return {
|
|
@@ -13532,8 +13727,8 @@
|
|
|
13532
13727
|
return !!standards_default.htmlElms[nodeName2];
|
|
13533
13728
|
}
|
|
13534
13729
|
var is_html_element_default = isHtmlElement;
|
|
13535
|
-
function _isNodeInContext(node,
|
|
13536
|
-
var
|
|
13730
|
+
function _isNodeInContext(node, _ref53) {
|
|
13731
|
+
var _ref53$include = _ref53.include, include = _ref53$include === void 0 ? [] : _ref53$include, _ref53$exclude = _ref53.exclude, exclude = _ref53$exclude === void 0 ? [] : _ref53$exclude;
|
|
13537
13732
|
var filterInclude = include.filter(function(candidate) {
|
|
13538
13733
|
return _contains(candidate, node);
|
|
13539
13734
|
});
|
|
@@ -14040,9 +14235,9 @@
|
|
|
14040
14235
|
var childAny = null;
|
|
14041
14236
|
var combinedLength = (((_currentLevel$anyLeve = currentLevel.anyLevel) === null || _currentLevel$anyLeve === void 0 ? void 0 : _currentLevel$anyLeve.length) || 0) + (((_currentLevel$thisLev = currentLevel.thisLevel) === null || _currentLevel$thisLev === void 0 ? void 0 : _currentLevel$thisLev.length) || 0);
|
|
14042
14237
|
var added = false;
|
|
14043
|
-
for (var
|
|
14238
|
+
for (var _i15 = 0; _i15 < combinedLength; _i15++) {
|
|
14044
14239
|
var _currentLevel$anyLeve2, _currentLevel$anyLeve3, _currentLevel$anyLeve4;
|
|
14045
|
-
var exp =
|
|
14240
|
+
var exp = _i15 < (((_currentLevel$anyLeve2 = currentLevel.anyLevel) === null || _currentLevel$anyLeve2 === void 0 ? void 0 : _currentLevel$anyLeve2.length) || 0) ? currentLevel.anyLevel[_i15] : currentLevel.thisLevel[_i15 - (((_currentLevel$anyLeve3 = currentLevel.anyLevel) === null || _currentLevel$anyLeve3 === void 0 ? void 0 : _currentLevel$anyLeve3.length) || 0)];
|
|
14046
14241
|
if ((!exp[0].id || vNode.shadowId === currentLevel.parentShadowId) && _matchesExpression(vNode, exp[0])) {
|
|
14047
14242
|
if (exp.length === 1) {
|
|
14048
14243
|
if (!added && (!filter || filter(vNode))) {
|
|
@@ -14086,8 +14281,8 @@
|
|
|
14086
14281
|
return matchExpressions(domTree, expressions, filter);
|
|
14087
14282
|
}
|
|
14088
14283
|
var query_selector_all_filter_default = querySelectorAllFilter;
|
|
14089
|
-
function preloadCssom(
|
|
14090
|
-
var
|
|
14284
|
+
function preloadCssom(_ref54) {
|
|
14285
|
+
var _ref54$treeRoot = _ref54.treeRoot, treeRoot = _ref54$treeRoot === void 0 ? axe._tree[0] : _ref54$treeRoot;
|
|
14091
14286
|
var rootNodes = getAllRootNodesInTree(treeRoot);
|
|
14092
14287
|
if (!rootNodes.length) {
|
|
14093
14288
|
return Promise.resolve();
|
|
@@ -14117,8 +14312,8 @@
|
|
|
14117
14312
|
}
|
|
14118
14313
|
function getCssomForAllRootNodes(rootNodes, convertDataToStylesheet) {
|
|
14119
14314
|
var promises = [];
|
|
14120
|
-
rootNodes.forEach(function(
|
|
14121
|
-
var rootNode =
|
|
14315
|
+
rootNodes.forEach(function(_ref55, index) {
|
|
14316
|
+
var rootNode = _ref55.rootNode, shadowId = _ref55.shadowId;
|
|
14122
14317
|
var sheets = getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet);
|
|
14123
14318
|
if (!sheets) {
|
|
14124
14319
|
return Promise.all(promises);
|
|
@@ -14202,10 +14397,10 @@
|
|
|
14202
14397
|
return true;
|
|
14203
14398
|
});
|
|
14204
14399
|
}
|
|
14205
|
-
function preloadMedia(
|
|
14206
|
-
var
|
|
14207
|
-
var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(
|
|
14208
|
-
var actualNode =
|
|
14400
|
+
function preloadMedia(_ref56) {
|
|
14401
|
+
var _ref56$treeRoot = _ref56.treeRoot, treeRoot = _ref56$treeRoot === void 0 ? axe._tree[0] : _ref56$treeRoot;
|
|
14402
|
+
var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(_ref57) {
|
|
14403
|
+
var actualNode = _ref57.actualNode;
|
|
14209
14404
|
if (actualNode.hasAttribute('src')) {
|
|
14210
14405
|
return !!actualNode.getAttribute('src');
|
|
14211
14406
|
}
|
|
@@ -14217,8 +14412,8 @@
|
|
|
14217
14412
|
}
|
|
14218
14413
|
return true;
|
|
14219
14414
|
});
|
|
14220
|
-
return Promise.all(mediaVirtualNodes.map(function(
|
|
14221
|
-
var actualNode =
|
|
14415
|
+
return Promise.all(mediaVirtualNodes.map(function(_ref58) {
|
|
14416
|
+
var actualNode = _ref58.actualNode;
|
|
14222
14417
|
return isMediaElementReady(actualNode);
|
|
14223
14418
|
}));
|
|
14224
14419
|
}
|
|
@@ -14469,8 +14664,8 @@
|
|
|
14469
14664
|
}
|
|
14470
14665
|
var outerIncludes = getOuterIncludes(context.include);
|
|
14471
14666
|
var isInContext = getContextFilter(context);
|
|
14472
|
-
for (var
|
|
14473
|
-
candidate = outerIncludes[
|
|
14667
|
+
for (var _i16 = 0; _i16 < outerIncludes.length; _i16++) {
|
|
14668
|
+
candidate = outerIncludes[_i16];
|
|
14474
14669
|
var nodes = query_selector_all_filter_default(candidate, selector, isInContext);
|
|
14475
14670
|
result = mergeArrayUniques(result, nodes);
|
|
14476
14671
|
}
|
|
@@ -14507,9 +14702,9 @@
|
|
|
14507
14702
|
arr1 = arr2;
|
|
14508
14703
|
arr2 = temp;
|
|
14509
14704
|
}
|
|
14510
|
-
for (var
|
|
14511
|
-
if (!arr1.includes(arr2[
|
|
14512
|
-
arr1.push(arr2[
|
|
14705
|
+
for (var _i17 = 0, l = arr2.length; _i17 < l; _i17++) {
|
|
14706
|
+
if (!arr1.includes(arr2[_i17])) {
|
|
14707
|
+
arr1.push(arr2[_i17]);
|
|
14513
14708
|
}
|
|
14514
14709
|
}
|
|
14515
14710
|
return arr1;
|
|
@@ -14523,8 +14718,8 @@
|
|
|
14523
14718
|
}
|
|
14524
14719
|
}
|
|
14525
14720
|
function setScrollState(scrollState) {
|
|
14526
|
-
scrollState.forEach(function(
|
|
14527
|
-
var elm =
|
|
14721
|
+
scrollState.forEach(function(_ref60) {
|
|
14722
|
+
var elm = _ref60.elm, top = _ref60.top, left = _ref60.left;
|
|
14528
14723
|
return setScroll(elm, top, left);
|
|
14529
14724
|
});
|
|
14530
14725
|
}
|
|
@@ -14552,8 +14747,8 @@
|
|
|
14552
14747
|
}
|
|
14553
14748
|
return selectAllRecursive(selectorArr, doc);
|
|
14554
14749
|
}
|
|
14555
|
-
function selectAllRecursive(
|
|
14556
|
-
var
|
|
14750
|
+
function selectAllRecursive(_ref61, doc) {
|
|
14751
|
+
var _ref62 = _toArray(_ref61), selectorStr = _ref62[0], restSelector = _ref62.slice(1);
|
|
14557
14752
|
var elms = doc.querySelectorAll(selectorStr);
|
|
14558
14753
|
if (restSelector.length === 0) {
|
|
14559
14754
|
return Array.from(elms);
|
|
@@ -14584,8 +14779,8 @@
|
|
|
14584
14779
|
while (lang.length < 3) {
|
|
14585
14780
|
lang += '`';
|
|
14586
14781
|
}
|
|
14587
|
-
for (var
|
|
14588
|
-
var index = lang.charCodeAt(
|
|
14782
|
+
for (var _i18 = 0; _i18 <= lang.length - 1; _i18++) {
|
|
14783
|
+
var index = lang.charCodeAt(_i18) - 96;
|
|
14589
14784
|
array = array[index];
|
|
14590
14785
|
if (!array) {
|
|
14591
14786
|
return false;
|
|
@@ -14657,9 +14852,9 @@
|
|
|
14657
14852
|
nodeTypeToName[nodeNamesToTypes[nodeName2]] = nodeName2;
|
|
14658
14853
|
});
|
|
14659
14854
|
function normaliseProps(serialNode) {
|
|
14660
|
-
var _serialNode$nodeName,
|
|
14855
|
+
var _serialNode$nodeName, _ref63, _serialNode$nodeType;
|
|
14661
14856
|
var nodeName2 = (_serialNode$nodeName = serialNode.nodeName) !== null && _serialNode$nodeName !== void 0 ? _serialNode$nodeName : nodeTypeToName[serialNode.nodeType];
|
|
14662
|
-
var nodeType = (
|
|
14857
|
+
var nodeType = (_ref63 = (_serialNode$nodeType = serialNode.nodeType) !== null && _serialNode$nodeType !== void 0 ? _serialNode$nodeType : nodeNamesToTypes[serialNode.nodeName]) !== null && _ref63 !== void 0 ? _ref63 : 1;
|
|
14663
14858
|
assert_default(typeof nodeType === 'number', 'nodeType has to be a number, got \''.concat(nodeType, '\''));
|
|
14664
14859
|
assert_default(typeof nodeName2 === 'string', 'nodeName has to be a string, got \''.concat(nodeName2, '\''));
|
|
14665
14860
|
nodeName2 = nodeName2.toLowerCase();
|
|
@@ -14680,8 +14875,8 @@
|
|
|
14680
14875
|
delete props.attributes;
|
|
14681
14876
|
return Object.freeze(props);
|
|
14682
14877
|
}
|
|
14683
|
-
function normaliseAttrs(
|
|
14684
|
-
var
|
|
14878
|
+
function normaliseAttrs(_ref64) {
|
|
14879
|
+
var _ref64$attributes = _ref64.attributes, attributes2 = _ref64$attributes === void 0 ? {} : _ref64$attributes;
|
|
14685
14880
|
var attrMap = {
|
|
14686
14881
|
htmlFor: 'for',
|
|
14687
14882
|
className: 'class'
|
|
@@ -14950,6 +15145,9 @@
|
|
|
14950
15145
|
isAriaRoleAllowedOnElement: function isAriaRoleAllowedOnElement() {
|
|
14951
15146
|
return is_aria_role_allowed_on_element_default;
|
|
14952
15147
|
},
|
|
15148
|
+
isComboboxPopup: function isComboboxPopup() {
|
|
15149
|
+
return _isComboboxPopup;
|
|
15150
|
+
},
|
|
14953
15151
|
isUnsupportedRole: function isUnsupportedRole() {
|
|
14954
15152
|
return is_unsupported_role_default;
|
|
14955
15153
|
},
|
|
@@ -15007,8 +15205,8 @@
|
|
|
15007
15205
|
idRefs[id] = idRefs[id] || [];
|
|
15008
15206
|
idRefs[id].push(node);
|
|
15009
15207
|
}
|
|
15010
|
-
for (var
|
|
15011
|
-
var attr = refAttrs[
|
|
15208
|
+
for (var _i19 = 0; _i19 < refAttrs.length; ++_i19) {
|
|
15209
|
+
var attr = refAttrs[_i19];
|
|
15012
15210
|
var attrValue = sanitize_default(node.getAttribute(attr) || '');
|
|
15013
15211
|
if (!attrValue) {
|
|
15014
15212
|
continue;
|
|
@@ -15020,9 +15218,9 @@
|
|
|
15020
15218
|
}
|
|
15021
15219
|
}
|
|
15022
15220
|
}
|
|
15023
|
-
for (var
|
|
15024
|
-
if (node.childNodes[
|
|
15025
|
-
cacheIdRefs(node.childNodes[
|
|
15221
|
+
for (var _i20 = 0; _i20 < node.childNodes.length; _i20++) {
|
|
15222
|
+
if (node.childNodes[_i20].nodeType === 1) {
|
|
15223
|
+
cacheIdRefs(node.childNodes[_i20], idRefs, refAttrs);
|
|
15026
15224
|
}
|
|
15027
15225
|
}
|
|
15028
15226
|
}
|
|
@@ -16869,8 +17067,8 @@
|
|
|
16869
17067
|
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
17068
|
} ];
|
|
16871
17069
|
lookupTable.evaluateRoleForElement = {
|
|
16872
|
-
A: function A(
|
|
16873
|
-
var node =
|
|
17070
|
+
A: function A(_ref65) {
|
|
17071
|
+
var node = _ref65.node, out = _ref65.out;
|
|
16874
17072
|
if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
|
|
16875
17073
|
return true;
|
|
16876
17074
|
}
|
|
@@ -16879,19 +17077,19 @@
|
|
|
16879
17077
|
}
|
|
16880
17078
|
return true;
|
|
16881
17079
|
},
|
|
16882
|
-
AREA: function AREA(
|
|
16883
|
-
var node =
|
|
17080
|
+
AREA: function AREA(_ref66) {
|
|
17081
|
+
var node = _ref66.node;
|
|
16884
17082
|
return !node.href;
|
|
16885
17083
|
},
|
|
16886
|
-
BUTTON: function BUTTON(
|
|
16887
|
-
var node =
|
|
17084
|
+
BUTTON: function BUTTON(_ref67) {
|
|
17085
|
+
var node = _ref67.node, role = _ref67.role, out = _ref67.out;
|
|
16888
17086
|
if (node.getAttribute('type') === 'menu') {
|
|
16889
17087
|
return role === 'menuitem';
|
|
16890
17088
|
}
|
|
16891
17089
|
return out;
|
|
16892
17090
|
},
|
|
16893
|
-
IMG: function IMG(
|
|
16894
|
-
var node =
|
|
17091
|
+
IMG: function IMG(_ref68) {
|
|
17092
|
+
var node = _ref68.node, role = _ref68.role, out = _ref68.out;
|
|
16895
17093
|
switch (node.alt) {
|
|
16896
17094
|
case null:
|
|
16897
17095
|
return out;
|
|
@@ -16903,8 +17101,8 @@
|
|
|
16903
17101
|
return role !== 'presentation' && role !== 'none';
|
|
16904
17102
|
}
|
|
16905
17103
|
},
|
|
16906
|
-
INPUT: function INPUT(
|
|
16907
|
-
var node =
|
|
17104
|
+
INPUT: function INPUT(_ref69) {
|
|
17105
|
+
var node = _ref69.node, role = _ref69.role, out = _ref69.out;
|
|
16908
17106
|
switch (node.type) {
|
|
16909
17107
|
case 'button':
|
|
16910
17108
|
case 'image':
|
|
@@ -16934,32 +17132,32 @@
|
|
|
16934
17132
|
return false;
|
|
16935
17133
|
}
|
|
16936
17134
|
},
|
|
16937
|
-
LI: function LI(
|
|
16938
|
-
var node =
|
|
17135
|
+
LI: function LI(_ref70) {
|
|
17136
|
+
var node = _ref70.node, out = _ref70.out;
|
|
16939
17137
|
var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
|
|
16940
17138
|
if (hasImplicitListitemRole) {
|
|
16941
17139
|
return out;
|
|
16942
17140
|
}
|
|
16943
17141
|
return true;
|
|
16944
17142
|
},
|
|
16945
|
-
MENU: function MENU(
|
|
16946
|
-
var node =
|
|
17143
|
+
MENU: function MENU(_ref71) {
|
|
17144
|
+
var node = _ref71.node;
|
|
16947
17145
|
if (node.getAttribute('type') === 'context') {
|
|
16948
17146
|
return false;
|
|
16949
17147
|
}
|
|
16950
17148
|
return true;
|
|
16951
17149
|
},
|
|
16952
|
-
OPTION: function OPTION(
|
|
16953
|
-
var node =
|
|
17150
|
+
OPTION: function OPTION(_ref72) {
|
|
17151
|
+
var node = _ref72.node;
|
|
16954
17152
|
var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
|
|
16955
17153
|
return !withinOptionList;
|
|
16956
17154
|
},
|
|
16957
|
-
SELECT: function SELECT(
|
|
16958
|
-
var node =
|
|
17155
|
+
SELECT: function SELECT(_ref73) {
|
|
17156
|
+
var node = _ref73.node, role = _ref73.role;
|
|
16959
17157
|
return !node.multiple && node.size <= 1 && role === 'menu';
|
|
16960
17158
|
},
|
|
16961
|
-
SVG: function SVG(
|
|
16962
|
-
var node =
|
|
17159
|
+
SVG: function SVG(_ref74) {
|
|
17160
|
+
var node = _ref74.node, out = _ref74.out;
|
|
16963
17161
|
if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
|
|
16964
17162
|
return true;
|
|
16965
17163
|
}
|
|
@@ -16983,6 +17181,42 @@
|
|
|
16983
17181
|
return !!get_accessible_refs_default(node).length;
|
|
16984
17182
|
}
|
|
16985
17183
|
var is_accessible_ref_default = isAccessibleRef;
|
|
17184
|
+
function _isComboboxPopup(virtualNode) {
|
|
17185
|
+
var _popupRoles;
|
|
17186
|
+
var _ref75 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, popupRoles = _ref75.popupRoles;
|
|
17187
|
+
var role = get_role_default(virtualNode);
|
|
17188
|
+
(_popupRoles = popupRoles) !== null && _popupRoles !== void 0 ? _popupRoles : popupRoles = aria_attrs_default['aria-haspopup'].values;
|
|
17189
|
+
if (!popupRoles.includes(role)) {
|
|
17190
|
+
return false;
|
|
17191
|
+
}
|
|
17192
|
+
var vParent = nearestParentWithRole(virtualNode);
|
|
17193
|
+
if (isCombobox(vParent)) {
|
|
17194
|
+
return true;
|
|
17195
|
+
}
|
|
17196
|
+
var id = virtualNode.props.id;
|
|
17197
|
+
if (!id) {
|
|
17198
|
+
return false;
|
|
17199
|
+
}
|
|
17200
|
+
if (!virtualNode.actualNode) {
|
|
17201
|
+
throw new Error('Unable to determine combobox popup without an actualNode');
|
|
17202
|
+
}
|
|
17203
|
+
var root = get_root_node_default(virtualNode.actualNode);
|
|
17204
|
+
var ownedCombobox = root.querySelectorAll('[aria-owns~="'.concat(id, '"][role~="combobox"]:not(select),\n [aria-controls~="').concat(id, '"][role~="combobox"]:not(select)'));
|
|
17205
|
+
return Array.from(ownedCombobox).some(isCombobox);
|
|
17206
|
+
}
|
|
17207
|
+
var isCombobox = function isCombobox(node) {
|
|
17208
|
+
return node && get_role_default(node) === 'combobox';
|
|
17209
|
+
};
|
|
17210
|
+
function nearestParentWithRole(vNode) {
|
|
17211
|
+
while (vNode = vNode.parent) {
|
|
17212
|
+
if (get_role_default(vNode, {
|
|
17213
|
+
noPresentational: true
|
|
17214
|
+
}) !== null) {
|
|
17215
|
+
return vNode;
|
|
17216
|
+
}
|
|
17217
|
+
}
|
|
17218
|
+
return null;
|
|
17219
|
+
}
|
|
16986
17220
|
function label2(node) {
|
|
16987
17221
|
node = get_node_from_tree_default(node);
|
|
16988
17222
|
return label_virtual_default(node);
|
|
@@ -17109,9 +17343,9 @@
|
|
|
17109
17343
|
preChecks[attr] = validateRowAttrs;
|
|
17110
17344
|
});
|
|
17111
17345
|
if (allowed) {
|
|
17112
|
-
for (var
|
|
17346
|
+
for (var _i21 = 0; _i21 < attrs.length; _i21++) {
|
|
17113
17347
|
var _preChecks$attrName;
|
|
17114
|
-
var attrName = attrs[
|
|
17348
|
+
var attrName = attrs[_i21];
|
|
17115
17349
|
if (validate_attr_default(attrName) && (_preChecks$attrName = preChecks[attrName]) !== null && _preChecks$attrName !== void 0 && _preChecks$attrName.call(preChecks)) {
|
|
17116
17350
|
invalid.push(attrName + '="' + virtualNode.attr(attrName) + '"');
|
|
17117
17351
|
} else if (validate_attr_default(attrName) && !allowed.includes(attrName)) {
|
|
@@ -17307,37 +17541,82 @@
|
|
|
17307
17541
|
function isClosedCombobox(vNode, role) {
|
|
17308
17542
|
return role === 'combobox' && vNode.attr('aria-expanded') === 'false';
|
|
17309
17543
|
}
|
|
17544
|
+
function ariaRequiredChildrenEvaluate(node, options, virtualNode) {
|
|
17545
|
+
var reviewEmpty = options && Array.isArray(options.reviewEmpty) ? options.reviewEmpty : [];
|
|
17546
|
+
var role = get_explicit_role_default(virtualNode, {
|
|
17547
|
+
dpub: true
|
|
17548
|
+
});
|
|
17549
|
+
var required = required_owned_default(role);
|
|
17550
|
+
if (required === null) {
|
|
17551
|
+
return true;
|
|
17552
|
+
}
|
|
17553
|
+
var ownedRoles = getOwnedRoles(virtualNode, required);
|
|
17554
|
+
var unallowed = ownedRoles.filter(function(_ref76) {
|
|
17555
|
+
var role2 = _ref76.role;
|
|
17556
|
+
return !required.includes(role2);
|
|
17557
|
+
});
|
|
17558
|
+
if (unallowed.length) {
|
|
17559
|
+
this.relatedNodes(unallowed.map(function(_ref77) {
|
|
17560
|
+
var ownedElement = _ref77.ownedElement;
|
|
17561
|
+
return ownedElement;
|
|
17562
|
+
}));
|
|
17563
|
+
this.data({
|
|
17564
|
+
messageKey: 'unallowed',
|
|
17565
|
+
values: unallowed.map(function(_ref78) {
|
|
17566
|
+
var ownedElement = _ref78.ownedElement, attr = _ref78.attr;
|
|
17567
|
+
return getUnallowedSelector(ownedElement, attr);
|
|
17568
|
+
}).filter(function(selector, index, array) {
|
|
17569
|
+
return array.indexOf(selector) === index;
|
|
17570
|
+
}).join(', ')
|
|
17571
|
+
});
|
|
17572
|
+
return false;
|
|
17573
|
+
}
|
|
17574
|
+
var missing = missingRequiredChildren(virtualNode, role, required, ownedRoles);
|
|
17575
|
+
if (!missing) {
|
|
17576
|
+
return true;
|
|
17577
|
+
}
|
|
17578
|
+
this.data(missing);
|
|
17579
|
+
if (reviewEmpty.includes(role) && !has_content_virtual_default(virtualNode, false, true) && !ownedRoles.length && (!virtualNode.hasAttr('aria-owns') || !idrefs_default(node, 'aria-owns').length)) {
|
|
17580
|
+
return void 0;
|
|
17581
|
+
}
|
|
17582
|
+
return false;
|
|
17583
|
+
}
|
|
17310
17584
|
function getOwnedRoles(virtualNode, required) {
|
|
17311
17585
|
var ownedRoles = [];
|
|
17312
17586
|
var ownedElements = get_owned_virtual_default(virtualNode);
|
|
17313
|
-
var _loop5 = function _loop5(
|
|
17314
|
-
var ownedElement = ownedElements[
|
|
17587
|
+
var _loop5 = function _loop5(_i22) {
|
|
17588
|
+
var ownedElement = ownedElements[_i22];
|
|
17589
|
+
if (ownedElement.props.nodeType !== 1) {
|
|
17590
|
+
return 'continue';
|
|
17591
|
+
}
|
|
17315
17592
|
var role = get_role_default(ownedElement, {
|
|
17316
17593
|
noPresentational: true
|
|
17317
17594
|
});
|
|
17318
|
-
var
|
|
17319
|
-
|
|
17320
|
-
|
|
17321
|
-
var hasGlobalAriaOrFocusable = hasGlobalAria || _isFocusable(ownedElement);
|
|
17322
|
-
if (!role && !hasGlobalAriaOrFocusable || [ 'group', 'rowgroup' ].includes(role) && required.some(function(requiredRole) {
|
|
17595
|
+
var globalAriaAttr = getGlobalAriaAttr(ownedElement);
|
|
17596
|
+
var hasGlobalAriaOrFocusable = !!globalAriaAttr || _isFocusable(ownedElement);
|
|
17597
|
+
if (!_isVisibleToScreenReaders(ownedElement) || !role && !hasGlobalAriaOrFocusable || [ 'group', 'rowgroup' ].includes(role) && required.some(function(requiredRole) {
|
|
17323
17598
|
return requiredRole === role;
|
|
17324
17599
|
})) {
|
|
17325
17600
|
ownedElements.push.apply(ownedElements, _toConsumableArray(ownedElement.children));
|
|
17326
17601
|
} else if (role || hasGlobalAriaOrFocusable) {
|
|
17327
17602
|
ownedRoles.push({
|
|
17328
17603
|
role: role,
|
|
17604
|
+
attr: globalAriaAttr || 'tabindex',
|
|
17329
17605
|
ownedElement: ownedElement
|
|
17330
17606
|
});
|
|
17331
17607
|
}
|
|
17332
17608
|
};
|
|
17333
|
-
for (var
|
|
17334
|
-
_loop5(
|
|
17609
|
+
for (var _i22 = 0; _i22 < ownedElements.length; _i22++) {
|
|
17610
|
+
var _ret2 = _loop5(_i22);
|
|
17611
|
+
if (_ret2 === 'continue') {
|
|
17612
|
+
continue;
|
|
17613
|
+
}
|
|
17335
17614
|
}
|
|
17336
17615
|
return ownedRoles;
|
|
17337
17616
|
}
|
|
17338
17617
|
function missingRequiredChildren(virtualNode, role, required, ownedRoles) {
|
|
17339
|
-
var _loop6 = function _loop6(
|
|
17340
|
-
var role2 = ownedRoles[
|
|
17618
|
+
var _loop6 = function _loop6(_i23) {
|
|
17619
|
+
var role2 = ownedRoles[_i23].role;
|
|
17341
17620
|
if (required.includes(role2)) {
|
|
17342
17621
|
required = required.filter(function(requiredRole) {
|
|
17343
17622
|
return requiredRole !== role2;
|
|
@@ -17347,10 +17626,10 @@
|
|
|
17347
17626
|
};
|
|
17348
17627
|
}
|
|
17349
17628
|
};
|
|
17350
|
-
for (var
|
|
17351
|
-
var
|
|
17352
|
-
if (_typeof(
|
|
17353
|
-
return
|
|
17629
|
+
for (var _i23 = 0; _i23 < ownedRoles.length; _i23++) {
|
|
17630
|
+
var _ret3 = _loop6(_i23);
|
|
17631
|
+
if (_typeof(_ret3) === 'object') {
|
|
17632
|
+
return _ret3.v;
|
|
17354
17633
|
}
|
|
17355
17634
|
}
|
|
17356
17635
|
if (required.length) {
|
|
@@ -17358,41 +17637,27 @@
|
|
|
17358
17637
|
}
|
|
17359
17638
|
return null;
|
|
17360
17639
|
}
|
|
17361
|
-
function
|
|
17362
|
-
|
|
17363
|
-
|
|
17364
|
-
dpub: true
|
|
17640
|
+
function getGlobalAriaAttr(vNode) {
|
|
17641
|
+
return get_global_aria_attrs_default().find(function(attr) {
|
|
17642
|
+
return vNode.hasAttr(attr);
|
|
17365
17643
|
});
|
|
17366
|
-
|
|
17367
|
-
|
|
17368
|
-
|
|
17644
|
+
}
|
|
17645
|
+
function getUnallowedSelector(vNode, attr) {
|
|
17646
|
+
var _vNode$props = vNode.props, nodeName2 = _vNode$props.nodeName, nodeType = _vNode$props.nodeType;
|
|
17647
|
+
if (nodeType === 3) {
|
|
17648
|
+
return '#text';
|
|
17369
17649
|
}
|
|
17370
|
-
var
|
|
17371
|
-
|
|
17372
|
-
var role2 = _ref72.role;
|
|
17373
|
-
return !required.includes(role2);
|
|
17650
|
+
var role = get_explicit_role_default(vNode, {
|
|
17651
|
+
dpub: true
|
|
17374
17652
|
});
|
|
17375
|
-
if (
|
|
17376
|
-
|
|
17377
|
-
var ownedElement = _ref73.ownedElement;
|
|
17378
|
-
return ownedElement;
|
|
17379
|
-
}));
|
|
17380
|
-
this.data({
|
|
17381
|
-
messageKey: 'unallowed'
|
|
17382
|
-
});
|
|
17383
|
-
return false;
|
|
17653
|
+
if (role) {
|
|
17654
|
+
return '[role='.concat(role, ']');
|
|
17384
17655
|
}
|
|
17385
|
-
|
|
17386
|
-
|
|
17387
|
-
return true;
|
|
17656
|
+
if (attr) {
|
|
17657
|
+
return nodeName2 + '['.concat(attr, ']');
|
|
17388
17658
|
}
|
|
17389
|
-
|
|
17390
|
-
if (reviewEmpty.includes(role) && !has_content_virtual_default(virtualNode, false, true) && !ownedRoles.length && (!virtualNode.hasAttr('aria-owns') || !idrefs_default(node, 'aria-owns').length)) {
|
|
17391
|
-
return void 0;
|
|
17392
|
-
}
|
|
17393
|
-
return false;
|
|
17659
|
+
return nodeName2;
|
|
17394
17660
|
}
|
|
17395
|
-
var aria_required_children_evaluate_default = ariaRequiredChildrenEvaluate;
|
|
17396
17661
|
function getMissingContext(virtualNode, ownGroupRoles, reqContext, includeElement) {
|
|
17397
17662
|
var explicitRole2 = get_explicit_role_default(virtualNode);
|
|
17398
17663
|
if (!reqContext) {
|
|
@@ -17448,8 +17713,8 @@
|
|
|
17448
17713
|
}
|
|
17449
17714
|
var owners = getAriaOwners(node);
|
|
17450
17715
|
if (owners) {
|
|
17451
|
-
for (var
|
|
17452
|
-
missingParents = getMissingContext(get_node_from_tree_default(owners[
|
|
17716
|
+
for (var _i24 = 0, l = owners.length; _i24 < l; _i24++) {
|
|
17717
|
+
missingParents = getMissingContext(get_node_from_tree_default(owners[_i24]), ownGroupRoles, missingParents, true);
|
|
17453
17718
|
if (!missingParents) {
|
|
17454
17719
|
return true;
|
|
17455
17720
|
}
|
|
@@ -17686,6 +17951,7 @@
|
|
|
17686
17951
|
};
|
|
17687
17952
|
var VALID_ROLES_FOR_SCROLLABLE_REGIONS = {
|
|
17688
17953
|
application: true,
|
|
17954
|
+
article: true,
|
|
17689
17955
|
banner: false,
|
|
17690
17956
|
complementary: true,
|
|
17691
17957
|
contentinfo: true,
|
|
@@ -17751,6 +18017,9 @@
|
|
|
17751
18017
|
getRectStack: function getRectStack() {
|
|
17752
18018
|
return get_rect_stack_default;
|
|
17753
18019
|
},
|
|
18020
|
+
getStackingContext: function getStackingContext() {
|
|
18021
|
+
return _getStackingContext;
|
|
18022
|
+
},
|
|
17754
18023
|
getTextShadowColors: function getTextShadowColors() {
|
|
17755
18024
|
return get_text_shadow_colors_default;
|
|
17756
18025
|
},
|
|
@@ -17759,6 +18028,9 @@
|
|
|
17759
18028
|
},
|
|
17760
18029
|
incompleteData: function incompleteData() {
|
|
17761
18030
|
return incomplete_data_default;
|
|
18031
|
+
},
|
|
18032
|
+
stackingContextToColor: function stackingContextToColor() {
|
|
18033
|
+
return _stackingContextToColor;
|
|
17762
18034
|
}
|
|
17763
18035
|
});
|
|
17764
18036
|
function centerPointOfRect(rect) {
|
|
@@ -17899,12 +18171,12 @@
|
|
|
17899
18171
|
function simpleAlphaCompositing(Cs, \u03b1s, Cb, \u03b1b, blendMode) {
|
|
17900
18172
|
return \u03b1s * (1 - \u03b1b) * Cs + \u03b1s * \u03b1b * blendFunctions[blendMode](Cb / 255, Cs / 255) * 255 + (1 - \u03b1s) * \u03b1b * Cb;
|
|
17901
18173
|
}
|
|
17902
|
-
function flattenColors(
|
|
18174
|
+
function flattenColors(sourceColor, backdrop) {
|
|
17903
18175
|
var blendMode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'normal';
|
|
17904
|
-
var r = simpleAlphaCompositing(
|
|
17905
|
-
var g = simpleAlphaCompositing(
|
|
17906
|
-
var b = simpleAlphaCompositing(
|
|
17907
|
-
var \u03b1o = clamp(
|
|
18176
|
+
var r = simpleAlphaCompositing(sourceColor.red, sourceColor.alpha, backdrop.red, backdrop.alpha, blendMode);
|
|
18177
|
+
var g = simpleAlphaCompositing(sourceColor.green, sourceColor.alpha, backdrop.green, backdrop.alpha, blendMode);
|
|
18178
|
+
var b = simpleAlphaCompositing(sourceColor.blue, sourceColor.alpha, backdrop.blue, backdrop.alpha, blendMode);
|
|
18179
|
+
var \u03b1o = clamp(sourceColor.alpha + backdrop.alpha * (1 - sourceColor.alpha), 0, 1);
|
|
17908
18180
|
if (\u03b1o === 0) {
|
|
17909
18181
|
return new color_default(r, g, b, \u03b1o);
|
|
17910
18182
|
}
|
|
@@ -17976,7 +18248,7 @@
|
|
|
17976
18248
|
return true;
|
|
17977
18249
|
}
|
|
17978
18250
|
function getTextShadowColors(node) {
|
|
17979
|
-
var
|
|
18251
|
+
var _ref79 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref79.minRatio, maxRatio = _ref79.maxRatio;
|
|
17980
18252
|
var style = window.getComputedStyle(node);
|
|
17981
18253
|
var textShadow = style.getPropertyValue('text-shadow');
|
|
17982
18254
|
if (textShadow === 'none') {
|
|
@@ -17987,8 +18259,8 @@
|
|
|
17987
18259
|
assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
|
|
17988
18260
|
var shadowColors = [];
|
|
17989
18261
|
var shadows = parseTextShadows(textShadow);
|
|
17990
|
-
shadows.forEach(function(
|
|
17991
|
-
var colorStr =
|
|
18262
|
+
shadows.forEach(function(_ref80) {
|
|
18263
|
+
var colorStr = _ref80.colorStr, pixels = _ref80.pixels;
|
|
17992
18264
|
colorStr = colorStr || style.getPropertyValue('color');
|
|
17993
18265
|
var _pixels = _slicedToArray(pixels, 3), offsetY = _pixels[0], offsetX = _pixels[1], _pixels$ = _pixels[2], blurRadius = _pixels$ === void 0 ? 0 : _pixels$;
|
|
17994
18266
|
if ((!minRatio || blurRadius >= fontSize * minRatio) && (!maxRatio || blurRadius < fontSize * maxRatio)) {
|
|
@@ -18038,8 +18310,8 @@
|
|
|
18038
18310
|
}
|
|
18039
18311
|
return shadows;
|
|
18040
18312
|
}
|
|
18041
|
-
function textShadowColor(
|
|
18042
|
-
var colorStr =
|
|
18313
|
+
function textShadowColor(_ref81) {
|
|
18314
|
+
var colorStr = _ref81.colorStr, offsetX = _ref81.offsetX, offsetY = _ref81.offsetY, blurRadius = _ref81.blurRadius, fontSize = _ref81.fontSize;
|
|
18043
18315
|
if (offsetX > blurRadius || offsetY > blurRadius) {
|
|
18044
18316
|
return new color_default(0, 0, 0, 0);
|
|
18045
18317
|
}
|
|
@@ -18056,6 +18328,98 @@
|
|
|
18056
18328
|
return .185 / (relativeBlur + .4);
|
|
18057
18329
|
}
|
|
18058
18330
|
var get_text_shadow_colors_default = getTextShadowColors;
|
|
18331
|
+
function _getStackingContext(elm, elmStack) {
|
|
18332
|
+
var _elmStack;
|
|
18333
|
+
var vNode = get_node_from_tree_default(elm);
|
|
18334
|
+
if (vNode._stackingContext) {
|
|
18335
|
+
return vNode._stackingContext;
|
|
18336
|
+
}
|
|
18337
|
+
var stackingContext = [];
|
|
18338
|
+
var contextMap = new Map();
|
|
18339
|
+
elmStack = (_elmStack = elmStack) !== null && _elmStack !== void 0 ? _elmStack : _getBackgroundStack(elm);
|
|
18340
|
+
elmStack.forEach(function(bgElm) {
|
|
18341
|
+
var _stackingOrder2;
|
|
18342
|
+
var bgVNode = get_node_from_tree_default(bgElm);
|
|
18343
|
+
var bgColor = getOwnBackgroundColor2(bgVNode);
|
|
18344
|
+
var stackingOrder = bgVNode._stackingOrder.filter(function(_ref82) {
|
|
18345
|
+
var vNode2 = _ref82.vNode;
|
|
18346
|
+
return !!vNode2;
|
|
18347
|
+
});
|
|
18348
|
+
stackingOrder.forEach(function(_ref83, index) {
|
|
18349
|
+
var _stackingOrder;
|
|
18350
|
+
var vNode2 = _ref83.vNode;
|
|
18351
|
+
var ancestorVNode2 = (_stackingOrder = stackingOrder[index - 1]) === null || _stackingOrder === void 0 ? void 0 : _stackingOrder.vNode;
|
|
18352
|
+
var context2 = addToStackingContext(contextMap, vNode2, ancestorVNode2);
|
|
18353
|
+
if (index === 0 && !contextMap.get(vNode2)) {
|
|
18354
|
+
stackingContext.unshift(context2);
|
|
18355
|
+
}
|
|
18356
|
+
contextMap.set(vNode2, context2);
|
|
18357
|
+
});
|
|
18358
|
+
var ancestorVNode = (_stackingOrder2 = stackingOrder[stackingOrder.length - 1]) === null || _stackingOrder2 === void 0 ? void 0 : _stackingOrder2.vNode;
|
|
18359
|
+
var context = addToStackingContext(contextMap, bgVNode, ancestorVNode);
|
|
18360
|
+
if (!stackingOrder.length) {
|
|
18361
|
+
stackingContext.unshift(context);
|
|
18362
|
+
}
|
|
18363
|
+
context.bgColor = bgColor;
|
|
18364
|
+
});
|
|
18365
|
+
vNode._stackingContext = stackingContext;
|
|
18366
|
+
return stackingContext;
|
|
18367
|
+
}
|
|
18368
|
+
function _stackingContextToColor(context) {
|
|
18369
|
+
var _context$descendants;
|
|
18370
|
+
if (!((_context$descendants = context.descendants) !== null && _context$descendants !== void 0 && _context$descendants.length)) {
|
|
18371
|
+
var color2 = context.bgColor;
|
|
18372
|
+
color2.alpha *= context.opacity;
|
|
18373
|
+
return {
|
|
18374
|
+
color: color2,
|
|
18375
|
+
blendMode: context.blendMode
|
|
18376
|
+
};
|
|
18377
|
+
}
|
|
18378
|
+
var sourceColor = context.descendants.reduce(reduceToColor, createStackingContext());
|
|
18379
|
+
var color = flatten_colors_default(sourceColor, context.bgColor, context.descendants[0].blendMode);
|
|
18380
|
+
color.alpha *= context.opacity;
|
|
18381
|
+
return {
|
|
18382
|
+
color: color,
|
|
18383
|
+
blendMode: context.blendMode
|
|
18384
|
+
};
|
|
18385
|
+
}
|
|
18386
|
+
function reduceToColor(backdropContext, sourceContext) {
|
|
18387
|
+
var backdrop;
|
|
18388
|
+
if (backdropContext instanceof color_default) {
|
|
18389
|
+
backdrop = backdropContext;
|
|
18390
|
+
} else {
|
|
18391
|
+
backdrop = _stackingContextToColor(backdropContext).color;
|
|
18392
|
+
}
|
|
18393
|
+
var sourceColor = _stackingContextToColor(sourceContext).color;
|
|
18394
|
+
return flatten_colors_default(sourceColor, backdrop, sourceContext.blendMode);
|
|
18395
|
+
}
|
|
18396
|
+
function createStackingContext(vNode) {
|
|
18397
|
+
var _vNode$getComputedSty;
|
|
18398
|
+
return {
|
|
18399
|
+
vNode: vNode,
|
|
18400
|
+
opacity: parseFloat((_vNode$getComputedSty = vNode === null || vNode === void 0 ? void 0 : vNode.getComputedStylePropertyValue('opacity')) !== null && _vNode$getComputedSty !== void 0 ? _vNode$getComputedSty : 1),
|
|
18401
|
+
bgColor: new color_default(0, 0, 0, 0),
|
|
18402
|
+
blendMode: normalizeBlendMode(vNode === null || vNode === void 0 ? void 0 : vNode.getComputedStylePropertyValue('mix-blend-mode')),
|
|
18403
|
+
descendants: []
|
|
18404
|
+
};
|
|
18405
|
+
}
|
|
18406
|
+
function normalizeBlendMode(blendmode) {
|
|
18407
|
+
return !!blendmode ? blendmode : void 0;
|
|
18408
|
+
}
|
|
18409
|
+
function addToStackingContext(contextMap, vNode, ancestorVNode) {
|
|
18410
|
+
var _contextMap$get;
|
|
18411
|
+
var context = (_contextMap$get = contextMap.get(vNode)) !== null && _contextMap$get !== void 0 ? _contextMap$get : createStackingContext(vNode);
|
|
18412
|
+
var ancestorContext = contextMap.get(ancestorVNode);
|
|
18413
|
+
if (ancestorContext && ancestorVNode !== vNode && !ancestorContext.descendants.includes(context)) {
|
|
18414
|
+
ancestorContext.descendants.unshift(context);
|
|
18415
|
+
}
|
|
18416
|
+
return context;
|
|
18417
|
+
}
|
|
18418
|
+
function getOwnBackgroundColor2(vNode) {
|
|
18419
|
+
var bgColor = new color_default();
|
|
18420
|
+
bgColor.parseString(vNode.getComputedStylePropertyValue('background-color'));
|
|
18421
|
+
return bgColor;
|
|
18422
|
+
}
|
|
18059
18423
|
function _getBackgroundColor2(elm) {
|
|
18060
18424
|
var bgElms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
18061
18425
|
var shadowOutlineEmMax = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : .1;
|
|
@@ -18076,6 +18440,11 @@
|
|
|
18076
18440
|
}
|
|
18077
18441
|
function _getBackgroundColor(elm, bgElms, shadowOutlineEmMax) {
|
|
18078
18442
|
var _bgColors;
|
|
18443
|
+
var elmStack = _getBackgroundStack(elm);
|
|
18444
|
+
if (!elmStack) {
|
|
18445
|
+
return null;
|
|
18446
|
+
}
|
|
18447
|
+
var textRects = get_visible_child_text_rects_default(elm);
|
|
18079
18448
|
var bgColors = get_text_shadow_colors_default(elm, {
|
|
18080
18449
|
minRatio: shadowOutlineEmMax
|
|
18081
18450
|
});
|
|
@@ -18084,36 +18453,29 @@
|
|
|
18084
18453
|
color: bgColors.reduce(_flattenShadowColors)
|
|
18085
18454
|
} ];
|
|
18086
18455
|
}
|
|
18087
|
-
var
|
|
18088
|
-
|
|
18089
|
-
(elmStack || []).some(function(bgElm) {
|
|
18456
|
+
for (var _i25 = 0; _i25 < elmStack.length; _i25++) {
|
|
18457
|
+
var bgElm = elmStack[_i25];
|
|
18090
18458
|
var bgElmStyle = window.getComputedStyle(bgElm);
|
|
18091
18459
|
if (element_has_image_default(bgElm, bgElmStyle)) {
|
|
18092
|
-
bgColors = null;
|
|
18093
18460
|
bgElms.push(bgElm);
|
|
18094
|
-
return
|
|
18461
|
+
return null;
|
|
18095
18462
|
}
|
|
18096
18463
|
var bgColor = get_own_background_color_default(bgElmStyle);
|
|
18097
18464
|
if (bgColor.alpha === 0) {
|
|
18098
|
-
|
|
18465
|
+
continue;
|
|
18099
18466
|
}
|
|
18100
18467
|
if (bgElmStyle.getPropertyValue('display') !== 'inline' && !fullyEncompasses(bgElm, textRects)) {
|
|
18101
|
-
bgColors = null;
|
|
18102
18468
|
bgElms.push(bgElm);
|
|
18103
18469
|
incomplete_data_default.set('bgColor', 'elmPartiallyObscured');
|
|
18104
|
-
return
|
|
18470
|
+
return null;
|
|
18105
18471
|
}
|
|
18106
18472
|
bgElms.push(bgElm);
|
|
18107
|
-
|
|
18108
|
-
|
|
18109
|
-
|
|
18110
|
-
blendMode: normalizeBlendMode(blendMode)
|
|
18111
|
-
});
|
|
18112
|
-
return bgColor.alpha === 1;
|
|
18113
|
-
});
|
|
18114
|
-
if (bgColors === null || elmStack === null) {
|
|
18115
|
-
return null;
|
|
18473
|
+
if (bgColor.alpha === 1) {
|
|
18474
|
+
break;
|
|
18475
|
+
}
|
|
18116
18476
|
}
|
|
18477
|
+
var stackingContext = _getStackingContext(elm, elmStack);
|
|
18478
|
+
bgColors = stackingContext.map(_stackingContextToColor).concat(bgColors);
|
|
18117
18479
|
var pageBgs = getPageBackgroundColors(elm, elmStack.includes(document.body));
|
|
18118
18480
|
(_bgColors = bgColors).unshift.apply(_bgColors, _toConsumableArray(pageBgs));
|
|
18119
18481
|
if (bgColors.length === 0) {
|
|
@@ -18138,7 +18500,7 @@
|
|
|
18138
18500
|
return rect.top >= nodeRect.top && rect.bottom <= bottom && rect.left >= nodeRect.left && rect.right <= right;
|
|
18139
18501
|
});
|
|
18140
18502
|
}
|
|
18141
|
-
function
|
|
18503
|
+
function normalizeBlendMode2(blendmode) {
|
|
18142
18504
|
return !!blendmode ? blendmode : void 0;
|
|
18143
18505
|
}
|
|
18144
18506
|
function getPageBackgroundColors(elm, stackContainsBody) {
|
|
@@ -18154,13 +18516,13 @@
|
|
|
18154
18516
|
if (bodyBgColor.alpha !== 0 && htmlBgColor.alpha === 0 || bodyBgColorApplies && bodyBgColor.alpha !== 1) {
|
|
18155
18517
|
pageColors.unshift({
|
|
18156
18518
|
color: bodyBgColor,
|
|
18157
|
-
blendMode:
|
|
18519
|
+
blendMode: normalizeBlendMode2(bodyStyle.getPropertyValue('mix-blend-mode'))
|
|
18158
18520
|
});
|
|
18159
18521
|
}
|
|
18160
18522
|
if (htmlBgColor.alpha !== 0 && (!bodyBgColorApplies || bodyBgColorApplies && bodyBgColor.alpha !== 1)) {
|
|
18161
18523
|
pageColors.unshift({
|
|
18162
18524
|
color: htmlBgColor,
|
|
18163
|
-
blendMode:
|
|
18525
|
+
blendMode: normalizeBlendMode2(htmlStyle.getPropertyValue('mix-blend-mode'))
|
|
18164
18526
|
});
|
|
18165
18527
|
}
|
|
18166
18528
|
}
|
|
@@ -18216,8 +18578,8 @@
|
|
|
18216
18578
|
function getTextColor(nodeStyle) {
|
|
18217
18579
|
return new color_default().parseString(nodeStyle.getPropertyValue('-webkit-text-fill-color') || nodeStyle.getPropertyValue('color'));
|
|
18218
18580
|
}
|
|
18219
|
-
function getStrokeColor(nodeStyle,
|
|
18220
|
-
var
|
|
18581
|
+
function getStrokeColor(nodeStyle, _ref84) {
|
|
18582
|
+
var _ref84$textStrokeEmMi = _ref84.textStrokeEmMin, textStrokeEmMin = _ref84$textStrokeEmMi === void 0 ? 0 : _ref84$textStrokeEmMi;
|
|
18221
18583
|
var strokeWidth = parseFloat(nodeStyle.getPropertyValue('-webkit-text-stroke-width'));
|
|
18222
18584
|
if (strokeWidth === 0) {
|
|
18223
18585
|
return null;
|
|
@@ -18279,7 +18641,7 @@
|
|
|
18279
18641
|
var bold = parseFloat(fontWeight) >= boldValue || fontWeight === 'bold';
|
|
18280
18642
|
var ptSize = Math.ceil(fontSize * 72) / 96;
|
|
18281
18643
|
var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
|
|
18282
|
-
var
|
|
18644
|
+
var _ref85 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref85.expected, minThreshold = _ref85.minThreshold, maxThreshold = _ref85.maxThreshold;
|
|
18283
18645
|
var pseudoElm = findPseudoElement(virtualNode, {
|
|
18284
18646
|
ignorePseudo: ignorePseudo,
|
|
18285
18647
|
pseudoSizeThreshold: pseudoSizeThreshold
|
|
@@ -18358,8 +18720,8 @@
|
|
|
18358
18720
|
}
|
|
18359
18721
|
return isValid;
|
|
18360
18722
|
}
|
|
18361
|
-
function findPseudoElement(vNode,
|
|
18362
|
-
var
|
|
18723
|
+
function findPseudoElement(vNode, _ref86) {
|
|
18724
|
+
var _ref86$pseudoSizeThre = _ref86.pseudoSizeThreshold, pseudoSizeThreshold = _ref86$pseudoSizeThre === void 0 ? .25 : _ref86$pseudoSizeThre, _ref86$ignorePseudo = _ref86.ignorePseudo, ignorePseudo = _ref86$ignorePseudo === void 0 ? false : _ref86$ignorePseudo;
|
|
18363
18725
|
if (ignorePseudo) {
|
|
18364
18726
|
return;
|
|
18365
18727
|
}
|
|
@@ -18401,7 +18763,7 @@
|
|
|
18401
18763
|
}
|
|
18402
18764
|
function parseUnit(str) {
|
|
18403
18765
|
var unitRegex = /^([0-9.]+)([a-z]+)$/i;
|
|
18404
|
-
var
|
|
18766
|
+
var _ref87 = str.match(unitRegex) || [], _ref88 = _slicedToArray(_ref87, 3), _ref88$ = _ref88[1], value = _ref88$ === void 0 ? '' : _ref88$, _ref88$2 = _ref88[2], unit = _ref88$2 === void 0 ? '' : _ref88$2;
|
|
18405
18767
|
return {
|
|
18406
18768
|
value: parseFloat(value),
|
|
18407
18769
|
unit: unit.toLowerCase()
|
|
@@ -18418,7 +18780,7 @@
|
|
|
18418
18780
|
return blockLike2.indexOf(display) !== -1 || display.substr(0, 6) === 'table-';
|
|
18419
18781
|
}
|
|
18420
18782
|
function linkInTextBlockEvaluate(node, options) {
|
|
18421
|
-
var requiredContrastRatio = options.requiredContrastRatio;
|
|
18783
|
+
var requiredContrastRatio = options.requiredContrastRatio, allowSameColor = options.allowSameColor;
|
|
18422
18784
|
if (isBlock2(node)) {
|
|
18423
18785
|
return false;
|
|
18424
18786
|
}
|
|
@@ -18460,6 +18822,9 @@
|
|
|
18460
18822
|
if (!textContrast) {
|
|
18461
18823
|
return void 0;
|
|
18462
18824
|
}
|
|
18825
|
+
if (allowSameColor && textContrast === 1 && backgroundContrast === 1) {
|
|
18826
|
+
return true;
|
|
18827
|
+
}
|
|
18463
18828
|
if (textContrast === 1 && backgroundContrast > 1) {
|
|
18464
18829
|
this.data({
|
|
18465
18830
|
messageKey: 'bgContrast',
|
|
@@ -18742,8 +19107,8 @@
|
|
|
18742
19107
|
}
|
|
18743
19108
|
var focusable_element_evaluate_default = focusableElementEvaluate;
|
|
18744
19109
|
function focusableModalOpenEvaluate(node, options, virtualNode) {
|
|
18745
|
-
var tabbableElements = virtualNode.tabbableElements.map(function(
|
|
18746
|
-
var actualNode =
|
|
19110
|
+
var tabbableElements = virtualNode.tabbableElements.map(function(_ref89) {
|
|
19111
|
+
var actualNode = _ref89.actualNode;
|
|
18747
19112
|
return actualNode;
|
|
18748
19113
|
});
|
|
18749
19114
|
if (!tabbableElements || !tabbableElements.length) {
|
|
@@ -19224,8 +19589,8 @@
|
|
|
19224
19589
|
this.relatedNodes(relatedNodes);
|
|
19225
19590
|
return true;
|
|
19226
19591
|
}
|
|
19227
|
-
function getInvalidSelector(vChild, nested,
|
|
19228
|
-
var
|
|
19592
|
+
function getInvalidSelector(vChild, nested, _ref90) {
|
|
19593
|
+
var _ref90$validRoles = _ref90.validRoles, validRoles = _ref90$validRoles === void 0 ? [] : _ref90$validRoles, _ref90$validNodeNames = _ref90.validNodeNames, validNodeNames = _ref90$validNodeNames === void 0 ? [] : _ref90$validNodeNames;
|
|
19229
19594
|
var _vChild$props = vChild.props, nodeName2 = _vChild$props.nodeName, nodeType = _vChild$props.nodeType, nodeValue = _vChild$props.nodeValue;
|
|
19230
19595
|
var selector = nested ? 'div > ' : '';
|
|
19231
19596
|
if (nodeType === 3 && nodeValue.trim() !== '') {
|
|
@@ -19458,8 +19823,8 @@
|
|
|
19458
19823
|
}
|
|
19459
19824
|
var no_autoplay_audio_evaluate_default = noAutoplayAudioEvaluate;
|
|
19460
19825
|
function cssOrientationLockEvaluate(node, options, virtualNode, context) {
|
|
19461
|
-
var
|
|
19462
|
-
var
|
|
19826
|
+
var _ref91 = context || {}, _ref91$cssom = _ref91.cssom, cssom = _ref91$cssom === void 0 ? void 0 : _ref91$cssom;
|
|
19827
|
+
var _ref92 = options || {}, _ref92$degreeThreshol = _ref92.degreeThreshold, degreeThreshold = _ref92$degreeThreshol === void 0 ? 0 : _ref92$degreeThreshol;
|
|
19463
19828
|
if (!cssom || !cssom.length) {
|
|
19464
19829
|
return void 0;
|
|
19465
19830
|
}
|
|
@@ -19467,14 +19832,14 @@
|
|
|
19467
19832
|
var relatedElements = [];
|
|
19468
19833
|
var rulesGroupByDocumentFragment = groupCssomByDocument(cssom);
|
|
19469
19834
|
var _loop7 = function _loop7() {
|
|
19470
|
-
var key = _Object$keys2[
|
|
19835
|
+
var key = _Object$keys2[_i26];
|
|
19471
19836
|
var _rulesGroupByDocument = rulesGroupByDocumentFragment[key], root = _rulesGroupByDocument.root, rules = _rulesGroupByDocument.rules;
|
|
19472
19837
|
var orientationRules = rules.filter(isMediaRuleWithOrientation);
|
|
19473
19838
|
if (!orientationRules.length) {
|
|
19474
19839
|
return 'continue';
|
|
19475
19840
|
}
|
|
19476
|
-
orientationRules.forEach(function(
|
|
19477
|
-
var cssRules =
|
|
19841
|
+
orientationRules.forEach(function(_ref93) {
|
|
19842
|
+
var cssRules = _ref93.cssRules;
|
|
19478
19843
|
Array.from(cssRules).forEach(function(cssRule) {
|
|
19479
19844
|
var locked = getIsOrientationLocked(cssRule);
|
|
19480
19845
|
if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
|
|
@@ -19485,9 +19850,9 @@
|
|
|
19485
19850
|
});
|
|
19486
19851
|
});
|
|
19487
19852
|
};
|
|
19488
|
-
for (var
|
|
19489
|
-
var
|
|
19490
|
-
if (
|
|
19853
|
+
for (var _i26 = 0, _Object$keys2 = Object.keys(rulesGroupByDocumentFragment); _i26 < _Object$keys2.length; _i26++) {
|
|
19854
|
+
var _ret4 = _loop7();
|
|
19855
|
+
if (_ret4 === 'continue') {
|
|
19491
19856
|
continue;
|
|
19492
19857
|
}
|
|
19493
19858
|
}
|
|
@@ -19499,8 +19864,8 @@
|
|
|
19499
19864
|
}
|
|
19500
19865
|
return false;
|
|
19501
19866
|
function groupCssomByDocument(cssObjectModel) {
|
|
19502
|
-
return cssObjectModel.reduce(function(out,
|
|
19503
|
-
var sheet =
|
|
19867
|
+
return cssObjectModel.reduce(function(out, _ref94) {
|
|
19868
|
+
var sheet = _ref94.sheet, root = _ref94.root, shadowId = _ref94.shadowId;
|
|
19504
19869
|
var key = shadowId ? shadowId : 'topDocument';
|
|
19505
19870
|
if (!out[key]) {
|
|
19506
19871
|
out[key] = {
|
|
@@ -19516,15 +19881,15 @@
|
|
|
19516
19881
|
return out;
|
|
19517
19882
|
}, {});
|
|
19518
19883
|
}
|
|
19519
|
-
function isMediaRuleWithOrientation(
|
|
19520
|
-
var type =
|
|
19884
|
+
function isMediaRuleWithOrientation(_ref95) {
|
|
19885
|
+
var type = _ref95.type, cssText = _ref95.cssText;
|
|
19521
19886
|
if (type !== 4) {
|
|
19522
19887
|
return false;
|
|
19523
19888
|
}
|
|
19524
19889
|
return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
|
|
19525
19890
|
}
|
|
19526
|
-
function getIsOrientationLocked(
|
|
19527
|
-
var selectorText =
|
|
19891
|
+
function getIsOrientationLocked(_ref96) {
|
|
19892
|
+
var selectorText = _ref96.selectorText, style = _ref96.style;
|
|
19528
19893
|
if (!selectorText || style.length <= 0) {
|
|
19529
19894
|
return false;
|
|
19530
19895
|
}
|
|
@@ -19571,7 +19936,7 @@
|
|
|
19571
19936
|
}
|
|
19572
19937
|
}
|
|
19573
19938
|
function getAngleInDegrees(angleWithUnit) {
|
|
19574
|
-
var
|
|
19939
|
+
var _ref97 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref98 = _slicedToArray(_ref97, 1), unit = _ref98[0];
|
|
19575
19940
|
if (!unit) {
|
|
19576
19941
|
return;
|
|
19577
19942
|
}
|
|
@@ -19620,7 +19985,7 @@
|
|
|
19620
19985
|
}
|
|
19621
19986
|
var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
|
|
19622
19987
|
function metaViewportScaleEvaluate(node, options, virtualNode) {
|
|
19623
|
-
var
|
|
19988
|
+
var _ref99 = options || {}, _ref99$scaleMinimum = _ref99.scaleMinimum, scaleMinimum = _ref99$scaleMinimum === void 0 ? 2 : _ref99$scaleMinimum, _ref99$lowerBound = _ref99.lowerBound, lowerBound = _ref99$lowerBound === void 0 ? false : _ref99$lowerBound;
|
|
19624
19989
|
var content = virtualNode.attr('content') || '';
|
|
19625
19990
|
if (!content) {
|
|
19626
19991
|
return true;
|
|
@@ -19695,8 +20060,8 @@
|
|
|
19695
20060
|
});
|
|
19696
20061
|
return true;
|
|
19697
20062
|
}
|
|
19698
|
-
this.relatedNodes(closeNeighbors.map(function(
|
|
19699
|
-
var actualNode =
|
|
20063
|
+
this.relatedNodes(closeNeighbors.map(function(_ref100) {
|
|
20064
|
+
var actualNode = _ref100.actualNode;
|
|
19700
20065
|
return actualNode;
|
|
19701
20066
|
}));
|
|
19702
20067
|
if (!closeNeighbors.some(_isInTabOrder)) {
|
|
@@ -19801,8 +20166,8 @@
|
|
|
19801
20166
|
if (obscuredNodes.length === 0) {
|
|
19802
20167
|
return null;
|
|
19803
20168
|
}
|
|
19804
|
-
var obscuringRects = obscuredNodes.map(function(
|
|
19805
|
-
var rect =
|
|
20169
|
+
var obscuringRects = obscuredNodes.map(function(_ref101) {
|
|
20170
|
+
var rect = _ref101.boundingClientRect;
|
|
19806
20171
|
return rect;
|
|
19807
20172
|
});
|
|
19808
20173
|
var unobscuredRects = _splitRects(nodeRect, obscuringRects);
|
|
@@ -19842,13 +20207,13 @@
|
|
|
19842
20207
|
function isDescendantNotInTabOrder(vAncestor, vNode) {
|
|
19843
20208
|
return vAncestor.actualNode.contains(vNode.actualNode) && !_isInTabOrder(vNode);
|
|
19844
20209
|
}
|
|
19845
|
-
function rectHasMinimumSize(minSize,
|
|
19846
|
-
var width =
|
|
20210
|
+
function rectHasMinimumSize(minSize, _ref102) {
|
|
20211
|
+
var width = _ref102.width, height = _ref102.height;
|
|
19847
20212
|
return width + roundingMargin2 >= minSize && height + roundingMargin2 >= minSize;
|
|
19848
20213
|
}
|
|
19849
20214
|
function mapActualNodes(vNodes) {
|
|
19850
|
-
return vNodes.map(function(
|
|
19851
|
-
var actualNode =
|
|
20215
|
+
return vNodes.map(function(_ref103) {
|
|
20216
|
+
var actualNode = _ref103.actualNode;
|
|
19852
20217
|
return actualNode;
|
|
19853
20218
|
});
|
|
19854
20219
|
}
|
|
@@ -19874,14 +20239,14 @@
|
|
|
19874
20239
|
}
|
|
19875
20240
|
function getHeadingOrder(results) {
|
|
19876
20241
|
results = _toConsumableArray(results);
|
|
19877
|
-
results.sort(function(
|
|
19878
|
-
var nodeA =
|
|
19879
|
-
var nodeB =
|
|
20242
|
+
results.sort(function(_ref104, _ref105) {
|
|
20243
|
+
var nodeA = _ref104.node;
|
|
20244
|
+
var nodeB = _ref105.node;
|
|
19880
20245
|
return nodeA.ancestry.length - nodeB.ancestry.length;
|
|
19881
20246
|
});
|
|
19882
20247
|
var headingOrder = results.reduce(mergeHeadingOrder, []);
|
|
19883
|
-
return headingOrder.filter(function(
|
|
19884
|
-
var level =
|
|
20248
|
+
return headingOrder.filter(function(_ref106) {
|
|
20249
|
+
var level = _ref106.level;
|
|
19885
20250
|
return level !== -1;
|
|
19886
20251
|
});
|
|
19887
20252
|
}
|
|
@@ -19932,7 +20297,7 @@
|
|
|
19932
20297
|
var headingRole = role && role.includes('heading');
|
|
19933
20298
|
var ariaHeadingLevel = vNode.attr('aria-level');
|
|
19934
20299
|
var ariaLevel = parseInt(ariaHeadingLevel, 10);
|
|
19935
|
-
var
|
|
20300
|
+
var _ref107 = vNode.props.nodeName.match(/h(\d)/) || [], _ref108 = _slicedToArray(_ref107, 2), headingLevel = _ref108[1];
|
|
19936
20301
|
if (!headingRole) {
|
|
19937
20302
|
return -1;
|
|
19938
20303
|
}
|
|
@@ -19996,8 +20361,8 @@
|
|
|
19996
20361
|
if (results.length < 2) {
|
|
19997
20362
|
return results;
|
|
19998
20363
|
}
|
|
19999
|
-
var incompleteResults = results.filter(function(
|
|
20000
|
-
var result =
|
|
20364
|
+
var incompleteResults = results.filter(function(_ref109) {
|
|
20365
|
+
var result = _ref109.result;
|
|
20001
20366
|
return result !== void 0;
|
|
20002
20367
|
});
|
|
20003
20368
|
var uniqueResults = [];
|
|
@@ -20009,12 +20374,12 @@
|
|
|
20009
20374
|
if (nameMap[name]) {
|
|
20010
20375
|
return 'continue';
|
|
20011
20376
|
}
|
|
20012
|
-
var sameNameResults = incompleteResults.filter(function(
|
|
20013
|
-
var data2 =
|
|
20377
|
+
var sameNameResults = incompleteResults.filter(function(_ref110, resultNum) {
|
|
20378
|
+
var data2 = _ref110.data;
|
|
20014
20379
|
return data2.name === name && resultNum !== index;
|
|
20015
20380
|
});
|
|
20016
|
-
var isSameUrl = sameNameResults.every(function(
|
|
20017
|
-
var data2 =
|
|
20381
|
+
var isSameUrl = sameNameResults.every(function(_ref111) {
|
|
20382
|
+
var data2 = _ref111.data;
|
|
20018
20383
|
return isIdenticalObject(data2.urlProps, urlProps);
|
|
20019
20384
|
});
|
|
20020
20385
|
if (sameNameResults.length && !isSameUrl) {
|
|
@@ -20028,8 +20393,8 @@
|
|
|
20028
20393
|
uniqueResults.push(currentResult);
|
|
20029
20394
|
};
|
|
20030
20395
|
for (var index = 0; index < incompleteResults.length; index++) {
|
|
20031
|
-
var
|
|
20032
|
-
if (
|
|
20396
|
+
var _ret5 = _loop8(index);
|
|
20397
|
+
if (_ret5 === 'continue') {
|
|
20033
20398
|
continue;
|
|
20034
20399
|
}
|
|
20035
20400
|
}
|
|
@@ -20433,7 +20798,7 @@
|
|
|
20433
20798
|
var separatorRegex = /[;,\s]/;
|
|
20434
20799
|
var validRedirectNumRegex = /^[0-9.]+$/;
|
|
20435
20800
|
function metaRefreshEvaluate(node, options, virtualNode) {
|
|
20436
|
-
var
|
|
20801
|
+
var _ref112 = options || {}, minDelay = _ref112.minDelay, maxDelay = _ref112.maxDelay;
|
|
20437
20802
|
var content = (virtualNode.attr('content') || '').trim();
|
|
20438
20803
|
var _content$split = content.split(separatorRegex), _content$split2 = _slicedToArray(_content$split, 1), redirectStr = _content$split2[0];
|
|
20439
20804
|
if (!redirectStr.match(validRedirectNumRegex)) {
|
|
@@ -20473,16 +20838,16 @@
|
|
|
20473
20838
|
var outerText = elm.textContent.trim();
|
|
20474
20839
|
var innerText = outerText;
|
|
20475
20840
|
while (innerText === outerText && nextNode !== void 0) {
|
|
20476
|
-
var
|
|
20841
|
+
var _i27 = -1;
|
|
20477
20842
|
elm = nextNode;
|
|
20478
20843
|
if (elm.children.length === 0) {
|
|
20479
20844
|
return elm;
|
|
20480
20845
|
}
|
|
20481
20846
|
do {
|
|
20482
|
-
|
|
20483
|
-
innerText = elm.children[
|
|
20484
|
-
} while (innerText === '' &&
|
|
20485
|
-
nextNode = elm.children[
|
|
20847
|
+
_i27++;
|
|
20848
|
+
innerText = elm.children[_i27].textContent.trim();
|
|
20849
|
+
} while (innerText === '' && _i27 + 1 < elm.children.length);
|
|
20850
|
+
nextNode = elm.children[_i27];
|
|
20486
20851
|
}
|
|
20487
20852
|
return elm;
|
|
20488
20853
|
}
|
|
@@ -20605,8 +20970,8 @@
|
|
|
20605
20970
|
} else if (node !== document.body && has_content_default(node, true)) {
|
|
20606
20971
|
return [ virtualNode ];
|
|
20607
20972
|
} else {
|
|
20608
|
-
return virtualNode.children.filter(function(
|
|
20609
|
-
var actualNode =
|
|
20973
|
+
return virtualNode.children.filter(function(_ref113) {
|
|
20974
|
+
var actualNode = _ref113.actualNode;
|
|
20610
20975
|
return actualNode.nodeType === 1;
|
|
20611
20976
|
}).map(function(vNode) {
|
|
20612
20977
|
return findRegionlessElms(vNode, options);
|
|
@@ -20759,8 +21124,8 @@
|
|
|
20759
21124
|
}
|
|
20760
21125
|
return false;
|
|
20761
21126
|
}
|
|
20762
|
-
function getNumberValue(domNode,
|
|
20763
|
-
var cssProperty =
|
|
21127
|
+
function getNumberValue(domNode, _ref114) {
|
|
21128
|
+
var cssProperty = _ref114.cssProperty, absoluteValues = _ref114.absoluteValues, normalValue = _ref114.normalValue;
|
|
20764
21129
|
var computedStyle = window.getComputedStyle(domNode);
|
|
20765
21130
|
var cssPropValue = computedStyle.getPropertyValue(cssProperty);
|
|
20766
21131
|
if (cssPropValue === 'normal') {
|
|
@@ -20837,8 +21202,8 @@
|
|
|
20837
21202
|
if (!virtualNode.children) {
|
|
20838
21203
|
return void 0;
|
|
20839
21204
|
}
|
|
20840
|
-
var titleNode = virtualNode.children.find(function(
|
|
20841
|
-
var props =
|
|
21205
|
+
var titleNode = virtualNode.children.find(function(_ref115) {
|
|
21206
|
+
var props = _ref115.props;
|
|
20842
21207
|
return props.nodeName === 'title';
|
|
20843
21208
|
});
|
|
20844
21209
|
if (!titleNode) {
|
|
@@ -21040,8 +21405,8 @@
|
|
|
21040
21405
|
var aria = /^aria-/;
|
|
21041
21406
|
var attrs = virtualNode.attrNames;
|
|
21042
21407
|
if (attrs.length) {
|
|
21043
|
-
for (var
|
|
21044
|
-
if (aria.test(attrs[
|
|
21408
|
+
for (var _i28 = 0, l = attrs.length; _i28 < l; _i28++) {
|
|
21409
|
+
if (aria.test(attrs[_i28])) {
|
|
21045
21410
|
return true;
|
|
21046
21411
|
}
|
|
21047
21412
|
}
|
|
@@ -21142,7 +21507,7 @@
|
|
|
21142
21507
|
if (nodeName2 === 'input' && nonTextInput.includes(inputType)) {
|
|
21143
21508
|
return false;
|
|
21144
21509
|
}
|
|
21145
|
-
if (is_disabled_default(virtualNode)) {
|
|
21510
|
+
if (is_disabled_default(virtualNode) || _isInert(virtualNode)) {
|
|
21146
21511
|
return false;
|
|
21147
21512
|
}
|
|
21148
21513
|
var formElements = [ 'input', 'select', 'textarea' ];
|
|
@@ -21197,13 +21562,7 @@
|
|
|
21197
21562
|
if (ariaLabelledbyControls.length > 0 && ariaLabelledbyControls.every(is_disabled_default)) {
|
|
21198
21563
|
return false;
|
|
21199
21564
|
}
|
|
21200
|
-
|
|
21201
|
-
var removeUnicodeOptions = {
|
|
21202
|
-
emoji: true,
|
|
21203
|
-
nonBmp: false,
|
|
21204
|
-
punctuations: true
|
|
21205
|
-
};
|
|
21206
|
-
if (!visibleText || !remove_unicode_default(visibleText, removeUnicodeOptions)) {
|
|
21565
|
+
if (!hasRealTextChildren(virtualNode)) {
|
|
21207
21566
|
return false;
|
|
21208
21567
|
}
|
|
21209
21568
|
var range = document.createRange();
|
|
@@ -21223,6 +21582,20 @@
|
|
|
21223
21582
|
return false;
|
|
21224
21583
|
}
|
|
21225
21584
|
var color_contrast_matches_default = colorContrastMatches;
|
|
21585
|
+
var removeUnicodeOptions = {
|
|
21586
|
+
emoji: true,
|
|
21587
|
+
nonBmp: false,
|
|
21588
|
+
punctuations: true
|
|
21589
|
+
};
|
|
21590
|
+
function hasRealTextChildren(virtualNode) {
|
|
21591
|
+
var visibleText = visible_virtual_default(virtualNode, false, true);
|
|
21592
|
+
if (visibleText === '' || remove_unicode_default(visibleText, removeUnicodeOptions) === '') {
|
|
21593
|
+
return false;
|
|
21594
|
+
}
|
|
21595
|
+
return virtualNode.children.some(function(vChild) {
|
|
21596
|
+
return vChild.props.nodeName === '#text' && !is_icon_ligature_default(vChild);
|
|
21597
|
+
});
|
|
21598
|
+
}
|
|
21226
21599
|
function dataTableLargeMatches(node) {
|
|
21227
21600
|
if (is_data_table_default(node)) {
|
|
21228
21601
|
var tableArray = to_grid_default(node);
|
|
@@ -21425,7 +21798,7 @@
|
|
|
21425
21798
|
if (!role || [ 'none', 'presentation' ].includes(role)) {
|
|
21426
21799
|
return true;
|
|
21427
21800
|
}
|
|
21428
|
-
var
|
|
21801
|
+
var _ref116 = aria_roles_default[role] || {}, accessibleNameRequired = _ref116.accessibleNameRequired;
|
|
21429
21802
|
if (accessibleNameRequired || _isFocusable(virtualNode)) {
|
|
21430
21803
|
return true;
|
|
21431
21804
|
}
|
|
@@ -21440,6 +21813,11 @@
|
|
|
21440
21813
|
if (get_explicit_role_default(virtualNode) === 'combobox' && query_selector_all_default(virtualNode, 'input:not([type="hidden"])').length) {
|
|
21441
21814
|
return false;
|
|
21442
21815
|
}
|
|
21816
|
+
if (_isComboboxPopup(virtualNode, {
|
|
21817
|
+
popupRoles: [ 'listbox' ]
|
|
21818
|
+
})) {
|
|
21819
|
+
return false;
|
|
21820
|
+
}
|
|
21443
21821
|
return true;
|
|
21444
21822
|
}
|
|
21445
21823
|
var no_naming_method_matches_default = noNamingMethodMatches;
|
|
@@ -21491,37 +21869,13 @@
|
|
|
21491
21869
|
}
|
|
21492
21870
|
var presentation_role_conflict_matches_default = presentationRoleConflictMatches;
|
|
21493
21871
|
function scrollableRegionFocusableMatches(node, virtualNode) {
|
|
21494
|
-
|
|
21495
|
-
|
|
21496
|
-
|
|
21497
|
-
|
|
21498
|
-
if (aria_attrs_default['aria-haspopup'].values.includes(role)) {
|
|
21499
|
-
if (closest_default(virtualNode, '[role~="combobox"]')) {
|
|
21500
|
-
return false;
|
|
21501
|
-
}
|
|
21502
|
-
var id = virtualNode.attr('id');
|
|
21503
|
-
if (id) {
|
|
21504
|
-
var doc = get_root_node_default(node);
|
|
21505
|
-
var owned = Array.from(doc.querySelectorAll('[aria-owns~="'.concat(id, '"], [aria-controls~="').concat(id, '"]')));
|
|
21506
|
-
var comboboxOwned = owned.some(function(el) {
|
|
21507
|
-
var roles = token_list_default(el.getAttribute('role'));
|
|
21508
|
-
return roles.includes('combobox');
|
|
21509
|
-
});
|
|
21510
|
-
if (comboboxOwned) {
|
|
21511
|
-
return false;
|
|
21512
|
-
}
|
|
21513
|
-
}
|
|
21514
|
-
}
|
|
21515
|
-
var nodeAndDescendents = query_selector_all_default(virtualNode, '*');
|
|
21516
|
-
var hasVisibleChildren = nodeAndDescendents.some(function(elm) {
|
|
21872
|
+
return _getScroll(node, 13) !== void 0 && _isComboboxPopup(virtualNode) === false && isNoneEmptyElement(virtualNode);
|
|
21873
|
+
}
|
|
21874
|
+
function isNoneEmptyElement(vNode) {
|
|
21875
|
+
return query_selector_all_default(vNode, '*').some(function(elm) {
|
|
21517
21876
|
return has_content_virtual_default(elm, true, true);
|
|
21518
21877
|
});
|
|
21519
|
-
if (!hasVisibleChildren) {
|
|
21520
|
-
return false;
|
|
21521
|
-
}
|
|
21522
|
-
return true;
|
|
21523
21878
|
}
|
|
21524
|
-
var scrollable_region_focusable_matches_default = scrollableRegionFocusableMatches;
|
|
21525
21879
|
function skipLinkMatches(node) {
|
|
21526
21880
|
return _isSkipLink(node) && is_offscreen_default(node);
|
|
21527
21881
|
}
|
|
@@ -21594,7 +21948,7 @@
|
|
|
21594
21948
|
'aria-level-evaluate': aria_level_evaluate_default,
|
|
21595
21949
|
'aria-prohibited-attr-evaluate': ariaProhibitedAttrEvaluate,
|
|
21596
21950
|
'aria-required-attr-evaluate': ariaRequiredAttrEvaluate,
|
|
21597
|
-
'aria-required-children-evaluate':
|
|
21951
|
+
'aria-required-children-evaluate': ariaRequiredChildrenEvaluate,
|
|
21598
21952
|
'aria-required-children-matches': aria_required_children_matches_default,
|
|
21599
21953
|
'aria-required-parent-evaluate': aria_required_parent_evaluate_default,
|
|
21600
21954
|
'aria-required-parent-matches': aria_required_parent_matches_default,
|
|
@@ -21710,7 +22064,7 @@
|
|
|
21710
22064
|
'region-evaluate': regionEvaluate,
|
|
21711
22065
|
'same-caption-summary-evaluate': same_caption_summary_evaluate_default,
|
|
21712
22066
|
'scope-value-evaluate': scope_value_evaluate_default,
|
|
21713
|
-
'scrollable-region-focusable-matches':
|
|
22067
|
+
'scrollable-region-focusable-matches': scrollableRegionFocusableMatches,
|
|
21714
22068
|
'skip-link-evaluate': skip_link_evaluate_default,
|
|
21715
22069
|
'skip-link-matches': skip_link_matches_default,
|
|
21716
22070
|
'structured-dlitems-evaluate': structured_dlitems_evaluate_default,
|
|
@@ -22231,10 +22585,10 @@
|
|
|
22231
22585
|
var import_dot2 = __toModule(require_doT());
|
|
22232
22586
|
var dotRegex = /\{\{.+?\}\}/g;
|
|
22233
22587
|
function getDefaultOrigin() {
|
|
22234
|
-
if (window.origin) {
|
|
22588
|
+
if (window.origin && window.origin !== 'null') {
|
|
22235
22589
|
return window.origin;
|
|
22236
22590
|
}
|
|
22237
|
-
if (window.location && window.location.origin) {
|
|
22591
|
+
if (window.location && window.location.origin && window.location.origin !== 'null') {
|
|
22238
22592
|
return window.location.origin;
|
|
22239
22593
|
}
|
|
22240
22594
|
}
|
|
@@ -22333,8 +22687,8 @@
|
|
|
22333
22687
|
lang: this.lang
|
|
22334
22688
|
};
|
|
22335
22689
|
var checkIDs = Object.keys(this.data.checks);
|
|
22336
|
-
for (var
|
|
22337
|
-
var id = checkIDs[
|
|
22690
|
+
for (var _i29 = 0; _i29 < checkIDs.length; _i29++) {
|
|
22691
|
+
var id = checkIDs[_i29];
|
|
22338
22692
|
var check = this.data.checks[id];
|
|
22339
22693
|
var _check$messages = check.messages, pass = _check$messages.pass, fail = _check$messages.fail, incomplete = _check$messages.incomplete;
|
|
22340
22694
|
locale.checks[id] = {
|
|
@@ -22344,8 +22698,8 @@
|
|
|
22344
22698
|
};
|
|
22345
22699
|
}
|
|
22346
22700
|
var ruleIDs = Object.keys(this.data.rules);
|
|
22347
|
-
for (var
|
|
22348
|
-
var _id = ruleIDs[
|
|
22701
|
+
for (var _i30 = 0; _i30 < ruleIDs.length; _i30++) {
|
|
22702
|
+
var _id = ruleIDs[_i30];
|
|
22349
22703
|
var rule = this.data.rules[_id];
|
|
22350
22704
|
var description = rule.description, help = rule.help;
|
|
22351
22705
|
locale.rules[_id] = {
|
|
@@ -22354,8 +22708,8 @@
|
|
|
22354
22708
|
};
|
|
22355
22709
|
}
|
|
22356
22710
|
var failureSummaries = Object.keys(this.data.failureSummaries);
|
|
22357
|
-
for (var
|
|
22358
|
-
var type = failureSummaries[
|
|
22711
|
+
for (var _i31 = 0; _i31 < failureSummaries.length; _i31++) {
|
|
22712
|
+
var type = failureSummaries[_i31];
|
|
22359
22713
|
var failureSummary2 = this.data.failureSummaries[type];
|
|
22360
22714
|
var failureMessage = failureSummary2.failureMessage;
|
|
22361
22715
|
locale.failureSummaries[type] = {
|
|
@@ -22378,8 +22732,8 @@
|
|
|
22378
22732
|
key: '_applyCheckLocale',
|
|
22379
22733
|
value: function _applyCheckLocale(checks) {
|
|
22380
22734
|
var keys = Object.keys(checks);
|
|
22381
|
-
for (var
|
|
22382
|
-
var id = keys[
|
|
22735
|
+
for (var _i32 = 0; _i32 < keys.length; _i32++) {
|
|
22736
|
+
var id = keys[_i32];
|
|
22383
22737
|
if (!this.data.checks[id]) {
|
|
22384
22738
|
throw new Error('Locale provided for unknown check: "'.concat(id, '"'));
|
|
22385
22739
|
}
|
|
@@ -22390,8 +22744,8 @@
|
|
|
22390
22744
|
key: '_applyRuleLocale',
|
|
22391
22745
|
value: function _applyRuleLocale(rules) {
|
|
22392
22746
|
var keys = Object.keys(rules);
|
|
22393
|
-
for (var
|
|
22394
|
-
var id = keys[
|
|
22747
|
+
for (var _i33 = 0; _i33 < keys.length; _i33++) {
|
|
22748
|
+
var id = keys[_i33];
|
|
22395
22749
|
if (!this.data.rules[id]) {
|
|
22396
22750
|
throw new Error('Locale provided for unknown rule: "'.concat(id, '"'));
|
|
22397
22751
|
}
|
|
@@ -22402,8 +22756,8 @@
|
|
|
22402
22756
|
key: '_applyFailureSummaries',
|
|
22403
22757
|
value: function _applyFailureSummaries(messages) {
|
|
22404
22758
|
var keys = Object.keys(messages);
|
|
22405
|
-
for (var
|
|
22406
|
-
var key = keys[
|
|
22759
|
+
for (var _i34 = 0; _i34 < keys.length; _i34++) {
|
|
22760
|
+
var key = keys[_i34];
|
|
22407
22761
|
if (!this.data.failureSummaries[key]) {
|
|
22408
22762
|
throw new Error('Locale provided for unknown failureMessage: "'.concat(key, '"'));
|
|
22409
22763
|
}
|
|
@@ -22752,8 +23106,8 @@
|
|
|
22752
23106
|
});
|
|
22753
23107
|
};
|
|
22754
23108
|
}
|
|
22755
|
-
function getHelpUrl(
|
|
22756
|
-
var brand =
|
|
23109
|
+
function getHelpUrl(_ref117, ruleId, version) {
|
|
23110
|
+
var brand = _ref117.brand, application = _ref117.application, lang = _ref117.lang;
|
|
22757
23111
|
return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
|
|
22758
23112
|
}
|
|
22759
23113
|
var audit_default = Audit;
|
|
@@ -22969,9 +23323,9 @@
|
|
|
22969
23323
|
toolOptions: options
|
|
22970
23324
|
});
|
|
22971
23325
|
}
|
|
22972
|
-
function normalizeRunParams(
|
|
22973
|
-
var
|
|
22974
|
-
var
|
|
23326
|
+
function normalizeRunParams(_ref118) {
|
|
23327
|
+
var _ref120, _options$reporter, _axe$_audit;
|
|
23328
|
+
var _ref119 = _slicedToArray(_ref118, 3), context = _ref119[0], options = _ref119[1], callback = _ref119[2];
|
|
22975
23329
|
var typeErr = new TypeError('axe.run arguments are invalid');
|
|
22976
23330
|
if (!isContextSpec(context)) {
|
|
22977
23331
|
if (callback !== void 0) {
|
|
@@ -22992,7 +23346,7 @@
|
|
|
22992
23346
|
throw typeErr;
|
|
22993
23347
|
}
|
|
22994
23348
|
options = clone_default(options);
|
|
22995
|
-
options.reporter = (
|
|
23349
|
+
options.reporter = (_ref120 = (_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 && _ref120 !== void 0 ? _ref120 : 'v1';
|
|
22996
23350
|
return {
|
|
22997
23351
|
context: context,
|
|
22998
23352
|
options: options,
|
|
@@ -23097,14 +23451,14 @@
|
|
|
23097
23451
|
return new Promise(function(res, rej) {
|
|
23098
23452
|
axe._audit.run(contextObj, options, res, rej);
|
|
23099
23453
|
}).then(function(results) {
|
|
23100
|
-
results = results.map(function(
|
|
23101
|
-
var nodes =
|
|
23454
|
+
results = results.map(function(_ref121) {
|
|
23455
|
+
var nodes = _ref121.nodes, result = _objectWithoutProperties(_ref121, _excluded8);
|
|
23102
23456
|
return _extends({
|
|
23103
23457
|
nodes: nodes.map(serializeNode)
|
|
23104
23458
|
}, result);
|
|
23105
23459
|
});
|
|
23106
|
-
var frames = contextObj.frames.map(function(
|
|
23107
|
-
var node =
|
|
23460
|
+
var frames = contextObj.frames.map(function(_ref122) {
|
|
23461
|
+
var node = _ref122.node;
|
|
23108
23462
|
return new dq_element_default(node, options).toJSON();
|
|
23109
23463
|
});
|
|
23110
23464
|
var environmentData;
|
|
@@ -23124,13 +23478,13 @@
|
|
|
23124
23478
|
return Promise.reject(err2);
|
|
23125
23479
|
});
|
|
23126
23480
|
}
|
|
23127
|
-
function serializeNode(
|
|
23128
|
-
var node =
|
|
23481
|
+
function serializeNode(_ref123) {
|
|
23482
|
+
var node = _ref123.node, nodeResult = _objectWithoutProperties(_ref123, _excluded9);
|
|
23129
23483
|
nodeResult.node = node.toJSON();
|
|
23130
|
-
for (var
|
|
23131
|
-
var type = _arr2[
|
|
23132
|
-
nodeResult[type] = nodeResult[type].map(function(
|
|
23133
|
-
var relatedNodes =
|
|
23484
|
+
for (var _i35 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i35 < _arr2.length; _i35++) {
|
|
23485
|
+
var type = _arr2[_i35];
|
|
23486
|
+
nodeResult[type] = nodeResult[type].map(function(_ref124) {
|
|
23487
|
+
var relatedNodes = _ref124.relatedNodes, checkResult = _objectWithoutProperties(_ref124, _excluded10);
|
|
23134
23488
|
return _extends({}, checkResult, {
|
|
23135
23489
|
relatedNodes: relatedNodes.map(function(node2) {
|
|
23136
23490
|
return node2.toJSON();
|
|
@@ -23141,14 +23495,14 @@
|
|
|
23141
23495
|
return nodeResult;
|
|
23142
23496
|
}
|
|
23143
23497
|
function finishRun(partialResults) {
|
|
23144
|
-
var
|
|
23498
|
+
var _ref126, _options$reporter2, _axe$_audit2;
|
|
23145
23499
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
23146
23500
|
options = clone_default(options);
|
|
23147
|
-
var
|
|
23501
|
+
var _ref125 = partialResults.find(function(r) {
|
|
23148
23502
|
return r.environmentData;
|
|
23149
|
-
}) || {}, environmentData =
|
|
23503
|
+
}) || {}, environmentData = _ref125.environmentData;
|
|
23150
23504
|
axe._audit.normalizeOptions(options);
|
|
23151
|
-
options.reporter = (
|
|
23505
|
+
options.reporter = (_ref126 = (_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 && _ref126 !== void 0 ? _ref126 : 'v1';
|
|
23152
23506
|
setFrameSpec(partialResults);
|
|
23153
23507
|
var results = merge_results_default(partialResults);
|
|
23154
23508
|
results = axe._audit.after(results, options);
|
|
@@ -23178,8 +23532,8 @@
|
|
|
23178
23532
|
_iterator12.f();
|
|
23179
23533
|
}
|
|
23180
23534
|
}
|
|
23181
|
-
function getMergedFrameSpecs(
|
|
23182
|
-
var childFrameSpecs =
|
|
23535
|
+
function getMergedFrameSpecs(_ref127) {
|
|
23536
|
+
var childFrameSpecs = _ref127.frames, parentFrameSpec = _ref127.frameSpec;
|
|
23183
23537
|
if (!parentFrameSpec) {
|
|
23184
23538
|
return childFrameSpecs;
|
|
23185
23539
|
}
|
|
@@ -23239,12 +23593,12 @@
|
|
|
23239
23593
|
var transformedResults = results.map(function(result) {
|
|
23240
23594
|
var transformedResult = _extends({}, result);
|
|
23241
23595
|
var types = [ 'passes', 'violations', 'incomplete', 'inapplicable' ];
|
|
23242
|
-
for (var
|
|
23243
|
-
var type = _types[
|
|
23596
|
+
for (var _i36 = 0, _types = types; _i36 < _types.length; _i36++) {
|
|
23597
|
+
var type = _types[_i36];
|
|
23244
23598
|
if (transformedResult[type] && Array.isArray(transformedResult[type])) {
|
|
23245
|
-
transformedResult[type] = transformedResult[type].map(function(
|
|
23599
|
+
transformedResult[type] = transformedResult[type].map(function(_ref128) {
|
|
23246
23600
|
var _node;
|
|
23247
|
-
var node =
|
|
23601
|
+
var node = _ref128.node, typeResult = _objectWithoutProperties(_ref128, _excluded13);
|
|
23248
23602
|
node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
|
|
23249
23603
|
return _extends({
|
|
23250
23604
|
node: node
|
|
@@ -23497,12 +23851,12 @@
|
|
|
23497
23851
|
help: 'Page must have means to bypass repeated blocks'
|
|
23498
23852
|
},
|
|
23499
23853
|
'color-contrast-enhanced': {
|
|
23500
|
-
description: 'Ensures the contrast between foreground and background colors meets WCAG 2 AAA contrast ratio thresholds',
|
|
23501
|
-
help: 'Elements must
|
|
23854
|
+
description: 'Ensures the contrast between foreground and background colors meets WCAG 2 AAA enhanced contrast ratio thresholds',
|
|
23855
|
+
help: 'Elements must meet enhanced color contrast ratio thresholds'
|
|
23502
23856
|
},
|
|
23503
23857
|
'color-contrast': {
|
|
23504
|
-
description: 'Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds',
|
|
23505
|
-
help: 'Elements must
|
|
23858
|
+
description: 'Ensures the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds',
|
|
23859
|
+
help: 'Elements must meet minimum color contrast ratio thresholds'
|
|
23506
23860
|
},
|
|
23507
23861
|
'css-orientation-lock': {
|
|
23508
23862
|
description: 'Ensures content is not locked to any specific display orientation, and the content is operable in all display orientations',
|
|
@@ -23889,7 +24243,7 @@
|
|
|
23889
24243
|
fail: {
|
|
23890
24244
|
singular: 'Required ARIA child role not present: ${data.values}',
|
|
23891
24245
|
plural: 'Required ARIA children role not present: ${data.values}',
|
|
23892
|
-
unallowed: 'Element has children which are not allowed
|
|
24246
|
+
unallowed: 'Element has children which are not allowed: ${data.values}'
|
|
23893
24247
|
},
|
|
23894
24248
|
incomplete: {
|
|
23895
24249
|
singular: 'Expecting ARIA child role to be added: ${data.values}',
|
|
@@ -24121,7 +24475,7 @@
|
|
|
24121
24475
|
}
|
|
24122
24476
|
},
|
|
24123
24477
|
'focusable-content': {
|
|
24124
|
-
impact: '
|
|
24478
|
+
impact: 'serious',
|
|
24125
24479
|
messages: {
|
|
24126
24480
|
pass: 'Element contains focusable elements',
|
|
24127
24481
|
fail: 'Element should have focusable content'
|
|
@@ -24136,7 +24490,7 @@
|
|
|
24136
24490
|
}
|
|
24137
24491
|
},
|
|
24138
24492
|
'focusable-element': {
|
|
24139
|
-
impact: '
|
|
24493
|
+
impact: 'serious',
|
|
24140
24494
|
messages: {
|
|
24141
24495
|
pass: 'Element is focusable',
|
|
24142
24496
|
fail: 'Element should be focusable'
|
|
@@ -25000,7 +25354,8 @@
|
|
|
25000
25354
|
}, {
|
|
25001
25355
|
id: 'aria-roledescription',
|
|
25002
25356
|
selector: '[aria-roledescription]',
|
|
25003
|
-
tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
|
|
25357
|
+
tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'deprecated' ],
|
|
25358
|
+
enabled: false,
|
|
25004
25359
|
all: [],
|
|
25005
25360
|
any: [ {
|
|
25006
25361
|
options: {
|
|
@@ -25092,7 +25447,7 @@
|
|
|
25092
25447
|
selector: 'audio',
|
|
25093
25448
|
enabled: false,
|
|
25094
25449
|
excludeHidden: false,
|
|
25095
|
-
tags: [ 'cat.time-and-media', 'wcag2a', 'wcag121', 'section508', 'section508.22.a' ],
|
|
25450
|
+
tags: [ 'cat.time-and-media', 'wcag2a', 'wcag121', 'section508', 'section508.22.a', 'deprecated' ],
|
|
25096
25451
|
actIds: [ '2eb176', 'afb423' ],
|
|
25097
25452
|
all: [],
|
|
25098
25453
|
any: [],
|
|
@@ -25296,7 +25651,8 @@
|
|
|
25296
25651
|
selector: '[id]',
|
|
25297
25652
|
matches: 'duplicate-id-active-matches',
|
|
25298
25653
|
excludeHidden: false,
|
|
25299
|
-
|
|
25654
|
+
enabled: false,
|
|
25655
|
+
tags: [ 'cat.parsing', 'wcag2a-obsolete', 'wcag411', 'deprecated' ],
|
|
25300
25656
|
actIds: [ '3ea0c8' ],
|
|
25301
25657
|
all: [],
|
|
25302
25658
|
any: [ 'duplicate-id-active' ],
|
|
@@ -25316,7 +25672,8 @@
|
|
|
25316
25672
|
selector: '[id]',
|
|
25317
25673
|
matches: 'duplicate-id-misc-matches',
|
|
25318
25674
|
excludeHidden: false,
|
|
25319
|
-
|
|
25675
|
+
enabled: false,
|
|
25676
|
+
tags: [ 'cat.parsing', 'wcag2a-obsolete', 'wcag411', 'deprecated' ],
|
|
25320
25677
|
actIds: [ '3ea0c8' ],
|
|
25321
25678
|
all: [],
|
|
25322
25679
|
any: [ 'duplicate-id' ],
|
|
@@ -25678,7 +26035,8 @@
|
|
|
25678
26035
|
all: [],
|
|
25679
26036
|
any: [ {
|
|
25680
26037
|
options: {
|
|
25681
|
-
requiredContrastRatio: 3
|
|
26038
|
+
requiredContrastRatio: 3,
|
|
26039
|
+
allowSameColor: true
|
|
25682
26040
|
},
|
|
25683
26041
|
id: 'link-in-text-block'
|
|
25684
26042
|
}, 'link-in-text-block-style' ],
|
|
@@ -25914,6 +26272,7 @@
|
|
|
25914
26272
|
none: []
|
|
25915
26273
|
}, {
|
|
25916
26274
|
id: 'scrollable-region-focusable',
|
|
26275
|
+
selector: '*:not(select,textarea)',
|
|
25917
26276
|
matches: 'scrollable-region-focusable-matches',
|
|
25918
26277
|
tags: [ 'cat.keyboard', 'wcag2a', 'wcag211' ],
|
|
25919
26278
|
actIds: [ '0ssw9k' ],
|
|
@@ -26201,7 +26560,8 @@
|
|
|
26201
26560
|
id: 'link-in-text-block',
|
|
26202
26561
|
evaluate: 'link-in-text-block-evaluate',
|
|
26203
26562
|
options: {
|
|
26204
|
-
requiredContrastRatio: 3
|
|
26563
|
+
requiredContrastRatio: 3,
|
|
26564
|
+
allowSameColor: true
|
|
26205
26565
|
}
|
|
26206
26566
|
}, {
|
|
26207
26567
|
id: 'autocomplete-appropriate',
|