axe-core 3.3.1-canary.ec9b762 → 3.3.1
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/CHANGELOG.md +0 -19
- package/axe.js +16 -43
- package/axe.min.js +2 -2
- package/bower.json +2 -8
- package/doc/API.md +75 -163
- package/doc/examples/chrome-debugging-protocol/package.json +1 -1
- package/doc/examples/jasmine/package.json +2 -2
- package/doc/examples/jest_react/package.json +8 -8
- package/doc/examples/jsdom/package.json +3 -3
- package/doc/examples/mocha/package.json +2 -2
- package/doc/examples/phantomjs/package.json +1 -1
- package/doc/examples/puppeteer/package.json +2 -2
- package/doc/examples/qunit/package.json +1 -1
- package/doc/examples/test-examples.js +6 -16
- package/doc/projects.md +1 -1
- package/doc/rule-descriptions.md +86 -86
- package/lib/checks/aria/valid-attr-value.json +1 -1
- package/lib/checks/forms/fieldset.json +0 -1
- package/lib/checks/forms/group-labelledby.json +0 -1
- package/lib/checks/tables/caption-faked.json +1 -1
- package/lib/commons/dom/is-visible.js +9 -27
- package/lib/core/index.js +3 -1
- package/lib/core/utils/escape-selector.js +1 -1
- package/lib/core/utils/flattened-tree.js +1 -4
- package/lib/rules/aria-form-field-name-matches.js +0 -11
- package/lib/rules/avoid-inline-spacing.json +1 -1
- package/lib/rules/checkboxgroup.json +1 -2
- package/lib/rules/radiogroup.json +1 -2
- package/lib/rules/video-description.json +1 -3
- package/package.json +7 -7
- package/sri-history.json +1 -5
- package/locales/es.json +0 -777
package/CHANGELOG.md
CHANGED
|
@@ -2,25 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
-
### [3.3.1-canary.ec9b762](https://github.com/dequelabs/axe-core/compare/v3.3.1...v3.3.1-canary.ec9b762) (2019-08-13)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
### Bug Fixes
|
|
9
|
-
|
|
10
|
-
* **aria-form-field-name-matches:** don't test combobox elements when they have a child input ([#1742](https://github.com/dequelabs/axe-core/issues/1742)) ([f0be6dc](https://github.com/dequelabs/axe-core/commit/f0be6dc))
|
|
11
|
-
* **aria-valid-attr-value:** fix incomplete translation message ([#1739](https://github.com/dequelabs/axe-core/issues/1739)) ([a0f3eef](https://github.com/dequelabs/axe-core/commit/a0f3eef))
|
|
12
|
-
* **flatten-tree:** do not call deprecated getDistributedNodes ([#1729](https://github.com/dequelabs/axe-core/issues/1729)) ([46a5d11](https://github.com/dequelabs/axe-core/commit/46a5d11))
|
|
13
|
-
* update tags to wcag21aa for rule avoid-inline-spacing ([#1757](https://github.com/dequelabs/axe-core/issues/1757)) ([973d48f](https://github.com/dequelabs/axe-core/commit/973d48f))
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
### Features
|
|
17
|
-
|
|
18
|
-
* **fieldset, group-labelledby:** deprecate fieldset and group-labelledby checks ([#1740](https://github.com/dequelabs/axe-core/issues/1740)) ([ec9b762](https://github.com/dequelabs/axe-core/commit/ec9b762))
|
|
19
|
-
* **i18n:** add spanish translation ([#1758](https://github.com/dequelabs/axe-core/issues/1758)) ([e9f821d](https://github.com/dequelabs/axe-core/commit/e9f821d)), closes [#1757](https://github.com/dequelabs/axe-core/issues/1757)
|
|
20
|
-
* **is-visible:** add support for clip-path techniques ([#1706](https://github.com/dequelabs/axe-core/issues/1706)) ([8ab262a](https://github.com/dequelabs/axe-core/commit/8ab262a))
|
|
21
|
-
* **radiogroup, checkboxgroup:** deprecate radiogroup and checkboxgroup rules ([#1640](https://github.com/dequelabs/axe-core/issues/1640)) ([6d30880](https://github.com/dequelabs/axe-core/commit/6d30880))
|
|
22
|
-
* **video-description:** deprecate video-description rule ([#1737](https://github.com/dequelabs/axe-core/issues/1737)) ([e91c25f](https://github.com/dequelabs/axe-core/commit/e91c25f))
|
|
23
|
-
|
|
24
5
|
## [3.3.1](https://github.com/dequelabs/axe-core/compare/v3.3.0...v3.3.1) (2019-07-23)
|
|
25
6
|
|
|
26
7
|
### Bug Fixes
|
package/axe.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! axe v3.3.1
|
|
1
|
+
/*! axe v3.3.1
|
|
2
2
|
* Copyright (c) 2019 Deque Systems, Inc.
|
|
3
3
|
*
|
|
4
4
|
* Your use of this Source Code Form is subject to the terms of the Mozilla Public
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
return _typeof(obj);
|
|
27
27
|
}
|
|
28
28
|
var axe = axe || {};
|
|
29
|
-
axe.version = '3.3.1
|
|
29
|
+
axe.version = '3.3.1';
|
|
30
30
|
if (typeof define === 'function' && define.amd) {
|
|
31
31
|
define('axe-core', [], function() {
|
|
32
32
|
'use strict';
|
|
@@ -5059,7 +5059,7 @@
|
|
|
5059
5059
|
}, []);
|
|
5060
5060
|
return [ retVal ];
|
|
5061
5061
|
} else {
|
|
5062
|
-
if (nodeName === 'content'
|
|
5062
|
+
if (nodeName === 'content') {
|
|
5063
5063
|
realArray = Array.from(node.getDistributedNodes());
|
|
5064
5064
|
return realArray.reduce(function(res, child) {
|
|
5065
5065
|
return reduceShadowDOM(res, child, parent);
|
|
@@ -7993,7 +7993,7 @@
|
|
|
7993
7993
|
return out;
|
|
7994
7994
|
},
|
|
7995
7995
|
incomplete: function anonymous(it) {
|
|
7996
|
-
var out = 'ARIA attribute
|
|
7996
|
+
var out = 'ARIA attribute{=it.data && it.data.length > 1 ? \'s\' : \'\'}} element ID does not exist on the page:';
|
|
7997
7997
|
var arr1 = it.data;
|
|
7998
7998
|
if (arr1) {
|
|
7999
7999
|
var value, i1 = -1, l1 = arr1.length - 1;
|
|
@@ -9033,7 +9033,7 @@
|
|
|
9033
9033
|
return out;
|
|
9034
9034
|
},
|
|
9035
9035
|
fail: function anonymous(it) {
|
|
9036
|
-
var out = 'The first
|
|
9036
|
+
var out = 'The first row of the table should be a caption instead of a table cell';
|
|
9037
9037
|
return out;
|
|
9038
9038
|
}
|
|
9039
9039
|
}
|
|
@@ -9246,9 +9246,6 @@
|
|
|
9246
9246
|
if (nodeName === 'BUTTON' || role === 'button') {
|
|
9247
9247
|
return false;
|
|
9248
9248
|
}
|
|
9249
|
-
if (role === 'combobox' && axe.utils.querySelectorAll(virtualNode, 'input:not([type="hidden"])').length) {
|
|
9250
|
-
return false;
|
|
9251
|
-
}
|
|
9252
9249
|
return true;
|
|
9253
9250
|
},
|
|
9254
9251
|
tags: [ 'wcag2a', 'wcag412' ],
|
|
@@ -9309,9 +9306,6 @@
|
|
|
9309
9306
|
if (nodeName === 'BUTTON' || role === 'button') {
|
|
9310
9307
|
return false;
|
|
9311
9308
|
}
|
|
9312
|
-
if (role === 'combobox' && axe.utils.querySelectorAll(virtualNode, 'input:not([type="hidden"])').length) {
|
|
9313
|
-
return false;
|
|
9314
|
-
}
|
|
9315
9309
|
return true;
|
|
9316
9310
|
},
|
|
9317
9311
|
tags: [ 'wcag2a', 'wcag412' ],
|
|
@@ -9409,7 +9403,7 @@
|
|
|
9409
9403
|
}, {
|
|
9410
9404
|
id: 'avoid-inline-spacing',
|
|
9411
9405
|
selector: '[style]',
|
|
9412
|
-
tags: [ '
|
|
9406
|
+
tags: [ 'wcag21', 'wcag1412' ],
|
|
9413
9407
|
all: [ 'avoid-inline-spacing' ],
|
|
9414
9408
|
any: [],
|
|
9415
9409
|
none: []
|
|
@@ -9442,8 +9436,7 @@
|
|
|
9442
9436
|
}, {
|
|
9443
9437
|
id: 'checkboxgroup',
|
|
9444
9438
|
selector: 'input[type=checkbox][name]',
|
|
9445
|
-
tags: [ 'cat.forms', 'best-practice'
|
|
9446
|
-
enabled: false,
|
|
9439
|
+
tags: [ 'cat.forms', 'best-practice' ],
|
|
9447
9440
|
all: [],
|
|
9448
9441
|
any: [ 'group-labelledby', 'fieldset' ],
|
|
9449
9442
|
none: []
|
|
@@ -10097,8 +10090,7 @@
|
|
|
10097
10090
|
}, {
|
|
10098
10091
|
id: 'radiogroup',
|
|
10099
10092
|
selector: 'input[type=radio][name]',
|
|
10100
|
-
tags: [ 'cat.forms', 'best-practice'
|
|
10101
|
-
enabled: false,
|
|
10093
|
+
tags: [ 'cat.forms', 'best-practice' ],
|
|
10102
10094
|
all: [],
|
|
10103
10095
|
any: [ 'group-labelledby', 'fieldset' ],
|
|
10104
10096
|
none: []
|
|
@@ -10239,8 +10231,7 @@
|
|
|
10239
10231
|
id: 'video-description',
|
|
10240
10232
|
selector: 'video',
|
|
10241
10233
|
excludeHidden: false,
|
|
10242
|
-
tags: [ 'cat.text-alternatives', 'wcag2aa', 'wcag125', 'section508', 'section508.22.b'
|
|
10243
|
-
enabled: false,
|
|
10234
|
+
tags: [ 'cat.text-alternatives', 'wcag2aa', 'wcag125', 'section508', 'section508.22.b' ],
|
|
10244
10235
|
all: [],
|
|
10245
10236
|
any: [],
|
|
10246
10237
|
none: [ 'description' ]
|
|
@@ -10968,8 +10959,7 @@
|
|
|
10968
10959
|
}
|
|
10969
10960
|
return false;
|
|
10970
10961
|
});
|
|
10971
|
-
}
|
|
10972
|
-
deprecated: true
|
|
10962
|
+
}
|
|
10973
10963
|
}, {
|
|
10974
10964
|
id: 'group-labelledby',
|
|
10975
10965
|
evaluate: function evaluate(node, options, virtualNode, context) {
|
|
@@ -11038,8 +11028,7 @@
|
|
|
11038
11028
|
}
|
|
11039
11029
|
return false;
|
|
11040
11030
|
});
|
|
11041
|
-
}
|
|
11042
|
-
deprecated: true
|
|
11031
|
+
}
|
|
11043
11032
|
}, {
|
|
11044
11033
|
id: 'accesskeys',
|
|
11045
11034
|
evaluate: function evaluate(node, options, virtualNode, context) {
|
|
@@ -15378,27 +15367,11 @@
|
|
|
15378
15367
|
}
|
|
15379
15368
|
return element.compareDocumentPosition(firstPageLink.actualNode) === element.DOCUMENT_POSITION_FOLLOWING;
|
|
15380
15369
|
};
|
|
15381
|
-
|
|
15382
|
-
var clipPathRegex = /(\w+)\((\d+)/;
|
|
15383
|
-
function isClipped(style) {
|
|
15370
|
+
function isClipped(clip) {
|
|
15384
15371
|
'use strict';
|
|
15385
|
-
var
|
|
15386
|
-
|
|
15387
|
-
|
|
15388
|
-
return matchesClip[3] - matchesClip[1] <= 0 && matchesClip[2] - matchesClip[4] <= 0;
|
|
15389
|
-
}
|
|
15390
|
-
if (matchesClipPath) {
|
|
15391
|
-
var type = matchesClipPath[1];
|
|
15392
|
-
var value = parseInt(matchesClipPath[2], 10);
|
|
15393
|
-
switch (type) {
|
|
15394
|
-
case 'inset':
|
|
15395
|
-
return value >= 50;
|
|
15396
|
-
|
|
15397
|
-
case 'circle':
|
|
15398
|
-
return value === 0;
|
|
15399
|
-
|
|
15400
|
-
default:
|
|
15401
|
-
}
|
|
15372
|
+
var matches = clip.match(/rect\s*\(([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px\s*\)/);
|
|
15373
|
+
if (matches && matches.length === 5) {
|
|
15374
|
+
return matches[3] - matches[1] <= 0 && matches[2] - matches[4] <= 0;
|
|
15402
15375
|
}
|
|
15403
15376
|
return false;
|
|
15404
15377
|
}
|
|
@@ -15420,7 +15393,7 @@
|
|
|
15420
15393
|
return false;
|
|
15421
15394
|
}
|
|
15422
15395
|
var nodeName = el.nodeName.toUpperCase();
|
|
15423
|
-
if (style.getPropertyValue('display') === 'none' || [ 'STYLE', 'SCRIPT', 'NOSCRIPT', 'TEMPLATE' ].includes(nodeName) || !screenReader && isClipped(style) || !recursed && (style.getPropertyValue('visibility') === 'hidden' || !screenReader && dom.isOffscreen(el)) || screenReader && el.getAttribute('aria-hidden') === 'true') {
|
|
15396
|
+
if (style.getPropertyValue('display') === 'none' || [ 'STYLE', 'SCRIPT', 'NOSCRIPT', 'TEMPLATE' ].includes(nodeName) || !screenReader && isClipped(style.getPropertyValue('clip')) || !recursed && (style.getPropertyValue('visibility') === 'hidden' || !screenReader && dom.isOffscreen(el)) || screenReader && el.getAttribute('aria-hidden') === 'true') {
|
|
15424
15397
|
return false;
|
|
15425
15398
|
}
|
|
15426
15399
|
var parent = el.assignedSlot ? el.assignedSlot : el.parentNode;
|