axe-core 4.6.2 → 4.6.3-canary.13aa1f8
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 +1124 -721
- package/axe.min.js +2 -2
- package/locales/_template.json +6 -6
- package/locales/ja.json +91 -11
- package/package.json +31 -31
- package/sri-history.json +345 -337
package/axe.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! axe v4.6.
|
|
1
|
+
/*! axe v4.6.3-canary.13aa1f8
|
|
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.13aa1f8';
|
|
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;
|
|
7663
7699
|
}
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
stackingOrder.
|
|
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);
|
|
7706
|
+
}
|
|
7707
|
+
var zIndex = getRealZIndex(vNode, parentVNode);
|
|
7708
|
+
if (![ 'auto', '0' ].includes(zIndex)) {
|
|
7709
|
+
stackingOrder.push(createContext(parseInt(zIndex), vNode));
|
|
7710
|
+
return stackingOrder;
|
|
7711
|
+
}
|
|
7712
|
+
var _float = nodeIndex3.toString();
|
|
7713
|
+
while (_float.length < 10) {
|
|
7714
|
+
_float = '0' + _float;
|
|
7670
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) {
|
|
@@ -12062,140 +12363,34 @@
|
|
|
12062
12363
|
if (/rad$/.test(value)) {
|
|
12063
12364
|
return parseFloat(value) * 57.3;
|
|
12064
12365
|
}
|
|
12065
|
-
}
|
|
12066
|
-
return parseFloat(value);
|
|
12067
|
-
}
|
|
12068
|
-
function hslToRgb(
|
|
12069
|
-
var
|
|
12070
|
-
saturation /= 255;
|
|
12071
|
-
lightness /= 255;
|
|
12072
|
-
var high = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
12073
|
-
var low = high * (1 - Math.abs(hue / 60 % 2 - 1));
|
|
12074
|
-
var base = lightness - high / 2;
|
|
12075
|
-
var colors;
|
|
12076
|
-
if (hue < 60) {
|
|
12077
|
-
colors = [ high, low, 0 ];
|
|
12078
|
-
} else if (hue < 120) {
|
|
12079
|
-
colors = [ low, high, 0 ];
|
|
12080
|
-
} else if (hue < 180) {
|
|
12081
|
-
colors = [ 0, high, low ];
|
|
12082
|
-
} else if (hue < 240) {
|
|
12083
|
-
colors = [ 0, low, high ];
|
|
12084
|
-
} else if (hue < 300) {
|
|
12085
|
-
colors = [ low, 0, high ];
|
|
12086
|
-
} else {
|
|
12087
|
-
colors = [ high, 0, low ];
|
|
12088
|
-
}
|
|
12089
|
-
return colors.map(function(color) {
|
|
12090
|
-
return Math.round((color + base) * 255);
|
|
12091
|
-
}).concat(alpha);
|
|
12092
|
-
}
|
|
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
|
-
};
|
|
12366
|
+
}
|
|
12367
|
+
return parseFloat(value);
|
|
12368
|
+
}
|
|
12369
|
+
function hslToRgb(_ref43) {
|
|
12370
|
+
var _ref44 = _slicedToArray(_ref43, 4), hue = _ref44[0], saturation = _ref44[1], lightness = _ref44[2], alpha = _ref44[3];
|
|
12371
|
+
saturation /= 255;
|
|
12372
|
+
lightness /= 255;
|
|
12373
|
+
var high = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
12374
|
+
var low = high * (1 - Math.abs(hue / 60 % 2 - 1));
|
|
12375
|
+
var base = lightness - high / 2;
|
|
12376
|
+
var colors;
|
|
12377
|
+
if (hue < 60) {
|
|
12378
|
+
colors = [ high, low, 0 ];
|
|
12379
|
+
} else if (hue < 120) {
|
|
12380
|
+
colors = [ low, high, 0 ];
|
|
12381
|
+
} else if (hue < 180) {
|
|
12382
|
+
colors = [ 0, high, low ];
|
|
12383
|
+
} else if (hue < 240) {
|
|
12384
|
+
colors = [ 0, low, high ];
|
|
12385
|
+
} else if (hue < 300) {
|
|
12386
|
+
colors = [ low, 0, high ];
|
|
12387
|
+
} else {
|
|
12388
|
+
colors = [ high, 0, low ];
|
|
12389
|
+
}
|
|
12390
|
+
return colors.map(function(color) {
|
|
12391
|
+
return Math.round((color + base) * 255);
|
|
12392
|
+
}).concat(alpha);
|
|
12197
12393
|
}
|
|
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;
|
|
17384
|
-
}
|
|
17385
|
-
var missing = missingRequiredChildren(virtualNode, role, required, ownedRoles);
|
|
17386
|
-
if (!missing) {
|
|
17387
|
-
return true;
|
|
17653
|
+
if (role) {
|
|
17654
|
+
return '[role='.concat(role, ']');
|
|
17388
17655
|
}
|
|
17389
|
-
|
|
17390
|
-
|
|
17391
|
-
return void 0;
|
|
17656
|
+
if (attr) {
|
|
17657
|
+
return nodeName2 + '['.concat(attr, ']');
|
|
17392
17658
|
}
|
|
17393
|
-
return
|
|
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,99 @@
|
|
|
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, ancestorContext) {
|
|
18397
|
+
var _vNode$getComputedSty;
|
|
18398
|
+
return {
|
|
18399
|
+
vNode: vNode,
|
|
18400
|
+
ancestor: ancestorContext,
|
|
18401
|
+
opacity: parseFloat((_vNode$getComputedSty = vNode === null || vNode === void 0 ? void 0 : vNode.getComputedStylePropertyValue('opacity')) !== null && _vNode$getComputedSty !== void 0 ? _vNode$getComputedSty : 1),
|
|
18402
|
+
bgColor: new color_default(0, 0, 0, 0),
|
|
18403
|
+
blendMode: normalizeBlendMode(vNode === null || vNode === void 0 ? void 0 : vNode.getComputedStylePropertyValue('mix-blend-mode')),
|
|
18404
|
+
descendants: []
|
|
18405
|
+
};
|
|
18406
|
+
}
|
|
18407
|
+
function normalizeBlendMode(blendmode) {
|
|
18408
|
+
return !!blendmode ? blendmode : void 0;
|
|
18409
|
+
}
|
|
18410
|
+
function addToStackingContext(contextMap, vNode, ancestorVNode) {
|
|
18411
|
+
var _contextMap$get;
|
|
18412
|
+
var ancestorContext = contextMap.get(ancestorVNode);
|
|
18413
|
+
var context = (_contextMap$get = contextMap.get(vNode)) !== null && _contextMap$get !== void 0 ? _contextMap$get : createStackingContext(vNode, ancestorContext);
|
|
18414
|
+
if (ancestorContext && ancestorVNode !== vNode && !ancestorContext.descendants.includes(context)) {
|
|
18415
|
+
ancestorContext.descendants.unshift(context);
|
|
18416
|
+
}
|
|
18417
|
+
return context;
|
|
18418
|
+
}
|
|
18419
|
+
function getOwnBackgroundColor2(vNode) {
|
|
18420
|
+
var bgColor = new color_default();
|
|
18421
|
+
bgColor.parseString(vNode.getComputedStylePropertyValue('background-color'));
|
|
18422
|
+
return bgColor;
|
|
18423
|
+
}
|
|
18059
18424
|
function _getBackgroundColor2(elm) {
|
|
18060
18425
|
var bgElms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
18061
18426
|
var shadowOutlineEmMax = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : .1;
|
|
@@ -18076,6 +18441,11 @@
|
|
|
18076
18441
|
}
|
|
18077
18442
|
function _getBackgroundColor(elm, bgElms, shadowOutlineEmMax) {
|
|
18078
18443
|
var _bgColors;
|
|
18444
|
+
var elmStack = _getBackgroundStack(elm);
|
|
18445
|
+
if (!elmStack) {
|
|
18446
|
+
return null;
|
|
18447
|
+
}
|
|
18448
|
+
var textRects = get_visible_child_text_rects_default(elm);
|
|
18079
18449
|
var bgColors = get_text_shadow_colors_default(elm, {
|
|
18080
18450
|
minRatio: shadowOutlineEmMax
|
|
18081
18451
|
});
|
|
@@ -18084,36 +18454,29 @@
|
|
|
18084
18454
|
color: bgColors.reduce(_flattenShadowColors)
|
|
18085
18455
|
} ];
|
|
18086
18456
|
}
|
|
18087
|
-
var
|
|
18088
|
-
|
|
18089
|
-
(elmStack || []).some(function(bgElm) {
|
|
18457
|
+
for (var _i25 = 0; _i25 < elmStack.length; _i25++) {
|
|
18458
|
+
var bgElm = elmStack[_i25];
|
|
18090
18459
|
var bgElmStyle = window.getComputedStyle(bgElm);
|
|
18091
18460
|
if (element_has_image_default(bgElm, bgElmStyle)) {
|
|
18092
|
-
bgColors = null;
|
|
18093
18461
|
bgElms.push(bgElm);
|
|
18094
|
-
return
|
|
18462
|
+
return null;
|
|
18095
18463
|
}
|
|
18096
18464
|
var bgColor = get_own_background_color_default(bgElmStyle);
|
|
18097
18465
|
if (bgColor.alpha === 0) {
|
|
18098
|
-
|
|
18466
|
+
continue;
|
|
18099
18467
|
}
|
|
18100
18468
|
if (bgElmStyle.getPropertyValue('display') !== 'inline' && !fullyEncompasses(bgElm, textRects)) {
|
|
18101
|
-
bgColors = null;
|
|
18102
18469
|
bgElms.push(bgElm);
|
|
18103
18470
|
incomplete_data_default.set('bgColor', 'elmPartiallyObscured');
|
|
18104
|
-
return
|
|
18471
|
+
return null;
|
|
18105
18472
|
}
|
|
18106
18473
|
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;
|
|
18474
|
+
if (bgColor.alpha === 1) {
|
|
18475
|
+
break;
|
|
18476
|
+
}
|
|
18116
18477
|
}
|
|
18478
|
+
var stackingContext = _getStackingContext(elm, elmStack);
|
|
18479
|
+
bgColors = stackingContext.map(_stackingContextToColor).concat(bgColors);
|
|
18117
18480
|
var pageBgs = getPageBackgroundColors(elm, elmStack.includes(document.body));
|
|
18118
18481
|
(_bgColors = bgColors).unshift.apply(_bgColors, _toConsumableArray(pageBgs));
|
|
18119
18482
|
if (bgColors.length === 0) {
|
|
@@ -18138,7 +18501,7 @@
|
|
|
18138
18501
|
return rect.top >= nodeRect.top && rect.bottom <= bottom && rect.left >= nodeRect.left && rect.right <= right;
|
|
18139
18502
|
});
|
|
18140
18503
|
}
|
|
18141
|
-
function
|
|
18504
|
+
function normalizeBlendMode2(blendmode) {
|
|
18142
18505
|
return !!blendmode ? blendmode : void 0;
|
|
18143
18506
|
}
|
|
18144
18507
|
function getPageBackgroundColors(elm, stackContainsBody) {
|
|
@@ -18154,13 +18517,13 @@
|
|
|
18154
18517
|
if (bodyBgColor.alpha !== 0 && htmlBgColor.alpha === 0 || bodyBgColorApplies && bodyBgColor.alpha !== 1) {
|
|
18155
18518
|
pageColors.unshift({
|
|
18156
18519
|
color: bodyBgColor,
|
|
18157
|
-
blendMode:
|
|
18520
|
+
blendMode: normalizeBlendMode2(bodyStyle.getPropertyValue('mix-blend-mode'))
|
|
18158
18521
|
});
|
|
18159
18522
|
}
|
|
18160
18523
|
if (htmlBgColor.alpha !== 0 && (!bodyBgColorApplies || bodyBgColorApplies && bodyBgColor.alpha !== 1)) {
|
|
18161
18524
|
pageColors.unshift({
|
|
18162
18525
|
color: htmlBgColor,
|
|
18163
|
-
blendMode:
|
|
18526
|
+
blendMode: normalizeBlendMode2(htmlStyle.getPropertyValue('mix-blend-mode'))
|
|
18164
18527
|
});
|
|
18165
18528
|
}
|
|
18166
18529
|
}
|
|
@@ -18182,42 +18545,45 @@
|
|
|
18182
18545
|
var _bgColor;
|
|
18183
18546
|
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
18184
18547
|
var nodeStyle = window.getComputedStyle(node);
|
|
18185
|
-
var
|
|
18186
|
-
|
|
18187
|
-
|
|
18188
|
-
|
|
18189
|
-
|
|
18190
|
-
|
|
18191
|
-
|
|
18192
|
-
|
|
18193
|
-
|
|
18194
|
-
|
|
18195
|
-
|
|
18196
|
-
|
|
18197
|
-
|
|
18198
|
-
|
|
18199
|
-
|
|
18200
|
-
|
|
18201
|
-
|
|
18202
|
-
|
|
18203
|
-
|
|
18204
|
-
|
|
18205
|
-
return fgColor;
|
|
18548
|
+
var colorStack = [ function() {
|
|
18549
|
+
return getStrokeColor(nodeStyle, options);
|
|
18550
|
+
}, function() {
|
|
18551
|
+
return getTextColor(nodeStyle);
|
|
18552
|
+
}, function() {
|
|
18553
|
+
return get_text_shadow_colors_default(node, {
|
|
18554
|
+
minRatio: 0
|
|
18555
|
+
});
|
|
18556
|
+
} ];
|
|
18557
|
+
var fgColors = [];
|
|
18558
|
+
for (var _i26 = 0, _colorStack = colorStack; _i26 < _colorStack.length; _i26++) {
|
|
18559
|
+
var colorFn = _colorStack[_i26];
|
|
18560
|
+
var color = colorFn();
|
|
18561
|
+
if (!color) {
|
|
18562
|
+
continue;
|
|
18563
|
+
}
|
|
18564
|
+
fgColors = fgColors.concat(color);
|
|
18565
|
+
if (color.alpha === 1) {
|
|
18566
|
+
break;
|
|
18567
|
+
}
|
|
18206
18568
|
}
|
|
18569
|
+
var fgColor = fgColors.reduce(function(source, backdrop) {
|
|
18570
|
+
return flatten_colors_default(source, backdrop);
|
|
18571
|
+
});
|
|
18207
18572
|
(_bgColor = bgColor) !== null && _bgColor !== void 0 ? _bgColor : bgColor = _getBackgroundColor2(node, []);
|
|
18208
18573
|
if (bgColor === null) {
|
|
18209
18574
|
var reason = incomplete_data_default.get('bgColor');
|
|
18210
18575
|
incomplete_data_default.set('fgColor', reason);
|
|
18211
18576
|
return null;
|
|
18212
18577
|
}
|
|
18213
|
-
|
|
18214
|
-
|
|
18578
|
+
var stackingContexts = _getStackingContext(node);
|
|
18579
|
+
var context = findNodeInContexts(stackingContexts, node);
|
|
18580
|
+
return flatten_colors_default(calculateBlendedForegroundColor(fgColor, context, stackingContexts), new color_default(255, 255, 255, 1));
|
|
18215
18581
|
}
|
|
18216
18582
|
function getTextColor(nodeStyle) {
|
|
18217
18583
|
return new color_default().parseString(nodeStyle.getPropertyValue('-webkit-text-fill-color') || nodeStyle.getPropertyValue('color'));
|
|
18218
18584
|
}
|
|
18219
|
-
function getStrokeColor(nodeStyle,
|
|
18220
|
-
var
|
|
18585
|
+
function getStrokeColor(nodeStyle, _ref84) {
|
|
18586
|
+
var _ref84$textStrokeEmMi = _ref84.textStrokeEmMin, textStrokeEmMin = _ref84$textStrokeEmMi === void 0 ? 0 : _ref84$textStrokeEmMi;
|
|
18221
18587
|
var strokeWidth = parseFloat(nodeStyle.getPropertyValue('-webkit-text-stroke-width'));
|
|
18222
18588
|
if (strokeWidth === 0) {
|
|
18223
18589
|
return null;
|
|
@@ -18230,22 +18596,53 @@
|
|
|
18230
18596
|
var strokeColor = nodeStyle.getPropertyValue('-webkit-text-stroke-color');
|
|
18231
18597
|
return new color_default().parseString(strokeColor);
|
|
18232
18598
|
}
|
|
18233
|
-
function
|
|
18234
|
-
|
|
18235
|
-
|
|
18236
|
-
|
|
18237
|
-
|
|
18238
|
-
|
|
18239
|
-
|
|
18240
|
-
|
|
18599
|
+
function calculateBlendedForegroundColor(fgColor, context, stackingContexts) {
|
|
18600
|
+
while (context) {
|
|
18601
|
+
var _context$ancestor;
|
|
18602
|
+
if (context.opacity === 1 && context.ancestor) {
|
|
18603
|
+
context = context.ancestor;
|
|
18604
|
+
continue;
|
|
18605
|
+
}
|
|
18606
|
+
fgColor.alpha *= context.opacity;
|
|
18607
|
+
var stack = ((_context$ancestor = context.ancestor) === null || _context$ancestor === void 0 ? void 0 : _context$ancestor.descendants) || stackingContexts;
|
|
18608
|
+
if (context.opacity !== 1) {
|
|
18609
|
+
stack = stack.slice(0, stack.indexOf(context));
|
|
18610
|
+
}
|
|
18611
|
+
var bgColors = stack.map(_stackingContextToColor);
|
|
18612
|
+
if (!bgColors.length) {
|
|
18613
|
+
context = context.ancestor;
|
|
18614
|
+
continue;
|
|
18615
|
+
}
|
|
18616
|
+
var bgColor = bgColors.reduce(function(backdrop, source) {
|
|
18617
|
+
return flatten_colors_default(source.color, backdrop.color instanceof color_default ? backdrop.color : backdrop);
|
|
18618
|
+
}, {
|
|
18619
|
+
color: new color_default(0, 0, 0, 0),
|
|
18620
|
+
blendMode: 'normal'
|
|
18621
|
+
});
|
|
18622
|
+
fgColor = flatten_colors_default(fgColor, bgColor);
|
|
18623
|
+
context = context.ancestor;
|
|
18241
18624
|
}
|
|
18242
|
-
|
|
18243
|
-
|
|
18244
|
-
|
|
18245
|
-
|
|
18246
|
-
|
|
18625
|
+
return fgColor;
|
|
18626
|
+
}
|
|
18627
|
+
function findNodeInContexts(contexts, node) {
|
|
18628
|
+
var _iterator8 = _createForOfIteratorHelper(contexts), _step8;
|
|
18629
|
+
try {
|
|
18630
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done; ) {
|
|
18631
|
+
var _context$vNode;
|
|
18632
|
+
var context = _step8.value;
|
|
18633
|
+
if (((_context$vNode = context.vNode) === null || _context$vNode === void 0 ? void 0 : _context$vNode.actualNode) === node) {
|
|
18634
|
+
return context;
|
|
18635
|
+
}
|
|
18636
|
+
var found = findNodeInContexts(context.descendants, node);
|
|
18637
|
+
if (found) {
|
|
18638
|
+
return found;
|
|
18639
|
+
}
|
|
18640
|
+
}
|
|
18641
|
+
} catch (err) {
|
|
18642
|
+
_iterator8.e(err);
|
|
18643
|
+
} finally {
|
|
18644
|
+
_iterator8.f();
|
|
18247
18645
|
}
|
|
18248
|
-
return finalOpacity;
|
|
18249
18646
|
}
|
|
18250
18647
|
function hasValidContrastRatio(bg, fg, fontSize, isBold) {
|
|
18251
18648
|
var contrast = get_contrast_default(bg, fg);
|
|
@@ -18279,7 +18676,7 @@
|
|
|
18279
18676
|
var bold = parseFloat(fontWeight) >= boldValue || fontWeight === 'bold';
|
|
18280
18677
|
var ptSize = Math.ceil(fontSize * 72) / 96;
|
|
18281
18678
|
var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
|
|
18282
|
-
var
|
|
18679
|
+
var _ref85 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref85.expected, minThreshold = _ref85.minThreshold, maxThreshold = _ref85.maxThreshold;
|
|
18283
18680
|
var pseudoElm = findPseudoElement(virtualNode, {
|
|
18284
18681
|
ignorePseudo: ignorePseudo,
|
|
18285
18682
|
pseudoSizeThreshold: pseudoSizeThreshold
|
|
@@ -18358,8 +18755,8 @@
|
|
|
18358
18755
|
}
|
|
18359
18756
|
return isValid;
|
|
18360
18757
|
}
|
|
18361
|
-
function findPseudoElement(vNode,
|
|
18362
|
-
var
|
|
18758
|
+
function findPseudoElement(vNode, _ref86) {
|
|
18759
|
+
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
18760
|
if (ignorePseudo) {
|
|
18364
18761
|
return;
|
|
18365
18762
|
}
|
|
@@ -18401,7 +18798,7 @@
|
|
|
18401
18798
|
}
|
|
18402
18799
|
function parseUnit(str) {
|
|
18403
18800
|
var unitRegex = /^([0-9.]+)([a-z]+)$/i;
|
|
18404
|
-
var
|
|
18801
|
+
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
18802
|
return {
|
|
18406
18803
|
value: parseFloat(value),
|
|
18407
18804
|
unit: unit.toLowerCase()
|
|
@@ -18418,7 +18815,7 @@
|
|
|
18418
18815
|
return blockLike2.indexOf(display) !== -1 || display.substr(0, 6) === 'table-';
|
|
18419
18816
|
}
|
|
18420
18817
|
function linkInTextBlockEvaluate(node, options) {
|
|
18421
|
-
var requiredContrastRatio = options.requiredContrastRatio;
|
|
18818
|
+
var requiredContrastRatio = options.requiredContrastRatio, allowSameColor = options.allowSameColor;
|
|
18422
18819
|
if (isBlock2(node)) {
|
|
18423
18820
|
return false;
|
|
18424
18821
|
}
|
|
@@ -18460,6 +18857,9 @@
|
|
|
18460
18857
|
if (!textContrast) {
|
|
18461
18858
|
return void 0;
|
|
18462
18859
|
}
|
|
18860
|
+
if (allowSameColor && textContrast === 1 && backgroundContrast === 1) {
|
|
18861
|
+
return true;
|
|
18862
|
+
}
|
|
18463
18863
|
if (textContrast === 1 && backgroundContrast > 1) {
|
|
18464
18864
|
this.data({
|
|
18465
18865
|
messageKey: 'bgContrast',
|
|
@@ -18742,8 +19142,8 @@
|
|
|
18742
19142
|
}
|
|
18743
19143
|
var focusable_element_evaluate_default = focusableElementEvaluate;
|
|
18744
19144
|
function focusableModalOpenEvaluate(node, options, virtualNode) {
|
|
18745
|
-
var tabbableElements = virtualNode.tabbableElements.map(function(
|
|
18746
|
-
var actualNode =
|
|
19145
|
+
var tabbableElements = virtualNode.tabbableElements.map(function(_ref89) {
|
|
19146
|
+
var actualNode = _ref89.actualNode;
|
|
18747
19147
|
return actualNode;
|
|
18748
19148
|
});
|
|
18749
19149
|
if (!tabbableElements || !tabbableElements.length) {
|
|
@@ -19224,8 +19624,8 @@
|
|
|
19224
19624
|
this.relatedNodes(relatedNodes);
|
|
19225
19625
|
return true;
|
|
19226
19626
|
}
|
|
19227
|
-
function getInvalidSelector(vChild, nested,
|
|
19228
|
-
var
|
|
19627
|
+
function getInvalidSelector(vChild, nested, _ref90) {
|
|
19628
|
+
var _ref90$validRoles = _ref90.validRoles, validRoles = _ref90$validRoles === void 0 ? [] : _ref90$validRoles, _ref90$validNodeNames = _ref90.validNodeNames, validNodeNames = _ref90$validNodeNames === void 0 ? [] : _ref90$validNodeNames;
|
|
19229
19629
|
var _vChild$props = vChild.props, nodeName2 = _vChild$props.nodeName, nodeType = _vChild$props.nodeType, nodeValue = _vChild$props.nodeValue;
|
|
19230
19630
|
var selector = nested ? 'div > ' : '';
|
|
19231
19631
|
if (nodeType === 3 && nodeValue.trim() !== '') {
|
|
@@ -19458,8 +19858,8 @@
|
|
|
19458
19858
|
}
|
|
19459
19859
|
var no_autoplay_audio_evaluate_default = noAutoplayAudioEvaluate;
|
|
19460
19860
|
function cssOrientationLockEvaluate(node, options, virtualNode, context) {
|
|
19461
|
-
var
|
|
19462
|
-
var
|
|
19861
|
+
var _ref91 = context || {}, _ref91$cssom = _ref91.cssom, cssom = _ref91$cssom === void 0 ? void 0 : _ref91$cssom;
|
|
19862
|
+
var _ref92 = options || {}, _ref92$degreeThreshol = _ref92.degreeThreshold, degreeThreshold = _ref92$degreeThreshol === void 0 ? 0 : _ref92$degreeThreshol;
|
|
19463
19863
|
if (!cssom || !cssom.length) {
|
|
19464
19864
|
return void 0;
|
|
19465
19865
|
}
|
|
@@ -19467,14 +19867,14 @@
|
|
|
19467
19867
|
var relatedElements = [];
|
|
19468
19868
|
var rulesGroupByDocumentFragment = groupCssomByDocument(cssom);
|
|
19469
19869
|
var _loop7 = function _loop7() {
|
|
19470
|
-
var key = _Object$keys2[
|
|
19870
|
+
var key = _Object$keys2[_i27];
|
|
19471
19871
|
var _rulesGroupByDocument = rulesGroupByDocumentFragment[key], root = _rulesGroupByDocument.root, rules = _rulesGroupByDocument.rules;
|
|
19472
19872
|
var orientationRules = rules.filter(isMediaRuleWithOrientation);
|
|
19473
19873
|
if (!orientationRules.length) {
|
|
19474
19874
|
return 'continue';
|
|
19475
19875
|
}
|
|
19476
|
-
orientationRules.forEach(function(
|
|
19477
|
-
var cssRules =
|
|
19876
|
+
orientationRules.forEach(function(_ref93) {
|
|
19877
|
+
var cssRules = _ref93.cssRules;
|
|
19478
19878
|
Array.from(cssRules).forEach(function(cssRule) {
|
|
19479
19879
|
var locked = getIsOrientationLocked(cssRule);
|
|
19480
19880
|
if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
|
|
@@ -19485,9 +19885,9 @@
|
|
|
19485
19885
|
});
|
|
19486
19886
|
});
|
|
19487
19887
|
};
|
|
19488
|
-
for (var
|
|
19489
|
-
var
|
|
19490
|
-
if (
|
|
19888
|
+
for (var _i27 = 0, _Object$keys2 = Object.keys(rulesGroupByDocumentFragment); _i27 < _Object$keys2.length; _i27++) {
|
|
19889
|
+
var _ret4 = _loop7();
|
|
19890
|
+
if (_ret4 === 'continue') {
|
|
19491
19891
|
continue;
|
|
19492
19892
|
}
|
|
19493
19893
|
}
|
|
@@ -19499,8 +19899,8 @@
|
|
|
19499
19899
|
}
|
|
19500
19900
|
return false;
|
|
19501
19901
|
function groupCssomByDocument(cssObjectModel) {
|
|
19502
|
-
return cssObjectModel.reduce(function(out,
|
|
19503
|
-
var sheet =
|
|
19902
|
+
return cssObjectModel.reduce(function(out, _ref94) {
|
|
19903
|
+
var sheet = _ref94.sheet, root = _ref94.root, shadowId = _ref94.shadowId;
|
|
19504
19904
|
var key = shadowId ? shadowId : 'topDocument';
|
|
19505
19905
|
if (!out[key]) {
|
|
19506
19906
|
out[key] = {
|
|
@@ -19516,28 +19916,25 @@
|
|
|
19516
19916
|
return out;
|
|
19517
19917
|
}, {});
|
|
19518
19918
|
}
|
|
19519
|
-
function isMediaRuleWithOrientation(
|
|
19520
|
-
var type =
|
|
19919
|
+
function isMediaRuleWithOrientation(_ref95) {
|
|
19920
|
+
var type = _ref95.type, cssText = _ref95.cssText;
|
|
19521
19921
|
if (type !== 4) {
|
|
19522
19922
|
return false;
|
|
19523
19923
|
}
|
|
19524
19924
|
return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
|
|
19525
19925
|
}
|
|
19526
|
-
function getIsOrientationLocked(
|
|
19527
|
-
var selectorText =
|
|
19926
|
+
function getIsOrientationLocked(_ref96) {
|
|
19927
|
+
var selectorText = _ref96.selectorText, style = _ref96.style;
|
|
19528
19928
|
if (!selectorText || style.length <= 0) {
|
|
19529
19929
|
return false;
|
|
19530
19930
|
}
|
|
19531
19931
|
var transformStyle = style.transform || style.webkitTransform || style.msTransform || false;
|
|
19532
|
-
if (!transformStyle) {
|
|
19533
|
-
return false;
|
|
19534
|
-
}
|
|
19535
|
-
var matches4 = transformStyle.match(/(rotate|rotateZ|rotate3d|matrix|matrix3d)\(([^)]+)\)(?!.*(rotate|rotateZ|rotate3d|matrix|matrix3d))/);
|
|
19536
|
-
if (!matches4) {
|
|
19932
|
+
if (!transformStyle && !style.rotate) {
|
|
19537
19933
|
return false;
|
|
19538
19934
|
}
|
|
19539
|
-
var
|
|
19540
|
-
var
|
|
19935
|
+
var transformDegrees = getTransformDegrees(transformStyle);
|
|
19936
|
+
var rotateDegrees = getRotationInDegrees('rotate', style.rotate);
|
|
19937
|
+
var degrees = transformDegrees + rotateDegrees;
|
|
19541
19938
|
if (!degrees) {
|
|
19542
19939
|
return false;
|
|
19543
19940
|
}
|
|
@@ -19547,6 +19944,17 @@
|
|
|
19547
19944
|
}
|
|
19548
19945
|
return Math.abs(degrees - 90) % 90 <= degreeThreshold;
|
|
19549
19946
|
}
|
|
19947
|
+
function getTransformDegrees(transformStyle) {
|
|
19948
|
+
if (!transformStyle) {
|
|
19949
|
+
return 0;
|
|
19950
|
+
}
|
|
19951
|
+
var matches4 = transformStyle.match(/(rotate|rotateZ|rotate3d|matrix|matrix3d)\(([^)]+)\)(?!.*(rotate|rotateZ|rotate3d|matrix|matrix3d))/);
|
|
19952
|
+
if (!matches4) {
|
|
19953
|
+
return 0;
|
|
19954
|
+
}
|
|
19955
|
+
var _matches = _slicedToArray(matches4, 3), transformFn = _matches[1], transformFnValue = _matches[2];
|
|
19956
|
+
return getRotationInDegrees(transformFn, transformFnValue);
|
|
19957
|
+
}
|
|
19550
19958
|
function getRotationInDegrees(transformFunction, transformFnValue) {
|
|
19551
19959
|
switch (transformFunction) {
|
|
19552
19960
|
case 'rotate':
|
|
@@ -19567,13 +19975,13 @@
|
|
|
19567
19975
|
return getAngleInDegreesFromMatrixTransform(transformFnValue);
|
|
19568
19976
|
|
|
19569
19977
|
default:
|
|
19570
|
-
return;
|
|
19978
|
+
return 0;
|
|
19571
19979
|
}
|
|
19572
19980
|
}
|
|
19573
19981
|
function getAngleInDegrees(angleWithUnit) {
|
|
19574
|
-
var
|
|
19982
|
+
var _ref97 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref98 = _slicedToArray(_ref97, 1), unit = _ref98[0];
|
|
19575
19983
|
if (!unit) {
|
|
19576
|
-
return;
|
|
19984
|
+
return 0;
|
|
19577
19985
|
}
|
|
19578
19986
|
var angle = parseFloat(angleWithUnit.replace(unit, ''));
|
|
19579
19987
|
switch (unit) {
|
|
@@ -19620,7 +20028,7 @@
|
|
|
19620
20028
|
}
|
|
19621
20029
|
var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
|
|
19622
20030
|
function metaViewportScaleEvaluate(node, options, virtualNode) {
|
|
19623
|
-
var
|
|
20031
|
+
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
20032
|
var content = virtualNode.attr('content') || '';
|
|
19625
20033
|
if (!content) {
|
|
19626
20034
|
return true;
|
|
@@ -19669,10 +20077,10 @@
|
|
|
19669
20077
|
var minOffset = (options === null || options === void 0 ? void 0 : options.minOffset) || 24;
|
|
19670
20078
|
var closeNeighbors = [];
|
|
19671
20079
|
var closestOffset = minOffset;
|
|
19672
|
-
var
|
|
20080
|
+
var _iterator9 = _createForOfIteratorHelper(_findNearbyElms(vNode, minOffset)), _step9;
|
|
19673
20081
|
try {
|
|
19674
|
-
for (
|
|
19675
|
-
var vNeighbor =
|
|
20082
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done; ) {
|
|
20083
|
+
var vNeighbor = _step9.value;
|
|
19676
20084
|
if (get_role_type_default(vNeighbor) !== 'widget' || !_isFocusable(vNeighbor)) {
|
|
19677
20085
|
continue;
|
|
19678
20086
|
}
|
|
@@ -19684,9 +20092,9 @@
|
|
|
19684
20092
|
closeNeighbors.push(vNeighbor);
|
|
19685
20093
|
}
|
|
19686
20094
|
} catch (err) {
|
|
19687
|
-
|
|
20095
|
+
_iterator9.e(err);
|
|
19688
20096
|
} finally {
|
|
19689
|
-
|
|
20097
|
+
_iterator9.f();
|
|
19690
20098
|
}
|
|
19691
20099
|
if (closeNeighbors.length === 0) {
|
|
19692
20100
|
this.data({
|
|
@@ -19695,8 +20103,8 @@
|
|
|
19695
20103
|
});
|
|
19696
20104
|
return true;
|
|
19697
20105
|
}
|
|
19698
|
-
this.relatedNodes(closeNeighbors.map(function(
|
|
19699
|
-
var actualNode =
|
|
20106
|
+
this.relatedNodes(closeNeighbors.map(function(_ref100) {
|
|
20107
|
+
var actualNode = _ref100.actualNode;
|
|
19700
20108
|
return actualNode;
|
|
19701
20109
|
}));
|
|
19702
20110
|
if (!closeNeighbors.some(_isInTabOrder)) {
|
|
@@ -19774,10 +20182,10 @@
|
|
|
19774
20182
|
function filterByElmsOverlap(vNode, nearbyElms) {
|
|
19775
20183
|
var fullyObscuringElms = [];
|
|
19776
20184
|
var partialObscuringElms = [];
|
|
19777
|
-
var
|
|
20185
|
+
var _iterator10 = _createForOfIteratorHelper(nearbyElms), _step10;
|
|
19778
20186
|
try {
|
|
19779
|
-
for (
|
|
19780
|
-
var vNeighbor =
|
|
20187
|
+
for (_iterator10.s(); !(_step10 = _iterator10.n()).done; ) {
|
|
20188
|
+
var vNeighbor = _step10.value;
|
|
19781
20189
|
if (!isDescendantNotInTabOrder(vNode, vNeighbor) && _hasVisualOverlap(vNode, vNeighbor) && getCssPointerEvents(vNeighbor) !== 'none') {
|
|
19782
20190
|
if (isEnclosedRect(vNode, vNeighbor)) {
|
|
19783
20191
|
fullyObscuringElms.push(vNeighbor);
|
|
@@ -19787,9 +20195,9 @@
|
|
|
19787
20195
|
}
|
|
19788
20196
|
}
|
|
19789
20197
|
} catch (err) {
|
|
19790
|
-
|
|
20198
|
+
_iterator10.e(err);
|
|
19791
20199
|
} finally {
|
|
19792
|
-
|
|
20200
|
+
_iterator10.f();
|
|
19793
20201
|
}
|
|
19794
20202
|
return {
|
|
19795
20203
|
fullyObscuringElms: fullyObscuringElms,
|
|
@@ -19801,8 +20209,8 @@
|
|
|
19801
20209
|
if (obscuredNodes.length === 0) {
|
|
19802
20210
|
return null;
|
|
19803
20211
|
}
|
|
19804
|
-
var obscuringRects = obscuredNodes.map(function(
|
|
19805
|
-
var rect =
|
|
20212
|
+
var obscuringRects = obscuredNodes.map(function(_ref101) {
|
|
20213
|
+
var rect = _ref101.boundingClientRect;
|
|
19806
20214
|
return rect;
|
|
19807
20215
|
});
|
|
19808
20216
|
var unobscuredRects = _splitRects(nodeRect, obscuringRects);
|
|
@@ -19842,13 +20250,13 @@
|
|
|
19842
20250
|
function isDescendantNotInTabOrder(vAncestor, vNode) {
|
|
19843
20251
|
return vAncestor.actualNode.contains(vNode.actualNode) && !_isInTabOrder(vNode);
|
|
19844
20252
|
}
|
|
19845
|
-
function rectHasMinimumSize(minSize,
|
|
19846
|
-
var width =
|
|
20253
|
+
function rectHasMinimumSize(minSize, _ref102) {
|
|
20254
|
+
var width = _ref102.width, height = _ref102.height;
|
|
19847
20255
|
return width + roundingMargin2 >= minSize && height + roundingMargin2 >= minSize;
|
|
19848
20256
|
}
|
|
19849
20257
|
function mapActualNodes(vNodes) {
|
|
19850
|
-
return vNodes.map(function(
|
|
19851
|
-
var actualNode =
|
|
20258
|
+
return vNodes.map(function(_ref103) {
|
|
20259
|
+
var actualNode = _ref103.actualNode;
|
|
19852
20260
|
return actualNode;
|
|
19853
20261
|
});
|
|
19854
20262
|
}
|
|
@@ -19874,14 +20282,14 @@
|
|
|
19874
20282
|
}
|
|
19875
20283
|
function getHeadingOrder(results) {
|
|
19876
20284
|
results = _toConsumableArray(results);
|
|
19877
|
-
results.sort(function(
|
|
19878
|
-
var nodeA =
|
|
19879
|
-
var nodeB =
|
|
20285
|
+
results.sort(function(_ref104, _ref105) {
|
|
20286
|
+
var nodeA = _ref104.node;
|
|
20287
|
+
var nodeB = _ref105.node;
|
|
19880
20288
|
return nodeA.ancestry.length - nodeB.ancestry.length;
|
|
19881
20289
|
});
|
|
19882
20290
|
var headingOrder = results.reduce(mergeHeadingOrder, []);
|
|
19883
|
-
return headingOrder.filter(function(
|
|
19884
|
-
var level =
|
|
20291
|
+
return headingOrder.filter(function(_ref106) {
|
|
20292
|
+
var level = _ref106.level;
|
|
19885
20293
|
return level !== -1;
|
|
19886
20294
|
});
|
|
19887
20295
|
}
|
|
@@ -19932,7 +20340,7 @@
|
|
|
19932
20340
|
var headingRole = role && role.includes('heading');
|
|
19933
20341
|
var ariaHeadingLevel = vNode.attr('aria-level');
|
|
19934
20342
|
var ariaLevel = parseInt(ariaHeadingLevel, 10);
|
|
19935
|
-
var
|
|
20343
|
+
var _ref107 = vNode.props.nodeName.match(/h(\d)/) || [], _ref108 = _slicedToArray(_ref107, 2), headingLevel = _ref108[1];
|
|
19936
20344
|
if (!headingRole) {
|
|
19937
20345
|
return -1;
|
|
19938
20346
|
}
|
|
@@ -19996,8 +20404,8 @@
|
|
|
19996
20404
|
if (results.length < 2) {
|
|
19997
20405
|
return results;
|
|
19998
20406
|
}
|
|
19999
|
-
var incompleteResults = results.filter(function(
|
|
20000
|
-
var result =
|
|
20407
|
+
var incompleteResults = results.filter(function(_ref109) {
|
|
20408
|
+
var result = _ref109.result;
|
|
20001
20409
|
return result !== void 0;
|
|
20002
20410
|
});
|
|
20003
20411
|
var uniqueResults = [];
|
|
@@ -20009,12 +20417,12 @@
|
|
|
20009
20417
|
if (nameMap[name]) {
|
|
20010
20418
|
return 'continue';
|
|
20011
20419
|
}
|
|
20012
|
-
var sameNameResults = incompleteResults.filter(function(
|
|
20013
|
-
var data2 =
|
|
20420
|
+
var sameNameResults = incompleteResults.filter(function(_ref110, resultNum) {
|
|
20421
|
+
var data2 = _ref110.data;
|
|
20014
20422
|
return data2.name === name && resultNum !== index;
|
|
20015
20423
|
});
|
|
20016
|
-
var isSameUrl = sameNameResults.every(function(
|
|
20017
|
-
var data2 =
|
|
20424
|
+
var isSameUrl = sameNameResults.every(function(_ref111) {
|
|
20425
|
+
var data2 = _ref111.data;
|
|
20018
20426
|
return isIdenticalObject(data2.urlProps, urlProps);
|
|
20019
20427
|
});
|
|
20020
20428
|
if (sameNameResults.length && !isSameUrl) {
|
|
@@ -20028,8 +20436,8 @@
|
|
|
20028
20436
|
uniqueResults.push(currentResult);
|
|
20029
20437
|
};
|
|
20030
20438
|
for (var index = 0; index < incompleteResults.length; index++) {
|
|
20031
|
-
var
|
|
20032
|
-
if (
|
|
20439
|
+
var _ret5 = _loop8(index);
|
|
20440
|
+
if (_ret5 === 'continue') {
|
|
20033
20441
|
continue;
|
|
20034
20442
|
}
|
|
20035
20443
|
}
|
|
@@ -20433,7 +20841,7 @@
|
|
|
20433
20841
|
var separatorRegex = /[;,\s]/;
|
|
20434
20842
|
var validRedirectNumRegex = /^[0-9.]+$/;
|
|
20435
20843
|
function metaRefreshEvaluate(node, options, virtualNode) {
|
|
20436
|
-
var
|
|
20844
|
+
var _ref112 = options || {}, minDelay = _ref112.minDelay, maxDelay = _ref112.maxDelay;
|
|
20437
20845
|
var content = (virtualNode.attr('content') || '').trim();
|
|
20438
20846
|
var _content$split = content.split(separatorRegex), _content$split2 = _slicedToArray(_content$split, 1), redirectStr = _content$split2[0];
|
|
20439
20847
|
if (!redirectStr.match(validRedirectNumRegex)) {
|
|
@@ -20473,16 +20881,16 @@
|
|
|
20473
20881
|
var outerText = elm.textContent.trim();
|
|
20474
20882
|
var innerText = outerText;
|
|
20475
20883
|
while (innerText === outerText && nextNode !== void 0) {
|
|
20476
|
-
var
|
|
20884
|
+
var _i28 = -1;
|
|
20477
20885
|
elm = nextNode;
|
|
20478
20886
|
if (elm.children.length === 0) {
|
|
20479
20887
|
return elm;
|
|
20480
20888
|
}
|
|
20481
20889
|
do {
|
|
20482
|
-
|
|
20483
|
-
innerText = elm.children[
|
|
20484
|
-
} while (innerText === '' &&
|
|
20485
|
-
nextNode = elm.children[
|
|
20890
|
+
_i28++;
|
|
20891
|
+
innerText = elm.children[_i28].textContent.trim();
|
|
20892
|
+
} while (innerText === '' && _i28 + 1 < elm.children.length);
|
|
20893
|
+
nextNode = elm.children[_i28];
|
|
20486
20894
|
}
|
|
20487
20895
|
return elm;
|
|
20488
20896
|
}
|
|
@@ -20545,19 +20953,19 @@
|
|
|
20545
20953
|
return;
|
|
20546
20954
|
}
|
|
20547
20955
|
var frameAncestry = r.node.ancestry.slice(0, -1);
|
|
20548
|
-
var
|
|
20956
|
+
var _iterator11 = _createForOfIteratorHelper(iframeResults), _step11;
|
|
20549
20957
|
try {
|
|
20550
|
-
for (
|
|
20551
|
-
var iframeResult =
|
|
20958
|
+
for (_iterator11.s(); !(_step11 = _iterator11.n()).done; ) {
|
|
20959
|
+
var iframeResult = _step11.value;
|
|
20552
20960
|
if (match_ancestry_default(frameAncestry, iframeResult.node.ancestry)) {
|
|
20553
20961
|
r.result = iframeResult.result;
|
|
20554
20962
|
break;
|
|
20555
20963
|
}
|
|
20556
20964
|
}
|
|
20557
20965
|
} catch (err) {
|
|
20558
|
-
|
|
20966
|
+
_iterator11.e(err);
|
|
20559
20967
|
} finally {
|
|
20560
|
-
|
|
20968
|
+
_iterator11.f();
|
|
20561
20969
|
}
|
|
20562
20970
|
});
|
|
20563
20971
|
iframeResults.forEach(function(r) {
|
|
@@ -20605,8 +21013,8 @@
|
|
|
20605
21013
|
} else if (node !== document.body && has_content_default(node, true)) {
|
|
20606
21014
|
return [ virtualNode ];
|
|
20607
21015
|
} else {
|
|
20608
|
-
return virtualNode.children.filter(function(
|
|
20609
|
-
var actualNode =
|
|
21016
|
+
return virtualNode.children.filter(function(_ref113) {
|
|
21017
|
+
var actualNode = _ref113.actualNode;
|
|
20610
21018
|
return actualNode.nodeType === 1;
|
|
20611
21019
|
}).map(function(vNode) {
|
|
20612
21020
|
return findRegionlessElms(vNode, options);
|
|
@@ -20759,8 +21167,8 @@
|
|
|
20759
21167
|
}
|
|
20760
21168
|
return false;
|
|
20761
21169
|
}
|
|
20762
|
-
function getNumberValue(domNode,
|
|
20763
|
-
var cssProperty =
|
|
21170
|
+
function getNumberValue(domNode, _ref114) {
|
|
21171
|
+
var cssProperty = _ref114.cssProperty, absoluteValues = _ref114.absoluteValues, normalValue = _ref114.normalValue;
|
|
20764
21172
|
var computedStyle = window.getComputedStyle(domNode);
|
|
20765
21173
|
var cssPropValue = computedStyle.getPropertyValue(cssProperty);
|
|
20766
21174
|
if (cssPropValue === 'normal') {
|
|
@@ -20837,8 +21245,8 @@
|
|
|
20837
21245
|
if (!virtualNode.children) {
|
|
20838
21246
|
return void 0;
|
|
20839
21247
|
}
|
|
20840
|
-
var titleNode = virtualNode.children.find(function(
|
|
20841
|
-
var props =
|
|
21248
|
+
var titleNode = virtualNode.children.find(function(_ref115) {
|
|
21249
|
+
var props = _ref115.props;
|
|
20842
21250
|
return props.nodeName === 'title';
|
|
20843
21251
|
});
|
|
20844
21252
|
if (!titleNode) {
|
|
@@ -21040,8 +21448,8 @@
|
|
|
21040
21448
|
var aria = /^aria-/;
|
|
21041
21449
|
var attrs = virtualNode.attrNames;
|
|
21042
21450
|
if (attrs.length) {
|
|
21043
|
-
for (var
|
|
21044
|
-
if (aria.test(attrs[
|
|
21451
|
+
for (var _i29 = 0, l = attrs.length; _i29 < l; _i29++) {
|
|
21452
|
+
if (aria.test(attrs[_i29])) {
|
|
21045
21453
|
return true;
|
|
21046
21454
|
}
|
|
21047
21455
|
}
|
|
@@ -21142,7 +21550,7 @@
|
|
|
21142
21550
|
if (nodeName2 === 'input' && nonTextInput.includes(inputType)) {
|
|
21143
21551
|
return false;
|
|
21144
21552
|
}
|
|
21145
|
-
if (is_disabled_default(virtualNode)) {
|
|
21553
|
+
if (is_disabled_default(virtualNode) || _isInert(virtualNode)) {
|
|
21146
21554
|
return false;
|
|
21147
21555
|
}
|
|
21148
21556
|
var formElements = [ 'input', 'select', 'textarea' ];
|
|
@@ -21197,13 +21605,7 @@
|
|
|
21197
21605
|
if (ariaLabelledbyControls.length > 0 && ariaLabelledbyControls.every(is_disabled_default)) {
|
|
21198
21606
|
return false;
|
|
21199
21607
|
}
|
|
21200
|
-
|
|
21201
|
-
var removeUnicodeOptions = {
|
|
21202
|
-
emoji: true,
|
|
21203
|
-
nonBmp: false,
|
|
21204
|
-
punctuations: true
|
|
21205
|
-
};
|
|
21206
|
-
if (!visibleText || !remove_unicode_default(visibleText, removeUnicodeOptions)) {
|
|
21608
|
+
if (!hasRealTextChildren(virtualNode)) {
|
|
21207
21609
|
return false;
|
|
21208
21610
|
}
|
|
21209
21611
|
var range = document.createRange();
|
|
@@ -21223,6 +21625,20 @@
|
|
|
21223
21625
|
return false;
|
|
21224
21626
|
}
|
|
21225
21627
|
var color_contrast_matches_default = colorContrastMatches;
|
|
21628
|
+
var removeUnicodeOptions = {
|
|
21629
|
+
emoji: true,
|
|
21630
|
+
nonBmp: false,
|
|
21631
|
+
punctuations: true
|
|
21632
|
+
};
|
|
21633
|
+
function hasRealTextChildren(virtualNode) {
|
|
21634
|
+
var visibleText = visible_virtual_default(virtualNode, false, true);
|
|
21635
|
+
if (visibleText === '' || remove_unicode_default(visibleText, removeUnicodeOptions) === '') {
|
|
21636
|
+
return false;
|
|
21637
|
+
}
|
|
21638
|
+
return virtualNode.children.some(function(vChild) {
|
|
21639
|
+
return vChild.props.nodeName === '#text' && !is_icon_ligature_default(vChild);
|
|
21640
|
+
});
|
|
21641
|
+
}
|
|
21226
21642
|
function dataTableLargeMatches(node) {
|
|
21227
21643
|
if (is_data_table_default(node)) {
|
|
21228
21644
|
var tableArray = to_grid_default(node);
|
|
@@ -21425,7 +21841,7 @@
|
|
|
21425
21841
|
if (!role || [ 'none', 'presentation' ].includes(role)) {
|
|
21426
21842
|
return true;
|
|
21427
21843
|
}
|
|
21428
|
-
var
|
|
21844
|
+
var _ref116 = aria_roles_default[role] || {}, accessibleNameRequired = _ref116.accessibleNameRequired;
|
|
21429
21845
|
if (accessibleNameRequired || _isFocusable(virtualNode)) {
|
|
21430
21846
|
return true;
|
|
21431
21847
|
}
|
|
@@ -21440,6 +21856,11 @@
|
|
|
21440
21856
|
if (get_explicit_role_default(virtualNode) === 'combobox' && query_selector_all_default(virtualNode, 'input:not([type="hidden"])').length) {
|
|
21441
21857
|
return false;
|
|
21442
21858
|
}
|
|
21859
|
+
if (_isComboboxPopup(virtualNode, {
|
|
21860
|
+
popupRoles: [ 'listbox' ]
|
|
21861
|
+
})) {
|
|
21862
|
+
return false;
|
|
21863
|
+
}
|
|
21443
21864
|
return true;
|
|
21444
21865
|
}
|
|
21445
21866
|
var no_naming_method_matches_default = noNamingMethodMatches;
|
|
@@ -21491,37 +21912,13 @@
|
|
|
21491
21912
|
}
|
|
21492
21913
|
var presentation_role_conflict_matches_default = presentationRoleConflictMatches;
|
|
21493
21914
|
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) {
|
|
21915
|
+
return _getScroll(node, 13) !== void 0 && _isComboboxPopup(virtualNode) === false && isNoneEmptyElement(virtualNode);
|
|
21916
|
+
}
|
|
21917
|
+
function isNoneEmptyElement(vNode) {
|
|
21918
|
+
return query_selector_all_default(vNode, '*').some(function(elm) {
|
|
21517
21919
|
return has_content_virtual_default(elm, true, true);
|
|
21518
21920
|
});
|
|
21519
|
-
if (!hasVisibleChildren) {
|
|
21520
|
-
return false;
|
|
21521
|
-
}
|
|
21522
|
-
return true;
|
|
21523
21921
|
}
|
|
21524
|
-
var scrollable_region_focusable_matches_default = scrollableRegionFocusableMatches;
|
|
21525
21922
|
function skipLinkMatches(node) {
|
|
21526
21923
|
return _isSkipLink(node) && is_offscreen_default(node);
|
|
21527
21924
|
}
|
|
@@ -21594,7 +21991,7 @@
|
|
|
21594
21991
|
'aria-level-evaluate': aria_level_evaluate_default,
|
|
21595
21992
|
'aria-prohibited-attr-evaluate': ariaProhibitedAttrEvaluate,
|
|
21596
21993
|
'aria-required-attr-evaluate': ariaRequiredAttrEvaluate,
|
|
21597
|
-
'aria-required-children-evaluate':
|
|
21994
|
+
'aria-required-children-evaluate': ariaRequiredChildrenEvaluate,
|
|
21598
21995
|
'aria-required-children-matches': aria_required_children_matches_default,
|
|
21599
21996
|
'aria-required-parent-evaluate': aria_required_parent_evaluate_default,
|
|
21600
21997
|
'aria-required-parent-matches': aria_required_parent_matches_default,
|
|
@@ -21710,7 +22107,7 @@
|
|
|
21710
22107
|
'region-evaluate': regionEvaluate,
|
|
21711
22108
|
'same-caption-summary-evaluate': same_caption_summary_evaluate_default,
|
|
21712
22109
|
'scope-value-evaluate': scope_value_evaluate_default,
|
|
21713
|
-
'scrollable-region-focusable-matches':
|
|
22110
|
+
'scrollable-region-focusable-matches': scrollableRegionFocusableMatches,
|
|
21714
22111
|
'skip-link-evaluate': skip_link_evaluate_default,
|
|
21715
22112
|
'skip-link-matches': skip_link_matches_default,
|
|
21716
22113
|
'structured-dlitems-evaluate': structured_dlitems_evaluate_default,
|
|
@@ -22231,10 +22628,10 @@
|
|
|
22231
22628
|
var import_dot2 = __toModule(require_doT());
|
|
22232
22629
|
var dotRegex = /\{\{.+?\}\}/g;
|
|
22233
22630
|
function getDefaultOrigin() {
|
|
22234
|
-
if (window.origin) {
|
|
22631
|
+
if (window.origin && window.origin !== 'null') {
|
|
22235
22632
|
return window.origin;
|
|
22236
22633
|
}
|
|
22237
|
-
if (window.location && window.location.origin) {
|
|
22634
|
+
if (window.location && window.location.origin && window.location.origin !== 'null') {
|
|
22238
22635
|
return window.location.origin;
|
|
22239
22636
|
}
|
|
22240
22637
|
}
|
|
@@ -22333,8 +22730,8 @@
|
|
|
22333
22730
|
lang: this.lang
|
|
22334
22731
|
};
|
|
22335
22732
|
var checkIDs = Object.keys(this.data.checks);
|
|
22336
|
-
for (var
|
|
22337
|
-
var id = checkIDs[
|
|
22733
|
+
for (var _i30 = 0; _i30 < checkIDs.length; _i30++) {
|
|
22734
|
+
var id = checkIDs[_i30];
|
|
22338
22735
|
var check = this.data.checks[id];
|
|
22339
22736
|
var _check$messages = check.messages, pass = _check$messages.pass, fail = _check$messages.fail, incomplete = _check$messages.incomplete;
|
|
22340
22737
|
locale.checks[id] = {
|
|
@@ -22344,8 +22741,8 @@
|
|
|
22344
22741
|
};
|
|
22345
22742
|
}
|
|
22346
22743
|
var ruleIDs = Object.keys(this.data.rules);
|
|
22347
|
-
for (var
|
|
22348
|
-
var _id = ruleIDs[
|
|
22744
|
+
for (var _i31 = 0; _i31 < ruleIDs.length; _i31++) {
|
|
22745
|
+
var _id = ruleIDs[_i31];
|
|
22349
22746
|
var rule = this.data.rules[_id];
|
|
22350
22747
|
var description = rule.description, help = rule.help;
|
|
22351
22748
|
locale.rules[_id] = {
|
|
@@ -22354,8 +22751,8 @@
|
|
|
22354
22751
|
};
|
|
22355
22752
|
}
|
|
22356
22753
|
var failureSummaries = Object.keys(this.data.failureSummaries);
|
|
22357
|
-
for (var
|
|
22358
|
-
var type = failureSummaries[
|
|
22754
|
+
for (var _i32 = 0; _i32 < failureSummaries.length; _i32++) {
|
|
22755
|
+
var type = failureSummaries[_i32];
|
|
22359
22756
|
var failureSummary2 = this.data.failureSummaries[type];
|
|
22360
22757
|
var failureMessage = failureSummary2.failureMessage;
|
|
22361
22758
|
locale.failureSummaries[type] = {
|
|
@@ -22378,8 +22775,8 @@
|
|
|
22378
22775
|
key: '_applyCheckLocale',
|
|
22379
22776
|
value: function _applyCheckLocale(checks) {
|
|
22380
22777
|
var keys = Object.keys(checks);
|
|
22381
|
-
for (var
|
|
22382
|
-
var id = keys[
|
|
22778
|
+
for (var _i33 = 0; _i33 < keys.length; _i33++) {
|
|
22779
|
+
var id = keys[_i33];
|
|
22383
22780
|
if (!this.data.checks[id]) {
|
|
22384
22781
|
throw new Error('Locale provided for unknown check: "'.concat(id, '"'));
|
|
22385
22782
|
}
|
|
@@ -22390,8 +22787,8 @@
|
|
|
22390
22787
|
key: '_applyRuleLocale',
|
|
22391
22788
|
value: function _applyRuleLocale(rules) {
|
|
22392
22789
|
var keys = Object.keys(rules);
|
|
22393
|
-
for (var
|
|
22394
|
-
var id = keys[
|
|
22790
|
+
for (var _i34 = 0; _i34 < keys.length; _i34++) {
|
|
22791
|
+
var id = keys[_i34];
|
|
22395
22792
|
if (!this.data.rules[id]) {
|
|
22396
22793
|
throw new Error('Locale provided for unknown rule: "'.concat(id, '"'));
|
|
22397
22794
|
}
|
|
@@ -22402,8 +22799,8 @@
|
|
|
22402
22799
|
key: '_applyFailureSummaries',
|
|
22403
22800
|
value: function _applyFailureSummaries(messages) {
|
|
22404
22801
|
var keys = Object.keys(messages);
|
|
22405
|
-
for (var
|
|
22406
|
-
var key = keys[
|
|
22802
|
+
for (var _i35 = 0; _i35 < keys.length; _i35++) {
|
|
22803
|
+
var key = keys[_i35];
|
|
22407
22804
|
if (!this.data.failureSummaries[key]) {
|
|
22408
22805
|
throw new Error('Locale provided for unknown failureMessage: "'.concat(key, '"'));
|
|
22409
22806
|
}
|
|
@@ -22435,10 +22832,10 @@
|
|
|
22435
22832
|
value: function setAllowedOrigins(allowedOrigins) {
|
|
22436
22833
|
var defaultOrigin = getDefaultOrigin();
|
|
22437
22834
|
this.allowedOrigins = [];
|
|
22438
|
-
var
|
|
22835
|
+
var _iterator12 = _createForOfIteratorHelper(allowedOrigins), _step12;
|
|
22439
22836
|
try {
|
|
22440
|
-
for (
|
|
22441
|
-
var origin =
|
|
22837
|
+
for (_iterator12.s(); !(_step12 = _iterator12.n()).done; ) {
|
|
22838
|
+
var origin = _step12.value;
|
|
22442
22839
|
if (origin === constants_default.allOrigins) {
|
|
22443
22840
|
this.allowedOrigins = [ '*' ];
|
|
22444
22841
|
return;
|
|
@@ -22449,9 +22846,9 @@
|
|
|
22449
22846
|
}
|
|
22450
22847
|
}
|
|
22451
22848
|
} catch (err) {
|
|
22452
|
-
|
|
22849
|
+
_iterator12.e(err);
|
|
22453
22850
|
} finally {
|
|
22454
|
-
|
|
22851
|
+
_iterator12.f();
|
|
22455
22852
|
}
|
|
22456
22853
|
}
|
|
22457
22854
|
}, {
|
|
@@ -22752,8 +23149,8 @@
|
|
|
22752
23149
|
});
|
|
22753
23150
|
};
|
|
22754
23151
|
}
|
|
22755
|
-
function getHelpUrl(
|
|
22756
|
-
var brand =
|
|
23152
|
+
function getHelpUrl(_ref117, ruleId, version) {
|
|
23153
|
+
var brand = _ref117.brand, application = _ref117.application, lang = _ref117.lang;
|
|
22757
23154
|
return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
|
|
22758
23155
|
}
|
|
22759
23156
|
var audit_default = Audit;
|
|
@@ -22969,9 +23366,9 @@
|
|
|
22969
23366
|
toolOptions: options
|
|
22970
23367
|
});
|
|
22971
23368
|
}
|
|
22972
|
-
function normalizeRunParams(
|
|
22973
|
-
var
|
|
22974
|
-
var
|
|
23369
|
+
function normalizeRunParams(_ref118) {
|
|
23370
|
+
var _ref120, _options$reporter, _axe$_audit;
|
|
23371
|
+
var _ref119 = _slicedToArray(_ref118, 3), context = _ref119[0], options = _ref119[1], callback = _ref119[2];
|
|
22975
23372
|
var typeErr = new TypeError('axe.run arguments are invalid');
|
|
22976
23373
|
if (!isContextSpec(context)) {
|
|
22977
23374
|
if (callback !== void 0) {
|
|
@@ -22992,7 +23389,7 @@
|
|
|
22992
23389
|
throw typeErr;
|
|
22993
23390
|
}
|
|
22994
23391
|
options = clone_default(options);
|
|
22995
|
-
options.reporter = (
|
|
23392
|
+
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
23393
|
return {
|
|
22997
23394
|
context: context,
|
|
22998
23395
|
options: options,
|
|
@@ -23097,14 +23494,14 @@
|
|
|
23097
23494
|
return new Promise(function(res, rej) {
|
|
23098
23495
|
axe._audit.run(contextObj, options, res, rej);
|
|
23099
23496
|
}).then(function(results) {
|
|
23100
|
-
results = results.map(function(
|
|
23101
|
-
var nodes =
|
|
23497
|
+
results = results.map(function(_ref121) {
|
|
23498
|
+
var nodes = _ref121.nodes, result = _objectWithoutProperties(_ref121, _excluded8);
|
|
23102
23499
|
return _extends({
|
|
23103
23500
|
nodes: nodes.map(serializeNode)
|
|
23104
23501
|
}, result);
|
|
23105
23502
|
});
|
|
23106
|
-
var frames = contextObj.frames.map(function(
|
|
23107
|
-
var node =
|
|
23503
|
+
var frames = contextObj.frames.map(function(_ref122) {
|
|
23504
|
+
var node = _ref122.node;
|
|
23108
23505
|
return new dq_element_default(node, options).toJSON();
|
|
23109
23506
|
});
|
|
23110
23507
|
var environmentData;
|
|
@@ -23124,13 +23521,13 @@
|
|
|
23124
23521
|
return Promise.reject(err2);
|
|
23125
23522
|
});
|
|
23126
23523
|
}
|
|
23127
|
-
function serializeNode(
|
|
23128
|
-
var node =
|
|
23524
|
+
function serializeNode(_ref123) {
|
|
23525
|
+
var node = _ref123.node, nodeResult = _objectWithoutProperties(_ref123, _excluded9);
|
|
23129
23526
|
nodeResult.node = node.toJSON();
|
|
23130
|
-
for (var
|
|
23131
|
-
var type = _arr2[
|
|
23132
|
-
nodeResult[type] = nodeResult[type].map(function(
|
|
23133
|
-
var relatedNodes =
|
|
23527
|
+
for (var _i36 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i36 < _arr2.length; _i36++) {
|
|
23528
|
+
var type = _arr2[_i36];
|
|
23529
|
+
nodeResult[type] = nodeResult[type].map(function(_ref124) {
|
|
23530
|
+
var relatedNodes = _ref124.relatedNodes, checkResult = _objectWithoutProperties(_ref124, _excluded10);
|
|
23134
23531
|
return _extends({}, checkResult, {
|
|
23135
23532
|
relatedNodes: relatedNodes.map(function(node2) {
|
|
23136
23533
|
return node2.toJSON();
|
|
@@ -23141,14 +23538,14 @@
|
|
|
23141
23538
|
return nodeResult;
|
|
23142
23539
|
}
|
|
23143
23540
|
function finishRun(partialResults) {
|
|
23144
|
-
var
|
|
23541
|
+
var _ref126, _options$reporter2, _axe$_audit2;
|
|
23145
23542
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
23146
23543
|
options = clone_default(options);
|
|
23147
|
-
var
|
|
23544
|
+
var _ref125 = partialResults.find(function(r) {
|
|
23148
23545
|
return r.environmentData;
|
|
23149
|
-
}) || {}, environmentData =
|
|
23546
|
+
}) || {}, environmentData = _ref125.environmentData;
|
|
23150
23547
|
axe._audit.normalizeOptions(options);
|
|
23151
|
-
options.reporter = (
|
|
23548
|
+
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
23549
|
setFrameSpec(partialResults);
|
|
23153
23550
|
var results = merge_results_default(partialResults);
|
|
23154
23551
|
results = axe._audit.after(results, options);
|
|
@@ -23160,10 +23557,10 @@
|
|
|
23160
23557
|
}
|
|
23161
23558
|
function setFrameSpec(partialResults) {
|
|
23162
23559
|
var frameStack = [];
|
|
23163
|
-
var
|
|
23560
|
+
var _iterator13 = _createForOfIteratorHelper(partialResults), _step13;
|
|
23164
23561
|
try {
|
|
23165
|
-
for (
|
|
23166
|
-
var partialResult =
|
|
23562
|
+
for (_iterator13.s(); !(_step13 = _iterator13.n()).done; ) {
|
|
23563
|
+
var partialResult = _step13.value;
|
|
23167
23564
|
var frameSpec = frameStack.shift();
|
|
23168
23565
|
if (!partialResult) {
|
|
23169
23566
|
continue;
|
|
@@ -23173,13 +23570,13 @@
|
|
|
23173
23570
|
frameStack.unshift.apply(frameStack, _toConsumableArray(frameSpecs));
|
|
23174
23571
|
}
|
|
23175
23572
|
} catch (err) {
|
|
23176
|
-
|
|
23573
|
+
_iterator13.e(err);
|
|
23177
23574
|
} finally {
|
|
23178
|
-
|
|
23575
|
+
_iterator13.f();
|
|
23179
23576
|
}
|
|
23180
23577
|
}
|
|
23181
|
-
function getMergedFrameSpecs(
|
|
23182
|
-
var childFrameSpecs =
|
|
23578
|
+
function getMergedFrameSpecs(_ref127) {
|
|
23579
|
+
var childFrameSpecs = _ref127.frames, parentFrameSpec = _ref127.frameSpec;
|
|
23183
23580
|
if (!parentFrameSpec) {
|
|
23184
23581
|
return childFrameSpecs;
|
|
23185
23582
|
}
|
|
@@ -23239,12 +23636,12 @@
|
|
|
23239
23636
|
var transformedResults = results.map(function(result) {
|
|
23240
23637
|
var transformedResult = _extends({}, result);
|
|
23241
23638
|
var types = [ 'passes', 'violations', 'incomplete', 'inapplicable' ];
|
|
23242
|
-
for (var
|
|
23243
|
-
var type = _types[
|
|
23639
|
+
for (var _i37 = 0, _types = types; _i37 < _types.length; _i37++) {
|
|
23640
|
+
var type = _types[_i37];
|
|
23244
23641
|
if (transformedResult[type] && Array.isArray(transformedResult[type])) {
|
|
23245
|
-
transformedResult[type] = transformedResult[type].map(function(
|
|
23642
|
+
transformedResult[type] = transformedResult[type].map(function(_ref128) {
|
|
23246
23643
|
var _node;
|
|
23247
|
-
var node =
|
|
23644
|
+
var node = _ref128.node, typeResult = _objectWithoutProperties(_ref128, _excluded13);
|
|
23248
23645
|
node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
|
|
23249
23646
|
return _extends({
|
|
23250
23647
|
node: node
|
|
@@ -23497,12 +23894,12 @@
|
|
|
23497
23894
|
help: 'Page must have means to bypass repeated blocks'
|
|
23498
23895
|
},
|
|
23499
23896
|
'color-contrast-enhanced': {
|
|
23500
|
-
description: 'Ensures the contrast between foreground and background colors meets WCAG 2 AAA contrast ratio thresholds',
|
|
23501
|
-
help: 'Elements must
|
|
23897
|
+
description: 'Ensures the contrast between foreground and background colors meets WCAG 2 AAA enhanced contrast ratio thresholds',
|
|
23898
|
+
help: 'Elements must meet enhanced color contrast ratio thresholds'
|
|
23502
23899
|
},
|
|
23503
23900
|
'color-contrast': {
|
|
23504
|
-
description: 'Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds',
|
|
23505
|
-
help: 'Elements must
|
|
23901
|
+
description: 'Ensures the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds',
|
|
23902
|
+
help: 'Elements must meet minimum color contrast ratio thresholds'
|
|
23506
23903
|
},
|
|
23507
23904
|
'css-orientation-lock': {
|
|
23508
23905
|
description: 'Ensures content is not locked to any specific display orientation, and the content is operable in all display orientations',
|
|
@@ -23821,7 +24218,7 @@
|
|
|
23821
24218
|
impact: 'serious',
|
|
23822
24219
|
messages: {
|
|
23823
24220
|
pass: 'Element has an aria-busy attribute',
|
|
23824
|
-
fail: 'Element
|
|
24221
|
+
fail: 'Element uses aria-busy="true" while showing a loader'
|
|
23825
24222
|
}
|
|
23826
24223
|
},
|
|
23827
24224
|
'aria-errormessage': {
|
|
@@ -23889,7 +24286,7 @@
|
|
|
23889
24286
|
fail: {
|
|
23890
24287
|
singular: 'Required ARIA child role not present: ${data.values}',
|
|
23891
24288
|
plural: 'Required ARIA children role not present: ${data.values}',
|
|
23892
|
-
unallowed: 'Element has children which are not allowed
|
|
24289
|
+
unallowed: 'Element has children which are not allowed: ${data.values}'
|
|
23893
24290
|
},
|
|
23894
24291
|
incomplete: {
|
|
23895
24292
|
singular: 'Expecting ARIA child role to be added: ${data.values}',
|
|
@@ -24121,7 +24518,7 @@
|
|
|
24121
24518
|
}
|
|
24122
24519
|
},
|
|
24123
24520
|
'focusable-content': {
|
|
24124
|
-
impact: '
|
|
24521
|
+
impact: 'serious',
|
|
24125
24522
|
messages: {
|
|
24126
24523
|
pass: 'Element contains focusable elements',
|
|
24127
24524
|
fail: 'Element should have focusable content'
|
|
@@ -24136,7 +24533,7 @@
|
|
|
24136
24533
|
}
|
|
24137
24534
|
},
|
|
24138
24535
|
'focusable-element': {
|
|
24139
|
-
impact: '
|
|
24536
|
+
impact: 'serious',
|
|
24140
24537
|
messages: {
|
|
24141
24538
|
pass: 'Element is focusable',
|
|
24142
24539
|
fail: 'Element should be focusable'
|
|
@@ -25000,7 +25397,8 @@
|
|
|
25000
25397
|
}, {
|
|
25001
25398
|
id: 'aria-roledescription',
|
|
25002
25399
|
selector: '[aria-roledescription]',
|
|
25003
|
-
tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
|
|
25400
|
+
tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'deprecated' ],
|
|
25401
|
+
enabled: false,
|
|
25004
25402
|
all: [],
|
|
25005
25403
|
any: [ {
|
|
25006
25404
|
options: {
|
|
@@ -25092,7 +25490,7 @@
|
|
|
25092
25490
|
selector: 'audio',
|
|
25093
25491
|
enabled: false,
|
|
25094
25492
|
excludeHidden: false,
|
|
25095
|
-
tags: [ 'cat.time-and-media', 'wcag2a', 'wcag121', 'section508', 'section508.22.a' ],
|
|
25493
|
+
tags: [ 'cat.time-and-media', 'wcag2a', 'wcag121', 'section508', 'section508.22.a', 'deprecated' ],
|
|
25096
25494
|
actIds: [ '2eb176', 'afb423' ],
|
|
25097
25495
|
all: [],
|
|
25098
25496
|
any: [],
|
|
@@ -25296,7 +25694,8 @@
|
|
|
25296
25694
|
selector: '[id]',
|
|
25297
25695
|
matches: 'duplicate-id-active-matches',
|
|
25298
25696
|
excludeHidden: false,
|
|
25299
|
-
|
|
25697
|
+
enabled: false,
|
|
25698
|
+
tags: [ 'cat.parsing', 'wcag2a-obsolete', 'wcag411', 'deprecated' ],
|
|
25300
25699
|
actIds: [ '3ea0c8' ],
|
|
25301
25700
|
all: [],
|
|
25302
25701
|
any: [ 'duplicate-id-active' ],
|
|
@@ -25316,7 +25715,8 @@
|
|
|
25316
25715
|
selector: '[id]',
|
|
25317
25716
|
matches: 'duplicate-id-misc-matches',
|
|
25318
25717
|
excludeHidden: false,
|
|
25319
|
-
|
|
25718
|
+
enabled: false,
|
|
25719
|
+
tags: [ 'cat.parsing', 'wcag2a-obsolete', 'wcag411', 'deprecated' ],
|
|
25320
25720
|
actIds: [ '3ea0c8' ],
|
|
25321
25721
|
all: [],
|
|
25322
25722
|
any: [ 'duplicate-id' ],
|
|
@@ -25678,7 +26078,8 @@
|
|
|
25678
26078
|
all: [],
|
|
25679
26079
|
any: [ {
|
|
25680
26080
|
options: {
|
|
25681
|
-
requiredContrastRatio: 3
|
|
26081
|
+
requiredContrastRatio: 3,
|
|
26082
|
+
allowSameColor: true
|
|
25682
26083
|
},
|
|
25683
26084
|
id: 'link-in-text-block'
|
|
25684
26085
|
}, 'link-in-text-block-style' ],
|
|
@@ -25914,6 +26315,7 @@
|
|
|
25914
26315
|
none: []
|
|
25915
26316
|
}, {
|
|
25916
26317
|
id: 'scrollable-region-focusable',
|
|
26318
|
+
selector: '*:not(select,textarea)',
|
|
25917
26319
|
matches: 'scrollable-region-focusable-matches',
|
|
25918
26320
|
tags: [ 'cat.keyboard', 'wcag2a', 'wcag211' ],
|
|
25919
26321
|
actIds: [ '0ssw9k' ],
|
|
@@ -26201,7 +26603,8 @@
|
|
|
26201
26603
|
id: 'link-in-text-block',
|
|
26202
26604
|
evaluate: 'link-in-text-block-evaluate',
|
|
26203
26605
|
options: {
|
|
26204
|
-
requiredContrastRatio: 3
|
|
26606
|
+
requiredContrastRatio: 3,
|
|
26607
|
+
allowSameColor: true
|
|
26205
26608
|
}
|
|
26206
26609
|
}, {
|
|
26207
26610
|
id: 'autocomplete-appropriate',
|