axe-core 4.3.5-canary.2ca9fef → 4.3.5-canary.2e27dca
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 +2 -2
- package/axe.js +177 -140
- package/axe.min.js +2 -2
- package/package.json +2 -2
- package/sri-history.json +3 -3
package/axe.d.ts
CHANGED
|
@@ -50,8 +50,8 @@ declare namespace axe {
|
|
|
50
50
|
type CrossFrameSelector = CrossTreeSelector[];
|
|
51
51
|
|
|
52
52
|
type ContextObject = {
|
|
53
|
-
include?: BaseSelector | Array<BaseSelector | BaseSelector[]>;
|
|
54
|
-
exclude?: BaseSelector | Array<BaseSelector | BaseSelector[]>;
|
|
53
|
+
include?: Node | BaseSelector | Array<Node | BaseSelector | BaseSelector[]>;
|
|
54
|
+
exclude?: Node | BaseSelector | Array<Node | BaseSelector | BaseSelector[]>;
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
type RunCallback = (error: Error, results: AxeResults) => void;
|
package/axe.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! axe v4.3.5-canary.
|
|
1
|
+
/*! axe v4.3.5-canary.2e27dca
|
|
2
2
|
* Copyright (c) 2022 Deque Systems, Inc.
|
|
3
3
|
*
|
|
4
4
|
* Your use of this Source Code Form is subject to the terms of the Mozilla Public
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}, _typeof(obj);
|
|
23
23
|
}
|
|
24
24
|
var axe = axe || {};
|
|
25
|
-
axe.version = '4.3.5-canary.
|
|
25
|
+
axe.version = '4.3.5-canary.2e27dca';
|
|
26
26
|
if (typeof define === 'function' && define.amd) {
|
|
27
27
|
define('axe-core', [], function() {
|
|
28
28
|
return axe;
|
|
@@ -13315,6 +13315,115 @@
|
|
|
13315
13315
|
return !isNaN(valueNow) ? String(valueNow) : '0';
|
|
13316
13316
|
}
|
|
13317
13317
|
var form_control_value_default = formControlValue;
|
|
13318
|
+
function getUnicodeNonBmpRegExp() {
|
|
13319
|
+
return /[\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u20A0-\u20CF\u20D0-\u20FF\u2100-\u214F\u2150-\u218F\u2190-\u21FF\u2200-\u22FF\u2300-\u23FF\u2400-\u243F\u2440-\u245F\u2460-\u24FF\u2500-\u257F\u2580-\u259F\u25A0-\u25FF\u2600-\u26FF\u2700-\u27BF\uE000-\uF8FF]/g;
|
|
13320
|
+
}
|
|
13321
|
+
function getPunctuationRegExp() {
|
|
13322
|
+
return /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&\xa3\xa2\xa5\xa7\u20ac()*+,\-.\/:;<=>?@\[\]^_`{|}~\xb1]/g;
|
|
13323
|
+
}
|
|
13324
|
+
function getSupplementaryPrivateUseRegExp() {
|
|
13325
|
+
return /[\uDB80-\uDBBF][\uDC00-\uDFFF]/g;
|
|
13326
|
+
}
|
|
13327
|
+
var emoji_regex = __toModule(require_emoji_regex());
|
|
13328
|
+
function hasUnicode(str, options) {
|
|
13329
|
+
var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations;
|
|
13330
|
+
if (emoji) {
|
|
13331
|
+
return emoji_regex['default']().test(str);
|
|
13332
|
+
}
|
|
13333
|
+
if (nonBmp) {
|
|
13334
|
+
return getUnicodeNonBmpRegExp().test(str) || getSupplementaryPrivateUseRegExp().test(str);
|
|
13335
|
+
}
|
|
13336
|
+
if (punctuations) {
|
|
13337
|
+
return getPunctuationRegExp().test(str);
|
|
13338
|
+
}
|
|
13339
|
+
return false;
|
|
13340
|
+
}
|
|
13341
|
+
var has_unicode_default = hasUnicode;
|
|
13342
|
+
function isIconLigature(textVNode) {
|
|
13343
|
+
var differenceThreshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .15;
|
|
13344
|
+
var occuranceThreshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
|
|
13345
|
+
var nodeValue = textVNode.actualNode.nodeValue.trim();
|
|
13346
|
+
if (!sanitize_default(nodeValue) || has_unicode_default(nodeValue, {
|
|
13347
|
+
emoji: true,
|
|
13348
|
+
nonBmp: true
|
|
13349
|
+
})) {
|
|
13350
|
+
return false;
|
|
13351
|
+
}
|
|
13352
|
+
if (!cache_default.get('canvasContext')) {
|
|
13353
|
+
cache_default.set('canvasContext', document.createElement('canvas').getContext('2d'));
|
|
13354
|
+
}
|
|
13355
|
+
var canvasContext = cache_default.get('canvasContext');
|
|
13356
|
+
var canvas = canvasContext.canvas;
|
|
13357
|
+
if (!cache_default.get('fonts')) {
|
|
13358
|
+
cache_default.set('fonts', {});
|
|
13359
|
+
}
|
|
13360
|
+
var fonts = cache_default.get('fonts');
|
|
13361
|
+
var style = window.getComputedStyle(textVNode.parent.actualNode);
|
|
13362
|
+
var fontFamily = style.getPropertyValue('font-family');
|
|
13363
|
+
if (!fonts[fontFamily]) {
|
|
13364
|
+
fonts[fontFamily] = {
|
|
13365
|
+
occurances: 0,
|
|
13366
|
+
numLigatures: 0
|
|
13367
|
+
};
|
|
13368
|
+
}
|
|
13369
|
+
var font = fonts[fontFamily];
|
|
13370
|
+
if (font.occurances >= occuranceThreshold) {
|
|
13371
|
+
if (font.numLigatures / font.occurances === 1) {
|
|
13372
|
+
return true;
|
|
13373
|
+
} else if (font.numLigatures === 0) {
|
|
13374
|
+
return false;
|
|
13375
|
+
}
|
|
13376
|
+
}
|
|
13377
|
+
font.occurances++;
|
|
13378
|
+
var fontSize = 30;
|
|
13379
|
+
var fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
|
|
13380
|
+
canvasContext.font = fontStyle;
|
|
13381
|
+
var firstChar = nodeValue.charAt(0);
|
|
13382
|
+
var width = canvasContext.measureText(firstChar).width;
|
|
13383
|
+
if (width < 30) {
|
|
13384
|
+
var diff = 30 / width;
|
|
13385
|
+
width *= diff;
|
|
13386
|
+
fontSize *= diff;
|
|
13387
|
+
fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
|
|
13388
|
+
}
|
|
13389
|
+
canvas.width = width;
|
|
13390
|
+
canvas.height = fontSize;
|
|
13391
|
+
canvasContext.font = fontStyle;
|
|
13392
|
+
canvasContext.textAlign = 'left';
|
|
13393
|
+
canvasContext.textBaseline = 'top';
|
|
13394
|
+
canvasContext.fillText(firstChar, 0, 0);
|
|
13395
|
+
var compareData = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
|
|
13396
|
+
if (!compareData.some(function(pixel) {
|
|
13397
|
+
return pixel;
|
|
13398
|
+
})) {
|
|
13399
|
+
font.numLigatures++;
|
|
13400
|
+
return true;
|
|
13401
|
+
}
|
|
13402
|
+
canvasContext.clearRect(0, 0, width, fontSize);
|
|
13403
|
+
canvasContext.fillText(nodeValue, 0, 0);
|
|
13404
|
+
var compareWith = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
|
|
13405
|
+
var differences = compareData.reduce(function(diff, pixel, i) {
|
|
13406
|
+
if (pixel === 0 && compareWith[i] === 0) {
|
|
13407
|
+
return diff;
|
|
13408
|
+
}
|
|
13409
|
+
if (pixel !== 0 && compareWith[i] !== 0) {
|
|
13410
|
+
return diff;
|
|
13411
|
+
}
|
|
13412
|
+
return ++diff;
|
|
13413
|
+
}, 0);
|
|
13414
|
+
var expectedWidth = nodeValue.split('').reduce(function(width2, _char3) {
|
|
13415
|
+
return width2 + canvasContext.measureText(_char3).width;
|
|
13416
|
+
}, 0);
|
|
13417
|
+
var actualWidth = canvasContext.measureText(nodeValue).width;
|
|
13418
|
+
var pixelDifference = differences / compareData.length;
|
|
13419
|
+
var sizeDifference = 1 - actualWidth / expectedWidth;
|
|
13420
|
+
if (pixelDifference >= differenceThreshold && sizeDifference >= differenceThreshold) {
|
|
13421
|
+
font.numLigatures++;
|
|
13422
|
+
return true;
|
|
13423
|
+
}
|
|
13424
|
+
return false;
|
|
13425
|
+
}
|
|
13426
|
+
var is_icon_ligature_default = isIconLigature;
|
|
13318
13427
|
function accessibleTextVirtual(virtualNode) {
|
|
13319
13428
|
var context5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
13320
13429
|
var actualNode = virtualNode.actualNode;
|
|
@@ -13322,6 +13431,9 @@
|
|
|
13322
13431
|
if (shouldIgnoreHidden(virtualNode, context5)) {
|
|
13323
13432
|
return '';
|
|
13324
13433
|
}
|
|
13434
|
+
if (shouldIgnoreIconLigature(virtualNode, context5)) {
|
|
13435
|
+
return '';
|
|
13436
|
+
}
|
|
13325
13437
|
var computationSteps = [ arialabelledby_text_default, arialabel_text_default, native_text_alternative_default, form_control_value_default, subtree_text_default, textNodeValue, title_text_default ];
|
|
13326
13438
|
var accName = computationSteps.reduce(function(accName2, step) {
|
|
13327
13439
|
if (context5.startNode === virtualNode) {
|
|
@@ -13353,6 +13465,13 @@
|
|
|
13353
13465
|
}
|
|
13354
13466
|
return !is_visible_default(actualNode, true);
|
|
13355
13467
|
}
|
|
13468
|
+
function shouldIgnoreIconLigature(virtualNode, context5) {
|
|
13469
|
+
var ignoreIconLigature = context5.ignoreIconLigature, pixelThreshold = context5.pixelThreshold, occuranceThreshold = context5.occuranceThreshold;
|
|
13470
|
+
if (virtualNode.props.nodeType !== 3 || !ignoreIconLigature) {
|
|
13471
|
+
return false;
|
|
13472
|
+
}
|
|
13473
|
+
return is_icon_ligature_default(virtualNode, pixelThreshold, occuranceThreshold);
|
|
13474
|
+
}
|
|
13356
13475
|
function prepareContext(virtualNode, context5) {
|
|
13357
13476
|
var actualNode = virtualNode.actualNode;
|
|
13358
13477
|
if (!context5.startNode) {
|
|
@@ -13483,30 +13602,6 @@
|
|
|
13483
13602
|
return visible_virtual_default;
|
|
13484
13603
|
}
|
|
13485
13604
|
});
|
|
13486
|
-
function getUnicodeNonBmpRegExp() {
|
|
13487
|
-
return /[\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u20A0-\u20CF\u20D0-\u20FF\u2100-\u214F\u2150-\u218F\u2190-\u21FF\u2200-\u22FF\u2300-\u23FF\u2400-\u243F\u2440-\u245F\u2460-\u24FF\u2500-\u257F\u2580-\u259F\u25A0-\u25FF\u2600-\u26FF\u2700-\u27BF\uE000-\uF8FF]/g;
|
|
13488
|
-
}
|
|
13489
|
-
function getPunctuationRegExp() {
|
|
13490
|
-
return /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&\xa3\xa2\xa5\xa7\u20ac()*+,\-.\/:;<=>?@\[\]^_`{|}~\xb1]/g;
|
|
13491
|
-
}
|
|
13492
|
-
function getSupplementaryPrivateUseRegExp() {
|
|
13493
|
-
return /[\uDB80-\uDBBF][\uDC00-\uDFFF]/g;
|
|
13494
|
-
}
|
|
13495
|
-
var emoji_regex = __toModule(require_emoji_regex());
|
|
13496
|
-
function hasUnicode(str, options) {
|
|
13497
|
-
var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations;
|
|
13498
|
-
if (emoji) {
|
|
13499
|
-
return emoji_regex['default']().test(str);
|
|
13500
|
-
}
|
|
13501
|
-
if (nonBmp) {
|
|
13502
|
-
return getUnicodeNonBmpRegExp().test(str) || getSupplementaryPrivateUseRegExp().test(str);
|
|
13503
|
-
}
|
|
13504
|
-
if (punctuations) {
|
|
13505
|
-
return getPunctuationRegExp().test(str);
|
|
13506
|
-
}
|
|
13507
|
-
return false;
|
|
13508
|
-
}
|
|
13509
|
-
var has_unicode_default = hasUnicode;
|
|
13510
13605
|
var emoji_regex2 = __toModule(require_emoji_regex());
|
|
13511
13606
|
function removeUnicode(str, options) {
|
|
13512
13607
|
var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations;
|
|
@@ -13542,91 +13637,6 @@
|
|
|
13542
13637
|
return 1;
|
|
13543
13638
|
}
|
|
13544
13639
|
var is_human_interpretable_default = isHumanInterpretable;
|
|
13545
|
-
function isIconLigature(textVNode) {
|
|
13546
|
-
var differenceThreshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .15;
|
|
13547
|
-
var occuranceThreshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
|
|
13548
|
-
var nodeValue = textVNode.actualNode.nodeValue.trim();
|
|
13549
|
-
if (!sanitize_default(nodeValue) || has_unicode_default(nodeValue, {
|
|
13550
|
-
emoji: true,
|
|
13551
|
-
nonBmp: true
|
|
13552
|
-
})) {
|
|
13553
|
-
return false;
|
|
13554
|
-
}
|
|
13555
|
-
if (!cache_default.get('canvasContext')) {
|
|
13556
|
-
cache_default.set('canvasContext', document.createElement('canvas').getContext('2d'));
|
|
13557
|
-
}
|
|
13558
|
-
var canvasContext = cache_default.get('canvasContext');
|
|
13559
|
-
var canvas = canvasContext.canvas;
|
|
13560
|
-
if (!cache_default.get('fonts')) {
|
|
13561
|
-
cache_default.set('fonts', {});
|
|
13562
|
-
}
|
|
13563
|
-
var fonts = cache_default.get('fonts');
|
|
13564
|
-
var style = window.getComputedStyle(textVNode.parent.actualNode);
|
|
13565
|
-
var fontFamily = style.getPropertyValue('font-family');
|
|
13566
|
-
if (!fonts[fontFamily]) {
|
|
13567
|
-
fonts[fontFamily] = {
|
|
13568
|
-
occurances: 0,
|
|
13569
|
-
numLigatures: 0
|
|
13570
|
-
};
|
|
13571
|
-
}
|
|
13572
|
-
var font = fonts[fontFamily];
|
|
13573
|
-
if (font.occurances >= occuranceThreshold) {
|
|
13574
|
-
if (font.numLigatures / font.occurances === 1) {
|
|
13575
|
-
return true;
|
|
13576
|
-
} else if (font.numLigatures === 0) {
|
|
13577
|
-
return false;
|
|
13578
|
-
}
|
|
13579
|
-
}
|
|
13580
|
-
font.occurances++;
|
|
13581
|
-
var fontSize = 30;
|
|
13582
|
-
var fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
|
|
13583
|
-
canvasContext.font = fontStyle;
|
|
13584
|
-
var firstChar = nodeValue.charAt(0);
|
|
13585
|
-
var width = canvasContext.measureText(firstChar).width;
|
|
13586
|
-
if (width < 30) {
|
|
13587
|
-
var diff = 30 / width;
|
|
13588
|
-
width *= diff;
|
|
13589
|
-
fontSize *= diff;
|
|
13590
|
-
fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
|
|
13591
|
-
}
|
|
13592
|
-
canvas.width = width;
|
|
13593
|
-
canvas.height = fontSize;
|
|
13594
|
-
canvasContext.font = fontStyle;
|
|
13595
|
-
canvasContext.textAlign = 'left';
|
|
13596
|
-
canvasContext.textBaseline = 'top';
|
|
13597
|
-
canvasContext.fillText(firstChar, 0, 0);
|
|
13598
|
-
var compareData = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
|
|
13599
|
-
if (!compareData.some(function(pixel) {
|
|
13600
|
-
return pixel;
|
|
13601
|
-
})) {
|
|
13602
|
-
font.numLigatures++;
|
|
13603
|
-
return true;
|
|
13604
|
-
}
|
|
13605
|
-
canvasContext.clearRect(0, 0, width, fontSize);
|
|
13606
|
-
canvasContext.fillText(nodeValue, 0, 0);
|
|
13607
|
-
var compareWith = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
|
|
13608
|
-
var differences = compareData.reduce(function(diff, pixel, i) {
|
|
13609
|
-
if (pixel === 0 && compareWith[i] === 0) {
|
|
13610
|
-
return diff;
|
|
13611
|
-
}
|
|
13612
|
-
if (pixel !== 0 && compareWith[i] !== 0) {
|
|
13613
|
-
return diff;
|
|
13614
|
-
}
|
|
13615
|
-
return ++diff;
|
|
13616
|
-
}, 0);
|
|
13617
|
-
var expectedWidth = nodeValue.split('').reduce(function(width2, _char3) {
|
|
13618
|
-
return width2 + canvasContext.measureText(_char3).width;
|
|
13619
|
-
}, 0);
|
|
13620
|
-
var actualWidth = canvasContext.measureText(nodeValue).width;
|
|
13621
|
-
var pixelDifference = differences / compareData.length;
|
|
13622
|
-
var sizeDifference = 1 - actualWidth / expectedWidth;
|
|
13623
|
-
if (pixelDifference >= differenceThreshold && sizeDifference >= differenceThreshold) {
|
|
13624
|
-
font.numLigatures++;
|
|
13625
|
-
return true;
|
|
13626
|
-
}
|
|
13627
|
-
return false;
|
|
13628
|
-
}
|
|
13629
|
-
var is_icon_ligature_default = isIconLigature;
|
|
13630
13640
|
var _autocomplete = {
|
|
13631
13641
|
stateTerms: [ 'on', 'off' ],
|
|
13632
13642
|
standaloneTerms: [ 'name', 'honorific-prefix', 'given-name', 'additional-name', 'family-name', 'honorific-suffix', 'nickname', 'username', 'new-password', 'current-password', 'organization-title', 'organization', 'street-address', 'address-line1', 'address-line2', 'address-line3', 'address-level4', 'address-level3', 'address-level2', 'address-level1', 'country', 'country-name', 'postal-code', 'cc-name', 'cc-given-name', 'cc-additional-name', 'cc-family-name', 'cc-number', 'cc-exp', 'cc-exp-month', 'cc-exp-year', 'cc-csc', 'cc-type', 'transaction-currency', 'transaction-amount', 'language', 'bday', 'bday-day', 'bday-month', 'bday-year', 'sex', 'url', 'photo', 'one-time-code' ],
|
|
@@ -15902,7 +15912,7 @@
|
|
|
15902
15912
|
ariaAttr.forEach(function(attr) {
|
|
15903
15913
|
preChecks[attr] = validateRowAttrs;
|
|
15904
15914
|
});
|
|
15905
|
-
if (
|
|
15915
|
+
if (allowed) {
|
|
15906
15916
|
for (var _i15 = 0; _i15 < attrs.length; _i15++) {
|
|
15907
15917
|
var _preChecks$attrName;
|
|
15908
15918
|
var attrName = attrs[_i15];
|
|
@@ -15915,6 +15925,9 @@
|
|
|
15915
15925
|
}
|
|
15916
15926
|
if (invalid.length) {
|
|
15917
15927
|
this.data(invalid);
|
|
15928
|
+
if (!is_html_element_default(virtualNode) && !role && !is_focusable_default(virtualNode)) {
|
|
15929
|
+
return void 0;
|
|
15930
|
+
}
|
|
15918
15931
|
return false;
|
|
15919
15932
|
}
|
|
15920
15933
|
return true;
|
|
@@ -15999,8 +16012,12 @@
|
|
|
15999
16012
|
function ariaProhibitedAttrEvaluate(node) {
|
|
16000
16013
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
16001
16014
|
var virtualNode = arguments.length > 2 ? arguments[2] : undefined;
|
|
16002
|
-
var
|
|
16003
|
-
var
|
|
16015
|
+
var elementsAllowedAriaLabel = (options === null || options === void 0 ? void 0 : options.elementsAllowedAriaLabel) || [];
|
|
16016
|
+
var nodeName2 = virtualNode.props.nodeName;
|
|
16017
|
+
var role = get_role_default(virtualNode, {
|
|
16018
|
+
chromium: true
|
|
16019
|
+
});
|
|
16020
|
+
var prohibitedList = listProhibitedAttrs(role, nodeName2, elementsAllowedAriaLabel);
|
|
16004
16021
|
var prohibited = prohibitedList.filter(function(attrName) {
|
|
16005
16022
|
if (!virtualNode.attrNames.includes(attrName)) {
|
|
16006
16023
|
return false;
|
|
@@ -16010,25 +16027,32 @@
|
|
|
16010
16027
|
if (prohibited.length === 0) {
|
|
16011
16028
|
return false;
|
|
16012
16029
|
}
|
|
16013
|
-
|
|
16014
|
-
|
|
16015
|
-
|
|
16016
|
-
|
|
16017
|
-
|
|
16018
|
-
|
|
16019
|
-
|
|
16030
|
+
var messageKey = virtualNode.hasAttr('role') ? 'hasRole' : 'noRole';
|
|
16031
|
+
messageKey += prohibited.length > 1 ? 'Plural' : 'Singular';
|
|
16032
|
+
this.data({
|
|
16033
|
+
role: role,
|
|
16034
|
+
nodeName: nodeName2,
|
|
16035
|
+
messageKey: messageKey,
|
|
16036
|
+
prohibited: prohibited
|
|
16020
16037
|
});
|
|
16038
|
+
var textContent = subtree_text_default(virtualNode, {
|
|
16039
|
+
subtreeDescendant: true
|
|
16040
|
+
});
|
|
16041
|
+
if (sanitize_default(textContent) !== '') {
|
|
16042
|
+
return void 0;
|
|
16043
|
+
}
|
|
16044
|
+
return true;
|
|
16045
|
+
}
|
|
16046
|
+
function listProhibitedAttrs(role, nodeName2, elementsAllowedAriaLabel) {
|
|
16021
16047
|
var roleSpec = standards_default.ariaRoles[role];
|
|
16022
16048
|
if (roleSpec) {
|
|
16023
16049
|
return roleSpec.prohibitedAttrs || [];
|
|
16024
16050
|
}
|
|
16025
|
-
var nodeName2 = virtualNode.props.nodeName;
|
|
16026
16051
|
if (!!role || elementsAllowedAriaLabel.includes(nodeName2)) {
|
|
16027
16052
|
return [];
|
|
16028
16053
|
}
|
|
16029
16054
|
return [ 'aria-label', 'aria-labelledby' ];
|
|
16030
16055
|
}
|
|
16031
|
-
var aria_prohibited_attr_evaluate_default = ariaProhibitedAttrEvaluate;
|
|
16032
16056
|
var standards_exports = {};
|
|
16033
16057
|
__export(standards_exports, {
|
|
16034
16058
|
getAriaRolesByType: function getAriaRolesByType() {
|
|
@@ -17425,10 +17449,13 @@
|
|
|
17425
17449
|
contrast = get_contrast_default(bgColor, fgColor);
|
|
17426
17450
|
} else if (fgColor && bgColor) {
|
|
17427
17451
|
shadowColor = [].concat(_toConsumableArray(shadowColors), [ bgColor ]).reduce(flatten_shadow_colors_default);
|
|
17428
|
-
var
|
|
17429
|
-
var
|
|
17430
|
-
|
|
17431
|
-
|
|
17452
|
+
var fgBgContrast = get_contrast_default(bgColor, fgColor);
|
|
17453
|
+
var bgShContrast = get_contrast_default(bgColor, shadowColor);
|
|
17454
|
+
var fgShContrast = get_contrast_default(shadowColor, fgColor);
|
|
17455
|
+
contrast = Math.max(fgBgContrast, bgShContrast, fgShContrast);
|
|
17456
|
+
if (contrast !== fgBgContrast) {
|
|
17457
|
+
contrastContributor = bgShContrast > fgShContrast ? 'shadowOnBgColor' : 'fgOnShadowColor';
|
|
17458
|
+
}
|
|
17432
17459
|
}
|
|
17433
17460
|
var ptSize = Math.ceil(fontSize * 72) / 96;
|
|
17434
17461
|
var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
|
|
@@ -18948,13 +18975,12 @@
|
|
|
18948
18975
|
if (is_human_interpretable_default(accText) < 1) {
|
|
18949
18976
|
return void 0;
|
|
18950
18977
|
}
|
|
18951
|
-
var
|
|
18952
|
-
|
|
18953
|
-
|
|
18954
|
-
|
|
18955
|
-
|
|
18956
|
-
}).
|
|
18957
|
-
var visibleText = sanitize_default(nonLigatureText).toLowerCase();
|
|
18978
|
+
var visibleText = sanitize_default(subtree_text_default(virtualNode, {
|
|
18979
|
+
subtreeDescendant: true,
|
|
18980
|
+
ignoreIconLigature: true,
|
|
18981
|
+
pixelThreshold: pixelThreshold,
|
|
18982
|
+
occuranceThreshold: occuranceThreshold
|
|
18983
|
+
})).toLowerCase();
|
|
18958
18984
|
if (!visibleText) {
|
|
18959
18985
|
return true;
|
|
18960
18986
|
}
|
|
@@ -19784,7 +19810,7 @@
|
|
|
19784
19810
|
'aria-errormessage-evaluate': aria_errormessage_evaluate_default,
|
|
19785
19811
|
'aria-hidden-body-evaluate': aria_hidden_body_evaluate_default,
|
|
19786
19812
|
'aria-level-evaluate': aria_level_evaluate_default,
|
|
19787
|
-
'aria-prohibited-attr-evaluate':
|
|
19813
|
+
'aria-prohibited-attr-evaluate': ariaProhibitedAttrEvaluate,
|
|
19788
19814
|
'aria-required-attr-evaluate': aria_required_attr_evaluate_default,
|
|
19789
19815
|
'aria-required-children-evaluate': aria_required_children_evaluate_default,
|
|
19790
19816
|
'aria-required-parent-evaluate': aria_required_parent_evaluate_default,
|
|
@@ -22153,7 +22179,8 @@
|
|
|
22153
22179
|
fail: {
|
|
22154
22180
|
singular: 'ARIA attribute is not allowed: ${data.values}',
|
|
22155
22181
|
plural: 'ARIA attributes are not allowed: ${data.values}'
|
|
22156
|
-
}
|
|
22182
|
+
},
|
|
22183
|
+
incomplete: 'Check that there is no problem if the ARIA attribute is ignored on this element: ${data.values}'
|
|
22157
22184
|
}
|
|
22158
22185
|
},
|
|
22159
22186
|
'aria-allowed-role': {
|
|
@@ -22204,8 +22231,18 @@
|
|
|
22204
22231
|
impact: 'serious',
|
|
22205
22232
|
messages: {
|
|
22206
22233
|
pass: 'ARIA attribute is allowed',
|
|
22207
|
-
fail:
|
|
22208
|
-
|
|
22234
|
+
fail: {
|
|
22235
|
+
hasRolePlural: '${data.prohibited} attributes cannot be used with role "${data.role}".',
|
|
22236
|
+
hasRoleSingular: '${data.prohibited} attribute cannot be used with role "${data.role}".',
|
|
22237
|
+
noRolePlural: '${data.prohibited} attributes cannot be used on a ${data.nodeName} with no valid role attribute.',
|
|
22238
|
+
noRoleSingular: '${data.prohibited} attribute cannot be used on a ${data.nodeName} with no valid role attribute.'
|
|
22239
|
+
},
|
|
22240
|
+
incomplete: {
|
|
22241
|
+
hasRoleSingular: '${data.prohibited} attribute is not well supported with role "${data.role}".',
|
|
22242
|
+
hasRolePlural: '${data.prohibited} attributes are not well supported with role "${data.role}".',
|
|
22243
|
+
noRoleSingular: '${data.prohibited} attribute is not well supported on a ${data.nodeName} with no valid role attribute.',
|
|
22244
|
+
noRolePlural: '${data.prohibited} attributes are not well supported on a ${data.nodeName} with no valid role attribute.'
|
|
22245
|
+
}
|
|
22209
22246
|
}
|
|
22210
22247
|
},
|
|
22211
22248
|
'aria-required-attr': {
|
|
@@ -23473,7 +23510,7 @@
|
|
|
23473
23510
|
}
|
|
23474
23511
|
},
|
|
23475
23512
|
pseudoSizeThreshold: .25,
|
|
23476
|
-
shadowOutlineEmMax: .
|
|
23513
|
+
shadowOutlineEmMax: .2
|
|
23477
23514
|
},
|
|
23478
23515
|
id: 'color-contrast'
|
|
23479
23516
|
} ],
|
|
@@ -24345,7 +24382,7 @@
|
|
|
24345
24382
|
}
|
|
24346
24383
|
},
|
|
24347
24384
|
pseudoSizeThreshold: .25,
|
|
24348
|
-
shadowOutlineEmMax: .
|
|
24385
|
+
shadowOutlineEmMax: .2
|
|
24349
24386
|
}
|
|
24350
24387
|
}, {
|
|
24351
24388
|
id: 'link-in-text-block',
|