axe-core 4.3.3 → 4.3.5-canary.3b2fdda
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 +1 -1
- package/axe.js +720 -490
- package/axe.min.js +2 -2
- package/locales/ko.json +596 -377
- package/package.json +11 -8
- package/sri-history.json +301 -285
- package/CHANGELOG.md +0 -1413
package/axe.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! axe v4.3.
|
|
1
|
+
/*! axe v4.3.5-canary.3b2fdda
|
|
2
2
|
* Copyright (c) 2021 Deque Systems, Inc.
|
|
3
3
|
*
|
|
4
4
|
* Your use of this Source Code Form is subject to the terms of the Mozilla Public
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
return _typeof(obj);
|
|
28
28
|
}
|
|
29
29
|
var axe = axe || {};
|
|
30
|
-
axe.version = '4.3.
|
|
30
|
+
axe.version = '4.3.5-canary.3b2fdda';
|
|
31
31
|
if (typeof define === 'function' && define.amd) {
|
|
32
32
|
define('axe-core', [], function() {
|
|
33
33
|
return axe;
|
|
@@ -1393,11 +1393,11 @@
|
|
|
1393
1393
|
} else {
|
|
1394
1394
|
mixin = require_mixin();
|
|
1395
1395
|
generate = function() {
|
|
1396
|
-
var
|
|
1396
|
+
var cache21 = [];
|
|
1397
1397
|
return function(length) {
|
|
1398
1398
|
var args, i = 0;
|
|
1399
|
-
if (
|
|
1400
|
-
return
|
|
1399
|
+
if (cache21[length]) {
|
|
1400
|
+
return cache21[length];
|
|
1401
1401
|
}
|
|
1402
1402
|
args = [];
|
|
1403
1403
|
while (length--) {
|
|
@@ -2216,7 +2216,7 @@
|
|
|
2216
2216
|
var _on = ee.on;
|
|
2217
2217
|
var emit = ee.emit;
|
|
2218
2218
|
module.exports = function(original, length, options) {
|
|
2219
|
-
var
|
|
2219
|
+
var cache21 = create(null), conf, memLength, _get, set, del, _clear, extDel, extGet, extHas, normalizer, getListeners, setListeners, deleteListeners, memoized, resolve;
|
|
2220
2220
|
if (length !== false) {
|
|
2221
2221
|
memLength = length;
|
|
2222
2222
|
} else if (isNaN(original.length)) {
|
|
@@ -2242,11 +2242,11 @@
|
|
|
2242
2242
|
}
|
|
2243
2243
|
id = _get(args);
|
|
2244
2244
|
if (id !== null) {
|
|
2245
|
-
if (hasOwnProperty.call(
|
|
2245
|
+
if (hasOwnProperty.call(cache21, id)) {
|
|
2246
2246
|
if (getListeners) {
|
|
2247
2247
|
conf.emit('get', id, args, this);
|
|
2248
2248
|
}
|
|
2249
|
-
return
|
|
2249
|
+
return cache21[id];
|
|
2250
2250
|
}
|
|
2251
2251
|
}
|
|
2252
2252
|
if (args.length === 1) {
|
|
@@ -2260,10 +2260,10 @@
|
|
|
2260
2260
|
throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
|
|
2261
2261
|
}
|
|
2262
2262
|
id = set(args);
|
|
2263
|
-
} else if (hasOwnProperty.call(
|
|
2263
|
+
} else if (hasOwnProperty.call(cache21, id)) {
|
|
2264
2264
|
throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
|
|
2265
2265
|
}
|
|
2266
|
-
|
|
2266
|
+
cache21[id] = result;
|
|
2267
2267
|
if (setListeners) {
|
|
2268
2268
|
conf.emit('set', id, null, result);
|
|
2269
2269
|
}
|
|
@@ -2272,21 +2272,21 @@
|
|
|
2272
2272
|
} else if (length === 0) {
|
|
2273
2273
|
memoized = function memoized() {
|
|
2274
2274
|
var result;
|
|
2275
|
-
if (hasOwnProperty.call(
|
|
2275
|
+
if (hasOwnProperty.call(cache21, 'data')) {
|
|
2276
2276
|
if (getListeners) {
|
|
2277
2277
|
conf.emit('get', 'data', arguments, this);
|
|
2278
2278
|
}
|
|
2279
|
-
return
|
|
2279
|
+
return cache21.data;
|
|
2280
2280
|
}
|
|
2281
2281
|
if (arguments.length) {
|
|
2282
2282
|
result = apply.call(original, this, arguments);
|
|
2283
2283
|
} else {
|
|
2284
2284
|
result = call.call(original, this);
|
|
2285
2285
|
}
|
|
2286
|
-
if (hasOwnProperty.call(
|
|
2286
|
+
if (hasOwnProperty.call(cache21, 'data')) {
|
|
2287
2287
|
throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
|
|
2288
2288
|
}
|
|
2289
|
-
|
|
2289
|
+
cache21.data = result;
|
|
2290
2290
|
if (setListeners) {
|
|
2291
2291
|
conf.emit('set', 'data', null, result);
|
|
2292
2292
|
}
|
|
@@ -2299,21 +2299,21 @@
|
|
|
2299
2299
|
args = resolve(arguments);
|
|
2300
2300
|
}
|
|
2301
2301
|
id = String(args[0]);
|
|
2302
|
-
if (hasOwnProperty.call(
|
|
2302
|
+
if (hasOwnProperty.call(cache21, id)) {
|
|
2303
2303
|
if (getListeners) {
|
|
2304
2304
|
conf.emit('get', id, args, this);
|
|
2305
2305
|
}
|
|
2306
|
-
return
|
|
2306
|
+
return cache21[id];
|
|
2307
2307
|
}
|
|
2308
2308
|
if (args.length === 1) {
|
|
2309
2309
|
result = call.call(original, this, args[0]);
|
|
2310
2310
|
} else {
|
|
2311
2311
|
result = apply.call(original, this, args);
|
|
2312
2312
|
}
|
|
2313
|
-
if (hasOwnProperty.call(
|
|
2313
|
+
if (hasOwnProperty.call(cache21, id)) {
|
|
2314
2314
|
throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
|
|
2315
2315
|
}
|
|
2316
|
-
|
|
2316
|
+
cache21[id] = result;
|
|
2317
2317
|
if (setListeners) {
|
|
2318
2318
|
conf.emit('set', id, null, result);
|
|
2319
2319
|
}
|
|
@@ -2334,28 +2334,28 @@
|
|
|
2334
2334
|
return String(args[0]);
|
|
2335
2335
|
},
|
|
2336
2336
|
has: function has(id) {
|
|
2337
|
-
return hasOwnProperty.call(
|
|
2337
|
+
return hasOwnProperty.call(cache21, id);
|
|
2338
2338
|
},
|
|
2339
2339
|
delete: function _delete(id) {
|
|
2340
2340
|
var result;
|
|
2341
|
-
if (!hasOwnProperty.call(
|
|
2341
|
+
if (!hasOwnProperty.call(cache21, id)) {
|
|
2342
2342
|
return;
|
|
2343
2343
|
}
|
|
2344
2344
|
if (del) {
|
|
2345
2345
|
del(id);
|
|
2346
2346
|
}
|
|
2347
|
-
result =
|
|
2348
|
-
delete
|
|
2347
|
+
result = cache21[id];
|
|
2348
|
+
delete cache21[id];
|
|
2349
2349
|
if (deleteListeners) {
|
|
2350
2350
|
conf.emit('delete', id, result);
|
|
2351
2351
|
}
|
|
2352
2352
|
},
|
|
2353
2353
|
clear: function clear() {
|
|
2354
|
-
var oldCache =
|
|
2354
|
+
var oldCache = cache21;
|
|
2355
2355
|
if (_clear) {
|
|
2356
2356
|
_clear();
|
|
2357
2357
|
}
|
|
2358
|
-
|
|
2358
|
+
cache21 = create(null);
|
|
2359
2359
|
conf.emit('clear', oldCache);
|
|
2360
2360
|
},
|
|
2361
2361
|
on: function on(type, listener) {
|
|
@@ -2400,7 +2400,7 @@
|
|
|
2400
2400
|
extGet = defineLength(function() {
|
|
2401
2401
|
var id, args = arguments;
|
|
2402
2402
|
if (length === 0) {
|
|
2403
|
-
return
|
|
2403
|
+
return cache21.data;
|
|
2404
2404
|
}
|
|
2405
2405
|
if (resolve) {
|
|
2406
2406
|
args = resolve(args);
|
|
@@ -2410,7 +2410,7 @@
|
|
|
2410
2410
|
} else {
|
|
2411
2411
|
id = String(args[0]);
|
|
2412
2412
|
}
|
|
2413
|
-
return
|
|
2413
|
+
return cache21[id];
|
|
2414
2414
|
});
|
|
2415
2415
|
extHas = defineLength(function() {
|
|
2416
2416
|
var id, args = arguments;
|
|
@@ -2561,7 +2561,7 @@
|
|
|
2561
2561
|
var indexOf = require_e_index_of();
|
|
2562
2562
|
var create = Object.create;
|
|
2563
2563
|
module.exports = function() {
|
|
2564
|
-
var lastId = 0, map = [],
|
|
2564
|
+
var lastId = 0, map = [], cache21 = create(null);
|
|
2565
2565
|
return {
|
|
2566
2566
|
get: function get(args) {
|
|
2567
2567
|
var index = 0, set = map, i, length = args.length;
|
|
@@ -2609,11 +2609,11 @@
|
|
|
2609
2609
|
}
|
|
2610
2610
|
set[1][i] = ++lastId;
|
|
2611
2611
|
}
|
|
2612
|
-
|
|
2612
|
+
cache21[lastId] = args;
|
|
2613
2613
|
return lastId;
|
|
2614
2614
|
},
|
|
2615
2615
|
delete: function _delete(id) {
|
|
2616
|
-
var index = 0, set = map, i, args =
|
|
2616
|
+
var index = 0, set = map, i, args = cache21[id], length = args.length, path = [];
|
|
2617
2617
|
if (length === 0) {
|
|
2618
2618
|
delete set[length];
|
|
2619
2619
|
} else if (set = set[length]) {
|
|
@@ -2640,11 +2640,11 @@
|
|
|
2640
2640
|
set[1].splice(i, 1);
|
|
2641
2641
|
}
|
|
2642
2642
|
}
|
|
2643
|
-
delete
|
|
2643
|
+
delete cache21[id];
|
|
2644
2644
|
},
|
|
2645
2645
|
clear: function clear() {
|
|
2646
2646
|
map = [];
|
|
2647
|
-
|
|
2647
|
+
cache21 = create(null);
|
|
2648
2648
|
}
|
|
2649
2649
|
};
|
|
2650
2650
|
};
|
|
@@ -2653,27 +2653,27 @@
|
|
|
2653
2653
|
'use strict';
|
|
2654
2654
|
var indexOf = require_e_index_of();
|
|
2655
2655
|
module.exports = function() {
|
|
2656
|
-
var lastId = 0, argsMap = [],
|
|
2656
|
+
var lastId = 0, argsMap = [], cache21 = [];
|
|
2657
2657
|
return {
|
|
2658
2658
|
get: function get(args) {
|
|
2659
2659
|
var index = indexOf.call(argsMap, args[0]);
|
|
2660
|
-
return index === -1 ? null :
|
|
2660
|
+
return index === -1 ? null : cache21[index];
|
|
2661
2661
|
},
|
|
2662
2662
|
set: function set(args) {
|
|
2663
2663
|
argsMap.push(args[0]);
|
|
2664
|
-
|
|
2664
|
+
cache21.push(++lastId);
|
|
2665
2665
|
return lastId;
|
|
2666
2666
|
},
|
|
2667
2667
|
delete: function _delete(id) {
|
|
2668
|
-
var index = indexOf.call(
|
|
2668
|
+
var index = indexOf.call(cache21, id);
|
|
2669
2669
|
if (index !== -1) {
|
|
2670
2670
|
argsMap.splice(index, 1);
|
|
2671
|
-
|
|
2671
|
+
cache21.splice(index, 1);
|
|
2672
2672
|
}
|
|
2673
2673
|
},
|
|
2674
2674
|
clear: function clear() {
|
|
2675
2675
|
argsMap = [];
|
|
2676
|
-
|
|
2676
|
+
cache21 = [];
|
|
2677
2677
|
}
|
|
2678
2678
|
};
|
|
2679
2679
|
};
|
|
@@ -2683,7 +2683,7 @@
|
|
|
2683
2683
|
var indexOf = require_e_index_of();
|
|
2684
2684
|
var create = Object.create;
|
|
2685
2685
|
module.exports = function(length) {
|
|
2686
|
-
var lastId = 0, map = [ [], [] ],
|
|
2686
|
+
var lastId = 0, map = [ [], [] ], cache21 = create(null);
|
|
2687
2687
|
return {
|
|
2688
2688
|
get: function get(args) {
|
|
2689
2689
|
var index = 0, set = map, i;
|
|
@@ -2717,11 +2717,11 @@
|
|
|
2717
2717
|
i = set[0].push(args[index]) - 1;
|
|
2718
2718
|
}
|
|
2719
2719
|
set[1][i] = ++lastId;
|
|
2720
|
-
|
|
2720
|
+
cache21[lastId] = args;
|
|
2721
2721
|
return lastId;
|
|
2722
2722
|
},
|
|
2723
2723
|
delete: function _delete(id) {
|
|
2724
|
-
var index = 0, set = map, i, path = [], args =
|
|
2724
|
+
var index = 0, set = map, i, path = [], args = cache21[id];
|
|
2725
2725
|
while (index < length - 1) {
|
|
2726
2726
|
i = indexOf.call(set[0], args[index]);
|
|
2727
2727
|
if (i === -1) {
|
|
@@ -2744,11 +2744,11 @@
|
|
|
2744
2744
|
set[0].splice(i, 1);
|
|
2745
2745
|
set[1].splice(i, 1);
|
|
2746
2746
|
}
|
|
2747
|
-
delete
|
|
2747
|
+
delete cache21[id];
|
|
2748
2748
|
},
|
|
2749
2749
|
clear: function clear() {
|
|
2750
2750
|
map = [ [], [] ];
|
|
2751
|
-
|
|
2751
|
+
cache21 = create(null);
|
|
2752
2752
|
}
|
|
2753
2753
|
};
|
|
2754
2754
|
};
|
|
@@ -2861,7 +2861,7 @@
|
|
|
2861
2861
|
var apply = Function.prototype.apply;
|
|
2862
2862
|
var create = Object.create;
|
|
2863
2863
|
require_registered_extensions().async = function(tbi, conf) {
|
|
2864
|
-
var waiting = create(null),
|
|
2864
|
+
var waiting = create(null), cache21 = create(null), base = conf.memoized, original = conf.original, currentCallback, currentContext, currentArgs;
|
|
2865
2865
|
conf.memoized = defineLength(function(arg) {
|
|
2866
2866
|
var args = arguments, last = args[args.length - 1];
|
|
2867
2867
|
if (typeof last === 'function') {
|
|
@@ -2893,8 +2893,8 @@
|
|
|
2893
2893
|
currentCallback = currentContext = currentArgs = null;
|
|
2894
2894
|
nextTick(function() {
|
|
2895
2895
|
var data2;
|
|
2896
|
-
if (hasOwnProperty.call(
|
|
2897
|
-
data2 =
|
|
2896
|
+
if (hasOwnProperty.call(cache21, id)) {
|
|
2897
|
+
data2 = cache21[id];
|
|
2898
2898
|
conf.emit('getasync', id, args, context5);
|
|
2899
2899
|
apply.call(cb, data2.context, data2.args);
|
|
2900
2900
|
} else {
|
|
@@ -2928,7 +2928,7 @@
|
|
|
2928
2928
|
if (err2) {
|
|
2929
2929
|
conf['delete'](id);
|
|
2930
2930
|
} else {
|
|
2931
|
-
|
|
2931
|
+
cache21[id] = {
|
|
2932
2932
|
context: this,
|
|
2933
2933
|
args: args2
|
|
2934
2934
|
};
|
|
@@ -2975,16 +2975,16 @@
|
|
|
2975
2975
|
if (hasOwnProperty.call(waiting, id)) {
|
|
2976
2976
|
return;
|
|
2977
2977
|
}
|
|
2978
|
-
if (!
|
|
2978
|
+
if (!cache21[id]) {
|
|
2979
2979
|
return;
|
|
2980
2980
|
}
|
|
2981
|
-
result =
|
|
2982
|
-
delete
|
|
2981
|
+
result = cache21[id];
|
|
2982
|
+
delete cache21[id];
|
|
2983
2983
|
conf.emit('deleteasync', id, slice.call(result.args, 1));
|
|
2984
2984
|
});
|
|
2985
2985
|
conf.on('clear', function() {
|
|
2986
|
-
var oldCache =
|
|
2987
|
-
|
|
2986
|
+
var oldCache = cache21;
|
|
2987
|
+
cache21 = create(null);
|
|
2988
2988
|
conf.emit('clearasync', objectMap(oldCache, function(data2) {
|
|
2989
2989
|
return slice.call(data2.args, 1);
|
|
2990
2990
|
}));
|
|
@@ -3078,7 +3078,7 @@
|
|
|
3078
3078
|
var create = Object.create;
|
|
3079
3079
|
var supportedModes = primitiveSet('then', 'then:finally', 'done', 'done:finally');
|
|
3080
3080
|
require_registered_extensions().promise = function(mode, conf) {
|
|
3081
|
-
var waiting = create(null),
|
|
3081
|
+
var waiting = create(null), cache21 = create(null), promises = create(null);
|
|
3082
3082
|
if (mode === true) {
|
|
3083
3083
|
mode = null;
|
|
3084
3084
|
} else {
|
|
@@ -3090,7 +3090,7 @@
|
|
|
3090
3090
|
conf.on('set', function(id, ignore, promise) {
|
|
3091
3091
|
var isFailed = false;
|
|
3092
3092
|
if (!isPromise(promise)) {
|
|
3093
|
-
|
|
3093
|
+
cache21[id] = promise;
|
|
3094
3094
|
conf.emit('setasync', id, 1);
|
|
3095
3095
|
return;
|
|
3096
3096
|
}
|
|
@@ -3105,7 +3105,7 @@
|
|
|
3105
3105
|
return;
|
|
3106
3106
|
}
|
|
3107
3107
|
delete waiting[id];
|
|
3108
|
-
|
|
3108
|
+
cache21[id] = result;
|
|
3109
3109
|
conf.emit('setasync', id, count);
|
|
3110
3110
|
};
|
|
3111
3111
|
var onFailure = function onFailure() {
|
|
@@ -3175,16 +3175,16 @@
|
|
|
3175
3175
|
delete waiting[id];
|
|
3176
3176
|
return;
|
|
3177
3177
|
}
|
|
3178
|
-
if (!hasOwnProperty.call(
|
|
3178
|
+
if (!hasOwnProperty.call(cache21, id)) {
|
|
3179
3179
|
return;
|
|
3180
3180
|
}
|
|
3181
|
-
var result =
|
|
3182
|
-
delete
|
|
3181
|
+
var result = cache21[id];
|
|
3182
|
+
delete cache21[id];
|
|
3183
3183
|
conf.emit('deleteasync', id, [ result ]);
|
|
3184
3184
|
});
|
|
3185
3185
|
conf.on('clear', function() {
|
|
3186
|
-
var oldCache =
|
|
3187
|
-
|
|
3186
|
+
var oldCache = cache21;
|
|
3187
|
+
cache21 = create(null);
|
|
3188
3188
|
waiting = create(null);
|
|
3189
3189
|
promises = create(null);
|
|
3190
3190
|
conf.emit('clearasync', objectMap(oldCache, function(data2) {
|
|
@@ -3206,8 +3206,8 @@
|
|
|
3206
3206
|
conf.on('deleteasync', del = function del(id, resultArray) {
|
|
3207
3207
|
apply.call(dispose, null, resultArray);
|
|
3208
3208
|
});
|
|
3209
|
-
conf.on('clearasync', function(
|
|
3210
|
-
forEach(
|
|
3209
|
+
conf.on('clearasync', function(cache21) {
|
|
3210
|
+
forEach(cache21, function(result, id) {
|
|
3211
3211
|
del(id, result);
|
|
3212
3212
|
});
|
|
3213
3213
|
});
|
|
@@ -3216,8 +3216,8 @@
|
|
|
3216
3216
|
conf.on('delete', del = function del(id, result) {
|
|
3217
3217
|
dispose(result);
|
|
3218
3218
|
});
|
|
3219
|
-
conf.on('clear', function(
|
|
3220
|
-
forEach(
|
|
3219
|
+
conf.on('clear', function(cache21) {
|
|
3220
|
+
forEach(cache21, function(result, id) {
|
|
3221
3221
|
del(id, result);
|
|
3222
3222
|
});
|
|
3223
3223
|
});
|
|
@@ -3438,20 +3438,20 @@
|
|
|
3438
3438
|
var create = Object.create;
|
|
3439
3439
|
var defineProperties = Object.defineProperties;
|
|
3440
3440
|
extensions.refCounter = function(ignore, conf, options) {
|
|
3441
|
-
var
|
|
3442
|
-
|
|
3441
|
+
var cache21, postfix;
|
|
3442
|
+
cache21 = create(null);
|
|
3443
3443
|
postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : '';
|
|
3444
3444
|
conf.on('set' + postfix, function(id, length) {
|
|
3445
|
-
|
|
3445
|
+
cache21[id] = length || 1;
|
|
3446
3446
|
});
|
|
3447
3447
|
conf.on('get' + postfix, function(id) {
|
|
3448
|
-
++
|
|
3448
|
+
++cache21[id];
|
|
3449
3449
|
});
|
|
3450
3450
|
conf.on('delete' + postfix, function(id) {
|
|
3451
|
-
delete
|
|
3451
|
+
delete cache21[id];
|
|
3452
3452
|
});
|
|
3453
3453
|
conf.on('clear' + postfix, function() {
|
|
3454
|
-
|
|
3454
|
+
cache21 = {};
|
|
3455
3455
|
});
|
|
3456
3456
|
defineProperties(conf.memoized, {
|
|
3457
3457
|
deleteRef: d(function() {
|
|
@@ -3459,10 +3459,10 @@
|
|
|
3459
3459
|
if (id === null) {
|
|
3460
3460
|
return null;
|
|
3461
3461
|
}
|
|
3462
|
-
if (!
|
|
3462
|
+
if (!cache21[id]) {
|
|
3463
3463
|
return null;
|
|
3464
3464
|
}
|
|
3465
|
-
if (!--
|
|
3465
|
+
if (!--cache21[id]) {
|
|
3466
3466
|
conf['delete'](id);
|
|
3467
3467
|
return true;
|
|
3468
3468
|
}
|
|
@@ -3473,10 +3473,10 @@
|
|
|
3473
3473
|
if (id === null) {
|
|
3474
3474
|
return 0;
|
|
3475
3475
|
}
|
|
3476
|
-
if (!
|
|
3476
|
+
if (!cache21[id]) {
|
|
3477
3477
|
return 0;
|
|
3478
3478
|
}
|
|
3479
|
-
return
|
|
3479
|
+
return cache21[id];
|
|
3480
3480
|
})
|
|
3481
3481
|
});
|
|
3482
3482
|
};
|
|
@@ -4255,7 +4255,7 @@
|
|
|
4255
4255
|
var LN2 = Math.LN2;
|
|
4256
4256
|
var abs = Math.abs;
|
|
4257
4257
|
var floor = Math.floor;
|
|
4258
|
-
var
|
|
4258
|
+
var log9 = Math.log;
|
|
4259
4259
|
var min = Math.min;
|
|
4260
4260
|
var pow = Math.pow;
|
|
4261
4261
|
var round = Math.round;
|
|
@@ -4411,7 +4411,7 @@
|
|
|
4411
4411
|
s = v < 0;
|
|
4412
4412
|
v = abs(v);
|
|
4413
4413
|
if (v >= pow(2, 1 - bias)) {
|
|
4414
|
-
e = min(floor(
|
|
4414
|
+
e = min(floor(log9(v) / LN2), 1023);
|
|
4415
4415
|
f = roundToEven(v / pow(2, e) * pow(2, fbits));
|
|
4416
4416
|
if (f / pow(2, fbits) >= 2) {
|
|
4417
4417
|
e = e + 1;
|
|
@@ -5945,23 +5945,23 @@
|
|
|
5945
5945
|
var xhtml;
|
|
5946
5946
|
var ignoredAttributes = [ 'class', 'style', 'id', 'selected', 'checked', 'disabled', 'tabindex', 'aria-checked', 'aria-selected', 'aria-invalid', 'aria-activedescendant', 'aria-busy', 'aria-disabled', 'aria-expanded', 'aria-grabbed', 'aria-pressed', 'aria-valuenow' ];
|
|
5947
5947
|
var MAXATTRIBUTELENGTH = 31;
|
|
5948
|
+
var attrCharsRegex = /([\\"])/g;
|
|
5949
|
+
var newlineChars = /(\r\n|\r|\n)/g;
|
|
5950
|
+
function escapeAttribute(str) {
|
|
5951
|
+
return str.replace(attrCharsRegex, '\\$1').replace(newlineChars, '\\a ');
|
|
5952
|
+
}
|
|
5948
5953
|
function getAttributeNameValue(node, at) {
|
|
5949
5954
|
var name = at.name;
|
|
5950
5955
|
var atnv;
|
|
5951
5956
|
if (name.indexOf('href') !== -1 || name.indexOf('src') !== -1) {
|
|
5952
5957
|
var friendly = get_friendly_uri_end_default(node.getAttribute(name));
|
|
5953
5958
|
if (friendly) {
|
|
5954
|
-
|
|
5955
|
-
if (value) {
|
|
5956
|
-
atnv = escape_selector_default(at.name) + '$="' + escape_selector_default(value) + '"';
|
|
5957
|
-
} else {
|
|
5958
|
-
return;
|
|
5959
|
-
}
|
|
5959
|
+
atnv = escape_selector_default(at.name) + '$="' + escapeAttribute(friendly) + '"';
|
|
5960
5960
|
} else {
|
|
5961
|
-
atnv = escape_selector_default(at.name) + '="' +
|
|
5961
|
+
atnv = escape_selector_default(at.name) + '="' + escapeAttribute(node.getAttribute(name)) + '"';
|
|
5962
5962
|
}
|
|
5963
5963
|
} else {
|
|
5964
|
-
atnv = escape_selector_default(name) + '="' +
|
|
5964
|
+
atnv = escape_selector_default(name) + '="' + escapeAttribute(at.value) + '"';
|
|
5965
5965
|
}
|
|
5966
5966
|
return atnv;
|
|
5967
5967
|
}
|
|
@@ -6365,7 +6365,15 @@
|
|
|
6365
6365
|
checkResult.data = data2;
|
|
6366
6366
|
},
|
|
6367
6367
|
relatedNodes: function relatedNodes(nodes) {
|
|
6368
|
+
if (!window.Node) {
|
|
6369
|
+
return;
|
|
6370
|
+
}
|
|
6368
6371
|
nodes = nodes instanceof window.Node ? [ nodes ] : to_array_default(nodes);
|
|
6372
|
+
if (!nodes.every(function(node) {
|
|
6373
|
+
return node instanceof window.Node || node.actualNode;
|
|
6374
|
+
})) {
|
|
6375
|
+
return;
|
|
6376
|
+
}
|
|
6369
6377
|
checkResult.relatedNodes = nodes.map(function(element) {
|
|
6370
6378
|
return new dq_element_default(element, options);
|
|
6371
6379
|
});
|
|
@@ -6762,6 +6770,7 @@
|
|
|
6762
6770
|
return new Error(message + ': ' + (selector || node));
|
|
6763
6771
|
}
|
|
6764
6772
|
function sendCommandToFrame(node, parameters, resolve, reject) {
|
|
6773
|
+
var _parameters$options$p, _parameters$options;
|
|
6765
6774
|
var win = node.contentWindow;
|
|
6766
6775
|
if (!win) {
|
|
6767
6776
|
log_default('Frame does not have a content window', node);
|
|
@@ -6776,7 +6785,7 @@
|
|
|
6776
6785
|
reject(err('No response from frame', node));
|
|
6777
6786
|
}
|
|
6778
6787
|
}, 0);
|
|
6779
|
-
}, 500);
|
|
6788
|
+
}, (_parameters$options$p = (_parameters$options = parameters.options) === null || _parameters$options === void 0 ? void 0 : _parameters$options.pingWaitTime) !== null && _parameters$options$p !== void 0 ? _parameters$options$p : 500);
|
|
6780
6789
|
_respondable(win, 'axe.ping', null, void 0, function() {
|
|
6781
6790
|
clearTimeout(timeout);
|
|
6782
6791
|
var frameWaitTime = parameters.options && parameters.options.frameWaitTime || 6e4;
|
|
@@ -7096,7 +7105,7 @@
|
|
|
7096
7105
|
return url_props_from_attribute_default;
|
|
7097
7106
|
},
|
|
7098
7107
|
visuallyContains: function visuallyContains() {
|
|
7099
|
-
return
|
|
7108
|
+
return _visuallyContains;
|
|
7100
7109
|
},
|
|
7101
7110
|
visuallyOverlaps: function visuallyOverlaps() {
|
|
7102
7111
|
return visually_overlaps_default;
|
|
@@ -7325,13 +7334,14 @@
|
|
|
7325
7334
|
});
|
|
7326
7335
|
}
|
|
7327
7336
|
function isVisible(el, screenReader, recursed) {
|
|
7337
|
+
var _window$Node;
|
|
7328
7338
|
if (!el) {
|
|
7329
7339
|
throw new TypeError('Cannot determine if element is visible for non-DOM nodes');
|
|
7330
7340
|
}
|
|
7331
7341
|
var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
|
|
7332
7342
|
el = vNode ? vNode.actualNode : el;
|
|
7333
7343
|
var cacheName = '_isVisible' + (screenReader ? 'ScreenReader' : '');
|
|
7334
|
-
var _window$Node = window.Node, DOCUMENT_NODE =
|
|
7344
|
+
var _ref9 = (_window$Node = window.Node) !== null && _window$Node !== void 0 ? _window$Node : {}, DOCUMENT_NODE = _ref9.DOCUMENT_NODE, DOCUMENT_FRAGMENT_NODE = _ref9.DOCUMENT_FRAGMENT_NODE;
|
|
7335
7345
|
var nodeType = vNode ? vNode.props.nodeType : el.nodeType;
|
|
7336
7346
|
var nodeName2 = vNode ? vNode.props.nodeName : el.nodeName.toLowerCase();
|
|
7337
7347
|
if (vNode && typeof vNode[cacheName] !== 'undefined') {
|
|
@@ -7374,9 +7384,12 @@
|
|
|
7374
7384
|
return false;
|
|
7375
7385
|
}
|
|
7376
7386
|
var elHeight = parseInt(style.getPropertyValue('height'));
|
|
7377
|
-
var
|
|
7378
|
-
var
|
|
7379
|
-
|
|
7387
|
+
var elWidth = parseInt(style.getPropertyValue('width'));
|
|
7388
|
+
var scroll = get_scroll_default(el);
|
|
7389
|
+
var scrollableWithZeroHeight = scroll && elHeight === 0;
|
|
7390
|
+
var scrollableWithZeroWidth = scroll && elWidth === 0;
|
|
7391
|
+
var posAbsoluteOverflowHiddenAndSmall = style.getPropertyValue('position') === 'absolute' && (elHeight < 2 || elWidth < 2) && style.getPropertyValue('overflow') === 'hidden';
|
|
7392
|
+
if (!screenReader && (isClipped(style) || style.getPropertyValue('opacity') === '0' || scrollableWithZeroHeight || scrollableWithZeroWidth || posAbsoluteOverflowHiddenAndSmall)) {
|
|
7380
7393
|
return false;
|
|
7381
7394
|
}
|
|
7382
7395
|
if (!recursed && (style.getPropertyValue('visibility') === 'hidden' || !screenReader && is_offscreen_default(el))) {
|
|
@@ -7394,6 +7407,90 @@
|
|
|
7394
7407
|
}
|
|
7395
7408
|
var is_visible_default = isVisible;
|
|
7396
7409
|
var gridSize = 200;
|
|
7410
|
+
function createGrid() {
|
|
7411
|
+
var root = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body;
|
|
7412
|
+
var rootGrid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
7413
|
+
container: null,
|
|
7414
|
+
cells: []
|
|
7415
|
+
};
|
|
7416
|
+
var parentVNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
7417
|
+
if (!parentVNode) {
|
|
7418
|
+
var vNode = get_node_from_tree_default(document.documentElement);
|
|
7419
|
+
if (!vNode) {
|
|
7420
|
+
vNode = new virtual_node_default(document.documentElement);
|
|
7421
|
+
}
|
|
7422
|
+
vNode._stackingOrder = [ 0 ];
|
|
7423
|
+
addNodeToGrid(rootGrid, vNode);
|
|
7424
|
+
if (get_scroll_default(vNode.actualNode)) {
|
|
7425
|
+
var subGrid = {
|
|
7426
|
+
container: vNode,
|
|
7427
|
+
cells: []
|
|
7428
|
+
};
|
|
7429
|
+
vNode._subGrid = subGrid;
|
|
7430
|
+
}
|
|
7431
|
+
}
|
|
7432
|
+
var treeWalker = document.createTreeWalker(root, window.NodeFilter.SHOW_ELEMENT, null, false);
|
|
7433
|
+
var node = parentVNode ? treeWalker.nextNode() : treeWalker.currentNode;
|
|
7434
|
+
while (node) {
|
|
7435
|
+
var _vNode = get_node_from_tree_default(node);
|
|
7436
|
+
if (node.parentElement) {
|
|
7437
|
+
parentVNode = get_node_from_tree_default(node.parentElement);
|
|
7438
|
+
} else if (node.parentNode && get_node_from_tree_default(node.parentNode)) {
|
|
7439
|
+
parentVNode = get_node_from_tree_default(node.parentNode);
|
|
7440
|
+
}
|
|
7441
|
+
if (!_vNode) {
|
|
7442
|
+
_vNode = new axe.VirtualNode(node, parentVNode);
|
|
7443
|
+
}
|
|
7444
|
+
_vNode._stackingOrder = getStackingOrder(_vNode, parentVNode);
|
|
7445
|
+
var scrollRegionParent = findScrollRegionParent(_vNode, parentVNode);
|
|
7446
|
+
var grid = scrollRegionParent ? scrollRegionParent._subGrid : rootGrid;
|
|
7447
|
+
if (get_scroll_default(_vNode.actualNode)) {
|
|
7448
|
+
var _subGrid = {
|
|
7449
|
+
container: _vNode,
|
|
7450
|
+
cells: []
|
|
7451
|
+
};
|
|
7452
|
+
_vNode._subGrid = _subGrid;
|
|
7453
|
+
}
|
|
7454
|
+
var rect = _vNode.boundingClientRect;
|
|
7455
|
+
if (rect.width !== 0 && rect.height !== 0 && is_visible_default(node)) {
|
|
7456
|
+
addNodeToGrid(grid, _vNode);
|
|
7457
|
+
}
|
|
7458
|
+
if (is_shadow_root_default(node)) {
|
|
7459
|
+
createGrid(node.shadowRoot, grid, _vNode);
|
|
7460
|
+
}
|
|
7461
|
+
node = treeWalker.nextNode();
|
|
7462
|
+
}
|
|
7463
|
+
}
|
|
7464
|
+
function getRectStack(grid, rect) {
|
|
7465
|
+
var _grid$cells$row$col$f, _grid$cells$row$col;
|
|
7466
|
+
var recursed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
7467
|
+
var x = rect.left + rect.width / 2;
|
|
7468
|
+
var y = rect.top + rect.height / 2;
|
|
7469
|
+
var row = y / gridSize | 0;
|
|
7470
|
+
var col = x / gridSize | 0;
|
|
7471
|
+
if (row > grid.cells.length || col > grid.numCols) {
|
|
7472
|
+
throw new Error('Element midpoint exceeds the grid bounds');
|
|
7473
|
+
}
|
|
7474
|
+
var stack = (_grid$cells$row$col$f = (_grid$cells$row$col = grid.cells[row][col]) === null || _grid$cells$row$col === void 0 ? void 0 : _grid$cells$row$col.filter(function(gridCellNode) {
|
|
7475
|
+
return gridCellNode.clientRects.find(function(clientRect) {
|
|
7476
|
+
var rectX = clientRect.left;
|
|
7477
|
+
var rectY = clientRect.top;
|
|
7478
|
+
return x <= rectX + clientRect.width && x >= rectX && y <= rectY + clientRect.height && y >= rectY;
|
|
7479
|
+
});
|
|
7480
|
+
})) !== null && _grid$cells$row$col$f !== void 0 ? _grid$cells$row$col$f : [];
|
|
7481
|
+
var gridContainer = grid.container;
|
|
7482
|
+
if (gridContainer) {
|
|
7483
|
+
stack = getRectStack(gridContainer._grid, gridContainer.boundingClientRect, true).concat(stack);
|
|
7484
|
+
}
|
|
7485
|
+
if (!recursed) {
|
|
7486
|
+
stack = stack.sort(visuallySort).map(function(vNode) {
|
|
7487
|
+
return vNode.actualNode;
|
|
7488
|
+
}).concat(document.documentElement).filter(function(node, index, array) {
|
|
7489
|
+
return array.indexOf(node) === index;
|
|
7490
|
+
});
|
|
7491
|
+
}
|
|
7492
|
+
return stack;
|
|
7493
|
+
}
|
|
7397
7494
|
function isStackingContext(vNode, parentVNode) {
|
|
7398
7495
|
var position = vNode.getComputedStylePropertyValue('position');
|
|
7399
7496
|
var zIndex = vNode.getComputedStylePropertyValue('z-index');
|
|
@@ -7477,21 +7574,21 @@
|
|
|
7477
7574
|
return floated;
|
|
7478
7575
|
}
|
|
7479
7576
|
function getPositionOrder(vNode) {
|
|
7480
|
-
if (vNode.getComputedStylePropertyValue('
|
|
7481
|
-
|
|
7482
|
-
return 2;
|
|
7483
|
-
}
|
|
7484
|
-
if (isFloated(vNode)) {
|
|
7485
|
-
return 1;
|
|
7486
|
-
}
|
|
7487
|
-
return 0;
|
|
7577
|
+
if (vNode.getComputedStylePropertyValue('display').indexOf('inline') !== -1) {
|
|
7578
|
+
return 2;
|
|
7488
7579
|
}
|
|
7489
|
-
|
|
7580
|
+
if (isFloated(vNode)) {
|
|
7581
|
+
return 1;
|
|
7582
|
+
}
|
|
7583
|
+
return 0;
|
|
7490
7584
|
}
|
|
7491
7585
|
function visuallySort(a, b) {
|
|
7492
|
-
|
|
7586
|
+
var length = Math.max(a._stackingOrder.length, b._stackingOrder.length);
|
|
7587
|
+
for (var _i5 = 0; _i5 < length; _i5++) {
|
|
7493
7588
|
if (typeof b._stackingOrder[_i5] === 'undefined') {
|
|
7494
7589
|
return -1;
|
|
7590
|
+
} else if (typeof a._stackingOrder[_i5] === 'undefined') {
|
|
7591
|
+
return 1;
|
|
7495
7592
|
}
|
|
7496
7593
|
if (b._stackingOrder[_i5] > a._stackingOrder[_i5]) {
|
|
7497
7594
|
return 1;
|
|
@@ -7537,11 +7634,25 @@
|
|
|
7537
7634
|
function getStackingOrder(vNode, parentVNode) {
|
|
7538
7635
|
var stackingOrder = parentVNode._stackingOrder.slice();
|
|
7539
7636
|
var zIndex = vNode.getComputedStylePropertyValue('z-index');
|
|
7540
|
-
|
|
7637
|
+
var positioned = vNode.getComputedStylePropertyValue('position') !== 'static';
|
|
7638
|
+
var floated = vNode.getComputedStylePropertyValue('float') !== 'none';
|
|
7639
|
+
if (positioned && ![ 'auto', '0' ].includes(zIndex)) {
|
|
7640
|
+
while (stackingOrder.find(function(value) {
|
|
7641
|
+
return value % 1 !== 0;
|
|
7642
|
+
})) {
|
|
7643
|
+
var index = stackingOrder.findIndex(function(value) {
|
|
7644
|
+
return value % 1 !== 0;
|
|
7645
|
+
});
|
|
7646
|
+
stackingOrder.splice(index, 1);
|
|
7647
|
+
}
|
|
7541
7648
|
stackingOrder[stackingOrder.length - 1] = parseInt(zIndex);
|
|
7542
7649
|
}
|
|
7543
7650
|
if (isStackingContext(vNode, parentVNode)) {
|
|
7544
7651
|
stackingOrder.push(0);
|
|
7652
|
+
} else if (positioned) {
|
|
7653
|
+
stackingOrder.push(.5);
|
|
7654
|
+
} else if (floated) {
|
|
7655
|
+
stackingOrder.push(.25);
|
|
7545
7656
|
}
|
|
7546
7657
|
return stackingOrder;
|
|
7547
7658
|
}
|
|
@@ -7549,14 +7660,14 @@
|
|
|
7549
7660
|
var scrollRegionParent = null;
|
|
7550
7661
|
var checkedNodes = [ vNode ];
|
|
7551
7662
|
while (parentVNode) {
|
|
7552
|
-
if (parentVNode._scrollRegionParent) {
|
|
7553
|
-
scrollRegionParent = parentVNode._scrollRegionParent;
|
|
7554
|
-
break;
|
|
7555
|
-
}
|
|
7556
7663
|
if (get_scroll_default(parentVNode.actualNode)) {
|
|
7557
7664
|
scrollRegionParent = parentVNode;
|
|
7558
7665
|
break;
|
|
7559
7666
|
}
|
|
7667
|
+
if (parentVNode._scrollRegionParent) {
|
|
7668
|
+
scrollRegionParent = parentVNode._scrollRegionParent;
|
|
7669
|
+
break;
|
|
7670
|
+
}
|
|
7560
7671
|
checkedNodes.push(parentVNode);
|
|
7561
7672
|
parentVNode = get_node_from_tree_default(parentVNode.actualNode.parentElement || parentVNode.actualNode.parentNode);
|
|
7562
7673
|
}
|
|
@@ -7568,12 +7679,14 @@
|
|
|
7568
7679
|
function addNodeToGrid(grid, vNode) {
|
|
7569
7680
|
vNode._grid = grid;
|
|
7570
7681
|
vNode.clientRects.forEach(function(rect) {
|
|
7682
|
+
var _grid$numCols;
|
|
7571
7683
|
var x = rect.left;
|
|
7572
7684
|
var y = rect.top;
|
|
7573
7685
|
var startRow = y / gridSize | 0;
|
|
7574
7686
|
var startCol = x / gridSize | 0;
|
|
7575
7687
|
var endRow = (y + rect.height) / gridSize | 0;
|
|
7576
7688
|
var endCol = (x + rect.width) / gridSize | 0;
|
|
7689
|
+
grid.numCols = Math.max((_grid$numCols = grid.numCols) !== null && _grid$numCols !== void 0 ? _grid$numCols : 0, endCol);
|
|
7577
7690
|
for (var row = startRow; row <= endRow; row++) {
|
|
7578
7691
|
grid.cells[row] = grid.cells[row] || [];
|
|
7579
7692
|
for (var col = startCol; col <= endCol; col++) {
|
|
@@ -7585,86 +7698,6 @@
|
|
|
7585
7698
|
}
|
|
7586
7699
|
});
|
|
7587
7700
|
}
|
|
7588
|
-
function createGrid() {
|
|
7589
|
-
var root = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body;
|
|
7590
|
-
var rootGrid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
7591
|
-
container: null,
|
|
7592
|
-
cells: []
|
|
7593
|
-
};
|
|
7594
|
-
var parentVNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
7595
|
-
if (!parentVNode) {
|
|
7596
|
-
var vNode = get_node_from_tree_default(document.documentElement);
|
|
7597
|
-
if (!vNode) {
|
|
7598
|
-
vNode = new virtual_node_default(document.documentElement);
|
|
7599
|
-
}
|
|
7600
|
-
vNode._stackingOrder = [ 0 ];
|
|
7601
|
-
addNodeToGrid(rootGrid, vNode);
|
|
7602
|
-
if (get_scroll_default(vNode.actualNode)) {
|
|
7603
|
-
var subGrid = {
|
|
7604
|
-
container: vNode,
|
|
7605
|
-
cells: []
|
|
7606
|
-
};
|
|
7607
|
-
vNode._subGrid = subGrid;
|
|
7608
|
-
}
|
|
7609
|
-
}
|
|
7610
|
-
var treeWalker = document.createTreeWalker(root, window.NodeFilter.SHOW_ELEMENT, null, false);
|
|
7611
|
-
var node = parentVNode ? treeWalker.nextNode() : treeWalker.currentNode;
|
|
7612
|
-
while (node) {
|
|
7613
|
-
var _vNode = get_node_from_tree_default(node);
|
|
7614
|
-
if (node.parentElement) {
|
|
7615
|
-
parentVNode = get_node_from_tree_default(node.parentElement);
|
|
7616
|
-
} else if (node.parentNode && get_node_from_tree_default(node.parentNode)) {
|
|
7617
|
-
parentVNode = get_node_from_tree_default(node.parentNode);
|
|
7618
|
-
}
|
|
7619
|
-
if (!_vNode) {
|
|
7620
|
-
_vNode = new axe.VirtualNode(node, parentVNode);
|
|
7621
|
-
}
|
|
7622
|
-
_vNode._stackingOrder = getStackingOrder(_vNode, parentVNode);
|
|
7623
|
-
var scrollRegionParent = findScrollRegionParent(_vNode, parentVNode);
|
|
7624
|
-
var grid = scrollRegionParent ? scrollRegionParent._subGrid : rootGrid;
|
|
7625
|
-
if (get_scroll_default(_vNode.actualNode)) {
|
|
7626
|
-
var _subGrid = {
|
|
7627
|
-
container: _vNode,
|
|
7628
|
-
cells: []
|
|
7629
|
-
};
|
|
7630
|
-
_vNode._subGrid = _subGrid;
|
|
7631
|
-
}
|
|
7632
|
-
var rect = _vNode.boundingClientRect;
|
|
7633
|
-
if (rect.width !== 0 && rect.height !== 0 && is_visible_default(node)) {
|
|
7634
|
-
addNodeToGrid(grid, _vNode);
|
|
7635
|
-
}
|
|
7636
|
-
if (is_shadow_root_default(node)) {
|
|
7637
|
-
createGrid(node.shadowRoot, grid, _vNode);
|
|
7638
|
-
}
|
|
7639
|
-
node = treeWalker.nextNode();
|
|
7640
|
-
}
|
|
7641
|
-
}
|
|
7642
|
-
function getRectStack(grid, rect) {
|
|
7643
|
-
var recursed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
7644
|
-
var x = rect.left + rect.width / 2;
|
|
7645
|
-
var y = rect.top + rect.height / 2;
|
|
7646
|
-
var row = y / gridSize | 0;
|
|
7647
|
-
var col = x / gridSize | 0;
|
|
7648
|
-
var stack = grid.cells[row][col].filter(function(gridCellNode) {
|
|
7649
|
-
return gridCellNode.clientRects.find(function(clientRect) {
|
|
7650
|
-
var rectX = clientRect.left;
|
|
7651
|
-
var rectY = clientRect.top;
|
|
7652
|
-
return x <= rectX + clientRect.width && x >= rectX && y <= rectY + clientRect.height && y >= rectY;
|
|
7653
|
-
});
|
|
7654
|
-
});
|
|
7655
|
-
var gridContainer = grid.container;
|
|
7656
|
-
if (gridContainer) {
|
|
7657
|
-
stack = getRectStack(gridContainer._grid, gridContainer.boundingClientRect, true).concat(stack);
|
|
7658
|
-
}
|
|
7659
|
-
if (!recursed) {
|
|
7660
|
-
stack = stack.sort(visuallySort).map(function(vNode) {
|
|
7661
|
-
return vNode.actualNode;
|
|
7662
|
-
}).concat(document.documentElement).filter(function(node, index, array) {
|
|
7663
|
-
return array.indexOf(node) === index;
|
|
7664
|
-
});
|
|
7665
|
-
}
|
|
7666
|
-
return stack;
|
|
7667
|
-
}
|
|
7668
7701
|
function getElementStack(node) {
|
|
7669
7702
|
if (!cache_default.get('gridCreated')) {
|
|
7670
7703
|
createGrid();
|
|
@@ -7808,7 +7841,7 @@
|
|
|
7808
7841
|
ref = idrefs_default(virtualNode.actualNode, 'aria-labelledby');
|
|
7809
7842
|
candidate = ref.map(function(thing) {
|
|
7810
7843
|
var vNode = get_node_from_tree_default(thing);
|
|
7811
|
-
return vNode ? visible_virtual_default(vNode
|
|
7844
|
+
return vNode ? visible_virtual_default(vNode) : '';
|
|
7812
7845
|
}).join(' ').trim();
|
|
7813
7846
|
if (candidate) {
|
|
7814
7847
|
return candidate;
|
|
@@ -7827,8 +7860,8 @@
|
|
|
7827
7860
|
var hiddenTextElms = [ 'HEAD', 'TITLE', 'TEMPLATE', 'SCRIPT', 'STYLE', 'IFRAME', 'OBJECT', 'VIDEO', 'AUDIO', 'NOSCRIPT' ];
|
|
7828
7861
|
function hasChildTextNodes(elm) {
|
|
7829
7862
|
if (!hiddenTextElms.includes(elm.actualNode.nodeName.toUpperCase())) {
|
|
7830
|
-
return elm.children.some(function(
|
|
7831
|
-
var actualNode =
|
|
7863
|
+
return elm.children.some(function(_ref10) {
|
|
7864
|
+
var actualNode = _ref10.actualNode;
|
|
7832
7865
|
return actualNode.nodeType === 3 && actualNode.nodeValue.trim();
|
|
7833
7866
|
});
|
|
7834
7867
|
}
|
|
@@ -8449,6 +8482,11 @@
|
|
|
8449
8482
|
allowedAttrs: [ 'aria-expanded' ],
|
|
8450
8483
|
superclassRole: [ 'landmark' ]
|
|
8451
8484
|
},
|
|
8485
|
+
comment: {
|
|
8486
|
+
type: 'structure',
|
|
8487
|
+
allowedAttrs: [ 'aria-level', 'aria-posinset', 'aria-setsize' ],
|
|
8488
|
+
superclassRole: [ 'article' ]
|
|
8489
|
+
},
|
|
8452
8490
|
definition: {
|
|
8453
8491
|
type: 'structure',
|
|
8454
8492
|
allowedAttrs: [ 'aria-expanded' ],
|
|
@@ -8560,7 +8598,7 @@
|
|
|
8560
8598
|
},
|
|
8561
8599
|
listbox: {
|
|
8562
8600
|
type: 'composite',
|
|
8563
|
-
requiredOwned: [ 'option' ],
|
|
8601
|
+
requiredOwned: [ 'group', 'option' ],
|
|
8564
8602
|
allowedAttrs: [ 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
|
|
8565
8603
|
superclassRole: [ 'select' ],
|
|
8566
8604
|
accessibleNameRequired: true
|
|
@@ -8639,6 +8677,11 @@
|
|
|
8639
8677
|
accessibleNameRequired: true,
|
|
8640
8678
|
childrenPresentational: true
|
|
8641
8679
|
},
|
|
8680
|
+
mark: {
|
|
8681
|
+
type: 'structure',
|
|
8682
|
+
superclassRole: [ 'section' ],
|
|
8683
|
+
prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
|
|
8684
|
+
},
|
|
8642
8685
|
navigation: {
|
|
8643
8686
|
type: 'landmark',
|
|
8644
8687
|
allowedAttrs: [ 'aria-expanded' ],
|
|
@@ -8656,7 +8699,7 @@
|
|
|
8656
8699
|
},
|
|
8657
8700
|
option: {
|
|
8658
8701
|
type: 'widget',
|
|
8659
|
-
requiredContext: [ 'listbox' ],
|
|
8702
|
+
requiredContext: [ 'group', 'listbox' ],
|
|
8660
8703
|
allowedAttrs: [ 'aria-selected', 'aria-checked', 'aria-posinset', 'aria-setsize' ],
|
|
8661
8704
|
superclassRole: [ 'input' ],
|
|
8662
8705
|
accessibleNameRequired: true,
|
|
@@ -8818,6 +8861,12 @@
|
|
|
8818
8861
|
nameFromContent: true,
|
|
8819
8862
|
childrenPresentational: true
|
|
8820
8863
|
},
|
|
8864
|
+
suggestion: {
|
|
8865
|
+
type: 'structure',
|
|
8866
|
+
requiredOwned: [ 'insertion', 'deletion' ],
|
|
8867
|
+
superclassRole: [ 'section' ],
|
|
8868
|
+
prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
|
|
8869
|
+
},
|
|
8821
8870
|
tab: {
|
|
8822
8871
|
type: 'widget',
|
|
8823
8872
|
requiredContext: [ 'tablist' ],
|
|
@@ -9407,11 +9456,13 @@
|
|
|
9407
9456
|
img: {
|
|
9408
9457
|
variant: {
|
|
9409
9458
|
nonEmptyAlt: {
|
|
9410
|
-
matches: {
|
|
9459
|
+
matches: [ {
|
|
9411
9460
|
attributes: {
|
|
9412
9461
|
alt: '/.+/'
|
|
9413
9462
|
}
|
|
9414
|
-
},
|
|
9463
|
+
}, {
|
|
9464
|
+
hasAccessibleName: true
|
|
9465
|
+
} ],
|
|
9415
9466
|
allowedRoles: [ 'button', 'checkbox', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'scrollbar', 'separator', 'slider', 'switch', 'tab', 'treeitem', 'doc-cover' ]
|
|
9416
9467
|
},
|
|
9417
9468
|
usemap: {
|
|
@@ -9692,7 +9743,7 @@
|
|
|
9692
9743
|
},
|
|
9693
9744
|
section: {
|
|
9694
9745
|
contentTypes: [ 'sectioning', 'flow' ],
|
|
9695
|
-
allowedRoles: [ 'alert', 'alertdialog', 'application', 'banner', 'complementary', 'contentinfo', 'dialog', 'document', 'feed', 'log', 'main', 'marquee', 'navigation', 'none', 'note', 'presentation', 'search', 'status', 'tabpanel', 'doc-abstract', 'doc-acknowledgments', 'doc-afterword', 'doc-appendix', 'doc-bibliography', 'doc-chapter', 'doc-colophon', 'doc-conclusion', 'doc-credit', 'doc-credits', 'doc-dedication', 'doc-endnotes', 'doc-epigraph', 'doc-epilogue', 'doc-errata', 'doc-example', 'doc-foreword', 'doc-glossary', 'doc-index', 'doc-introduction', 'doc-notice', 'doc-pagelist', 'doc-part', 'doc-preface', 'doc-prologue', 'doc-pullquote', 'doc-qna', 'doc-toc' ],
|
|
9746
|
+
allowedRoles: [ 'alert', 'alertdialog', 'application', 'banner', 'complementary', 'contentinfo', 'dialog', 'document', 'feed', 'group', 'log', 'main', 'marquee', 'navigation', 'none', 'note', 'presentation', 'search', 'status', 'tabpanel', 'doc-abstract', 'doc-acknowledgments', 'doc-afterword', 'doc-appendix', 'doc-bibliography', 'doc-chapter', 'doc-colophon', 'doc-conclusion', 'doc-credit', 'doc-credits', 'doc-dedication', 'doc-endnotes', 'doc-epigraph', 'doc-epilogue', 'doc-errata', 'doc-example', 'doc-foreword', 'doc-glossary', 'doc-index', 'doc-introduction', 'doc-notice', 'doc-pagelist', 'doc-part', 'doc-preface', 'doc-prologue', 'doc-pullquote', 'doc-qna', 'doc-toc' ],
|
|
9696
9747
|
shadowRoot: true
|
|
9697
9748
|
},
|
|
9698
9749
|
select: {
|
|
@@ -9836,7 +9887,7 @@
|
|
|
9836
9887
|
},
|
|
9837
9888
|
wbr: {
|
|
9838
9889
|
contentTypes: [ 'phrasing', 'flow' ],
|
|
9839
|
-
allowedRoles:
|
|
9890
|
+
allowedRoles: [ 'presentation', 'none' ]
|
|
9840
9891
|
}
|
|
9841
9892
|
};
|
|
9842
9893
|
var html_elms_default = htmlElms;
|
|
@@ -10028,8 +10079,8 @@
|
|
|
10028
10079
|
}
|
|
10029
10080
|
return parseFloat(value);
|
|
10030
10081
|
}
|
|
10031
|
-
function hslToRgb(
|
|
10032
|
-
var
|
|
10082
|
+
function hslToRgb(_ref11) {
|
|
10083
|
+
var _ref12 = _slicedToArray(_ref11, 4), hue = _ref12[0], saturation = _ref12[1], lightness = _ref12[2], alpha = _ref12[3];
|
|
10033
10084
|
saturation /= 255;
|
|
10034
10085
|
lightness /= 255;
|
|
10035
10086
|
var high = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
@@ -10049,8 +10100,8 @@
|
|
|
10049
10100
|
} else {
|
|
10050
10101
|
colors = [ high, 0, low ];
|
|
10051
10102
|
}
|
|
10052
|
-
return colors.map(function(
|
|
10053
|
-
return Math.round((
|
|
10103
|
+
return colors.map(function(color11) {
|
|
10104
|
+
return Math.round((color11 + base) * 255);
|
|
10054
10105
|
}).concat(alpha);
|
|
10055
10106
|
}
|
|
10056
10107
|
function Color(red, green, blue, alpha) {
|
|
@@ -10068,7 +10119,7 @@
|
|
|
10068
10119
|
var colorFnRegex = /^((?:rgb|hsl)a?)\s*\(([^\)]*)\)/i;
|
|
10069
10120
|
this.parseString = function parseString(colorString) {
|
|
10070
10121
|
if (standards_default.cssColors[colorString] || colorString === 'transparent') {
|
|
10071
|
-
var
|
|
10122
|
+
var _ref13 = standards_default.cssColors[colorString] || [ 0, 0, 0 ], _ref14 = _slicedToArray(_ref13, 3), red2 = _ref14[0], green2 = _ref14[1], blue2 = _ref14[2];
|
|
10072
10123
|
this.red = red2;
|
|
10073
10124
|
this.green = green2;
|
|
10074
10125
|
this.blue = blue2;
|
|
@@ -10118,7 +10169,7 @@
|
|
|
10118
10169
|
}
|
|
10119
10170
|
};
|
|
10120
10171
|
this.parseColorFnString = function parseColorFnString(colorString) {
|
|
10121
|
-
var
|
|
10172
|
+
var _ref15 = colorString.match(colorFnRegex) || [], _ref16 = _slicedToArray(_ref15, 3), colorFunc = _ref16[1], colorValStr = _ref16[2];
|
|
10122
10173
|
if (!colorFunc || !colorValStr) {
|
|
10123
10174
|
return;
|
|
10124
10175
|
}
|
|
@@ -10201,6 +10252,17 @@
|
|
|
10201
10252
|
return finalElements;
|
|
10202
10253
|
}
|
|
10203
10254
|
var reduce_to_elements_below_floating_default = reduceToElementsBelowFloating;
|
|
10255
|
+
function _visuallyContains(node, parent) {
|
|
10256
|
+
var parentScrollAncestor = getScrollAncestor(parent);
|
|
10257
|
+
do {
|
|
10258
|
+
var nextScrollAncestor = getScrollAncestor(node);
|
|
10259
|
+
if (nextScrollAncestor === parentScrollAncestor || nextScrollAncestor === parent) {
|
|
10260
|
+
return contains2(node, parent);
|
|
10261
|
+
}
|
|
10262
|
+
node = nextScrollAncestor;
|
|
10263
|
+
} while (node);
|
|
10264
|
+
return false;
|
|
10265
|
+
}
|
|
10204
10266
|
function getScrollAncestor(node) {
|
|
10205
10267
|
var vNode = get_node_from_tree_default(node);
|
|
10206
10268
|
var ancestor = vNode.parent;
|
|
@@ -10212,47 +10274,30 @@
|
|
|
10212
10274
|
}
|
|
10213
10275
|
}
|
|
10214
10276
|
function contains2(node, parent) {
|
|
10215
|
-
var rectBound = node.getBoundingClientRect();
|
|
10216
|
-
var margin = .01;
|
|
10217
|
-
var rect = {
|
|
10218
|
-
top: rectBound.top + margin,
|
|
10219
|
-
bottom: rectBound.bottom - margin,
|
|
10220
|
-
left: rectBound.left + margin,
|
|
10221
|
-
right: rectBound.right - margin
|
|
10222
|
-
};
|
|
10223
|
-
var parentRect = parent.getBoundingClientRect();
|
|
10224
|
-
var parentTop = parentRect.top;
|
|
10225
|
-
var parentLeft = parentRect.left;
|
|
10226
|
-
var parentScrollArea = {
|
|
10227
|
-
top: parentTop - parent.scrollTop,
|
|
10228
|
-
bottom: parentTop - parent.scrollTop + parent.scrollHeight,
|
|
10229
|
-
left: parentLeft - parent.scrollLeft,
|
|
10230
|
-
right: parentLeft - parent.scrollLeft + parent.scrollWidth
|
|
10231
|
-
};
|
|
10232
10277
|
var style = window.getComputedStyle(parent);
|
|
10278
|
+
var overflow = style.getPropertyValue('overflow');
|
|
10233
10279
|
if (style.getPropertyValue('display') === 'inline') {
|
|
10234
10280
|
return true;
|
|
10235
10281
|
}
|
|
10236
|
-
|
|
10237
|
-
|
|
10282
|
+
var clientRects = Array.from(node.getClientRects());
|
|
10283
|
+
var boundingRect = parent.getBoundingClientRect();
|
|
10284
|
+
var rect = {
|
|
10285
|
+
left: boundingRect.left,
|
|
10286
|
+
top: boundingRect.top,
|
|
10287
|
+
width: boundingRect.width,
|
|
10288
|
+
height: boundingRect.height
|
|
10289
|
+
};
|
|
10290
|
+
if ([ 'scroll', 'auto' ].includes(overflow) || parent instanceof window.HTMLHtmlElement) {
|
|
10291
|
+
rect.width = parent.scrollWidth;
|
|
10292
|
+
rect.height = parent.scrollHeight;
|
|
10238
10293
|
}
|
|
10239
|
-
if (
|
|
10240
|
-
|
|
10294
|
+
if (clientRects.length === 1 && overflow === 'hidden' && style.getPropertyValue('white-space') === 'nowrap') {
|
|
10295
|
+
clientRects[0] = rect;
|
|
10241
10296
|
}
|
|
10242
|
-
return
|
|
10243
|
-
|
|
10244
|
-
|
|
10245
|
-
var parentScrollAncestor = getScrollAncestor(parent);
|
|
10246
|
-
do {
|
|
10247
|
-
var nextScrollAncestor = getScrollAncestor(node);
|
|
10248
|
-
if (nextScrollAncestor === parentScrollAncestor || nextScrollAncestor === parent) {
|
|
10249
|
-
return contains2(node, parent);
|
|
10250
|
-
}
|
|
10251
|
-
node = nextScrollAncestor;
|
|
10252
|
-
} while (node);
|
|
10253
|
-
return false;
|
|
10297
|
+
return clientRects.some(function(clientRect) {
|
|
10298
|
+
return !(Math.ceil(clientRect.left) < Math.floor(rect.left) || Math.ceil(clientRect.top) < Math.floor(rect.top) || Math.floor(clientRect.left + clientRect.width) > Math.ceil(rect.left + rect.width) || Math.floor(clientRect.top + clientRect.height) > Math.ceil(rect.top + rect.height));
|
|
10299
|
+
});
|
|
10254
10300
|
}
|
|
10255
|
-
var visually_contains_default = visuallyContains;
|
|
10256
10301
|
function shadowElementsFromPoint(nodeX, nodeY) {
|
|
10257
10302
|
var root = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : document;
|
|
10258
10303
|
var i = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
@@ -10265,7 +10310,7 @@
|
|
|
10265
10310
|
if (is_shadow_root_default(elm)) {
|
|
10266
10311
|
var shadowStack = shadowElementsFromPoint(nodeX, nodeY, elm.shadowRoot, i + 1);
|
|
10267
10312
|
stack = stack.concat(shadowStack);
|
|
10268
|
-
if (stack.length &&
|
|
10313
|
+
if (stack.length && _visuallyContains(stack[0], elm)) {
|
|
10269
10314
|
stack.push(elm);
|
|
10270
10315
|
}
|
|
10271
10316
|
} else {
|
|
@@ -10407,7 +10452,7 @@
|
|
|
10407
10452
|
key: 'props',
|
|
10408
10453
|
get: function get() {
|
|
10409
10454
|
if (!this._cache.hasOwnProperty('props')) {
|
|
10410
|
-
var _this$actualNode = this.actualNode, nodeType = _this$actualNode.nodeType, nodeName2 = _this$actualNode.nodeName, id = _this$actualNode.id, multiple = _this$actualNode.multiple, nodeValue = _this$actualNode.nodeValue, value = _this$actualNode.value;
|
|
10455
|
+
var _this$actualNode = this.actualNode, nodeType = _this$actualNode.nodeType, nodeName2 = _this$actualNode.nodeName, id = _this$actualNode.id, multiple = _this$actualNode.multiple, nodeValue = _this$actualNode.nodeValue, value = _this$actualNode.value, selected = _this$actualNode.selected;
|
|
10411
10456
|
this._cache.props = {
|
|
10412
10457
|
nodeType: nodeType,
|
|
10413
10458
|
nodeName: this._isXHTML ? nodeName2 : nodeName2.toLowerCase(),
|
|
@@ -10415,7 +10460,8 @@
|
|
|
10415
10460
|
type: this._type,
|
|
10416
10461
|
multiple: multiple,
|
|
10417
10462
|
nodeValue: nodeValue,
|
|
10418
|
-
value: value
|
|
10463
|
+
value: value,
|
|
10464
|
+
selected: selected
|
|
10419
10465
|
};
|
|
10420
10466
|
}
|
|
10421
10467
|
return this._cache.props;
|
|
@@ -10795,7 +10841,7 @@
|
|
|
10795
10841
|
return {};
|
|
10796
10842
|
}
|
|
10797
10843
|
var navigator = win.navigator, innerHeight = win.innerHeight, innerWidth = win.innerWidth;
|
|
10798
|
-
var
|
|
10844
|
+
var _ref17 = getOrientation(win) || {}, angle = _ref17.angle, type = _ref17.type;
|
|
10799
10845
|
return {
|
|
10800
10846
|
userAgent: navigator.userAgent,
|
|
10801
10847
|
windowWidth: innerWidth,
|
|
@@ -10804,12 +10850,12 @@
|
|
|
10804
10850
|
orientationType: type
|
|
10805
10851
|
};
|
|
10806
10852
|
}
|
|
10807
|
-
function getOrientation(
|
|
10808
|
-
var screen =
|
|
10853
|
+
function getOrientation(_ref18) {
|
|
10854
|
+
var screen = _ref18.screen;
|
|
10809
10855
|
return screen.orientation || screen.msOrientation || screen.mozOrientation;
|
|
10810
10856
|
}
|
|
10811
|
-
function createFrameContext(frame,
|
|
10812
|
-
var focusable =
|
|
10857
|
+
function createFrameContext(frame, _ref19) {
|
|
10858
|
+
var focusable = _ref19.focusable, page = _ref19.page;
|
|
10813
10859
|
return {
|
|
10814
10860
|
node: frame,
|
|
10815
10861
|
include: [],
|
|
@@ -10847,8 +10893,8 @@
|
|
|
10847
10893
|
}
|
|
10848
10894
|
context5.frames.push(createFrameContext(frame, context5));
|
|
10849
10895
|
}
|
|
10850
|
-
function isPageContext(
|
|
10851
|
-
var include =
|
|
10896
|
+
function isPageContext(_ref20) {
|
|
10897
|
+
var include = _ref20.include;
|
|
10852
10898
|
return include.length === 1 && include[0].actualNode === document.documentElement;
|
|
10853
10899
|
}
|
|
10854
10900
|
function pushUniqueFrameSelector(context5, type, selectorArray) {
|
|
@@ -10948,8 +10994,8 @@
|
|
|
10948
10994
|
});
|
|
10949
10995
|
}
|
|
10950
10996
|
}
|
|
10951
|
-
function getRootNode2(
|
|
10952
|
-
var include =
|
|
10997
|
+
function getRootNode2(_ref21) {
|
|
10998
|
+
var include = _ref21.include, exclude = _ref21.exclude;
|
|
10953
10999
|
var selectors = Array.from(include).concat(Array.from(exclude));
|
|
10954
11000
|
for (var i = 0; i < selectors.length; ++i) {
|
|
10955
11001
|
var item = selectors[i];
|
|
@@ -10998,8 +11044,8 @@
|
|
|
10998
11044
|
}
|
|
10999
11045
|
function _getFrameContexts(context5) {
|
|
11000
11046
|
var _Context = new Context(context5), frames = _Context.frames;
|
|
11001
|
-
return frames.map(function(
|
|
11002
|
-
var node =
|
|
11047
|
+
return frames.map(function(_ref22) {
|
|
11048
|
+
var node = _ref22.node, frameContext = _objectWithoutProperties(_ref22, _excluded2);
|
|
11003
11049
|
frameContext.initiator = false;
|
|
11004
11050
|
var frameSelector = _getAncestry(node);
|
|
11005
11051
|
return {
|
|
@@ -11684,8 +11730,8 @@
|
|
|
11684
11730
|
return matchExpressions(domTree, expressions, filter);
|
|
11685
11731
|
}
|
|
11686
11732
|
var query_selector_all_filter_default = querySelectorAllFilter;
|
|
11687
|
-
function preloadCssom(
|
|
11688
|
-
var
|
|
11733
|
+
function preloadCssom(_ref23) {
|
|
11734
|
+
var _ref23$treeRoot = _ref23.treeRoot, treeRoot = _ref23$treeRoot === void 0 ? axe._tree[0] : _ref23$treeRoot;
|
|
11689
11735
|
var rootNodes = getAllRootNodesInTree(treeRoot);
|
|
11690
11736
|
if (!rootNodes.length) {
|
|
11691
11737
|
return Promise.resolve();
|
|
@@ -11715,8 +11761,8 @@
|
|
|
11715
11761
|
}
|
|
11716
11762
|
function getCssomForAllRootNodes(rootNodes, convertDataToStylesheet) {
|
|
11717
11763
|
var promises = [];
|
|
11718
|
-
rootNodes.forEach(function(
|
|
11719
|
-
var rootNode =
|
|
11764
|
+
rootNodes.forEach(function(_ref24, index) {
|
|
11765
|
+
var rootNode = _ref24.rootNode, shadowId = _ref24.shadowId;
|
|
11720
11766
|
var sheets = getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet);
|
|
11721
11767
|
if (!sheets) {
|
|
11722
11768
|
return Promise.all(promises);
|
|
@@ -11797,10 +11843,10 @@
|
|
|
11797
11843
|
return true;
|
|
11798
11844
|
});
|
|
11799
11845
|
}
|
|
11800
|
-
function preloadMedia(
|
|
11801
|
-
var
|
|
11802
|
-
var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(
|
|
11803
|
-
var actualNode =
|
|
11846
|
+
function preloadMedia(_ref25) {
|
|
11847
|
+
var _ref25$treeRoot = _ref25.treeRoot, treeRoot = _ref25$treeRoot === void 0 ? axe._tree[0] : _ref25$treeRoot;
|
|
11848
|
+
var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(_ref26) {
|
|
11849
|
+
var actualNode = _ref26.actualNode;
|
|
11804
11850
|
if (actualNode.hasAttribute('src')) {
|
|
11805
11851
|
return !!actualNode.getAttribute('src');
|
|
11806
11852
|
}
|
|
@@ -11812,8 +11858,8 @@
|
|
|
11812
11858
|
}
|
|
11813
11859
|
return true;
|
|
11814
11860
|
});
|
|
11815
|
-
return Promise.all(mediaVirtualNodes.map(function(
|
|
11816
|
-
var actualNode =
|
|
11861
|
+
return Promise.all(mediaVirtualNodes.map(function(_ref27) {
|
|
11862
|
+
var actualNode = _ref27.actualNode;
|
|
11817
11863
|
return isMediaElementReady(actualNode);
|
|
11818
11864
|
}));
|
|
11819
11865
|
}
|
|
@@ -12108,8 +12154,8 @@
|
|
|
12108
12154
|
}
|
|
12109
12155
|
}
|
|
12110
12156
|
function setScrollState(scrollState) {
|
|
12111
|
-
scrollState.forEach(function(
|
|
12112
|
-
var elm =
|
|
12157
|
+
scrollState.forEach(function(_ref29) {
|
|
12158
|
+
var elm = _ref29.elm, top = _ref29.top, left = _ref29.left;
|
|
12113
12159
|
return setScroll(elm, top, left);
|
|
12114
12160
|
});
|
|
12115
12161
|
}
|
|
@@ -12220,9 +12266,9 @@
|
|
|
12220
12266
|
nodeTypeToName[nodeNamesToTypes[nodeName2]] = nodeName2;
|
|
12221
12267
|
});
|
|
12222
12268
|
function normaliseProps(serialNode) {
|
|
12223
|
-
var _serialNode$nodeName,
|
|
12269
|
+
var _serialNode$nodeName, _ref30, _serialNode$nodeType;
|
|
12224
12270
|
var nodeName2 = (_serialNode$nodeName = serialNode.nodeName) !== null && _serialNode$nodeName !== void 0 ? _serialNode$nodeName : nodeTypeToName[serialNode.nodeType];
|
|
12225
|
-
var nodeType = (
|
|
12271
|
+
var nodeType = (_ref30 = (_serialNode$nodeType = serialNode.nodeType) !== null && _serialNode$nodeType !== void 0 ? _serialNode$nodeType : nodeNamesToTypes[serialNode.nodeName]) !== null && _ref30 !== void 0 ? _ref30 : 1;
|
|
12226
12272
|
assert_default(typeof nodeType === 'number', 'nodeType has to be a number, got \''.concat(nodeType, '\''));
|
|
12227
12273
|
assert_default(typeof nodeName2 === 'string', 'nodeName has to be a string, got \''.concat(nodeName2, '\''));
|
|
12228
12274
|
nodeName2 = nodeName2.toLowerCase();
|
|
@@ -12243,8 +12289,8 @@
|
|
|
12243
12289
|
delete props.attributes;
|
|
12244
12290
|
return Object.freeze(props);
|
|
12245
12291
|
}
|
|
12246
|
-
function normaliseAttrs(
|
|
12247
|
-
var
|
|
12292
|
+
function normaliseAttrs(_ref31) {
|
|
12293
|
+
var _ref31$attributes = _ref31.attributes, attributes4 = _ref31$attributes === void 0 ? {} : _ref31$attributes;
|
|
12248
12294
|
var attrMap = {
|
|
12249
12295
|
htmlFor: 'for',
|
|
12250
12296
|
className: 'class'
|
|
@@ -12386,7 +12432,7 @@
|
|
|
12386
12432
|
}
|
|
12387
12433
|
var is_unsupported_role_default = isUnsupportedRole;
|
|
12388
12434
|
function isValidRole(role) {
|
|
12389
|
-
var
|
|
12435
|
+
var _ref32 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, allowAbstract = _ref32.allowAbstract, _ref32$flagUnsupporte = _ref32.flagUnsupported, flagUnsupported = _ref32$flagUnsupporte === void 0 ? false : _ref32$flagUnsupporte;
|
|
12390
12436
|
var roleDefinition = standards_default.ariaRoles[role];
|
|
12391
12437
|
var isRoleUnsupported = is_unsupported_role_default(role);
|
|
12392
12438
|
if (!roleDefinition || flagUnsupported && isRoleUnsupported) {
|
|
@@ -12396,7 +12442,7 @@
|
|
|
12396
12442
|
}
|
|
12397
12443
|
var is_valid_role_default = isValidRole;
|
|
12398
12444
|
function getExplicitRole(vNode) {
|
|
12399
|
-
var
|
|
12445
|
+
var _ref33 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, fallback = _ref33.fallback, abstracts = _ref33.abstracts, dpub = _ref33.dpub;
|
|
12400
12446
|
vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
|
|
12401
12447
|
if (vNode.props.nodeType !== 1) {
|
|
12402
12448
|
return null;
|
|
@@ -12667,6 +12713,10 @@
|
|
|
12667
12713
|
return matcher === someString;
|
|
12668
12714
|
}
|
|
12669
12715
|
var from_primative_default = fromPrimative;
|
|
12716
|
+
function hasAccessibleName2(vNode, matcher) {
|
|
12717
|
+
return from_primative_default(!!accessible_text_virtual_default(vNode), matcher);
|
|
12718
|
+
}
|
|
12719
|
+
var has_accessible_name_default = hasAccessibleName2;
|
|
12670
12720
|
function fromFunction(getValue, matcher) {
|
|
12671
12721
|
var matcherType = _typeof(matcher);
|
|
12672
12722
|
if (matcherType !== 'object' || Array.isArray(matcher) || matcher instanceof RegExp) {
|
|
@@ -12719,6 +12769,7 @@
|
|
|
12719
12769
|
}
|
|
12720
12770
|
var semantic_role_default = semanticRole;
|
|
12721
12771
|
var matchers = {
|
|
12772
|
+
hasAccessibleName: has_accessible_name_default,
|
|
12722
12773
|
attributes: attributes_default,
|
|
12723
12774
|
condition: condition_default,
|
|
12724
12775
|
explicitRole: explicit_role_default,
|
|
@@ -12753,6 +12804,7 @@
|
|
|
12753
12804
|
return from_definition_default(vNode, definition);
|
|
12754
12805
|
}
|
|
12755
12806
|
var matches_default2 = matches5;
|
|
12807
|
+
matches_default2.hasAccessibleName = has_accessible_name_default;
|
|
12756
12808
|
matches_default2.attributes = attributes_default;
|
|
12757
12809
|
matches_default2.condition = condition_default;
|
|
12758
12810
|
matches_default2.explicitRole = explicit_role_default;
|
|
@@ -12765,6 +12817,7 @@
|
|
|
12765
12817
|
matches_default2.semanticRole = semantic_role_default;
|
|
12766
12818
|
var matches_default3 = matches_default2;
|
|
12767
12819
|
function getElementSpec(vNode) {
|
|
12820
|
+
var _ref34 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref34$noMatchAccessi = _ref34.noMatchAccessibleName, noMatchAccessibleName = _ref34$noMatchAccessi === void 0 ? false : _ref34$noMatchAccessi;
|
|
12768
12821
|
var standard = standards_default.htmlElms[vNode.props.nodeName];
|
|
12769
12822
|
if (!standard) {
|
|
12770
12823
|
return {};
|
|
@@ -12778,6 +12831,12 @@
|
|
|
12778
12831
|
continue;
|
|
12779
12832
|
}
|
|
12780
12833
|
var _variant$variantName = variant[variantName], matches14 = _variant$variantName.matches, props = _objectWithoutProperties(_variant$variantName, _excluded4);
|
|
12834
|
+
var matchProperties = Array.isArray(matches14) ? matches14 : [ matches14 ];
|
|
12835
|
+
for (var _i12 = 0; _i12 < matchProperties.length && noMatchAccessibleName; _i12++) {
|
|
12836
|
+
if (matchProperties[_i12].hasOwnProperty('hasAccessibleName')) {
|
|
12837
|
+
return standard;
|
|
12838
|
+
}
|
|
12839
|
+
}
|
|
12781
12840
|
if (matches_default3(vNode, matches14)) {
|
|
12782
12841
|
for (var propName in props) {
|
|
12783
12842
|
if (props.hasOwnProperty(propName)) {
|
|
@@ -12795,7 +12854,7 @@
|
|
|
12795
12854
|
}
|
|
12796
12855
|
var get_element_spec_default = getElementSpec;
|
|
12797
12856
|
function implicitRole2(node) {
|
|
12798
|
-
var
|
|
12857
|
+
var _ref35 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref35.chromium;
|
|
12799
12858
|
var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
|
|
12800
12859
|
node = vNode.actualNode;
|
|
12801
12860
|
if (!vNode) {
|
|
@@ -12845,8 +12904,8 @@
|
|
|
12845
12904
|
}
|
|
12846
12905
|
return getInheritedRole(vNode.parent, explicitRoleOptions);
|
|
12847
12906
|
}
|
|
12848
|
-
function resolveImplicitRole(vNode,
|
|
12849
|
-
var chromium =
|
|
12907
|
+
function resolveImplicitRole(vNode, _ref36) {
|
|
12908
|
+
var chromium = _ref36.chromium, explicitRoleOptions = _objectWithoutProperties(_ref36, _excluded5);
|
|
12850
12909
|
var implicitRole3 = implicit_role_default(vNode, {
|
|
12851
12910
|
chromium: chromium
|
|
12852
12911
|
});
|
|
@@ -12866,8 +12925,8 @@
|
|
|
12866
12925
|
return hasGlobalAria || is_focusable_default(vNode);
|
|
12867
12926
|
}
|
|
12868
12927
|
function resolveRole(node) {
|
|
12869
|
-
var
|
|
12870
|
-
var noImplicit =
|
|
12928
|
+
var _ref37 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12929
|
+
var noImplicit = _ref37.noImplicit, roleOptions = _objectWithoutProperties(_ref37, _excluded6);
|
|
12871
12930
|
var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
|
|
12872
12931
|
if (vNode.props.nodeType !== 1) {
|
|
12873
12932
|
return null;
|
|
@@ -12885,8 +12944,8 @@
|
|
|
12885
12944
|
return explicitRole2;
|
|
12886
12945
|
}
|
|
12887
12946
|
function getRole(node) {
|
|
12888
|
-
var
|
|
12889
|
-
var noPresentational =
|
|
12947
|
+
var _ref38 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12948
|
+
var noPresentational = _ref38.noPresentational, options = _objectWithoutProperties(_ref38, _excluded7);
|
|
12890
12949
|
var role = resolveRole(node, options);
|
|
12891
12950
|
if (noPresentational && [ 'presentation', 'none' ].includes(role)) {
|
|
12892
12951
|
return null;
|
|
@@ -12907,7 +12966,7 @@
|
|
|
12907
12966
|
}
|
|
12908
12967
|
var title_text_default = titleText;
|
|
12909
12968
|
function namedFromContents(vNode) {
|
|
12910
|
-
var
|
|
12969
|
+
var _ref39 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref39.strict;
|
|
12911
12970
|
vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
|
|
12912
12971
|
if (vNode.props.nodeType !== 1) {
|
|
12913
12972
|
return false;
|
|
@@ -12944,7 +13003,9 @@
|
|
|
12944
13003
|
var alreadyProcessed2 = accessible_text_virtual_default.alreadyProcessed;
|
|
12945
13004
|
context5.startNode = context5.startNode || virtualNode;
|
|
12946
13005
|
var _context = context5, strict = _context.strict, inControlContext = _context.inControlContext, inLabelledByContext = _context.inLabelledByContext;
|
|
12947
|
-
var _get_element_spec_def2 = get_element_spec_default(virtualNode
|
|
13006
|
+
var _get_element_spec_def2 = get_element_spec_default(virtualNode, {
|
|
13007
|
+
noMatchAccessibleName: true
|
|
13008
|
+
}), contentTypes = _get_element_spec_def2.contentTypes;
|
|
12948
13009
|
if (alreadyProcessed2(virtualNode, context5) || virtualNode.props.nodeType !== 1 || contentTypes !== null && contentTypes !== void 0 && contentTypes.includes('embedded')) {
|
|
12949
13010
|
return '';
|
|
12950
13011
|
}
|
|
@@ -13030,12 +13091,12 @@
|
|
|
13030
13091
|
button: ''
|
|
13031
13092
|
};
|
|
13032
13093
|
var nativeTextMethods = {
|
|
13033
|
-
valueText: function valueText(
|
|
13034
|
-
var actualNode =
|
|
13094
|
+
valueText: function valueText(_ref40) {
|
|
13095
|
+
var actualNode = _ref40.actualNode;
|
|
13035
13096
|
return actualNode.value || '';
|
|
13036
13097
|
},
|
|
13037
|
-
buttonDefaultText: function buttonDefaultText(
|
|
13038
|
-
var actualNode =
|
|
13098
|
+
buttonDefaultText: function buttonDefaultText(_ref41) {
|
|
13099
|
+
var actualNode = _ref41.actualNode;
|
|
13039
13100
|
return defaultButtonValues[actualNode.type] || '';
|
|
13040
13101
|
},
|
|
13041
13102
|
tableCaptionText: descendantText.bind(null, 'caption'),
|
|
@@ -13055,8 +13116,8 @@
|
|
|
13055
13116
|
function attrText(attr, vNode) {
|
|
13056
13117
|
return vNode.attr(attr) || '';
|
|
13057
13118
|
}
|
|
13058
|
-
function descendantText(nodeName2,
|
|
13059
|
-
var actualNode =
|
|
13119
|
+
function descendantText(nodeName2, _ref42, context5) {
|
|
13120
|
+
var actualNode = _ref42.actualNode;
|
|
13060
13121
|
nodeName2 = nodeName2.toLowerCase();
|
|
13061
13122
|
var nodeNames2 = [ nodeName2, actualNode.nodeName.toLowerCase() ].join(',');
|
|
13062
13123
|
var candidate = actualNode.querySelector(nodeNames2);
|
|
@@ -13082,7 +13143,9 @@
|
|
|
13082
13143
|
return accName;
|
|
13083
13144
|
}
|
|
13084
13145
|
function findTextMethods(virtualNode) {
|
|
13085
|
-
var elmSpec = get_element_spec_default(virtualNode
|
|
13146
|
+
var elmSpec = get_element_spec_default(virtualNode, {
|
|
13147
|
+
noMatchAccessibleName: true
|
|
13148
|
+
});
|
|
13086
13149
|
var methods = elmSpec.namingMethods || [];
|
|
13087
13150
|
return methods.map(function(methodName) {
|
|
13088
13151
|
return native_text_methods_default[methodName];
|
|
@@ -13169,7 +13232,7 @@
|
|
|
13169
13232
|
}
|
|
13170
13233
|
var options = query_selector_all_default(vNode, 'option');
|
|
13171
13234
|
var selectedOptions = options.filter(function(option) {
|
|
13172
|
-
return option.
|
|
13235
|
+
return option.props.selected;
|
|
13173
13236
|
});
|
|
13174
13237
|
if (!selectedOptions.length) {
|
|
13175
13238
|
selectedOptions.push(options[0]);
|
|
@@ -13250,8 +13313,8 @@
|
|
|
13250
13313
|
}
|
|
13251
13314
|
return virtualNode.props.nodeValue;
|
|
13252
13315
|
}
|
|
13253
|
-
function shouldIgnoreHidden(
|
|
13254
|
-
var actualNode =
|
|
13316
|
+
function shouldIgnoreHidden(_ref43, context5) {
|
|
13317
|
+
var actualNode = _ref43.actualNode;
|
|
13255
13318
|
if (!actualNode) {
|
|
13256
13319
|
return false;
|
|
13257
13320
|
}
|
|
@@ -13542,7 +13605,7 @@
|
|
|
13542
13605
|
locations: [ 'billing', 'shipping' ]
|
|
13543
13606
|
};
|
|
13544
13607
|
function isValidAutocomplete(autocompleteValue) {
|
|
13545
|
-
var
|
|
13608
|
+
var _ref44 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref44$looseTyped = _ref44.looseTyped, looseTyped = _ref44$looseTyped === void 0 ? false : _ref44$looseTyped, _ref44$stateTerms = _ref44.stateTerms, stateTerms = _ref44$stateTerms === void 0 ? [] : _ref44$stateTerms, _ref44$locations = _ref44.locations, locations = _ref44$locations === void 0 ? [] : _ref44$locations, _ref44$qualifiers = _ref44.qualifiers, qualifiers = _ref44$qualifiers === void 0 ? [] : _ref44$qualifiers, _ref44$standaloneTerm = _ref44.standaloneTerms, standaloneTerms = _ref44$standaloneTerm === void 0 ? [] : _ref44$standaloneTerm, _ref44$qualifiedTerms = _ref44.qualifiedTerms, qualifiedTerms = _ref44$qualifiedTerms === void 0 ? [] : _ref44$qualifiedTerms;
|
|
13546
13609
|
autocompleteValue = autocompleteValue.toLowerCase().trim();
|
|
13547
13610
|
stateTerms = stateTerms.concat(_autocomplete.stateTerms);
|
|
13548
13611
|
if (stateTerms.includes(autocompleteValue) || autocompleteValue === '') {
|
|
@@ -13693,8 +13756,8 @@
|
|
|
13693
13756
|
idRefs[id] = idRefs[id] || [];
|
|
13694
13757
|
idRefs[id].push(node);
|
|
13695
13758
|
}
|
|
13696
|
-
for (var
|
|
13697
|
-
var attr = refAttrs[
|
|
13759
|
+
for (var _i13 = 0; _i13 < refAttrs.length; ++_i13) {
|
|
13760
|
+
var attr = refAttrs[_i13];
|
|
13698
13761
|
var attrValue = sanitize_default(node.getAttribute(attr) || '');
|
|
13699
13762
|
if (!attrValue) {
|
|
13700
13763
|
continue;
|
|
@@ -13706,8 +13769,8 @@
|
|
|
13706
13769
|
}
|
|
13707
13770
|
}
|
|
13708
13771
|
}
|
|
13709
|
-
for (var
|
|
13710
|
-
cacheIdRefs(node.children[
|
|
13772
|
+
for (var _i14 = 0; _i14 < node.children.length; _i14++) {
|
|
13773
|
+
cacheIdRefs(node.children[_i14], idRefs, refAttrs);
|
|
13711
13774
|
}
|
|
13712
13775
|
}
|
|
13713
13776
|
function getAccessibleRefs(node) {
|
|
@@ -15567,8 +15630,8 @@
|
|
|
15567
15630
|
nodeName: [ 'abbr', 'address', 'canvas', 'div', 'p', 'pre', 'blockquote', 'ins', 'del', 'output', 'span', 'table', 'tbody', 'thead', 'tfoot', 'td', 'em', 'strong', 'small', 's', 'cite', 'q', 'dfn', 'abbr', 'time', 'code', 'var', 'samp', 'kbd', 'sub', 'sup', 'i', 'b', 'u', 'mark', 'ruby', 'rt', 'rp', 'bdi', 'bdo', 'br', 'wbr', 'th', 'tr' ]
|
|
15568
15631
|
} ];
|
|
15569
15632
|
lookupTable.evaluateRoleForElement = {
|
|
15570
|
-
A: function A(
|
|
15571
|
-
var node =
|
|
15633
|
+
A: function A(_ref45) {
|
|
15634
|
+
var node = _ref45.node, out = _ref45.out;
|
|
15572
15635
|
if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
|
|
15573
15636
|
return true;
|
|
15574
15637
|
}
|
|
@@ -15577,19 +15640,19 @@
|
|
|
15577
15640
|
}
|
|
15578
15641
|
return true;
|
|
15579
15642
|
},
|
|
15580
|
-
AREA: function AREA(
|
|
15581
|
-
var node =
|
|
15643
|
+
AREA: function AREA(_ref46) {
|
|
15644
|
+
var node = _ref46.node;
|
|
15582
15645
|
return !node.href;
|
|
15583
15646
|
},
|
|
15584
|
-
BUTTON: function BUTTON(
|
|
15585
|
-
var node =
|
|
15647
|
+
BUTTON: function BUTTON(_ref47) {
|
|
15648
|
+
var node = _ref47.node, role = _ref47.role, out = _ref47.out;
|
|
15586
15649
|
if (node.getAttribute('type') === 'menu') {
|
|
15587
15650
|
return role === 'menuitem';
|
|
15588
15651
|
}
|
|
15589
15652
|
return out;
|
|
15590
15653
|
},
|
|
15591
|
-
IMG: function IMG(
|
|
15592
|
-
var node =
|
|
15654
|
+
IMG: function IMG(_ref48) {
|
|
15655
|
+
var node = _ref48.node, role = _ref48.role, out = _ref48.out;
|
|
15593
15656
|
switch (node.alt) {
|
|
15594
15657
|
case null:
|
|
15595
15658
|
return out;
|
|
@@ -15601,8 +15664,8 @@
|
|
|
15601
15664
|
return role !== 'presentation' && role !== 'none';
|
|
15602
15665
|
}
|
|
15603
15666
|
},
|
|
15604
|
-
INPUT: function INPUT(
|
|
15605
|
-
var node =
|
|
15667
|
+
INPUT: function INPUT(_ref49) {
|
|
15668
|
+
var node = _ref49.node, role = _ref49.role, out = _ref49.out;
|
|
15606
15669
|
switch (node.type) {
|
|
15607
15670
|
case 'button':
|
|
15608
15671
|
case 'image':
|
|
@@ -15632,32 +15695,32 @@
|
|
|
15632
15695
|
return false;
|
|
15633
15696
|
}
|
|
15634
15697
|
},
|
|
15635
|
-
LI: function LI(
|
|
15636
|
-
var node =
|
|
15698
|
+
LI: function LI(_ref50) {
|
|
15699
|
+
var node = _ref50.node, out = _ref50.out;
|
|
15637
15700
|
var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
|
|
15638
15701
|
if (hasImplicitListitemRole) {
|
|
15639
15702
|
return out;
|
|
15640
15703
|
}
|
|
15641
15704
|
return true;
|
|
15642
15705
|
},
|
|
15643
|
-
MENU: function MENU(
|
|
15644
|
-
var node =
|
|
15706
|
+
MENU: function MENU(_ref51) {
|
|
15707
|
+
var node = _ref51.node;
|
|
15645
15708
|
if (node.getAttribute('type') === 'context') {
|
|
15646
15709
|
return false;
|
|
15647
15710
|
}
|
|
15648
15711
|
return true;
|
|
15649
15712
|
},
|
|
15650
|
-
OPTION: function OPTION(
|
|
15651
|
-
var node =
|
|
15713
|
+
OPTION: function OPTION(_ref52) {
|
|
15714
|
+
var node = _ref52.node;
|
|
15652
15715
|
var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
|
|
15653
15716
|
return !withinOptionList;
|
|
15654
15717
|
},
|
|
15655
|
-
SELECT: function SELECT(
|
|
15656
|
-
var node =
|
|
15718
|
+
SELECT: function SELECT(_ref53) {
|
|
15719
|
+
var node = _ref53.node, role = _ref53.role;
|
|
15657
15720
|
return !node.multiple && node.size <= 1 && role === 'menu';
|
|
15658
15721
|
},
|
|
15659
|
-
SVG: function SVG(
|
|
15660
|
-
var node =
|
|
15722
|
+
SVG: function SVG(_ref54) {
|
|
15723
|
+
var node = _ref54.node, out = _ref54.out;
|
|
15661
15724
|
if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
|
|
15662
15725
|
return true;
|
|
15663
15726
|
}
|
|
@@ -15785,10 +15848,36 @@
|
|
|
15785
15848
|
if (Array.isArray(options[role])) {
|
|
15786
15849
|
allowed = unique_array_default(options[role].concat(allowed));
|
|
15787
15850
|
}
|
|
15851
|
+
var tableMap = cache_default.get('aria-allowed-attr-table');
|
|
15852
|
+
if (!tableMap) {
|
|
15853
|
+
tableMap = new WeakMap();
|
|
15854
|
+
cache_default.set('aria-allowed-attr-table', tableMap);
|
|
15855
|
+
}
|
|
15856
|
+
function validateRowAttrs() {
|
|
15857
|
+
if (virtualNode.parent && role === 'row') {
|
|
15858
|
+
var table5 = closest_default(virtualNode, 'table, [role="treegrid"], [role="table"], [role="grid"]');
|
|
15859
|
+
var tableRole = tableMap.get(table5);
|
|
15860
|
+
if (table5 && !tableRole) {
|
|
15861
|
+
tableRole = get_role_default(table5);
|
|
15862
|
+
tableMap.set(table5, tableRole);
|
|
15863
|
+
}
|
|
15864
|
+
if ([ 'table', 'grid' ].includes(tableRole) && role === 'row') {
|
|
15865
|
+
return true;
|
|
15866
|
+
}
|
|
15867
|
+
}
|
|
15868
|
+
}
|
|
15869
|
+
var ariaAttr = Array.isArray(options.validTreeRowAttrs) ? options.validTreeRowAttrs : [];
|
|
15870
|
+
var preChecks = {};
|
|
15871
|
+
ariaAttr.forEach(function(attr) {
|
|
15872
|
+
preChecks[attr] = validateRowAttrs;
|
|
15873
|
+
});
|
|
15788
15874
|
if (role && allowed) {
|
|
15789
|
-
for (var
|
|
15790
|
-
var attrName
|
|
15791
|
-
|
|
15875
|
+
for (var _i15 = 0; _i15 < attrs.length; _i15++) {
|
|
15876
|
+
var _preChecks$attrName;
|
|
15877
|
+
var attrName = attrs[_i15];
|
|
15878
|
+
if (validate_attr_default(attrName) && (_preChecks$attrName = preChecks[attrName]) !== null && _preChecks$attrName !== void 0 && _preChecks$attrName.call(preChecks)) {
|
|
15879
|
+
invalid.push(attrName + '="' + virtualNode.attr(attrName) + '"');
|
|
15880
|
+
} else if (validate_attr_default(attrName) && !allowed.includes(attrName)) {
|
|
15792
15881
|
invalid.push(attrName + '="' + virtualNode.attr(attrName) + '"');
|
|
15793
15882
|
}
|
|
15794
15883
|
}
|
|
@@ -15845,6 +15934,13 @@
|
|
|
15845
15934
|
return void 0;
|
|
15846
15935
|
}
|
|
15847
15936
|
if (idref) {
|
|
15937
|
+
if (!is_visible_default(idref, true)) {
|
|
15938
|
+
this.data({
|
|
15939
|
+
messageKey: 'hidden',
|
|
15940
|
+
values: token_list_default(attr2)
|
|
15941
|
+
});
|
|
15942
|
+
return false;
|
|
15943
|
+
}
|
|
15848
15944
|
return idref.getAttribute('role') === 'alert' || idref.getAttribute('aria-live') === 'assertive' || idref.getAttribute('aria-live') === 'polite' || token_list_default(virtualNode.attr('aria-describedby')).indexOf(attr2) > -1;
|
|
15849
15945
|
}
|
|
15850
15946
|
return;
|
|
@@ -15936,8 +16032,8 @@
|
|
|
15936
16032
|
required = unique_array_default(options[role], required);
|
|
15937
16033
|
}
|
|
15938
16034
|
if (role && required) {
|
|
15939
|
-
for (var
|
|
15940
|
-
var attr = required[
|
|
16035
|
+
for (var _i16 = 0, l = required.length; _i16 < l; _i16++) {
|
|
16036
|
+
var attr = required[_i16];
|
|
15941
16037
|
if (!virtualNode.attr(attr) && !(elmSpec.implicitAttrs && typeof elmSpec.implicitAttrs[attr] !== 'undefined')) {
|
|
15942
16038
|
missing.push(attr);
|
|
15943
16039
|
}
|
|
@@ -15958,8 +16054,8 @@
|
|
|
15958
16054
|
function getOwnedRoles(virtualNode, required) {
|
|
15959
16055
|
var ownedRoles = [];
|
|
15960
16056
|
var ownedElements = get_owned_virtual_default(virtualNode);
|
|
15961
|
-
var _loop4 = function _loop4(
|
|
15962
|
-
var ownedElement = ownedElements[
|
|
16057
|
+
var _loop4 = function _loop4(_i17) {
|
|
16058
|
+
var ownedElement = ownedElements[_i17];
|
|
15963
16059
|
var role = get_role_default(ownedElement, {
|
|
15964
16060
|
noPresentational: true
|
|
15965
16061
|
});
|
|
@@ -15971,14 +16067,14 @@
|
|
|
15971
16067
|
ownedRoles.push(role);
|
|
15972
16068
|
}
|
|
15973
16069
|
};
|
|
15974
|
-
for (var
|
|
15975
|
-
_loop4(
|
|
16070
|
+
for (var _i17 = 0; _i17 < ownedElements.length; _i17++) {
|
|
16071
|
+
_loop4(_i17);
|
|
15976
16072
|
}
|
|
15977
16073
|
return ownedRoles;
|
|
15978
16074
|
}
|
|
15979
16075
|
function missingRequiredChildren(virtualNode, role, required, ownedRoles) {
|
|
15980
|
-
for (var
|
|
15981
|
-
var ownedRole = ownedRoles[
|
|
16076
|
+
for (var _i18 = 0; _i18 < ownedRoles.length; _i18++) {
|
|
16077
|
+
var ownedRole = ownedRoles[_i18];
|
|
15982
16078
|
if (required.includes(ownedRole)) {
|
|
15983
16079
|
required = required.filter(function(requiredRole) {
|
|
15984
16080
|
return requiredRole !== ownedRole;
|
|
@@ -16065,8 +16161,8 @@
|
|
|
16065
16161
|
}
|
|
16066
16162
|
var owners = getAriaOwners(node);
|
|
16067
16163
|
if (owners) {
|
|
16068
|
-
for (var
|
|
16069
|
-
missingParents = getMissingContext(get_node_from_tree_default(owners[
|
|
16164
|
+
for (var _i19 = 0, l = owners.length; _i19 < l; _i19++) {
|
|
16165
|
+
missingParents = getMissingContext(get_node_from_tree_default(owners[_i19]), ownGroupRoles, missingParents, true);
|
|
16070
16166
|
if (!missingParents) {
|
|
16071
16167
|
return true;
|
|
16072
16168
|
}
|
|
@@ -16774,8 +16870,11 @@
|
|
|
16774
16870
|
flattenColors: function flattenColors() {
|
|
16775
16871
|
return flatten_colors_default;
|
|
16776
16872
|
},
|
|
16873
|
+
flattenShadowColors: function flattenShadowColors() {
|
|
16874
|
+
return flatten_shadow_colors_default;
|
|
16875
|
+
},
|
|
16777
16876
|
getBackgroundColor: function getBackgroundColor() {
|
|
16778
|
-
return
|
|
16877
|
+
return _getBackgroundColor;
|
|
16779
16878
|
},
|
|
16780
16879
|
getBackgroundStack: function getBackgroundStack() {
|
|
16781
16880
|
return get_background_stack_default;
|
|
@@ -16891,7 +16990,24 @@
|
|
|
16891
16990
|
return null;
|
|
16892
16991
|
}
|
|
16893
16992
|
var filtered_rect_stack_default = filteredRectStack;
|
|
16993
|
+
var blendFunctions = {
|
|
16994
|
+
normal: function normal(Cb, Cs) {
|
|
16995
|
+
return Cs;
|
|
16996
|
+
}
|
|
16997
|
+
};
|
|
16998
|
+
function simpleAlphaCompositing(Cs, \u03b1s, Cb, \u03b1b, blendMode) {
|
|
16999
|
+
return Math.round(\u03b1s * (1 - \u03b1b) * Cs + \u03b1s * \u03b1b * blendFunctions[blendMode](Cb, Cs) + (1 - \u03b1s) * \u03b1b * Cb);
|
|
17000
|
+
}
|
|
16894
17001
|
function flattenColors(fgColor, bgColor) {
|
|
17002
|
+
var blendMode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'normal';
|
|
17003
|
+
var r = simpleAlphaCompositing(fgColor.red, fgColor.alpha, bgColor.red, bgColor.alpha, blendMode);
|
|
17004
|
+
var g = simpleAlphaCompositing(fgColor.green, fgColor.alpha, bgColor.green, bgColor.alpha, blendMode);
|
|
17005
|
+
var b = simpleAlphaCompositing(fgColor.blue, fgColor.alpha, bgColor.blue, bgColor.alpha, blendMode);
|
|
17006
|
+
var a = Math.max(0, Math.min(fgColor.alpha + bgColor.alpha * (1 - fgColor.alpha), 1));
|
|
17007
|
+
return new color_default(r, g, b, a);
|
|
17008
|
+
}
|
|
17009
|
+
var flatten_colors_default = flattenColors;
|
|
17010
|
+
function flattenColors2(fgColor, bgColor) {
|
|
16895
17011
|
var alpha = fgColor.alpha;
|
|
16896
17012
|
var r = (1 - alpha) * bgColor.red + alpha * fgColor.red;
|
|
16897
17013
|
var g = (1 - alpha) * bgColor.green + alpha * fgColor.green;
|
|
@@ -16899,7 +17015,7 @@
|
|
|
16899
17015
|
var a = fgColor.alpha + bgColor.alpha * (1 - fgColor.alpha);
|
|
16900
17016
|
return new color_default(r, g, b, a);
|
|
16901
17017
|
}
|
|
16902
|
-
var
|
|
17018
|
+
var flatten_shadow_colors_default = flattenColors2;
|
|
16903
17019
|
function contentOverlapping(targetElement, bgNode) {
|
|
16904
17020
|
var targetRect = targetElement.getClientRects()[0];
|
|
16905
17021
|
var obscuringElements = shadow_elements_from_point_default(targetRect.left, targetRect.top);
|
|
@@ -16928,13 +17044,17 @@
|
|
|
16928
17044
|
function sortPageBackground(elmStack) {
|
|
16929
17045
|
var bodyIndex = elmStack.indexOf(document.body);
|
|
16930
17046
|
var bgNodes = elmStack;
|
|
16931
|
-
var
|
|
16932
|
-
if (
|
|
17047
|
+
var htmlBgColor = get_own_background_color_default(window.getComputedStyle(document.documentElement));
|
|
17048
|
+
if (bodyIndex > 1 && htmlBgColor.alpha === 0 && !element_has_image_default(document.documentElement)) {
|
|
16933
17049
|
if (bodyIndex > 1) {
|
|
16934
17050
|
bgNodes.splice(bodyIndex, 1);
|
|
17051
|
+
bgNodes.push(document.body);
|
|
17052
|
+
}
|
|
17053
|
+
var htmlIndex = bgNodes.indexOf(document.documentElement);
|
|
17054
|
+
if (htmlIndex > 0) {
|
|
17055
|
+
bgNodes.splice(htmlIndex, 1);
|
|
17056
|
+
bgNodes.push(document.documentElement);
|
|
16935
17057
|
}
|
|
16936
|
-
bgNodes.splice(elmStack.indexOf(document.documentElement), 1);
|
|
16937
|
-
bgNodes.push(document.body);
|
|
16938
17058
|
}
|
|
16939
17059
|
return bgNodes;
|
|
16940
17060
|
}
|
|
@@ -16954,7 +17074,7 @@
|
|
|
16954
17074
|
}
|
|
16955
17075
|
var get_background_stack_default = getBackgroundStack;
|
|
16956
17076
|
function getTextShadowColors(node) {
|
|
16957
|
-
var
|
|
17077
|
+
var _ref55 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref55.minRatio, maxRatio = _ref55.maxRatio;
|
|
16958
17078
|
var style = window.getComputedStyle(node);
|
|
16959
17079
|
var textShadow = style.getPropertyValue('text-shadow');
|
|
16960
17080
|
if (textShadow === 'none') {
|
|
@@ -16965,19 +17085,19 @@
|
|
|
16965
17085
|
assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
|
|
16966
17086
|
var shadowColors = [];
|
|
16967
17087
|
var shadows = parseTextShadows(textShadow);
|
|
16968
|
-
shadows.forEach(function(
|
|
16969
|
-
var colorStr =
|
|
17088
|
+
shadows.forEach(function(_ref56) {
|
|
17089
|
+
var colorStr = _ref56.colorStr, pixels = _ref56.pixels;
|
|
16970
17090
|
colorStr = colorStr || style.getPropertyValue('color');
|
|
16971
17091
|
var _pixels = _slicedToArray(pixels, 3), offsetY = _pixels[0], offsetX = _pixels[1], _pixels$ = _pixels[2], blurRadius = _pixels$ === void 0 ? 0 : _pixels$;
|
|
16972
17092
|
if ((!minRatio || blurRadius >= fontSize * minRatio) && (!maxRatio || blurRadius < fontSize * maxRatio)) {
|
|
16973
|
-
var
|
|
17093
|
+
var color11 = textShadowColor({
|
|
16974
17094
|
colorStr: colorStr,
|
|
16975
17095
|
offsetY: offsetY,
|
|
16976
17096
|
offsetX: offsetX,
|
|
16977
17097
|
blurRadius: blurRadius,
|
|
16978
17098
|
fontSize: fontSize
|
|
16979
17099
|
});
|
|
16980
|
-
shadowColors.push(
|
|
17100
|
+
shadowColors.push(color11);
|
|
16981
17101
|
}
|
|
16982
17102
|
});
|
|
16983
17103
|
return shadowColors;
|
|
@@ -17016,8 +17136,8 @@
|
|
|
17016
17136
|
}
|
|
17017
17137
|
return shadows;
|
|
17018
17138
|
}
|
|
17019
|
-
function textShadowColor(
|
|
17020
|
-
var colorStr =
|
|
17139
|
+
function textShadowColor(_ref57) {
|
|
17140
|
+
var colorStr = _ref57.colorStr, offsetX = _ref57.offsetX, offsetY = _ref57.offsetY, blurRadius = _ref57.blurRadius, fontSize = _ref57.fontSize;
|
|
17021
17141
|
if (offsetX > blurRadius || offsetY > blurRadius) {
|
|
17022
17142
|
return new color_default(0, 0, 0, 0);
|
|
17023
17143
|
}
|
|
@@ -17034,19 +17154,16 @@
|
|
|
17034
17154
|
return .185 / (relativeBlur + .4);
|
|
17035
17155
|
}
|
|
17036
17156
|
var get_text_shadow_colors_default = getTextShadowColors;
|
|
17037
|
-
function
|
|
17038
|
-
var
|
|
17039
|
-
if (obscured) {
|
|
17040
|
-
incomplete_data_default.set('bgColor', 'elmPartiallyObscured');
|
|
17041
|
-
}
|
|
17042
|
-
return obscured;
|
|
17043
|
-
}
|
|
17044
|
-
function getBackgroundColor(elm) {
|
|
17157
|
+
function _getBackgroundColor(elm) {
|
|
17158
|
+
var _bgColors;
|
|
17045
17159
|
var bgElms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
17046
17160
|
var shadowOutlineEmMax = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : .1;
|
|
17047
17161
|
var bgColors = get_text_shadow_colors_default(elm, {
|
|
17048
17162
|
minRatio: shadowOutlineEmMax
|
|
17049
17163
|
});
|
|
17164
|
+
if (bgColors.length) {
|
|
17165
|
+
bgColors = [ bgColors.reduce(flatten_shadow_colors_default) ];
|
|
17166
|
+
}
|
|
17050
17167
|
var elmStack = get_background_stack_default(elm);
|
|
17051
17168
|
(elmStack || []).some(function(bgElm) {
|
|
17052
17169
|
var bgElmStyle = window.getComputedStyle(bgElm);
|
|
@@ -17058,7 +17175,7 @@
|
|
|
17058
17175
|
}
|
|
17059
17176
|
if (bgColor.alpha !== 0) {
|
|
17060
17177
|
bgElms.push(bgElm);
|
|
17061
|
-
bgColors.
|
|
17178
|
+
bgColors.unshift(bgColor);
|
|
17062
17179
|
return bgColor.alpha === 1;
|
|
17063
17180
|
} else {
|
|
17064
17181
|
return false;
|
|
@@ -17067,11 +17184,40 @@
|
|
|
17067
17184
|
if (bgColors === null || elmStack === null) {
|
|
17068
17185
|
return null;
|
|
17069
17186
|
}
|
|
17070
|
-
|
|
17071
|
-
|
|
17187
|
+
var pageBgs = getPageBackgroundColors(elm, elmStack.includes(document.body));
|
|
17188
|
+
(_bgColors = bgColors).unshift.apply(_bgColors, _toConsumableArray(pageBgs));
|
|
17189
|
+
var colors = bgColors.reduce(function(bgColor, fgColor) {
|
|
17190
|
+
return flatten_colors_default(fgColor, bgColor);
|
|
17191
|
+
});
|
|
17072
17192
|
return colors;
|
|
17073
17193
|
}
|
|
17074
|
-
|
|
17194
|
+
function elmPartiallyObscured(elm, bgElm, bgColor) {
|
|
17195
|
+
var obscured = elm !== bgElm && !_visuallyContains(elm, bgElm) && bgColor.alpha !== 0;
|
|
17196
|
+
if (obscured) {
|
|
17197
|
+
incomplete_data_default.set('bgColor', 'elmPartiallyObscured');
|
|
17198
|
+
}
|
|
17199
|
+
return obscured;
|
|
17200
|
+
}
|
|
17201
|
+
function getPageBackgroundColors(elm, stackContainsBody) {
|
|
17202
|
+
var pageColors = [];
|
|
17203
|
+
if (!stackContainsBody) {
|
|
17204
|
+
var html = document.documentElement;
|
|
17205
|
+
var body = document.body;
|
|
17206
|
+
var htmlStyle = window.getComputedStyle(html);
|
|
17207
|
+
var bodyStyle = window.getComputedStyle(body);
|
|
17208
|
+
var htmlBgColor = get_own_background_color_default(htmlStyle);
|
|
17209
|
+
var bodyBgColor = get_own_background_color_default(bodyStyle);
|
|
17210
|
+
var bodyBgColorApplies = bodyBgColor.alpha !== 0 && _visuallyContains(elm, body);
|
|
17211
|
+
if (bodyBgColor.alpha !== 0 && htmlBgColor.alpha === 0 || bodyBgColorApplies && bodyBgColor.alpha !== 1) {
|
|
17212
|
+
pageColors.unshift(bodyBgColor);
|
|
17213
|
+
}
|
|
17214
|
+
if (htmlBgColor.alpha !== 0 && (!bodyBgColorApplies || bodyBgColorApplies && bodyBgColor.alpha !== 1)) {
|
|
17215
|
+
pageColors.unshift(htmlBgColor);
|
|
17216
|
+
}
|
|
17217
|
+
}
|
|
17218
|
+
pageColors.unshift(new color_default(255, 255, 255, 1));
|
|
17219
|
+
return pageColors;
|
|
17220
|
+
}
|
|
17075
17221
|
function getContrast(bgColor, fgColor) {
|
|
17076
17222
|
if (!fgColor || !bgColor) {
|
|
17077
17223
|
return null;
|
|
@@ -17110,7 +17256,7 @@
|
|
|
17110
17256
|
return fgColor;
|
|
17111
17257
|
}
|
|
17112
17258
|
if (!bgColor) {
|
|
17113
|
-
bgColor =
|
|
17259
|
+
bgColor = _getBackgroundColor(node, []);
|
|
17114
17260
|
}
|
|
17115
17261
|
if (bgColor === null) {
|
|
17116
17262
|
var reason = incomplete_data_default.get('bgColor');
|
|
@@ -17121,7 +17267,7 @@
|
|
|
17121
17267
|
var textShadowColors = get_text_shadow_colors_default(node, {
|
|
17122
17268
|
minRatio: 0
|
|
17123
17269
|
});
|
|
17124
|
-
return [ fgColor ].concat(_toConsumableArray(textShadowColors), [ bgColor ]).reduce(
|
|
17270
|
+
return [ fgColor ].concat(_toConsumableArray(textShadowColors), [ bgColor ]).reduce(flatten_shadow_colors_default);
|
|
17125
17271
|
}
|
|
17126
17272
|
return flatten_colors_default(fgColor, bgColor);
|
|
17127
17273
|
}
|
|
@@ -17161,7 +17307,7 @@
|
|
|
17161
17307
|
return void 0;
|
|
17162
17308
|
}
|
|
17163
17309
|
var bgNodes = [];
|
|
17164
|
-
var bgColor =
|
|
17310
|
+
var bgColor = _getBackgroundColor(node, bgNodes, shadowOutlineEmMax);
|
|
17165
17311
|
var fgColor = get_foreground_color_default(node, false, bgColor);
|
|
17166
17312
|
var shadowColors = get_text_shadow_colors_default(node, {
|
|
17167
17313
|
minRatio: .001,
|
|
@@ -17177,7 +17323,7 @@
|
|
|
17177
17323
|
if (shadowColors.length === 0) {
|
|
17178
17324
|
contrast = get_contrast_default(bgColor, fgColor);
|
|
17179
17325
|
} else if (fgColor && bgColor) {
|
|
17180
|
-
shadowColor = [].concat(_toConsumableArray(shadowColors), [ bgColor ]).reduce(
|
|
17326
|
+
shadowColor = [].concat(_toConsumableArray(shadowColors), [ bgColor ]).reduce(flatten_shadow_colors_default);
|
|
17181
17327
|
var bgContrast = get_contrast_default(bgColor, shadowColor);
|
|
17182
17328
|
var fgContrast = get_contrast_default(shadowColor, fgColor);
|
|
17183
17329
|
contrast = Math.max(bgContrast, fgContrast);
|
|
@@ -17185,7 +17331,7 @@
|
|
|
17185
17331
|
}
|
|
17186
17332
|
var ptSize = Math.ceil(fontSize * 72) / 96;
|
|
17187
17333
|
var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
|
|
17188
|
-
var
|
|
17334
|
+
var _ref58 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref58.expected, minThreshold = _ref58.minThreshold, maxThreshold = _ref58.maxThreshold;
|
|
17189
17335
|
var isValid = contrast > expected;
|
|
17190
17336
|
if (typeof minThreshold === 'number' && contrast < minThreshold || typeof maxThreshold === 'number' && contrast > maxThreshold) {
|
|
17191
17337
|
return true;
|
|
@@ -17194,14 +17340,14 @@
|
|
|
17194
17340
|
var missing;
|
|
17195
17341
|
if (bgColor === null) {
|
|
17196
17342
|
missing = incomplete_data_default.get('bgColor');
|
|
17197
|
-
} else {
|
|
17343
|
+
} else if (!isValid) {
|
|
17198
17344
|
missing = contrastContributor;
|
|
17199
17345
|
}
|
|
17200
17346
|
var equalRatio = truncatedResult === 1;
|
|
17201
17347
|
var shortTextContent = visibleText.length === 1;
|
|
17202
17348
|
if (equalRatio) {
|
|
17203
17349
|
missing = incomplete_data_default.set('bgColor', 'equalRatio');
|
|
17204
|
-
} else if (shortTextContent && !ignoreLength) {
|
|
17350
|
+
} else if (!isValid && shortTextContent && !ignoreLength) {
|
|
17205
17351
|
missing = 'shortTextContent';
|
|
17206
17352
|
}
|
|
17207
17353
|
this.data({
|
|
@@ -17225,8 +17371,8 @@
|
|
|
17225
17371
|
}
|
|
17226
17372
|
return isValid;
|
|
17227
17373
|
}
|
|
17228
|
-
function findPseudoElement(vNode,
|
|
17229
|
-
var
|
|
17374
|
+
function findPseudoElement(vNode, _ref59) {
|
|
17375
|
+
var _ref59$pseudoSizeThre = _ref59.pseudoSizeThreshold, pseudoSizeThreshold = _ref59$pseudoSizeThre === void 0 ? .25 : _ref59$pseudoSizeThre, _ref59$ignorePseudo = _ref59.ignorePseudo, ignorePseudo = _ref59$ignorePseudo === void 0 ? false : _ref59$ignorePseudo;
|
|
17230
17376
|
if (ignorePseudo) {
|
|
17231
17377
|
return;
|
|
17232
17378
|
}
|
|
@@ -17268,7 +17414,7 @@
|
|
|
17268
17414
|
}
|
|
17269
17415
|
function parseUnit(str) {
|
|
17270
17416
|
var unitRegex = /^([0-9.]+)([a-z]+)$/i;
|
|
17271
|
-
var
|
|
17417
|
+
var _ref60 = str.match(unitRegex) || [], _ref61 = _slicedToArray(_ref60, 3), _ref61$ = _ref61[1], value = _ref61$ === void 0 ? '' : _ref61$, _ref61$2 = _ref61[2], unit = _ref61$2 === void 0 ? '' : _ref61$2;
|
|
17272
17418
|
return {
|
|
17273
17419
|
value: parseFloat(value),
|
|
17274
17420
|
unit: unit.toLowerCase()
|
|
@@ -17313,8 +17459,8 @@
|
|
|
17313
17459
|
incomplete_data_default.clear();
|
|
17314
17460
|
return void 0;
|
|
17315
17461
|
}
|
|
17316
|
-
nodeColor =
|
|
17317
|
-
parentColor =
|
|
17462
|
+
nodeColor = _getBackgroundColor(node);
|
|
17463
|
+
parentColor = _getBackgroundColor(parentBlock);
|
|
17318
17464
|
if (!nodeColor || !parentColor || getContrast2(nodeColor, parentColor) >= 3) {
|
|
17319
17465
|
var reason;
|
|
17320
17466
|
if (!nodeColor || !parentColor) {
|
|
@@ -17511,14 +17657,14 @@
|
|
|
17511
17657
|
}
|
|
17512
17658
|
function getHeadingOrder(results) {
|
|
17513
17659
|
results = _toConsumableArray(results);
|
|
17514
|
-
results.sort(function(
|
|
17515
|
-
var nodeA =
|
|
17516
|
-
var nodeB =
|
|
17660
|
+
results.sort(function(_ref62, _ref63) {
|
|
17661
|
+
var nodeA = _ref62.node;
|
|
17662
|
+
var nodeB = _ref63.node;
|
|
17517
17663
|
return nodeA.ancestry.length - nodeB.ancestry.length;
|
|
17518
17664
|
});
|
|
17519
17665
|
var headingOrder = results.reduce(mergeHeadingOrder, []);
|
|
17520
|
-
return headingOrder.filter(function(
|
|
17521
|
-
var level =
|
|
17666
|
+
return headingOrder.filter(function(_ref64) {
|
|
17667
|
+
var level = _ref64.level;
|
|
17522
17668
|
return level !== -1;
|
|
17523
17669
|
});
|
|
17524
17670
|
}
|
|
@@ -17569,7 +17715,7 @@
|
|
|
17569
17715
|
var headingRole = role && role.includes('heading');
|
|
17570
17716
|
var ariaHeadingLevel = vNode.attr('aria-level');
|
|
17571
17717
|
var ariaLevel = parseInt(ariaHeadingLevel, 10);
|
|
17572
|
-
var
|
|
17718
|
+
var _ref65 = vNode.props.nodeName.match(/h(\d)/) || [], _ref66 = _slicedToArray(_ref65, 2), headingLevel = _ref66[1];
|
|
17573
17719
|
if (!headingRole) {
|
|
17574
17720
|
return -1;
|
|
17575
17721
|
}
|
|
@@ -17635,8 +17781,8 @@
|
|
|
17635
17781
|
if (results.length < 2) {
|
|
17636
17782
|
return results;
|
|
17637
17783
|
}
|
|
17638
|
-
var incompleteResults = results.filter(function(
|
|
17639
|
-
var result =
|
|
17784
|
+
var incompleteResults = results.filter(function(_ref67) {
|
|
17785
|
+
var result = _ref67.result;
|
|
17640
17786
|
return result !== void 0;
|
|
17641
17787
|
});
|
|
17642
17788
|
var uniqueResults = [];
|
|
@@ -17648,12 +17794,12 @@
|
|
|
17648
17794
|
if (nameMap[name]) {
|
|
17649
17795
|
return 'continue';
|
|
17650
17796
|
}
|
|
17651
|
-
var sameNameResults = incompleteResults.filter(function(
|
|
17652
|
-
var data2 =
|
|
17797
|
+
var sameNameResults = incompleteResults.filter(function(_ref68, resultNum) {
|
|
17798
|
+
var data2 = _ref68.data;
|
|
17653
17799
|
return data2.name === name && resultNum !== index;
|
|
17654
17800
|
});
|
|
17655
|
-
var isSameUrl = sameNameResults.every(function(
|
|
17656
|
-
var data2 =
|
|
17801
|
+
var isSameUrl = sameNameResults.every(function(_ref69) {
|
|
17802
|
+
var data2 = _ref69.data;
|
|
17657
17803
|
return isIdenticalObject(data2.urlProps, urlProps);
|
|
17658
17804
|
});
|
|
17659
17805
|
if (sameNameResults.length && !isSameUrl) {
|
|
@@ -17783,7 +17929,7 @@
|
|
|
17783
17929
|
function internalLinkPresentEvaluate(node, options, virtualNode) {
|
|
17784
17930
|
var links = query_selector_all_default(virtualNode, 'a[href]');
|
|
17785
17931
|
return links.some(function(vLink) {
|
|
17786
|
-
return /^#[^/!]/.test(vLink.
|
|
17932
|
+
return /^#[^/!]/.test(vLink.attr('href'));
|
|
17787
17933
|
});
|
|
17788
17934
|
}
|
|
17789
17935
|
var internal_link_present_evaluate_default = internalLinkPresentEvaluate;
|
|
@@ -17814,16 +17960,16 @@
|
|
|
17814
17960
|
var outerText = elm.textContent.trim();
|
|
17815
17961
|
var innerText = outerText;
|
|
17816
17962
|
while (innerText === outerText && nextNode !== void 0) {
|
|
17817
|
-
var
|
|
17963
|
+
var _i20 = -1;
|
|
17818
17964
|
elm = nextNode;
|
|
17819
17965
|
if (elm.children.length === 0) {
|
|
17820
17966
|
return elm;
|
|
17821
17967
|
}
|
|
17822
17968
|
do {
|
|
17823
|
-
|
|
17824
|
-
innerText = elm.children[
|
|
17825
|
-
} while (innerText === '' &&
|
|
17826
|
-
nextNode = elm.children[
|
|
17969
|
+
_i20++;
|
|
17970
|
+
innerText = elm.children[_i20].textContent.trim();
|
|
17971
|
+
} while (innerText === '' && _i20 + 1 < elm.children.length);
|
|
17972
|
+
nextNode = elm.children[_i20];
|
|
17827
17973
|
}
|
|
17828
17974
|
return elm;
|
|
17829
17975
|
}
|
|
@@ -17854,6 +18000,13 @@
|
|
|
17854
18000
|
var currStyle = getStyleValues(node);
|
|
17855
18001
|
var nextStyle = nextSibling ? getStyleValues(nextSibling) : null;
|
|
17856
18002
|
var prevStyle = prevSibling ? getStyleValues(prevSibling) : null;
|
|
18003
|
+
var optionsPassLength = options.passLength;
|
|
18004
|
+
var optionsFailLength = options.failLength;
|
|
18005
|
+
var headingLength = node.textContent.trim().length;
|
|
18006
|
+
var paragraphLength = nextSibling === null || nextSibling === void 0 ? void 0 : nextSibling.textContent.trim().length;
|
|
18007
|
+
if (headingLength > paragraphLength * optionsPassLength) {
|
|
18008
|
+
return true;
|
|
18009
|
+
}
|
|
17857
18010
|
if (!nextStyle || !isHeaderStyle(currStyle, nextStyle, margins)) {
|
|
17858
18011
|
return true;
|
|
17859
18012
|
}
|
|
@@ -17864,6 +18017,9 @@
|
|
|
17864
18017
|
if (prevStyle && !isHeaderStyle(currStyle, prevStyle, margins)) {
|
|
17865
18018
|
return void 0;
|
|
17866
18019
|
}
|
|
18020
|
+
if (headingLength > paragraphLength * optionsFailLength) {
|
|
18021
|
+
return void 0;
|
|
18022
|
+
}
|
|
17867
18023
|
return false;
|
|
17868
18024
|
}
|
|
17869
18025
|
var p_as_heading_evaluate_default = pAsHeadingEvaluate;
|
|
@@ -17899,8 +18055,8 @@
|
|
|
17899
18055
|
} else if (node !== document.body && has_content_default(node, true)) {
|
|
17900
18056
|
return [ virtualNode ];
|
|
17901
18057
|
} else {
|
|
17902
|
-
return virtualNode.children.filter(function(
|
|
17903
|
-
var actualNode =
|
|
18058
|
+
return virtualNode.children.filter(function(_ref70) {
|
|
18059
|
+
var actualNode = _ref70.actualNode;
|
|
17904
18060
|
return actualNode.nodeType === 1;
|
|
17905
18061
|
}).map(function(vNode) {
|
|
17906
18062
|
return findRegionlessElms(vNode, options);
|
|
@@ -18083,8 +18239,8 @@
|
|
|
18083
18239
|
if (!virtualNode.children) {
|
|
18084
18240
|
return void 0;
|
|
18085
18241
|
}
|
|
18086
|
-
var titleNode = virtualNode.children.find(function(
|
|
18087
|
-
var props =
|
|
18242
|
+
var titleNode = virtualNode.children.find(function(_ref71) {
|
|
18243
|
+
var props = _ref71.props;
|
|
18088
18244
|
return props.nodeName === 'title';
|
|
18089
18245
|
});
|
|
18090
18246
|
if (!titleNode) {
|
|
@@ -18107,8 +18263,8 @@
|
|
|
18107
18263
|
}
|
|
18108
18264
|
var svg_non_empty_title_evaluate_default = svgNonEmptyTitleEvaluate;
|
|
18109
18265
|
function cssOrientationLockEvaluate(node, options, virtualNode, context5) {
|
|
18110
|
-
var
|
|
18111
|
-
var
|
|
18266
|
+
var _ref72 = context5 || {}, _ref72$cssom = _ref72.cssom, cssom = _ref72$cssom === void 0 ? void 0 : _ref72$cssom;
|
|
18267
|
+
var _ref73 = options || {}, _ref73$degreeThreshol = _ref73.degreeThreshold, degreeThreshold = _ref73$degreeThreshol === void 0 ? 0 : _ref73$degreeThreshol;
|
|
18112
18268
|
if (!cssom || !cssom.length) {
|
|
18113
18269
|
return void 0;
|
|
18114
18270
|
}
|
|
@@ -18116,14 +18272,14 @@
|
|
|
18116
18272
|
var relatedElements = [];
|
|
18117
18273
|
var rulesGroupByDocumentFragment = groupCssomByDocument(cssom);
|
|
18118
18274
|
var _loop6 = function _loop6() {
|
|
18119
|
-
var key = _Object$keys2[
|
|
18275
|
+
var key = _Object$keys2[_i21];
|
|
18120
18276
|
var _rulesGroupByDocument = rulesGroupByDocumentFragment[key], root = _rulesGroupByDocument.root, rules = _rulesGroupByDocument.rules;
|
|
18121
18277
|
var orientationRules = rules.filter(isMediaRuleWithOrientation);
|
|
18122
18278
|
if (!orientationRules.length) {
|
|
18123
18279
|
return 'continue';
|
|
18124
18280
|
}
|
|
18125
|
-
orientationRules.forEach(function(
|
|
18126
|
-
var cssRules =
|
|
18281
|
+
orientationRules.forEach(function(_ref74) {
|
|
18282
|
+
var cssRules = _ref74.cssRules;
|
|
18127
18283
|
Array.from(cssRules).forEach(function(cssRule) {
|
|
18128
18284
|
var locked = getIsOrientationLocked(cssRule);
|
|
18129
18285
|
if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
|
|
@@ -18134,7 +18290,7 @@
|
|
|
18134
18290
|
});
|
|
18135
18291
|
});
|
|
18136
18292
|
};
|
|
18137
|
-
for (var
|
|
18293
|
+
for (var _i21 = 0, _Object$keys2 = Object.keys(rulesGroupByDocumentFragment); _i21 < _Object$keys2.length; _i21++) {
|
|
18138
18294
|
var _ret3 = _loop6();
|
|
18139
18295
|
if (_ret3 === 'continue') {
|
|
18140
18296
|
continue;
|
|
@@ -18148,8 +18304,8 @@
|
|
|
18148
18304
|
}
|
|
18149
18305
|
return false;
|
|
18150
18306
|
function groupCssomByDocument(cssObjectModel) {
|
|
18151
|
-
return cssObjectModel.reduce(function(out,
|
|
18152
|
-
var sheet =
|
|
18307
|
+
return cssObjectModel.reduce(function(out, _ref75) {
|
|
18308
|
+
var sheet = _ref75.sheet, root = _ref75.root, shadowId = _ref75.shadowId;
|
|
18153
18309
|
var key = shadowId ? shadowId : 'topDocument';
|
|
18154
18310
|
if (!out[key]) {
|
|
18155
18311
|
out[key] = {
|
|
@@ -18165,15 +18321,15 @@
|
|
|
18165
18321
|
return out;
|
|
18166
18322
|
}, {});
|
|
18167
18323
|
}
|
|
18168
|
-
function isMediaRuleWithOrientation(
|
|
18169
|
-
var type =
|
|
18324
|
+
function isMediaRuleWithOrientation(_ref76) {
|
|
18325
|
+
var type = _ref76.type, cssText = _ref76.cssText;
|
|
18170
18326
|
if (type !== 4) {
|
|
18171
18327
|
return false;
|
|
18172
18328
|
}
|
|
18173
18329
|
return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
|
|
18174
18330
|
}
|
|
18175
|
-
function getIsOrientationLocked(
|
|
18176
|
-
var selectorText =
|
|
18331
|
+
function getIsOrientationLocked(_ref77) {
|
|
18332
|
+
var selectorText = _ref77.selectorText, style = _ref77.style;
|
|
18177
18333
|
if (!selectorText || style.length <= 0) {
|
|
18178
18334
|
return false;
|
|
18179
18335
|
}
|
|
@@ -18220,7 +18376,7 @@
|
|
|
18220
18376
|
}
|
|
18221
18377
|
}
|
|
18222
18378
|
function getAngleInDegrees(angleWithUnit) {
|
|
18223
|
-
var
|
|
18379
|
+
var _ref78 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref79 = _slicedToArray(_ref78, 1), unit = _ref79[0];
|
|
18224
18380
|
if (!unit) {
|
|
18225
18381
|
return;
|
|
18226
18382
|
}
|
|
@@ -18269,7 +18425,7 @@
|
|
|
18269
18425
|
}
|
|
18270
18426
|
var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
|
|
18271
18427
|
function metaViewportScaleEvaluate(node, options, virtualNode) {
|
|
18272
|
-
var
|
|
18428
|
+
var _ref80 = options || {}, _ref80$scaleMinimum = _ref80.scaleMinimum, scaleMinimum = _ref80$scaleMinimum === void 0 ? 2 : _ref80$scaleMinimum, _ref80$lowerBound = _ref80.lowerBound, lowerBound = _ref80$lowerBound === void 0 ? false : _ref80$lowerBound;
|
|
18273
18429
|
var content = virtualNode.attr('content') || '';
|
|
18274
18430
|
if (!content) {
|
|
18275
18431
|
return true;
|
|
@@ -18385,8 +18541,8 @@
|
|
|
18385
18541
|
if (!tabbableElements || !tabbableElements.length) {
|
|
18386
18542
|
return true;
|
|
18387
18543
|
}
|
|
18388
|
-
var relatedNodes = tabbableElements.reduce(function(out,
|
|
18389
|
-
var el =
|
|
18544
|
+
var relatedNodes = tabbableElements.reduce(function(out, _ref81) {
|
|
18545
|
+
var el = _ref81.actualNode;
|
|
18390
18546
|
var nodeName2 = el.nodeName.toUpperCase();
|
|
18391
18547
|
if (elementsThatCanBeDisabled.includes(nodeName2)) {
|
|
18392
18548
|
out.push(el);
|
|
@@ -18425,8 +18581,8 @@
|
|
|
18425
18581
|
}
|
|
18426
18582
|
var focusable_element_evaluate_default = focusableElementEvaluate;
|
|
18427
18583
|
function focusableModalOpenEvaluate(node, options, virtualNode) {
|
|
18428
|
-
var tabbableElements = virtualNode.tabbableElements.map(function(
|
|
18429
|
-
var actualNode =
|
|
18584
|
+
var tabbableElements = virtualNode.tabbableElements.map(function(_ref82) {
|
|
18585
|
+
var actualNode = _ref82.actualNode;
|
|
18430
18586
|
return actualNode;
|
|
18431
18587
|
});
|
|
18432
18588
|
if (!tabbableElements || !tabbableElements.length) {
|
|
@@ -18458,8 +18614,8 @@
|
|
|
18458
18614
|
if (!tabbableElements || !tabbableElements.length) {
|
|
18459
18615
|
return true;
|
|
18460
18616
|
}
|
|
18461
|
-
var relatedNodes = tabbableElements.reduce(function(out,
|
|
18462
|
-
var el =
|
|
18617
|
+
var relatedNodes = tabbableElements.reduce(function(out, _ref83) {
|
|
18618
|
+
var el = _ref83.actualNode;
|
|
18463
18619
|
var nodeName2 = el.nodeName.toUpperCase();
|
|
18464
18620
|
if (!elementsThatCanBeDisabled.includes(nodeName2)) {
|
|
18465
18621
|
out.push(el);
|
|
@@ -18507,7 +18663,7 @@
|
|
|
18507
18663
|
return focusableDescendants(child);
|
|
18508
18664
|
});
|
|
18509
18665
|
}
|
|
18510
|
-
function
|
|
18666
|
+
function frameFocusableContentEvaluate(node, options, virtualNode) {
|
|
18511
18667
|
if (!virtualNode.children) {
|
|
18512
18668
|
return void 0;
|
|
18513
18669
|
}
|
|
@@ -18519,7 +18675,51 @@
|
|
|
18519
18675
|
return void 0;
|
|
18520
18676
|
}
|
|
18521
18677
|
}
|
|
18522
|
-
var
|
|
18678
|
+
var frame_focusable_content_evaluate_default = frameFocusableContentEvaluate;
|
|
18679
|
+
function noFocusableContentEvaluate(node, options, virtualNode) {
|
|
18680
|
+
if (!virtualNode.children) {
|
|
18681
|
+
return void 0;
|
|
18682
|
+
}
|
|
18683
|
+
try {
|
|
18684
|
+
var focusableDescendants2 = getFocusableDescendants(virtualNode);
|
|
18685
|
+
if (!focusableDescendants2.length) {
|
|
18686
|
+
return true;
|
|
18687
|
+
}
|
|
18688
|
+
var notHiddenElements = focusableDescendants2.filter(usesUnreliableHidingStrategy);
|
|
18689
|
+
if (notHiddenElements.length > 0) {
|
|
18690
|
+
this.data({
|
|
18691
|
+
messageKey: 'notHidden'
|
|
18692
|
+
});
|
|
18693
|
+
this.relatedNodes(notHiddenElements);
|
|
18694
|
+
} else {
|
|
18695
|
+
this.relatedNodes(focusableDescendants2);
|
|
18696
|
+
}
|
|
18697
|
+
return false;
|
|
18698
|
+
} catch (e) {
|
|
18699
|
+
return void 0;
|
|
18700
|
+
}
|
|
18701
|
+
}
|
|
18702
|
+
function getFocusableDescendants(vNode) {
|
|
18703
|
+
if (!vNode.children) {
|
|
18704
|
+
if (vNode.props.nodeType === 1) {
|
|
18705
|
+
throw new Error('Cannot determine children');
|
|
18706
|
+
}
|
|
18707
|
+
return [];
|
|
18708
|
+
}
|
|
18709
|
+
var retVal = [];
|
|
18710
|
+
vNode.children.forEach(function(child) {
|
|
18711
|
+
if (is_focusable_default(child)) {
|
|
18712
|
+
retVal.push(child);
|
|
18713
|
+
} else {
|
|
18714
|
+
retVal.push.apply(retVal, _toConsumableArray(getFocusableDescendants(child)));
|
|
18715
|
+
}
|
|
18716
|
+
});
|
|
18717
|
+
return retVal;
|
|
18718
|
+
}
|
|
18719
|
+
function usesUnreliableHidingStrategy(vNode) {
|
|
18720
|
+
var tabIndex = parseInt(vNode.attr('tabindex'), 10);
|
|
18721
|
+
return !isNaN(tabIndex) && tabIndex < 0;
|
|
18722
|
+
}
|
|
18523
18723
|
function tabindexEvaluate(node, options, virtualNode) {
|
|
18524
18724
|
var tabIndex = parseInt(virtualNode.attr('tabindex'), 10);
|
|
18525
18725
|
return isNaN(tabIndex) ? true : tabIndex <= 0;
|
|
@@ -18641,7 +18841,7 @@
|
|
|
18641
18841
|
return sanitize_default(noUnicodeStr);
|
|
18642
18842
|
}
|
|
18643
18843
|
function labelContentNameMismatchEvaluate(node, options, virtualNode) {
|
|
18644
|
-
var
|
|
18844
|
+
var _ref84 = options || {}, pixelThreshold = _ref84.pixelThreshold, occuranceThreshold = _ref84.occuranceThreshold;
|
|
18645
18845
|
var accText = accessible_text_default(node).toLowerCase();
|
|
18646
18846
|
if (is_human_interpretable_default(accText) < 1) {
|
|
18647
18847
|
return void 0;
|
|
@@ -19009,8 +19209,8 @@
|
|
|
19009
19209
|
var aria46 = /^aria-/;
|
|
19010
19210
|
var attrs = virtualNode.attrNames;
|
|
19011
19211
|
if (attrs.length) {
|
|
19012
|
-
for (var
|
|
19013
|
-
if (aria46.test(attrs[
|
|
19212
|
+
for (var _i22 = 0, l = attrs.length; _i22 < l; _i22++) {
|
|
19213
|
+
if (aria46.test(attrs[_i22])) {
|
|
19014
19214
|
return true;
|
|
19015
19215
|
}
|
|
19016
19216
|
}
|
|
@@ -19391,7 +19591,7 @@
|
|
|
19391
19591
|
if (!role || [ 'none', 'presentation' ].includes(role)) {
|
|
19392
19592
|
return true;
|
|
19393
19593
|
}
|
|
19394
|
-
var
|
|
19594
|
+
var _ref85 = aria_roles_default[role] || {}, accessibleNameRequired = _ref85.accessibleNameRequired;
|
|
19395
19595
|
if (accessibleNameRequired || is_focusable_default(virtualNode)) {
|
|
19396
19596
|
return true;
|
|
19397
19597
|
}
|
|
@@ -19554,7 +19754,8 @@
|
|
|
19554
19754
|
'focusable-no-name-evaluate': focusable_no_name_evaluate_default,
|
|
19555
19755
|
'focusable-not-tabbable-evaluate': focusable_not_tabbable_evaluate_default,
|
|
19556
19756
|
'landmark-is-top-level-evaluate': landmark_is_top_level_evaluate_default,
|
|
19557
|
-
'
|
|
19757
|
+
'frame-focusable-content-evaluate': frame_focusable_content_evaluate_default,
|
|
19758
|
+
'no-focusable-content-evaluate': noFocusableContentEvaluate,
|
|
19558
19759
|
'tabindex-evaluate': tabindex_evaluate_default,
|
|
19559
19760
|
'alt-space-value-evaluate': alt_space_value_evaluate_default,
|
|
19560
19761
|
'duplicate-img-label-evaluate': duplicate_img_label_evaluate_default,
|
|
@@ -20206,8 +20407,8 @@
|
|
|
20206
20407
|
lang: this.lang
|
|
20207
20408
|
};
|
|
20208
20409
|
var checkIDs = Object.keys(this.data.checks);
|
|
20209
|
-
for (var
|
|
20210
|
-
var id = checkIDs[
|
|
20410
|
+
for (var _i23 = 0; _i23 < checkIDs.length; _i23++) {
|
|
20411
|
+
var id = checkIDs[_i23];
|
|
20211
20412
|
var check4 = this.data.checks[id];
|
|
20212
20413
|
var _check4$messages = check4.messages, pass = _check4$messages.pass, fail = _check4$messages.fail, incomplete = _check4$messages.incomplete;
|
|
20213
20414
|
locale.checks[id] = {
|
|
@@ -20217,8 +20418,8 @@
|
|
|
20217
20418
|
};
|
|
20218
20419
|
}
|
|
20219
20420
|
var ruleIDs = Object.keys(this.data.rules);
|
|
20220
|
-
for (var
|
|
20221
|
-
var _id = ruleIDs[
|
|
20421
|
+
for (var _i24 = 0; _i24 < ruleIDs.length; _i24++) {
|
|
20422
|
+
var _id = ruleIDs[_i24];
|
|
20222
20423
|
var rule3 = this.data.rules[_id];
|
|
20223
20424
|
var description = rule3.description, help = rule3.help;
|
|
20224
20425
|
locale.rules[_id] = {
|
|
@@ -20227,8 +20428,8 @@
|
|
|
20227
20428
|
};
|
|
20228
20429
|
}
|
|
20229
20430
|
var failureSummaries = Object.keys(this.data.failureSummaries);
|
|
20230
|
-
for (var
|
|
20231
|
-
var type = failureSummaries[
|
|
20431
|
+
for (var _i25 = 0; _i25 < failureSummaries.length; _i25++) {
|
|
20432
|
+
var type = failureSummaries[_i25];
|
|
20232
20433
|
var failureSummary2 = this.data.failureSummaries[type];
|
|
20233
20434
|
var failureMessage = failureSummary2.failureMessage;
|
|
20234
20435
|
locale.failureSummaries[type] = {
|
|
@@ -20251,8 +20452,8 @@
|
|
|
20251
20452
|
key: '_applyCheckLocale',
|
|
20252
20453
|
value: function _applyCheckLocale(checks) {
|
|
20253
20454
|
var keys = Object.keys(checks);
|
|
20254
|
-
for (var
|
|
20255
|
-
var id = keys[
|
|
20455
|
+
for (var _i26 = 0; _i26 < keys.length; _i26++) {
|
|
20456
|
+
var id = keys[_i26];
|
|
20256
20457
|
if (!this.data.checks[id]) {
|
|
20257
20458
|
throw new Error('Locale provided for unknown check: "'.concat(id, '"'));
|
|
20258
20459
|
}
|
|
@@ -20263,8 +20464,8 @@
|
|
|
20263
20464
|
key: '_applyRuleLocale',
|
|
20264
20465
|
value: function _applyRuleLocale(rules) {
|
|
20265
20466
|
var keys = Object.keys(rules);
|
|
20266
|
-
for (var
|
|
20267
|
-
var id = keys[
|
|
20467
|
+
for (var _i27 = 0; _i27 < keys.length; _i27++) {
|
|
20468
|
+
var id = keys[_i27];
|
|
20268
20469
|
if (!this.data.rules[id]) {
|
|
20269
20470
|
throw new Error('Locale provided for unknown rule: "'.concat(id, '"'));
|
|
20270
20471
|
}
|
|
@@ -20275,8 +20476,8 @@
|
|
|
20275
20476
|
key: '_applyFailureSummaries',
|
|
20276
20477
|
value: function _applyFailureSummaries(messages) {
|
|
20277
20478
|
var keys = Object.keys(messages);
|
|
20278
|
-
for (var
|
|
20279
|
-
var key = keys[
|
|
20479
|
+
for (var _i28 = 0; _i28 < keys.length; _i28++) {
|
|
20480
|
+
var key = keys[_i28];
|
|
20280
20481
|
if (!this.data.failureSummaries[key]) {
|
|
20281
20482
|
throw new Error('Locale provided for unknown failureMessage: "'.concat(key, '"'));
|
|
20282
20483
|
}
|
|
@@ -20522,10 +20723,10 @@
|
|
|
20522
20723
|
} else if ([ 'tag', 'tags', void 0 ].includes(only.type)) {
|
|
20523
20724
|
only.type = 'tag';
|
|
20524
20725
|
var unmatchedTags = only.values.filter(function(tag) {
|
|
20525
|
-
return !tags.includes(tag);
|
|
20726
|
+
return !tags.includes(tag) && !/wcag2[1-3]a{1,3}/.test(tag);
|
|
20526
20727
|
});
|
|
20527
20728
|
if (unmatchedTags.length !== 0) {
|
|
20528
|
-
|
|
20729
|
+
axe.log('Could not find tags `' + unmatchedTags.join('`, `') + '`');
|
|
20529
20730
|
}
|
|
20530
20731
|
} else {
|
|
20531
20732
|
throw new Error('Unknown runOnly type \''.concat(only.type, '\''));
|
|
@@ -20622,8 +20823,8 @@
|
|
|
20622
20823
|
});
|
|
20623
20824
|
};
|
|
20624
20825
|
}
|
|
20625
|
-
function getHelpUrl(
|
|
20626
|
-
var brand =
|
|
20826
|
+
function getHelpUrl(_ref86, ruleId, version) {
|
|
20827
|
+
var brand = _ref86.brand, application = _ref86.application, lang = _ref86.lang;
|
|
20627
20828
|
return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
|
|
20628
20829
|
}
|
|
20629
20830
|
var audit_default = Audit;
|
|
@@ -20649,6 +20850,7 @@
|
|
|
20649
20850
|
var es6_promise = __toModule(require_es6_promise());
|
|
20650
20851
|
var typedarray = __toModule(require_typedarray());
|
|
20651
20852
|
var weakmap_polyfill = __toModule(require_weakmap_polyfill());
|
|
20853
|
+
dot2['default'].templateSettings.strip = false;
|
|
20652
20854
|
if (!('Promise' in window)) {
|
|
20653
20855
|
es6_promise['default'].polyfill();
|
|
20654
20856
|
}
|
|
@@ -21036,9 +21238,9 @@
|
|
|
21036
21238
|
});
|
|
21037
21239
|
}
|
|
21038
21240
|
var run_virtual_rule_default = runVirtualRule;
|
|
21039
|
-
function normalizeRunParams(
|
|
21040
|
-
var
|
|
21041
|
-
var
|
|
21241
|
+
function normalizeRunParams(_ref87) {
|
|
21242
|
+
var _ref89, _options$reporter, _axe$_audit;
|
|
21243
|
+
var _ref88 = _slicedToArray(_ref87, 3), context5 = _ref88[0], options = _ref88[1], callback = _ref88[2];
|
|
21042
21244
|
var typeErr = new TypeError('axe.run arguments are invalid');
|
|
21043
21245
|
if (!isContext(context5)) {
|
|
21044
21246
|
if (callback !== void 0) {
|
|
@@ -21059,7 +21261,7 @@
|
|
|
21059
21261
|
throw typeErr;
|
|
21060
21262
|
}
|
|
21061
21263
|
options = clone_default(options);
|
|
21062
|
-
options.reporter = (
|
|
21264
|
+
options.reporter = (_ref89 = (_options$reporter = options.reporter) !== null && _options$reporter !== void 0 ? _options$reporter : (_axe$_audit = axe._audit) === null || _axe$_audit === void 0 ? void 0 : _axe$_audit.reporter) !== null && _ref89 !== void 0 ? _ref89 : 'v1';
|
|
21063
21265
|
return {
|
|
21064
21266
|
context: context5,
|
|
21065
21267
|
options: options,
|
|
@@ -21184,14 +21386,14 @@
|
|
|
21184
21386
|
return new Promise(function(res, rej) {
|
|
21185
21387
|
axe._audit.run(contextObj, options, res, rej);
|
|
21186
21388
|
}).then(function(results) {
|
|
21187
|
-
results = results.map(function(
|
|
21188
|
-
var nodes =
|
|
21389
|
+
results = results.map(function(_ref90) {
|
|
21390
|
+
var nodes = _ref90.nodes, result = _objectWithoutProperties(_ref90, _excluded8);
|
|
21189
21391
|
return _extends({
|
|
21190
21392
|
nodes: nodes.map(serializeNode)
|
|
21191
21393
|
}, result);
|
|
21192
21394
|
});
|
|
21193
|
-
var frames = contextObj.frames.map(function(
|
|
21194
|
-
var node =
|
|
21395
|
+
var frames = contextObj.frames.map(function(_ref91) {
|
|
21396
|
+
var node = _ref91.node;
|
|
21195
21397
|
return new dq_element_default(node, options).toJSON();
|
|
21196
21398
|
});
|
|
21197
21399
|
var environmentData;
|
|
@@ -21208,13 +21410,13 @@
|
|
|
21208
21410
|
teardown_default();
|
|
21209
21411
|
});
|
|
21210
21412
|
}
|
|
21211
|
-
function serializeNode(
|
|
21212
|
-
var node =
|
|
21413
|
+
function serializeNode(_ref92) {
|
|
21414
|
+
var node = _ref92.node, nodeResult = _objectWithoutProperties(_ref92, _excluded9);
|
|
21213
21415
|
nodeResult.node = node.toJSON();
|
|
21214
|
-
for (var
|
|
21215
|
-
var type = _arr2[
|
|
21216
|
-
nodeResult[type] = nodeResult[type].map(function(
|
|
21217
|
-
var relatedNodes =
|
|
21416
|
+
for (var _i29 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i29 < _arr2.length; _i29++) {
|
|
21417
|
+
var type = _arr2[_i29];
|
|
21418
|
+
nodeResult[type] = nodeResult[type].map(function(_ref93) {
|
|
21419
|
+
var relatedNodes = _ref93.relatedNodes, checkResult = _objectWithoutProperties(_ref93, _excluded10);
|
|
21218
21420
|
return _extends({}, checkResult, {
|
|
21219
21421
|
relatedNodes: relatedNodes.map(function(node2) {
|
|
21220
21422
|
return node2.toJSON();
|
|
@@ -21225,14 +21427,14 @@
|
|
|
21225
21427
|
return nodeResult;
|
|
21226
21428
|
}
|
|
21227
21429
|
function finishRun(partialResults) {
|
|
21228
|
-
var
|
|
21430
|
+
var _ref95, _options$reporter2, _axe$_audit2;
|
|
21229
21431
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
21230
21432
|
options = clone_default(options);
|
|
21231
|
-
var
|
|
21433
|
+
var _ref94 = partialResults.find(function(r) {
|
|
21232
21434
|
return r.environmentData;
|
|
21233
|
-
}) || {}, environmentData =
|
|
21435
|
+
}) || {}, environmentData = _ref94.environmentData;
|
|
21234
21436
|
axe._audit.normalizeOptions(options);
|
|
21235
|
-
options.reporter = (
|
|
21437
|
+
options.reporter = (_ref95 = (_options$reporter2 = options.reporter) !== null && _options$reporter2 !== void 0 ? _options$reporter2 : (_axe$_audit2 = axe._audit) === null || _axe$_audit2 === void 0 ? void 0 : _axe$_audit2.reporter) !== null && _ref95 !== void 0 ? _ref95 : 'v1';
|
|
21236
21438
|
setFrameSpec(partialResults);
|
|
21237
21439
|
var results = merge_results_default(partialResults);
|
|
21238
21440
|
results = axe._audit.after(results, options);
|
|
@@ -21262,8 +21464,8 @@
|
|
|
21262
21464
|
_iterator4.f();
|
|
21263
21465
|
}
|
|
21264
21466
|
}
|
|
21265
|
-
function getMergedFrameSpecs(
|
|
21266
|
-
var childFrameSpecs =
|
|
21467
|
+
function getMergedFrameSpecs(_ref96) {
|
|
21468
|
+
var childFrameSpecs = _ref96.frames, parentFrameSpec = _ref96.frameSpec;
|
|
21267
21469
|
if (!parentFrameSpec) {
|
|
21268
21470
|
return childFrameSpecs;
|
|
21269
21471
|
}
|
|
@@ -21323,12 +21525,12 @@
|
|
|
21323
21525
|
var transformedResults = results.map(function(result) {
|
|
21324
21526
|
var transformedResult = _extends({}, result);
|
|
21325
21527
|
var types = [ 'passes', 'violations', 'incomplete', 'inapplicable' ];
|
|
21326
|
-
for (var
|
|
21327
|
-
var type = _types[
|
|
21528
|
+
for (var _i30 = 0, _types = types; _i30 < _types.length; _i30++) {
|
|
21529
|
+
var type = _types[_i30];
|
|
21328
21530
|
if (transformedResult[type] && Array.isArray(transformedResult[type])) {
|
|
21329
|
-
transformedResult[type] = transformedResult[type].map(function(
|
|
21531
|
+
transformedResult[type] = transformedResult[type].map(function(_ref97) {
|
|
21330
21532
|
var _node;
|
|
21331
|
-
var node =
|
|
21533
|
+
var node = _ref97.node, typeResult = _objectWithoutProperties(_ref97, _excluded13);
|
|
21332
21534
|
node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
|
|
21333
21535
|
return _extends({
|
|
21334
21536
|
node: node
|
|
@@ -21403,6 +21605,9 @@
|
|
|
21403
21605
|
Rule: rule_default,
|
|
21404
21606
|
metadataFunctionMap: metadata_function_map_default
|
|
21405
21607
|
};
|
|
21608
|
+
axe._thisWillBeDeletedDoNotUse['public'] = {
|
|
21609
|
+
reporters: reporters
|
|
21610
|
+
};
|
|
21406
21611
|
axe.imports = imports_exports;
|
|
21407
21612
|
axe.cleanup = cleanup_default;
|
|
21408
21613
|
axe.configure = configure_default;
|
|
@@ -21494,7 +21699,7 @@
|
|
|
21494
21699
|
},
|
|
21495
21700
|
'aria-roledescription': {
|
|
21496
21701
|
description: 'Ensure aria-roledescription is only used on elements with an implicit or explicit role',
|
|
21497
|
-
help: '
|
|
21702
|
+
help: 'aria-roledescription must be on elements with a semantic role'
|
|
21498
21703
|
},
|
|
21499
21704
|
'aria-roles': {
|
|
21500
21705
|
description: 'Ensures all elements with a role attribute use a valid value',
|
|
@@ -21506,7 +21711,7 @@
|
|
|
21506
21711
|
},
|
|
21507
21712
|
'aria-toggle-field-name': {
|
|
21508
21713
|
description: 'Ensures every ARIA toggle field has an accessible name',
|
|
21509
|
-
help: 'ARIA toggle fields have an accessible name'
|
|
21714
|
+
help: 'ARIA toggle fields must have an accessible name'
|
|
21510
21715
|
},
|
|
21511
21716
|
'aria-tooltip-name': {
|
|
21512
21717
|
description: 'Ensures every ARIA tooltip node has an accessible name',
|
|
@@ -21554,7 +21759,7 @@
|
|
|
21554
21759
|
},
|
|
21555
21760
|
'css-orientation-lock': {
|
|
21556
21761
|
description: 'Ensures content is not locked to any specific display orientation, and the content is operable in all display orientations',
|
|
21557
|
-
help: 'CSS Media queries
|
|
21762
|
+
help: 'CSS Media queries must not lock display orientation'
|
|
21558
21763
|
},
|
|
21559
21764
|
'definition-list': {
|
|
21560
21765
|
description: 'Ensures <dl> elements are structured correctly',
|
|
@@ -21589,8 +21794,8 @@
|
|
|
21589
21794
|
help: 'Table header text must not be empty'
|
|
21590
21795
|
},
|
|
21591
21796
|
'focus-order-semantics': {
|
|
21592
|
-
description: 'Ensures elements in the focus order have
|
|
21593
|
-
help: 'Elements in the focus order
|
|
21797
|
+
description: 'Ensures elements in the focus order have a role appropriate for interactive content',
|
|
21798
|
+
help: 'Elements in the focus order should have an appropriate role'
|
|
21594
21799
|
},
|
|
21595
21800
|
'form-field-multiple-labels': {
|
|
21596
21801
|
description: 'Ensures form field does not have multiple label elements',
|
|
@@ -21618,7 +21823,7 @@
|
|
|
21618
21823
|
},
|
|
21619
21824
|
'hidden-content': {
|
|
21620
21825
|
description: 'Informs users about hidden content.',
|
|
21621
|
-
help: 'Hidden content on the page
|
|
21826
|
+
help: 'Hidden content on the page should be analyzed'
|
|
21622
21827
|
},
|
|
21623
21828
|
'html-has-lang': {
|
|
21624
21829
|
description: 'Ensures every HTML document has a lang attribute',
|
|
@@ -21634,7 +21839,7 @@
|
|
|
21634
21839
|
},
|
|
21635
21840
|
'identical-links-same-purpose': {
|
|
21636
21841
|
description: 'Ensure that links with the same accessible name serve a similar purpose',
|
|
21637
|
-
help: 'Links with the same name have a similar purpose'
|
|
21842
|
+
help: 'Links with the same name must have a similar purpose'
|
|
21638
21843
|
},
|
|
21639
21844
|
'image-alt': {
|
|
21640
21845
|
description: 'Ensures <img> elements have alternate text or a role of none or presentation',
|
|
@@ -21657,7 +21862,7 @@
|
|
|
21657
21862
|
help: 'Elements must have their visible text as part of their accessible name'
|
|
21658
21863
|
},
|
|
21659
21864
|
'label-title-only': {
|
|
21660
|
-
description: 'Ensures that every form element is not solely labeled using the title or aria-describedby attributes',
|
|
21865
|
+
description: 'Ensures that every form element has a visible label and is not solely labeled using hidden labels, or the title or aria-describedby attributes',
|
|
21661
21866
|
help: 'Form elements should have a visible label'
|
|
21662
21867
|
},
|
|
21663
21868
|
label: {
|
|
@@ -21701,8 +21906,8 @@
|
|
|
21701
21906
|
description: 'Landmarks should have a unique role or role/label/title (i.e. accessible name) combination'
|
|
21702
21907
|
},
|
|
21703
21908
|
'link-in-text-block': {
|
|
21704
|
-
description: '
|
|
21705
|
-
help: 'Links must be
|
|
21909
|
+
description: 'Ensure links are distinguished from surrounding text in a way that does not rely on color',
|
|
21910
|
+
help: 'Links must be distinguishable without relying on color'
|
|
21706
21911
|
},
|
|
21707
21912
|
'link-name': {
|
|
21708
21913
|
description: 'Ensures links have discernible text',
|
|
@@ -21733,20 +21938,20 @@
|
|
|
21733
21938
|
help: 'Zooming and scaling should not be disabled'
|
|
21734
21939
|
},
|
|
21735
21940
|
'nested-interactive': {
|
|
21736
|
-
description: '
|
|
21737
|
-
help: '
|
|
21941
|
+
description: 'Ensures interactive controls are not nested as they are not always announced by screen readers or can cause focus problems for assistive technologies',
|
|
21942
|
+
help: 'Interactive controls must not be nested'
|
|
21738
21943
|
},
|
|
21739
21944
|
'no-autoplay-audio': {
|
|
21740
21945
|
description: 'Ensures <video> or <audio> elements do not autoplay audio for more than 3 seconds without a control mechanism to stop or mute the audio',
|
|
21741
|
-
help: '<video> or <audio> elements
|
|
21946
|
+
help: '<video> or <audio> elements must not play automatically'
|
|
21742
21947
|
},
|
|
21743
21948
|
'object-alt': {
|
|
21744
21949
|
description: 'Ensures <object> elements have alternate text',
|
|
21745
21950
|
help: '<object> elements must have alternate text'
|
|
21746
21951
|
},
|
|
21747
21952
|
'p-as-heading': {
|
|
21748
|
-
description: 'Ensure
|
|
21749
|
-
help: '
|
|
21953
|
+
description: 'Ensure bold, italic text and font-size is not used to style <p> elements as a heading',
|
|
21954
|
+
help: 'Styled <p> elements must not be used as headings'
|
|
21750
21955
|
},
|
|
21751
21956
|
'page-has-heading-one': {
|
|
21752
21957
|
description: 'Ensure that the page, or at least one of its frames contains a level-one heading',
|
|
@@ -21762,15 +21967,15 @@
|
|
|
21762
21967
|
},
|
|
21763
21968
|
'role-img-alt': {
|
|
21764
21969
|
description: 'Ensures [role=\'img\'] elements have alternate text',
|
|
21765
|
-
help: '[role=\'img\'] elements have an alternative text'
|
|
21970
|
+
help: '[role=\'img\'] elements must have an alternative text'
|
|
21766
21971
|
},
|
|
21767
21972
|
'scope-attr-valid': {
|
|
21768
21973
|
description: 'Ensures the scope attribute is used correctly on tables',
|
|
21769
21974
|
help: 'scope attribute should be used correctly'
|
|
21770
21975
|
},
|
|
21771
21976
|
'scrollable-region-focusable': {
|
|
21772
|
-
description: '
|
|
21773
|
-
help: '
|
|
21977
|
+
description: 'Ensure elements that have scrollable content are accessible by keyboard',
|
|
21978
|
+
help: 'Scrollable region must have keyboard access'
|
|
21774
21979
|
},
|
|
21775
21980
|
'select-name': {
|
|
21776
21981
|
description: 'Ensures select element has an accessible name',
|
|
@@ -21785,32 +21990,32 @@
|
|
|
21785
21990
|
help: 'The skip-link target should exist and be focusable'
|
|
21786
21991
|
},
|
|
21787
21992
|
'svg-img-alt': {
|
|
21788
|
-
description: 'Ensures svg elements with an img, graphics-document or graphics-symbol role have an accessible text',
|
|
21789
|
-
help: 'svg elements with an img role have an alternative text'
|
|
21993
|
+
description: 'Ensures <svg> elements with an img, graphics-document or graphics-symbol role have an accessible text',
|
|
21994
|
+
help: '<svg> elements with an img role must have an alternative text'
|
|
21790
21995
|
},
|
|
21791
21996
|
tabindex: {
|
|
21792
21997
|
description: 'Ensures tabindex attribute values are not greater than 0',
|
|
21793
21998
|
help: 'Elements should not have tabindex greater than zero'
|
|
21794
21999
|
},
|
|
21795
22000
|
'table-duplicate-name': {
|
|
21796
|
-
description: 'Ensure
|
|
21797
|
-
help: '
|
|
22001
|
+
description: 'Ensure the <caption> element does not contain the same text as the summary attribute',
|
|
22002
|
+
help: 'tables should not have the same summary and caption'
|
|
21798
22003
|
},
|
|
21799
22004
|
'table-fake-caption': {
|
|
21800
22005
|
description: 'Ensure that tables with a caption use the <caption> element.',
|
|
21801
22006
|
help: 'Data or header cells must not be used to give caption to a data table.'
|
|
21802
22007
|
},
|
|
21803
22008
|
'td-has-header': {
|
|
21804
|
-
description: 'Ensure that each non-empty data cell in a
|
|
21805
|
-
help: '
|
|
22009
|
+
description: 'Ensure that each non-empty data cell in a <table> larger than 3 by 3 has one or more table headers',
|
|
22010
|
+
help: 'Non-empty <td> elements in larger <table> must have an associated table header'
|
|
21806
22011
|
},
|
|
21807
22012
|
'td-headers-attr': {
|
|
21808
|
-
description: 'Ensure that each cell in a table
|
|
21809
|
-
help: '
|
|
22013
|
+
description: 'Ensure that each cell in a table that uses the headers attribute refers only to other cells in that table',
|
|
22014
|
+
help: 'Table cells that use the headers attribute must only refer to cells in the same table'
|
|
21810
22015
|
},
|
|
21811
22016
|
'th-has-data-cells': {
|
|
21812
|
-
description: 'Ensure that
|
|
21813
|
-
help: '
|
|
22017
|
+
description: 'Ensure that <th> elements and elements with role=columnheader/rowheader have data cells they describe',
|
|
22018
|
+
help: 'Table headers in a data table must refer to data cells'
|
|
21814
22019
|
},
|
|
21815
22020
|
'valid-lang': {
|
|
21816
22021
|
description: 'Ensures lang attributes have valid values',
|
|
@@ -21862,7 +22067,8 @@
|
|
|
21862
22067
|
pass: 'aria-errormessage exists and references elements visible to screen readers that use a supported aria-errormessage technique',
|
|
21863
22068
|
fail: {
|
|
21864
22069
|
singular: 'aria-errormessage value `${data.values}` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)',
|
|
21865
|
-
plural: 'aria-errormessage values `${data.values}` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)'
|
|
22070
|
+
plural: 'aria-errormessage values `${data.values}` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)',
|
|
22071
|
+
hidden: 'aria-errormessage value `${data.values}` cannot reference a hidden element'
|
|
21866
22072
|
},
|
|
21867
22073
|
incomplete: {
|
|
21868
22074
|
singular: 'ensure aria-errormessage value `${data.values}` references an existing element',
|
|
@@ -21889,8 +22095,8 @@
|
|
|
21889
22095
|
impact: 'serious',
|
|
21890
22096
|
messages: {
|
|
21891
22097
|
pass: 'ARIA attribute is allowed',
|
|
21892
|
-
fail: 'ARIA attribute
|
|
21893
|
-
incomplete: 'ARIA attribute is not well supported
|
|
22098
|
+
fail: 'ARIA attribute: ${data.values} is not allowed. Use a different role attribute or element.',
|
|
22099
|
+
incomplete: 'ARIA attribute: ${data.values} is not well supported. Use a different role attribute or element.'
|
|
21894
22100
|
}
|
|
21895
22101
|
},
|
|
21896
22102
|
'aria-required-attr': {
|
|
@@ -22154,7 +22360,10 @@
|
|
|
22154
22360
|
impact: 'serious',
|
|
22155
22361
|
messages: {
|
|
22156
22362
|
pass: 'Element does not have focusable descendants',
|
|
22157
|
-
fail:
|
|
22363
|
+
fail: {
|
|
22364
|
+
default: 'Element has focusable descendants',
|
|
22365
|
+
notHidden: 'Using a negative tabindex on an element inside an interactive control does not prevent assistive technologies from focusing the element (even with \'aria-hidden=true\')'
|
|
22366
|
+
},
|
|
22158
22367
|
incomplete: 'Could not determine if element has descendants'
|
|
22159
22368
|
}
|
|
22160
22369
|
},
|
|
@@ -22430,7 +22639,8 @@
|
|
|
22430
22639
|
impact: 'serious',
|
|
22431
22640
|
messages: {
|
|
22432
22641
|
pass: '<p> elements are not styled as headings',
|
|
22433
|
-
fail: 'Heading elements should be used instead of styled p elements'
|
|
22642
|
+
fail: 'Heading elements should be used instead of styled <p> elements',
|
|
22643
|
+
incomplete: 'Unable to determine if <p> elements are styled as headings'
|
|
22434
22644
|
}
|
|
22435
22645
|
},
|
|
22436
22646
|
region: {
|
|
@@ -22757,7 +22967,12 @@
|
|
|
22757
22967
|
tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
|
|
22758
22968
|
actIds: [ '5c01ea' ],
|
|
22759
22969
|
all: [],
|
|
22760
|
-
any: [
|
|
22970
|
+
any: [ {
|
|
22971
|
+
options: {
|
|
22972
|
+
validTreeRowAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-level' ]
|
|
22973
|
+
},
|
|
22974
|
+
id: 'aria-allowed-attr'
|
|
22975
|
+
} ],
|
|
22761
22976
|
none: [ 'aria-unsupported-attr', {
|
|
22762
22977
|
options: {
|
|
22763
22978
|
elementsAllowedAriaLabel: [ 'applet', 'input' ]
|
|
@@ -23002,7 +23217,12 @@
|
|
|
23002
23217
|
matches: 'autocomplete-matches',
|
|
23003
23218
|
tags: [ 'cat.forms', 'wcag21aa', 'wcag135' ],
|
|
23004
23219
|
actIds: [ '73f2c2' ],
|
|
23005
|
-
all: [
|
|
23220
|
+
all: [ {
|
|
23221
|
+
options: {
|
|
23222
|
+
stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null' ]
|
|
23223
|
+
},
|
|
23224
|
+
id: 'autocomplete-valid'
|
|
23225
|
+
} ],
|
|
23006
23226
|
any: [],
|
|
23007
23227
|
none: []
|
|
23008
23228
|
}, {
|
|
@@ -23297,7 +23517,7 @@
|
|
|
23297
23517
|
selector: 'a[href], area[href], [role="link"]',
|
|
23298
23518
|
excludeHidden: false,
|
|
23299
23519
|
matches: 'identical-links-same-purpose-matches',
|
|
23300
|
-
tags: [ 'cat.semantics', 'wcag2aaa', 'wcag249'
|
|
23520
|
+
tags: [ 'cat.semantics', 'wcag2aaa', 'wcag249' ],
|
|
23301
23521
|
actIds: [ 'b20e66', 'fd3a94' ],
|
|
23302
23522
|
all: [ 'identical-links-same-purpose' ],
|
|
23303
23523
|
any: [],
|
|
@@ -23544,7 +23764,7 @@
|
|
|
23544
23764
|
id: 'meta-refresh',
|
|
23545
23765
|
selector: 'meta[http-equiv="refresh"]',
|
|
23546
23766
|
excludeHidden: false,
|
|
23547
|
-
tags: [ 'cat.time-and-media', 'wcag2a', '
|
|
23767
|
+
tags: [ 'cat.time-and-media', 'wcag2a', 'wcag221', 'wcag224', 'wcag325' ],
|
|
23548
23768
|
all: [],
|
|
23549
23769
|
any: [ 'meta-refresh' ],
|
|
23550
23770
|
none: []
|
|
@@ -23634,7 +23854,9 @@
|
|
|
23634
23854
|
size: 1.15
|
|
23635
23855
|
}, {
|
|
23636
23856
|
size: 1.4
|
|
23637
|
-
} ]
|
|
23857
|
+
} ],
|
|
23858
|
+
passLength: 1,
|
|
23859
|
+
failLength: .5
|
|
23638
23860
|
},
|
|
23639
23861
|
id: 'p-as-heading'
|
|
23640
23862
|
} ],
|
|
@@ -23823,7 +24045,10 @@
|
|
|
23823
24045
|
evaluate: 'abstractrole-evaluate'
|
|
23824
24046
|
}, {
|
|
23825
24047
|
id: 'aria-allowed-attr',
|
|
23826
|
-
evaluate: 'aria-allowed-attr-evaluate'
|
|
24048
|
+
evaluate: 'aria-allowed-attr-evaluate',
|
|
24049
|
+
options: {
|
|
24050
|
+
validTreeRowAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-level' ]
|
|
24051
|
+
}
|
|
23827
24052
|
}, {
|
|
23828
24053
|
id: 'aria-allowed-role',
|
|
23829
24054
|
evaluate: 'aria-allowed-role-evaluate',
|
|
@@ -23936,7 +24161,10 @@
|
|
|
23936
24161
|
deprecated: true
|
|
23937
24162
|
}, {
|
|
23938
24163
|
id: 'autocomplete-valid',
|
|
23939
|
-
evaluate: 'autocomplete-valid-evaluate'
|
|
24164
|
+
evaluate: 'autocomplete-valid-evaluate',
|
|
24165
|
+
options: {
|
|
24166
|
+
stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null' ]
|
|
24167
|
+
}
|
|
23940
24168
|
}, {
|
|
23941
24169
|
id: 'accesskeys',
|
|
23942
24170
|
evaluate: 'accesskeys-evaluate',
|
|
@@ -23961,7 +24189,7 @@
|
|
|
23961
24189
|
evaluate: 'focusable-not-tabbable-evaluate'
|
|
23962
24190
|
}, {
|
|
23963
24191
|
id: 'frame-focusable-content',
|
|
23964
|
-
evaluate: '
|
|
24192
|
+
evaluate: 'frame-focusable-content-evaluate'
|
|
23965
24193
|
}, {
|
|
23966
24194
|
id: 'landmark-is-top-level',
|
|
23967
24195
|
evaluate: 'landmark-is-top-level-evaluate'
|
|
@@ -24154,7 +24382,9 @@
|
|
|
24154
24382
|
size: 1.15
|
|
24155
24383
|
}, {
|
|
24156
24384
|
size: 1.4
|
|
24157
|
-
} ]
|
|
24385
|
+
} ],
|
|
24386
|
+
passLength: 1,
|
|
24387
|
+
failLength: .5
|
|
24158
24388
|
}
|
|
24159
24389
|
}, {
|
|
24160
24390
|
id: 'region',
|