axe-core 4.11.0-canary.d0e6d8e → 4.11.0-canary.d4aee16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/axe.d.ts +4 -2
- package/axe.js +58 -24
- package/axe.min.js +3 -3
- package/locales/_template.json +4 -2
- package/package.json +3 -5
- package/sri-history.json +401 -405
package/axe.d.ts
CHANGED
|
@@ -386,8 +386,10 @@ declare namespace axe {
|
|
|
386
386
|
frameContext: FrameContextObject;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
|
-
interface RawCheckResult
|
|
390
|
-
|
|
389
|
+
interface RawCheckResult extends Omit<
|
|
390
|
+
CheckResult,
|
|
391
|
+
'relatedNodes' | 'impact'
|
|
392
|
+
> {
|
|
391
393
|
relatedNodes?: Array<SerialDqElement | DqElement>;
|
|
392
394
|
impact?: ImpactValue;
|
|
393
395
|
}
|
package/axe.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! axe v4.11.0
|
|
2
|
-
* Copyright (c) 2015 -
|
|
1
|
+
/*! axe v4.11.0
|
|
2
|
+
* Copyright (c) 2015 - 2026 Deque Systems, Inc.
|
|
3
3
|
*
|
|
4
4
|
* Your use of this Source Code Form is subject to the terms of the Mozilla Public
|
|
5
5
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}, _typeof(o);
|
|
23
23
|
}
|
|
24
24
|
var axe = axe || {};
|
|
25
|
-
axe.version = '4.11.0
|
|
25
|
+
axe.version = '4.11.0';
|
|
26
26
|
if (typeof define === 'function' && define.amd) {
|
|
27
27
|
define('axe-core', [], function() {
|
|
28
28
|
return axe;
|
|
@@ -16416,6 +16416,7 @@
|
|
|
16416
16416
|
this.b = _color2.b;
|
|
16417
16417
|
this.alpha = +_color2.alpha;
|
|
16418
16418
|
} catch (_unused2) {
|
|
16419
|
+
incomplete_data_default.set('colorParse', colorString);
|
|
16419
16420
|
throw new Error('Unable to parse color "'.concat(colorString, '"'));
|
|
16420
16421
|
}
|
|
16421
16422
|
return this;
|
|
@@ -16442,9 +16443,9 @@
|
|
|
16442
16443
|
key: 'getRelativeLuminance',
|
|
16443
16444
|
value: function getRelativeLuminance() {
|
|
16444
16445
|
var rSRGB = this.r, gSRGB = this.g, bSRGB = this.b;
|
|
16445
|
-
var r = rSRGB <= .
|
|
16446
|
-
var g2 = gSRGB <= .
|
|
16447
|
-
var b2 = bSRGB <= .
|
|
16446
|
+
var r = rSRGB <= .04045 ? rSRGB / 12.92 : Math.pow((rSRGB + .055) / 1.055, 2.4);
|
|
16447
|
+
var g2 = gSRGB <= .04045 ? gSRGB / 12.92 : Math.pow((gSRGB + .055) / 1.055, 2.4);
|
|
16448
|
+
var b2 = bSRGB <= .04045 ? bSRGB / 12.92 : Math.pow((bSRGB + .055) / 1.055, 2.4);
|
|
16448
16449
|
return .2126 * r + .7152 * g2 + .0722 * b2;
|
|
16449
16450
|
}
|
|
16450
16451
|
}, {
|
|
@@ -18839,6 +18840,11 @@
|
|
|
18839
18840
|
if (item instanceof window.Node) {
|
|
18840
18841
|
if (item.documentElement instanceof window.Node) {
|
|
18841
18842
|
result.push(context.flatTree[0]);
|
|
18843
|
+
} else if (item.host instanceof window.Node) {
|
|
18844
|
+
var children = Array.from(item.children).map(function(child) {
|
|
18845
|
+
return get_node_from_tree_default(child);
|
|
18846
|
+
});
|
|
18847
|
+
result.push.apply(result, _toConsumableArray(children));
|
|
18842
18848
|
} else {
|
|
18843
18849
|
result.push(get_node_from_tree_default(item));
|
|
18844
18850
|
}
|
|
@@ -24184,9 +24190,17 @@
|
|
|
24184
24190
|
bgElms.push(bgElm);
|
|
24185
24191
|
return null;
|
|
24186
24192
|
}
|
|
24187
|
-
var bgColor =
|
|
24188
|
-
|
|
24189
|
-
|
|
24193
|
+
var bgColor = void 0;
|
|
24194
|
+
try {
|
|
24195
|
+
bgColor = get_own_background_color_default(bgElmStyle);
|
|
24196
|
+
if (bgColor.alpha === 0) {
|
|
24197
|
+
continue;
|
|
24198
|
+
}
|
|
24199
|
+
} catch (error) {
|
|
24200
|
+
if (error && incomplete_data_default.get('colorParse')) {
|
|
24201
|
+
return null;
|
|
24202
|
+
}
|
|
24203
|
+
throw error;
|
|
24190
24204
|
}
|
|
24191
24205
|
if (bgElmStyle.getPropertyValue('display') !== 'inline' && !fullyEncompasses(bgElm, textRects)) {
|
|
24192
24206
|
bgElms.push(bgElm);
|
|
@@ -24277,16 +24291,23 @@
|
|
|
24277
24291
|
});
|
|
24278
24292
|
} ];
|
|
24279
24293
|
var fgColors = [];
|
|
24280
|
-
|
|
24281
|
-
var
|
|
24282
|
-
|
|
24283
|
-
|
|
24284
|
-
|
|
24294
|
+
try {
|
|
24295
|
+
for (var _i24 = 0, _colorStack = colorStack; _i24 < _colorStack.length; _i24++) {
|
|
24296
|
+
var colorFn = _colorStack[_i24];
|
|
24297
|
+
var _color4 = colorFn();
|
|
24298
|
+
if (!_color4) {
|
|
24299
|
+
continue;
|
|
24300
|
+
}
|
|
24301
|
+
fgColors = fgColors.concat(_color4);
|
|
24302
|
+
if (_color4.alpha === 1) {
|
|
24303
|
+
break;
|
|
24304
|
+
}
|
|
24285
24305
|
}
|
|
24286
|
-
|
|
24287
|
-
if (
|
|
24288
|
-
|
|
24306
|
+
} catch (error) {
|
|
24307
|
+
if (error && incomplete_data_default.get('colorParse')) {
|
|
24308
|
+
return null;
|
|
24289
24309
|
}
|
|
24310
|
+
throw error;
|
|
24290
24311
|
}
|
|
24291
24312
|
var fgColor = fgColors.reduce(function(source, backdrop) {
|
|
24292
24313
|
return _flattenColors(source, backdrop);
|
|
@@ -26219,11 +26240,21 @@
|
|
|
26219
26240
|
}
|
|
26220
26241
|
var truncatedResult = Math.floor(contrast2 * 100) / 100;
|
|
26221
26242
|
var missing;
|
|
26243
|
+
var colorParse;
|
|
26222
26244
|
if (bgColor === null) {
|
|
26223
|
-
|
|
26245
|
+
if (incomplete_data_default.get('colorParse')) {
|
|
26246
|
+
missing = 'colorParse';
|
|
26247
|
+
colorParse = incomplete_data_default.get('colorParse');
|
|
26248
|
+
} else {
|
|
26249
|
+
missing = incomplete_data_default.get('bgColor');
|
|
26250
|
+
}
|
|
26224
26251
|
} else if (!isValid) {
|
|
26225
26252
|
missing = contrastContributor;
|
|
26226
26253
|
}
|
|
26254
|
+
if (fgColor === null && incomplete_data_default.get('colorParse')) {
|
|
26255
|
+
missing = 'colorParse';
|
|
26256
|
+
colorParse = incomplete_data_default.get('colorParse');
|
|
26257
|
+
}
|
|
26227
26258
|
var equalRatio = truncatedResult === 1;
|
|
26228
26259
|
var shortTextContent = visibleText.length === 1;
|
|
26229
26260
|
if (equalRatio) {
|
|
@@ -26239,7 +26270,8 @@
|
|
|
26239
26270
|
fontWeight: bold ? 'bold' : 'normal',
|
|
26240
26271
|
messageKey: missing,
|
|
26241
26272
|
expectedContrastRatio: expected + ':1',
|
|
26242
|
-
shadowColor: shadowColor ? shadowColor.toHexString() : void 0
|
|
26273
|
+
shadowColor: shadowColor ? shadowColor.toHexString() : void 0,
|
|
26274
|
+
colorParse: colorParse
|
|
26243
26275
|
});
|
|
26244
26276
|
if (fgColor === null || bgColor === null || equalRatio || shortTextContent && !ignoreLength && !isValid) {
|
|
26245
26277
|
missing = null;
|
|
@@ -30189,7 +30221,8 @@
|
|
|
30189
30221
|
equalRatio: 'Element has a 1:1 contrast ratio with the background',
|
|
30190
30222
|
shortTextContent: 'Element content is too short to determine if it is actual text content',
|
|
30191
30223
|
nonBmp: 'Element content contains only non-text characters',
|
|
30192
|
-
pseudoContent: 'Element\'s background color could not be determined due to a pseudo element'
|
|
30224
|
+
pseudoContent: 'Element\'s background color could not be determined due to a pseudo element',
|
|
30225
|
+
colorParse: 'Could not parse color string ${data.colorParse}'
|
|
30193
30226
|
}
|
|
30194
30227
|
}
|
|
30195
30228
|
},
|
|
@@ -30219,7 +30252,8 @@
|
|
|
30219
30252
|
equalRatio: 'Element has a 1:1 contrast ratio with the background',
|
|
30220
30253
|
shortTextContent: 'Element content is too short to determine if it is actual text content',
|
|
30221
30254
|
nonBmp: 'Element content contains only non-text characters',
|
|
30222
|
-
pseudoContent: 'Element\'s background color could not be determined due to a pseudo element'
|
|
30255
|
+
pseudoContent: 'Element\'s background color could not be determined due to a pseudo element',
|
|
30256
|
+
colorParse: 'Could not parse color string ${data.colorParse}'
|
|
30223
30257
|
}
|
|
30224
30258
|
}
|
|
30225
30259
|
},
|
|
@@ -31112,7 +31146,7 @@
|
|
|
31112
31146
|
selector: 'body',
|
|
31113
31147
|
excludeHidden: false,
|
|
31114
31148
|
matches: 'is-initiator-matches',
|
|
31115
|
-
tags: [ 'cat.aria', 'wcag2a', 'wcag131', 'wcag412', 'EN-301-549', 'EN-9.1.3.1', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-
|
|
31149
|
+
tags: [ 'cat.aria', 'wcag2a', 'wcag131', 'wcag412', 'EN-301-549', 'EN-9.1.3.1', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-10.8.1' ],
|
|
31116
31150
|
all: [],
|
|
31117
31151
|
any: [ 'aria-hidden-body' ],
|
|
31118
31152
|
none: []
|
|
@@ -31122,7 +31156,7 @@
|
|
|
31122
31156
|
selector: '[aria-hidden="true"]',
|
|
31123
31157
|
matches: 'aria-hidden-focus-matches',
|
|
31124
31158
|
excludeHidden: false,
|
|
31125
|
-
tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'TTv5', 'TT6.a', 'EN-301-549', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-
|
|
31159
|
+
tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'TTv5', 'TT6.a', 'EN-301-549', 'EN-9.4.1.2', 'RGAAv4', 'RGAA-10.8.1' ],
|
|
31126
31160
|
actIds: [ '6cfa84' ],
|
|
31127
31161
|
all: [ 'focusable-modal-open', 'focusable-disabled', 'focusable-not-tabbable' ],
|
|
31128
31162
|
any: [],
|
|
@@ -32362,7 +32396,7 @@
|
|
|
32362
32396
|
id: 'valid-lang',
|
|
32363
32397
|
impact: 'serious',
|
|
32364
32398
|
selector: '[lang]:not(html), [xml\\:lang]:not(html)',
|
|
32365
|
-
tags: [ 'cat.language', 'wcag2aa', 'wcag312', 'TTv5', 'TT11.b', 'EN-301-549', 'EN-9.3.1.2', 'ACT', 'RGAAv4', 'RGAA-8.
|
|
32399
|
+
tags: [ 'cat.language', 'wcag2aa', 'wcag312', 'TTv5', 'TT11.b', 'EN-301-549', 'EN-9.3.1.2', 'ACT', 'RGAAv4', 'RGAA-8.8.1' ],
|
|
32366
32400
|
actIds: [ 'de46e4' ],
|
|
32367
32401
|
all: [],
|
|
32368
32402
|
any: [],
|