axe-core 4.2.0-canary.f1a0368 → 4.2.0

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +0 -14
  2. package/README.md +1 -1
  3. package/axe.d.ts +1 -1
  4. package/axe.js +4 -45
  5. package/axe.min.js +2 -2
  6. package/bower.json +2 -8
  7. package/doc/rule-descriptions.md +104 -104
  8. package/lib/checks/forms/autocomplete-appropriate-evaluate.js +0 -1
  9. package/lib/core/utils/index.js +0 -1
  10. package/lib/rules/area-alt.json +0 -1
  11. package/lib/rules/aria-allowed-attr.json +0 -1
  12. package/lib/rules/aria-command-name.json +0 -1
  13. package/lib/rules/aria-hidden-focus.json +0 -1
  14. package/lib/rules/aria-input-field-name.json +0 -1
  15. package/lib/rules/aria-required-children.json +0 -1
  16. package/lib/rules/aria-required-parent.json +0 -1
  17. package/lib/rules/aria-valid-attr-value.json +0 -1
  18. package/lib/rules/audio-caption.json +0 -1
  19. package/lib/rules/autocomplete-valid.json +0 -1
  20. package/lib/rules/button-name.json +0 -1
  21. package/lib/rules/css-orientation-lock.json +0 -1
  22. package/lib/rules/document-title.json +0 -1
  23. package/lib/rules/duplicate-id-aria.json +0 -1
  24. package/lib/rules/frame-focusable-content.json +2 -2
  25. package/lib/rules/html-has-lang.json +0 -1
  26. package/lib/rules/html-lang-valid.json +0 -1
  27. package/lib/rules/html-xml-lang-mismatch.json +0 -1
  28. package/lib/rules/identical-links-same-purpose.json +0 -1
  29. package/lib/rules/image-alt.json +0 -1
  30. package/lib/rules/input-image-alt.json +0 -1
  31. package/lib/rules/label-content-name-mismatch.json +0 -1
  32. package/lib/rules/label.json +0 -1
  33. package/lib/rules/link-name.json +0 -1
  34. package/lib/rules/meta-viewport.json +0 -1
  35. package/lib/rules/nested-interactive.json +0 -1
  36. package/lib/rules/no-autoplay-audio.json +0 -1
  37. package/lib/rules/object-alt.json +0 -1
  38. package/lib/rules/role-img-alt.json +0 -1
  39. package/lib/rules/scrollable-region-focusable.json +0 -1
  40. package/lib/rules/select-name.json +0 -1
  41. package/lib/rules/svg-img-alt.json +0 -1
  42. package/lib/rules/td-headers-attr.json +0 -1
  43. package/lib/rules/th-has-data-cells.json +0 -1
  44. package/lib/rules/video-caption.json +0 -1
  45. package/locales/pt_BR.json +44 -163
  46. package/package.json +3 -3
  47. package/sri-history.json +229 -233
  48. package/.prettierrc.json +0 -10
  49. package/lib/core/utils/get-standards.js +0 -6
package/CHANGELOG.md CHANGED
@@ -2,20 +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
- ## [4.2.0-canary.f1a0368](https://github.com/dequelabs/axe-core/compare/v4.2.0...v4.2.0-canary.f1a0368) (2021-05-02)
6
-
7
-
8
- ### Features
9
-
10
- * **rule:** add ACT Rule IDs to test rule objects ([#2866](https://github.com/dequelabs/axe-core/issues/2866)) ([cc1ebf5](https://github.com/dequelabs/axe-core/commit/cc1ebf520caaf787fe73498cac0e4917d357edad)), closes [#2820](https://github.com/dequelabs/axe-core/issues/2820)
11
-
12
-
13
- ### Bug Fixes
14
-
15
- * **autocomplete-appropriate:** pass for autocomplete=username and type=email ([#2896](https://github.com/dequelabs/axe-core/issues/2896)) ([43394bc](https://github.com/dequelabs/axe-core/commit/43394bcd01c631f0c129f2f584d88a3a134a92a7))
16
- * **getStandards:** Read standards from utils ([#2903](https://github.com/dequelabs/axe-core/issues/2903)) ([f1a0368](https://github.com/dequelabs/axe-core/commit/f1a036890b9befe8c1a0af388fd0f215bee6d9ae))
17
- * **types:** make `evaluate` check optional ([#2902](https://github.com/dequelabs/axe-core/issues/2902)) ([417f572](https://github.com/dequelabs/axe-core/commit/417f5724112e46f128efd5f56da9f891bf1e938c))
18
-
19
5
  ## [4.2.0](https://github.com/dequelabs/axe-core/compare/v4.1.2...v4.2.0) (2021-04-23)
20
6
 
21
7
  ### Features
package/README.md CHANGED
@@ -16,7 +16,7 @@ Axe is an accessibility testing engine for websites and other HTML-based user in
16
16
 
17
17
  Axe-core has different types of rules, for WCAG 2.0 and 2.1 on level A and AA, as well as a number of best practices that help you identify common accessibility practices like ensuring every page has an `h1` heading, and to help you avoid "gotchas" in ARIA like where an ARIA attribute you used will get ignored.
18
18
 
19
- With axe-core, you can find **on average 57% of WCAG issues automatically**. Additionally, axe-core will return elements as "incomplete" where axe-core could not be certain, and manual review is needed. To further improve test coverage we recommend the [intelligent guided tests](https://www.youtube.com/watch?v=AtsX0dPCG_4&feature=youtu.be&ab_channel=DequeSystems) in the [axe Extension](https://www.deque.com/axe/browser-extensions/).
19
+ With axe-core, you can find **up to 50% of WCAG issues automatically**. Additionally, axe-core will return elements as "incomplete" where axe-core could not be certain, and manual review is needed. To further improve test coverage we recommend the [intelligent guided tests](https://www.youtube.com/watch?v=AtsX0dPCG_4&feature=youtu.be&ab_channel=DequeSystems) in the [axe Extension](https://www.deque.com/axe/browser-extensions/).
20
20
 
21
21
  The complete list of rules, grouped WCAG level and best practice, can found in [doc/rule-descriptions.md](./doc/rule-descriptions.md).
22
22
 
package/axe.d.ts CHANGED
@@ -206,7 +206,7 @@ declare namespace axe {
206
206
  }
207
207
  interface Check {
208
208
  id: string;
209
- evaluate?: Function | string;
209
+ evaluate: Function | string;
210
210
  after?: Function | string;
211
211
  options?: any;
212
212
  matches?: string;
package/axe.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! axe v4.2.0-canary.f1a0368
1
+ /*! axe v4.2.0
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.2.0-canary.f1a0368';
30
+ axe.version = '4.2.0';
31
31
  if (typeof define === 'function' && define.amd) {
32
32
  define('axe-core', [], function() {
33
33
  return axe;
@@ -5067,9 +5067,6 @@
5067
5067
  getShadowSelector: function getShadowSelector() {
5068
5068
  return get_shadow_selector_default;
5069
5069
  },
5070
- getStandards: function getStandards() {
5071
- return _getStandards;
5072
- },
5073
5070
  getStyleSheetFactory: function getStyleSheetFactory() {
5074
5071
  return get_stylesheet_factory_default;
5075
5072
  },
@@ -10754,9 +10751,6 @@
10754
10751
  return windowScroll.concat(getElmScrollRecursive(document.body));
10755
10752
  }
10756
10753
  var get_scroll_state_default = getScrollState;
10757
- function _getStandards() {
10758
- return clone_default(standards_default);
10759
- }
10760
10754
  function getStyleSheetFactory(dynamicDoc) {
10761
10755
  if (!dynamicDoc) {
10762
10756
  throw new Error('axe.utils.getStyleSheetFactory should be invoked with an argument');
@@ -16829,7 +16823,6 @@
16829
16823
  var allowedTypesMap = {
16830
16824
  bday: [ 'text', 'search', 'date' ],
16831
16825
  email: [ 'text', 'search', 'email' ],
16832
- username: [ 'text', 'search', 'email' ],
16833
16826
  'street-address': [ 'text' ],
16834
16827
  tel: [ 'text', 'search', 'tel' ],
16835
16828
  'tel-country-code': [ 'text', 'search', 'tel' ],
@@ -21066,8 +21059,8 @@
21066
21059
  help: 'Form field must not have multiple label elements'
21067
21060
  },
21068
21061
  'frame-focusable-content': {
21069
- description: 'Ensures <frame> and <iframe> elements with focusable content do not have tabindex=-1',
21070
- help: 'Frames with focusable content must not have tabindex=-1'
21062
+ description: 'Ensures <frame> and <iframe> elements with tabindex=-1 do not have focusable content',
21063
+ help: 'Frames with tabindex=-1 must not have focusable content'
21071
21064
  },
21072
21065
  'frame-tested': {
21073
21066
  description: 'Ensures <iframe> and <frame> elements contain the axe-core script',
@@ -22191,7 +22184,6 @@
22191
22184
  selector: 'map area[href]',
22192
22185
  excludeHidden: false,
22193
22186
  tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'wcag244', 'wcag412', 'section508', 'section508.22.a', 'ACT' ],
22194
- actIds: [ 'c487ae' ],
22195
22187
  all: [],
22196
22188
  any: [ {
22197
22189
  options: {
@@ -22209,7 +22201,6 @@
22209
22201
  id: 'aria-allowed-attr',
22210
22202
  matches: 'aria-allowed-attr-matches',
22211
22203
  tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
22212
- actIds: [ '5c01ea' ],
22213
22204
  all: [],
22214
22205
  any: [ 'aria-allowed-attr' ],
22215
22206
  none: [ 'aria-unsupported-attr', 'aria-prohibited-attr' ]
@@ -22233,7 +22224,6 @@
22233
22224
  selector: '[role="link"], [role="button"], [role="menuitem"]',
22234
22225
  matches: 'no-naming-method-matches',
22235
22226
  tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
22236
- actIds: [ '97a4e1' ],
22237
22227
  all: [],
22238
22228
  any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
22239
22229
  options: {
@@ -22270,7 +22260,6 @@
22270
22260
  matches: 'aria-hidden-focus-matches',
22271
22261
  excludeHidden: false,
22272
22262
  tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'wcag131' ],
22273
- actIds: [ '6cfa84' ],
22274
22263
  all: [ 'focusable-modal-open', 'focusable-disabled', 'focusable-not-tabbable' ],
22275
22264
  any: [],
22276
22265
  none: []
@@ -22279,7 +22268,6 @@
22279
22268
  selector: '[role="combobox"], [role="listbox"], [role="searchbox"], [role="slider"], [role="spinbutton"], [role="textbox"]',
22280
22269
  matches: 'no-naming-method-matches',
22281
22270
  tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'ACT' ],
22282
- actIds: [ 'e086e5' ],
22283
22271
  all: [],
22284
22272
  any: [ 'aria-label', 'aria-labelledby', {
22285
22273
  options: {
@@ -22326,7 +22314,6 @@
22326
22314
  selector: '[role]',
22327
22315
  matches: 'aria-required-children-matches',
22328
22316
  tags: [ 'cat.aria', 'wcag2a', 'wcag131' ],
22329
- actIds: [ 'ff89c9' ],
22330
22317
  all: [],
22331
22318
  any: [ {
22332
22319
  options: {
@@ -22340,7 +22327,6 @@
22340
22327
  selector: '[role]',
22341
22328
  matches: 'aria-required-parent-matches',
22342
22329
  tags: [ 'cat.aria', 'wcag2a', 'wcag131' ],
22343
- actIds: [ 'bc4a75', 'ff89c9' ],
22344
22330
  all: [],
22345
22331
  any: [ 'aria-required-parent' ],
22346
22332
  none: []
@@ -22414,7 +22400,6 @@
22414
22400
  id: 'aria-valid-attr-value',
22415
22401
  matches: 'aria-has-attr-matches',
22416
22402
  tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
22417
- actIds: [ '5c01ea', 'c487ae' ],
22418
22403
  all: [ {
22419
22404
  options: [],
22420
22405
  id: 'aria-valid-attr-value'
@@ -22437,7 +22422,6 @@
22437
22422
  enabled: false,
22438
22423
  excludeHidden: false,
22439
22424
  tags: [ 'cat.time-and-media', 'wcag2a', 'wcag121', 'section508', 'section508.22.a' ],
22440
- actIds: [ 'c3232f', 'e7aa44' ],
22441
22425
  all: [],
22442
22426
  any: [],
22443
22427
  none: [ 'caption' ]
@@ -22445,7 +22429,6 @@
22445
22429
  id: 'autocomplete-valid',
22446
22430
  matches: 'autocomplete-matches',
22447
22431
  tags: [ 'cat.forms', 'wcag21aa', 'wcag135' ],
22448
- actIds: [ '73f2c2' ],
22449
22432
  all: [ 'autocomplete-valid', 'autocomplete-appropriate' ],
22450
22433
  any: [],
22451
22434
  none: []
@@ -22474,7 +22457,6 @@
22474
22457
  selector: 'button',
22475
22458
  matches: 'no-explicit-name-required-matches',
22476
22459
  tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'section508', 'section508.22.a', 'ACT' ],
22477
- actIds: [ '97a4e1', 'm6b1q3' ],
22478
22460
  all: [],
22479
22461
  any: [ 'button-has-visible-text', 'aria-label', 'aria-labelledby', {
22480
22462
  options: {
@@ -22533,7 +22515,6 @@
22533
22515
  id: 'css-orientation-lock',
22534
22516
  selector: 'html',
22535
22517
  tags: [ 'cat.structure', 'wcag134', 'wcag21aa', 'experimental' ],
22536
- actIds: [ 'b33eff' ],
22537
22518
  all: [ {
22538
22519
  options: {
22539
22520
  degreeThreshold: 2
@@ -22564,7 +22545,6 @@
22564
22545
  selector: 'html',
22565
22546
  matches: 'is-initiator-matches',
22566
22547
  tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag242', 'ACT' ],
22567
- actIds: [ '2779a5' ],
22568
22548
  all: [],
22569
22549
  any: [ 'doc-has-title' ],
22570
22550
  none: []
@@ -22583,7 +22563,6 @@
22583
22563
  matches: 'duplicate-id-aria-matches',
22584
22564
  excludeHidden: false,
22585
22565
  tags: [ 'cat.parsing', 'wcag2a', 'wcag411' ],
22586
- actIds: [ '3ea0c8' ],
22587
22566
  all: [],
22588
22567
  any: [ 'duplicate-id-aria' ],
22589
22568
  none: []
@@ -22703,7 +22682,6 @@
22703
22682
  selector: 'html',
22704
22683
  matches: 'is-initiator-matches',
22705
22684
  tags: [ 'cat.language', 'wcag2a', 'wcag311', 'ACT' ],
22706
- actIds: [ 'b5c3f8' ],
22707
22685
  all: [],
22708
22686
  any: [ {
22709
22687
  options: {
@@ -22716,7 +22694,6 @@
22716
22694
  id: 'html-lang-valid',
22717
22695
  selector: 'html[lang], html[xml\\:lang]',
22718
22696
  tags: [ 'cat.language', 'wcag2a', 'wcag311', 'ACT' ],
22719
- actIds: [ 'bf051a' ],
22720
22697
  all: [],
22721
22698
  any: [],
22722
22699
  none: [ {
@@ -22730,7 +22707,6 @@
22730
22707
  selector: 'html[lang][xml\\:lang]',
22731
22708
  matches: 'xml-lang-mismatch-matches',
22732
22709
  tags: [ 'cat.language', 'wcag2a', 'wcag311', 'ACT' ],
22733
- actIds: [ '5b7ae0' ],
22734
22710
  all: [ 'xml-lang-mismatch' ],
22735
22711
  any: [],
22736
22712
  none: []
@@ -22740,7 +22716,6 @@
22740
22716
  excludeHidden: false,
22741
22717
  matches: 'identical-links-same-purpose-matches',
22742
22718
  tags: [ 'cat.semantics', 'wcag2aaa', 'wcag249', 'best-practice' ],
22743
- actIds: [ 'b20e66', 'fd3a94' ],
22744
22719
  all: [ 'identical-links-same-purpose' ],
22745
22720
  any: [],
22746
22721
  none: []
@@ -22749,7 +22724,6 @@
22749
22724
  selector: 'img',
22750
22725
  matches: 'no-explicit-name-required-matches',
22751
22726
  tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'ACT' ],
22752
- actIds: [ '23a2a8' ],
22753
22727
  all: [],
22754
22728
  any: [ 'has-alt', 'aria-label', 'aria-labelledby', {
22755
22729
  options: {
@@ -22793,7 +22767,6 @@
22793
22767
  selector: 'input[type="image"]',
22794
22768
  matches: 'no-explicit-name-required-matches',
22795
22769
  tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'ACT' ],
22796
- actIds: [ '59796f' ],
22797
22770
  all: [],
22798
22771
  any: [ {
22799
22772
  options: {
@@ -22811,7 +22784,6 @@
22811
22784
  id: 'label-content-name-mismatch',
22812
22785
  matches: 'label-content-name-mismatch-matches',
22813
22786
  tags: [ 'cat.semantics', 'wcag21a', 'wcag253', 'experimental' ],
22814
- actIds: [ '2ee8b8' ],
22815
22787
  all: [],
22816
22788
  any: [ {
22817
22789
  options: {
@@ -22834,7 +22806,6 @@
22834
22806
  selector: 'input, textarea',
22835
22807
  matches: 'label-matches',
22836
22808
  tags: [ 'cat.forms', 'wcag2a', 'wcag412', 'wcag131', 'section508', 'section508.22.n', 'ACT' ],
22837
- actIds: [ 'e086e5', '307n5z' ],
22838
22809
  all: [],
22839
22810
  any: [ 'implicit-label', 'explicit-label', 'aria-label', 'aria-labelledby', {
22840
22811
  options: {
@@ -22949,7 +22920,6 @@
22949
22920
  id: 'link-name',
22950
22921
  selector: 'a[href]',
22951
22922
  tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'wcag244', 'section508', 'section508.22.a', 'ACT' ],
22952
- actIds: [ 'c487ae' ],
22953
22923
  all: [],
22954
22924
  any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
22955
22925
  options: {
@@ -23009,7 +22979,6 @@
23009
22979
  selector: 'meta[name="viewport"]',
23010
22980
  excludeHidden: false,
23011
22981
  tags: [ 'cat.sensory-and-visual-cues', 'best-practice', 'ACT' ],
23012
- actIds: [ 'b4f0c3' ],
23013
22982
  all: [],
23014
22983
  any: [ {
23015
22984
  options: {
@@ -23022,7 +22991,6 @@
23022
22991
  id: 'nested-interactive',
23023
22992
  matches: 'nested-interactive-matches',
23024
22993
  tags: [ 'cat.keyboard', 'wcag2a', 'wcag412' ],
23025
- actIds: [ '307n5z' ],
23026
22994
  all: [],
23027
22995
  any: [ 'no-focusable-content' ],
23028
22996
  none: []
@@ -23032,7 +23000,6 @@
23032
23000
  selector: 'audio[autoplay], video[autoplay]',
23033
23001
  matches: 'no-autoplay-audio-matches',
23034
23002
  tags: [ 'cat.time-and-media', 'wcag2a', 'wcag142', 'experimental' ],
23035
- actIds: [ '80f0bf' ],
23036
23003
  preload: true,
23037
23004
  all: [ {
23038
23005
  options: {
@@ -23047,7 +23014,6 @@
23047
23014
  selector: 'object',
23048
23015
  matches: 'no-explicit-name-required-matches',
23049
23016
  tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a' ],
23050
- actIds: [ '8fc3b6' ],
23051
23017
  all: [],
23052
23018
  any: [ 'aria-label', 'aria-labelledby', {
23053
23019
  options: {
@@ -23116,7 +23082,6 @@
23116
23082
  selector: '[role=\'img\']:not(img, area, input, object)',
23117
23083
  matches: 'html-namespace-matches',
23118
23084
  tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'ACT' ],
23119
- actIds: [ '23a2a8' ],
23120
23085
  all: [],
23121
23086
  any: [ 'aria-label', 'aria-labelledby', {
23122
23087
  options: {
@@ -23141,7 +23106,6 @@
23141
23106
  id: 'scrollable-region-focusable',
23142
23107
  matches: 'scrollable-region-focusable-matches',
23143
23108
  tags: [ 'cat.keyboard', 'wcag2a', 'wcag211' ],
23144
- actIds: [ '0ssw9k' ],
23145
23109
  all: [],
23146
23110
  any: [ 'focusable-content', 'focusable-element' ],
23147
23111
  none: []
@@ -23149,7 +23113,6 @@
23149
23113
  id: 'select-name',
23150
23114
  selector: 'select',
23151
23115
  tags: [ 'cat.forms', 'wcag2a', 'wcag412', 'wcag131', 'section508', 'section508.22.n', 'ACT' ],
23152
- actIds: [ 'e086e5' ],
23153
23116
  all: [],
23154
23117
  any: [ 'implicit-label', 'explicit-label', 'aria-label', 'aria-labelledby', {
23155
23118
  options: {
@@ -23178,7 +23141,6 @@
23178
23141
  selector: '[role="img"], [role="graphics-symbol"], svg[role="graphics-document"]',
23179
23142
  matches: 'svg-namespace-matches',
23180
23143
  tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'ACT' ],
23181
- actIds: [ '7d6734' ],
23182
23144
  all: [],
23183
23145
  any: [ 'svg-non-empty-title', 'aria-label', 'aria-labelledby', {
23184
23146
  options: {
@@ -23221,7 +23183,6 @@
23221
23183
  id: 'td-headers-attr',
23222
23184
  selector: 'table',
23223
23185
  tags: [ 'cat.tables', 'wcag2a', 'wcag131', 'section508', 'section508.22.g' ],
23224
- actIds: [ 'a25f45' ],
23225
23186
  all: [ 'td-headers-attr' ],
23226
23187
  any: [],
23227
23188
  none: []
@@ -23230,7 +23191,6 @@
23230
23191
  selector: 'table',
23231
23192
  matches: 'data-table-matches',
23232
23193
  tags: [ 'cat.tables', 'wcag2a', 'wcag131', 'section508', 'section508.22.g' ],
23233
- actIds: [ 'd0f69e' ],
23234
23194
  all: [ 'th-has-data-cells' ],
23235
23195
  any: [],
23236
23196
  none: []
@@ -23252,7 +23212,6 @@
23252
23212
  selector: 'video',
23253
23213
  excludeHidden: false,
23254
23214
  tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag122', 'section508', 'section508.22.a' ],
23255
- actIds: [ 'eac66b' ],
23256
23215
  all: [],
23257
23216
  any: [],
23258
23217
  none: [ 'caption' ]