axe-core 4.2.2-canary.fa4f926 → 4.2.2

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 (75) hide show
  1. package/CHANGELOG.md +0 -31
  2. package/README.md +2 -4
  3. package/axe.d.ts +10 -10
  4. package/axe.js +257 -353
  5. package/axe.min.js +2 -2
  6. package/bower.json +2 -8
  7. package/doc/API.md +7 -36
  8. package/doc/examples/phantomjs/README.md +17 -0
  9. package/doc/examples/phantomjs/axe-phantom.js +53 -0
  10. package/doc/examples/phantomjs/package.json +19 -0
  11. package/doc/frame-messenger.md +6 -70
  12. package/doc/projects.md +0 -2
  13. package/doc/rule-descriptions.md +104 -104
  14. package/lib/checks/aria/aria-valid-attr-evaluate.js +10 -5
  15. package/lib/checks/color/color-contrast-evaluate.js +6 -6
  16. package/lib/checks/forms/autocomplete-appropriate.json +0 -1
  17. package/lib/checks/media/frame-tested-evaluate.js +24 -2
  18. package/lib/checks/media/frame-tested.json +0 -1
  19. package/lib/checks/visibility/hidden-content-evaluate.js +2 -2
  20. package/lib/commons/dom/is-visible.js +1 -11
  21. package/lib/commons/text/subtree-text.js +1 -5
  22. package/lib/core/base/audit.js +1 -4
  23. package/lib/core/base/check.js +2 -2
  24. package/lib/core/base/metadata-function-map.js +0 -2
  25. package/lib/core/base/rule.js +4 -2
  26. package/lib/core/base/virtual-node/virtual-node.js +0 -6
  27. package/lib/core/utils/dq-element.js +23 -39
  28. package/lib/core/utils/frame-messenger/channel-store.js +2 -2
  29. package/lib/core/utils/get-standards.js +2 -2
  30. package/lib/core/utils/merge-results.js +31 -33
  31. package/lib/core/utils/pollyfills.js +0 -27
  32. package/lib/core/utils/publish-metadata.js +11 -12
  33. package/lib/rules/area-alt.json +0 -1
  34. package/lib/rules/aria-allowed-attr.json +0 -1
  35. package/lib/rules/aria-command-name.json +0 -1
  36. package/lib/rules/aria-has-attr-matches.js +13 -5
  37. package/lib/rules/aria-hidden-focus.json +0 -1
  38. package/lib/rules/aria-input-field-name.json +0 -1
  39. package/lib/rules/aria-required-children.json +0 -1
  40. package/lib/rules/aria-required-parent.json +0 -1
  41. package/lib/rules/aria-valid-attr-value.json +0 -1
  42. package/lib/rules/audio-caption.json +0 -1
  43. package/lib/rules/autocomplete-valid.json +1 -2
  44. package/lib/rules/button-name.json +0 -1
  45. package/lib/rules/css-orientation-lock.json +0 -1
  46. package/lib/rules/document-title.json +0 -1
  47. package/lib/rules/duplicate-id-aria.json +0 -1
  48. package/lib/rules/frame-tested.json +1 -1
  49. package/lib/rules/html-has-lang.json +0 -1
  50. package/lib/rules/html-lang-valid.json +0 -1
  51. package/lib/rules/html-xml-lang-mismatch.json +0 -1
  52. package/lib/rules/identical-links-same-purpose.json +0 -1
  53. package/lib/rules/image-alt.json +0 -1
  54. package/lib/rules/input-image-alt.json +0 -1
  55. package/lib/rules/label-content-name-mismatch.json +0 -1
  56. package/lib/rules/label.json +0 -1
  57. package/lib/rules/link-name.json +0 -1
  58. package/lib/rules/meta-viewport.json +0 -1
  59. package/lib/rules/nested-interactive.json +0 -1
  60. package/lib/rules/no-autoplay-audio.json +0 -1
  61. package/lib/rules/object-alt.json +0 -1
  62. package/lib/rules/role-img-alt.json +0 -1
  63. package/lib/rules/scrollable-region-focusable.json +0 -1
  64. package/lib/rules/select-name.json +0 -1
  65. package/lib/rules/svg-img-alt.json +0 -1
  66. package/lib/rules/td-headers-attr.json +0 -1
  67. package/lib/rules/th-has-data-cells.json +0 -1
  68. package/lib/rules/video-caption.json +0 -1
  69. package/lib/standards/html-elms.js +3 -7
  70. package/locales/de.json +1 -1
  71. package/locales/pl.json +73 -104
  72. package/locales/pt_BR.json +44 -163
  73. package/package.json +2 -2
  74. package/sri-history.json +237 -269
  75. package/lib/checks/media/frame-tested-after.js +0 -31
package/CHANGELOG.md CHANGED
@@ -2,37 +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.2-canary.fa4f926](https://github.com/dequelabs/axe-core/compare/v4.2.2...v4.2.2-canary.fa4f926) (2021-06-22)
6
-
7
-
8
- ### Features
9
-
10
- * deprecate autocomplete appropriate check ([#2917](https://github.com/dequelabs/axe-core/issues/2917)) ([1fe1487](https://github.com/dequelabs/axe-core/commit/1fe1487758fa0f1f4b7bfc1d8c18bbe397be362d))
11
- * Remove deprecated phantomjs example ([#2913](https://github.com/dequelabs/axe-core/issues/2913)) ([4a01ffe](https://github.com/dequelabs/axe-core/commit/4a01ffe1adf009745ea12a71f4a888843dc779da))
12
- * Support multiple languages at once in builds ([#2994](https://github.com/dequelabs/axe-core/issues/2994)) ([f18a56b](https://github.com/dequelabs/axe-core/commit/f18a56b3efafdb14989b45bfff0f94e1863b3899))
13
- * **options:** accept a string for options.runOnly ([4392bc0](https://github.com/dequelabs/axe-core/commit/4392bc05fb208606fc589b261d3419b9625c6b6c))
14
- * **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)
15
-
16
-
17
- ### Bug Fixes
18
-
19
- * **accText:** ignore text in embedded content elements ([#3022](https://github.com/dequelabs/axe-core/issues/3022)) ([fa4f926](https://github.com/dequelabs/axe-core/commit/fa4f926c089bec2cfca882b61b74fecac504c8e0)), closes [#3017](https://github.com/dequelabs/axe-core/issues/3017)
20
- * **aria-allowed-attr:** allow aria-posinset and aria-setsize on row elements for treegrids ([#2952](https://github.com/dequelabs/axe-core/issues/2952)) ([24e6115](https://github.com/dequelabs/axe-core/commit/24e6115adb8834b02e1e0a535a661c31caefa588))
21
- * **aria-allowed-attr:** pass aria-label on some HTML elements ([#2935](https://github.com/dequelabs/axe-core/issues/2935)) ([d2584ed](https://github.com/dequelabs/axe-core/commit/d2584edfa7b439a5702f5b8d368253b9abe690fc))
22
- * JS error in @axe-core/react caused by stale reference to heading ([b7094c8](https://github.com/dequelabs/axe-core/commit/b7094c8146ec816ab3d079e57f07bf0f21ce6676))
23
- * **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))
24
- * **color-contrast:** add special case for new sr-only technique ([#2985](https://github.com/dequelabs/axe-core/issues/2985)) ([d6a72f9](https://github.com/dequelabs/axe-core/commit/d6a72f9316b00eee683aed4dbf0a0fafe0661a2f))
25
- * **color-contrast:** check for pseudo elements on element itself, not just parents ([#2980](https://github.com/dequelabs/axe-core/issues/2980)) ([9b6ccd0](https://github.com/dequelabs/axe-core/commit/9b6ccd0c2948e7036ef3984810909f59d1e65f27))
26
- * **frame-tested:** run without respondable ([#2942](https://github.com/dequelabs/axe-core/issues/2942)) ([c046114](https://github.com/dequelabs/axe-core/commit/c046114e9740e3e130ad0cb98288eb77331fbb93))
27
- * **getStandards:** Read standards from utils ([#2903](https://github.com/dequelabs/axe-core/issues/2903)) ([f1a0368](https://github.com/dequelabs/axe-core/commit/f1a036890b9befe8c1a0af388fd0f215bee6d9ae))
28
- * treat input with no role as textbox ([#2929](https://github.com/dequelabs/axe-core/issues/2929)) ([13d909d](https://github.com/dequelabs/axe-core/commit/13d909dd12dc40ab9ed448793aef5031e207d429))
29
- * **heading-order:** Prevent crash on page with iframes but no headings ([#2965](https://github.com/dequelabs/axe-core/issues/2965)) ([99e7f0c](https://github.com/dequelabs/axe-core/commit/99e7f0c2ae5758328e1299ff54a261c7e581c475))
30
- * **meta-viewport:** test that a user-scalable number does not prevent zoom ([b3562fb](https://github.com/dequelabs/axe-core/commit/b3562fb9fffa3152014d56a6e02a05622c10b9a9))
31
- * **publish-metadata:** use fail message for rules with reviewOnFail:true ([#2987](https://github.com/dequelabs/axe-core/issues/2987)) ([b6dc5f6](https://github.com/dequelabs/axe-core/commit/b6dc5f654c6c4b56217eabfd093447122890a7a2))
32
- * **required-parent:** Allow *item > group > *item nesting ([#2898](https://github.com/dequelabs/axe-core/issues/2898)) ([59b4a7e](https://github.com/dequelabs/axe-core/commit/59b4a7e2d939076e7aed6308ff25d1f3460d944b))
33
- * **sri-history:** add backported releases ([#3004](https://github.com/dequelabs/axe-core/issues/3004)) ([6eecf34](https://github.com/dequelabs/axe-core/commit/6eecf344751e03170bd70fe076584011b5a6cacb))
34
- * **types:** make `evaluate` check optional ([#2902](https://github.com/dequelabs/axe-core/issues/2902)) ([417f572](https://github.com/dequelabs/axe-core/commit/417f5724112e46f128efd5f56da9f891bf1e938c))
35
-
36
5
  ### [4.2.2](https://github.com/dequelabs/axe-core/compare/v4.2.1...v4.2.2) (2021-06-03)
37
6
 
38
7
  ### Bug Fixes
package/README.md CHANGED
@@ -16,9 +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.
20
-
21
- To catch bugs earlier in the development cycle we recommend using the [axe-linter vscode extension](https://marketplace.visualstudio.com/items?itemName=deque-systems.vscode-axe-linter). To improve test coverage even further 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 **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/).
22
20
 
23
21
  The complete list of rules, grouped WCAG level and best practice, can found in [doc/rule-descriptions.md](./doc/rule-descriptions.md).
24
22
 
@@ -103,7 +101,7 @@ or equivalently:
103
101
 
104
102
  `npm run build -- --lang=nl`
105
103
 
106
- This will create a new build for axe, called `axe.<lang>.js` and `axe.<lang>.min.js`. If you want to build localized versions, simply pass in `--all-lang` instead. If you want to build multiple localized versions (but not all of them), you can pass in a comma-separated list of langages to the `--lang` flag, like `--lang=nl,ja`.
104
+ This will create a new build for axe, called `axe.<lang>.js` and `axe.<lang>.min.js`. If you want to build localized versions, simply pass in `--all-lang` instead.
107
105
 
108
106
  To create a new translation for axe, start by running `grunt translate --lang=<langcode>`. This will create a json file fin the `./locales` directory, with the default English text in it for you to translate. We welcome any localization for axe-core. For details on how to contribute, see the Contributing section below. For details on the message syntax, see [Check Message Template](/docs/check-message-template.md).
109
107
 
package/axe.d.ts CHANGED
@@ -78,7 +78,7 @@ declare namespace axe {
78
78
  };
79
79
  }
80
80
  interface RunOptions {
81
- runOnly?: RunOnly | TagValue[] | string[] | string;
81
+ runOnly?: RunOnly | TagValue[] | string[];
82
82
  rules?: RuleObject;
83
83
  reporter?: ReporterVersion;
84
84
  resultTypes?: resultGroups[];
@@ -318,20 +318,20 @@ declare namespace axe {
318
318
  open: (topicHandler: TopicHandler) => Close | void;
319
319
  post: (
320
320
  frameWindow: Window,
321
- data: TopicData,
321
+ data: TopicData | ReplyData,
322
322
  replyHandler: ReplyHandler
323
- ) => boolean | void;
323
+ ) => void;
324
324
  };
325
325
  type Close = Function;
326
- type TopicHandler = (data: TopicData, responder: Responder) => void;
327
- type ReplyHandler = (message: any | Error, keepalive: boolean, responder: Responder) => void;
326
+ type TopicHandler = (data: TopicData, responder?: Responder) => void;
327
+ type ReplyHandler = (data: ReplyData, responder?: Responder) => void;
328
328
  type Responder = (
329
- message: any | Error,
330
- keepalive?: boolean,
331
- replyHandler?: ReplyHandler
329
+ message: any,
330
+ keepalive: boolean,
331
+ replyHandler: ReplyHandler
332
332
  ) => void;
333
- type TopicData = { topic: string } & ReplyData;
334
- type ReplyData = { channelId: string; message: any; keepalive: boolean };
333
+ type TopicData = { topic: String } & ReplyData;
334
+ type ReplyData = { channelId: String; message: any; keepAlive: Boolean };
335
335
  }
336
336
 
337
337
  export = axe;