govuk_publishing_components 21.16.3 → 21.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/component_guide/accessibility-test.js +0 -6
  3. data/app/views/govuk_publishing_components/components/docs/machine_readable_metadata.yml +7 -0
  4. data/lib/govuk_publishing_components/presenters/machine_readable/dataset_schema.rb +34 -0
  5. data/lib/govuk_publishing_components/presenters/schema_org.rb +3 -0
  6. data/lib/govuk_publishing_components/version.rb +1 -1
  7. data/node_modules/axe-core/CHANGELOG.md +166 -2
  8. data/node_modules/axe-core/CONTRIBUTING.md +5 -5
  9. data/node_modules/axe-core/README.md +4 -4
  10. data/node_modules/axe-core/axe.d.ts +27 -11
  11. data/node_modules/axe-core/axe.js +9597 -2431
  12. data/node_modules/axe-core/axe.min.js +2 -2
  13. data/node_modules/axe-core/bower.json +1 -1
  14. data/node_modules/axe-core/doc/API.md +211 -128
  15. data/node_modules/axe-core/doc/accessibility-supported.md +1 -1
  16. data/node_modules/axe-core/doc/aria-supported.md +4 -13
  17. data/node_modules/axe-core/doc/backwards-compatibility-doc.md +93 -0
  18. data/node_modules/axe-core/doc/code-submission-guidelines.md +4 -4
  19. data/node_modules/axe-core/doc/developer-guide.md +27 -13
  20. data/node_modules/axe-core/doc/examples/chrome-debugging-protocol/package.json +5 -2
  21. data/node_modules/axe-core/doc/examples/jasmine/README.md +3 -5
  22. data/node_modules/axe-core/doc/examples/jasmine/karma.conf.js +29 -0
  23. data/node_modules/axe-core/doc/examples/jasmine/package.json +6 -5
  24. data/node_modules/axe-core/doc/examples/jest_react/README.md +1 -1
  25. data/node_modules/axe-core/doc/examples/jest_react/link.test.js +3 -3
  26. data/node_modules/axe-core/doc/examples/jest_react/package.json +9 -9
  27. data/node_modules/axe-core/doc/examples/jsdom/package.json +15 -0
  28. data/node_modules/axe-core/doc/examples/mocha/README.md +5 -7
  29. data/node_modules/axe-core/doc/examples/mocha/karma.conf.js +29 -0
  30. data/node_modules/axe-core/doc/examples/mocha/package.json +7 -6
  31. data/node_modules/axe-core/doc/examples/phantomjs/README.md +3 -3
  32. data/node_modules/axe-core/doc/examples/phantomjs/axe-phantom.js +4 -2
  33. data/node_modules/axe-core/doc/examples/phantomjs/package.json +3 -3
  34. data/node_modules/axe-core/doc/examples/puppeteer/package.json +5 -2
  35. data/node_modules/axe-core/doc/examples/qunit/README.md +2 -2
  36. data/node_modules/axe-core/doc/examples/qunit/package.json +2 -2
  37. data/node_modules/axe-core/doc/examples/test-examples.js +32 -0
  38. data/node_modules/axe-core/doc/plugins.md +10 -10
  39. data/node_modules/axe-core/doc/projects.md +12 -8
  40. data/node_modules/axe-core/doc/rule-descriptions.md +87 -79
  41. data/node_modules/axe-core/doc/rule-development.md +30 -2
  42. data/node_modules/axe-core/lib/checks/aria/allowed-attr.js +1 -1
  43. data/node_modules/axe-core/lib/checks/aria/aria-roledescription.js +14 -0
  44. data/node_modules/axe-core/lib/checks/aria/aria-roledescription.json +23 -0
  45. data/node_modules/axe-core/lib/checks/aria/no-implicit-explicit-label.js +21 -0
  46. data/node_modules/axe-core/lib/checks/aria/no-implicit-explicit-label.json +11 -0
  47. data/node_modules/axe-core/lib/checks/aria/required-attr.js +32 -7
  48. data/node_modules/axe-core/lib/checks/aria/required-children.js +40 -14
  49. data/node_modules/axe-core/lib/checks/aria/required-children.json +12 -1
  50. data/node_modules/axe-core/lib/checks/aria/required-parent.js +1 -1
  51. data/node_modules/axe-core/lib/checks/aria/unsupportedattr.js +1 -1
  52. data/node_modules/axe-core/lib/checks/aria/valid-attr-value.js +50 -17
  53. data/node_modules/axe-core/lib/checks/aria/valid-attr-value.json +2 -1
  54. data/node_modules/axe-core/lib/checks/aria/valid-attr.js +1 -1
  55. data/node_modules/axe-core/lib/checks/color/color-contrast.js +2 -2
  56. data/node_modules/axe-core/lib/checks/forms/autocomplete-appropriate.js +4 -4
  57. data/node_modules/axe-core/lib/checks/forms/autocomplete-valid.js +1 -1
  58. data/node_modules/axe-core/lib/checks/forms/fieldset.json +1 -0
  59. data/node_modules/axe-core/lib/checks/forms/group-labelledby.json +1 -0
  60. data/node_modules/axe-core/lib/checks/keyboard/focusable-content.js +16 -0
  61. data/node_modules/axe-core/lib/checks/keyboard/focusable-content.json +11 -0
  62. data/node_modules/axe-core/lib/checks/keyboard/focusable-element.js +12 -0
  63. data/node_modules/axe-core/lib/checks/keyboard/focusable-element.json +11 -0
  64. data/node_modules/axe-core/lib/checks/keyboard/tabindex.js +6 -1
  65. data/node_modules/axe-core/lib/checks/label/alt-space-value.js +3 -2
  66. data/node_modules/axe-core/lib/checks/label/duplicate-img-label.js +18 -15
  67. data/node_modules/axe-core/lib/checks/label/label-content-name-mismatch.js +13 -3
  68. data/node_modules/axe-core/lib/checks/label/label-content-name-mismatch.json +4 -0
  69. data/node_modules/axe-core/lib/checks/label/multiple-label.js +22 -12
  70. data/node_modules/axe-core/lib/checks/label/multiple-label.json +1 -1
  71. data/node_modules/axe-core/lib/checks/landmarks/landmark-is-unique-after.js +23 -0
  72. data/node_modules/axe-core/lib/checks/landmarks/landmark-is-unique.js +7 -0
  73. data/node_modules/axe-core/lib/checks/landmarks/landmark-is-unique.json +12 -0
  74. data/node_modules/axe-core/lib/checks/lists/listitem.js +1 -0
  75. data/node_modules/axe-core/lib/checks/lists/listitem.json +1 -1
  76. data/node_modules/axe-core/lib/checks/lists/only-listitems.js +0 -4
  77. data/node_modules/axe-core/lib/checks/mobile/css-orientation-lock.js +8 -6
  78. data/node_modules/axe-core/lib/checks/navigation/region.js +2 -19
  79. data/node_modules/axe-core/lib/checks/shared/avoid-inline-spacing.js +18 -0
  80. data/node_modules/axe-core/lib/checks/shared/avoid-inline-spacing.json +11 -0
  81. data/node_modules/axe-core/lib/checks/shared/exists.js +1 -1
  82. data/node_modules/axe-core/lib/checks/shared/exists.json +1 -1
  83. data/node_modules/axe-core/lib/checks/shared/has-alt.js +6 -4
  84. data/node_modules/axe-core/lib/checks/shared/non-empty-alt.js +1 -1
  85. data/node_modules/axe-core/lib/checks/tables/caption-faked.json +1 -1
  86. data/node_modules/axe-core/lib/checks/tables/td-has-header.js +5 -4
  87. data/node_modules/axe-core/lib/checks/tables/th-has-data-cells.js +19 -29
  88. data/node_modules/axe-core/lib/commons/aria/get-owned-virtual.js +1 -1
  89. data/node_modules/axe-core/lib/commons/aria/index.js +50 -46
  90. data/node_modules/axe-core/lib/commons/aria/is-accessible-ref.js +41 -37
  91. data/node_modules/axe-core/lib/commons/aria/label-virtual.js +2 -2
  92. data/node_modules/axe-core/lib/commons/aria/roles.js +1 -1
  93. data/node_modules/axe-core/lib/commons/aria/validate-attr-value.js +0 -1
  94. data/node_modules/axe-core/lib/commons/color/center-point-of-rect.js +30 -0
  95. data/node_modules/axe-core/lib/commons/color/contrast.js +7 -1
  96. data/node_modules/axe-core/lib/commons/color/element-has-image.js +36 -0
  97. data/node_modules/axe-core/lib/commons/color/get-background-color.js +332 -306
  98. data/node_modules/axe-core/lib/commons/color/get-foreground-color.js +35 -6
  99. data/node_modules/axe-core/lib/commons/color/get-own-background-color.js +22 -0
  100. data/node_modules/axe-core/lib/commons/dom/find-up.js +5 -5
  101. data/node_modules/axe-core/lib/commons/dom/get-scroll-offset.js +0 -1
  102. data/node_modules/axe-core/lib/commons/dom/get-tabbable-elements.js +1 -1
  103. data/node_modules/axe-core/lib/commons/dom/has-content-virtual.js +7 -5
  104. data/node_modules/axe-core/lib/commons/dom/is-focusable.js +8 -5
  105. data/node_modules/axe-core/lib/commons/dom/is-hidden-with-css.js +15 -2
  106. data/node_modules/axe-core/lib/commons/dom/is-in-text-block.js +1 -2
  107. data/node_modules/axe-core/lib/commons/dom/is-skip-link.js +45 -0
  108. data/node_modules/axe-core/lib/commons/dom/is-visible.js +43 -17
  109. data/node_modules/axe-core/lib/commons/dom/is-visual-content.js +0 -1
  110. data/node_modules/axe-core/lib/commons/dom/visually-contains.js +0 -1
  111. data/node_modules/axe-core/lib/commons/dom/visually-overlaps.js +0 -1
  112. data/node_modules/axe-core/lib/commons/forms/index.js +8 -0
  113. data/node_modules/axe-core/lib/commons/forms/is-aria-combobox.js +13 -0
  114. data/node_modules/axe-core/lib/commons/forms/is-aria-listbox.js +13 -0
  115. data/node_modules/axe-core/lib/commons/forms/is-aria-range.js +14 -0
  116. data/node_modules/axe-core/lib/commons/forms/is-aria-textbox.js +13 -0
  117. data/node_modules/axe-core/lib/commons/forms/is-native-select.js +13 -0
  118. data/node_modules/axe-core/lib/commons/forms/is-native-textbox.js +28 -0
  119. data/node_modules/axe-core/lib/commons/table/get-cell-position.js +2 -2
  120. data/node_modules/axe-core/lib/commons/table/get-headers.js +55 -11
  121. data/node_modules/axe-core/lib/commons/table/get-scope.js +1 -1
  122. data/node_modules/axe-core/lib/commons/table/is-data-table.js +0 -1
  123. data/node_modules/axe-core/lib/commons/table/to-grid.js +2 -2
  124. data/node_modules/axe-core/lib/commons/text/accessible-text-virtual.js +5 -5
  125. data/node_modules/axe-core/lib/commons/text/form-control-value.js +18 -30
  126. data/node_modules/axe-core/lib/commons/text/is-icon-ligature.js +210 -0
  127. data/node_modules/axe-core/lib/commons/text/is-valid-autocomplete.js +0 -1
  128. data/node_modules/axe-core/lib/commons/text/label-text.js +1 -1
  129. data/node_modules/axe-core/lib/commons/text/label-virtual.js +1 -1
  130. data/node_modules/axe-core/lib/commons/text/native-text-methods.js +1 -1
  131. data/node_modules/axe-core/lib/commons/text/subtree-text.js +3 -3
  132. data/node_modules/axe-core/lib/commons/text/unicode.js +15 -0
  133. data/node_modules/axe-core/lib/commons/text/visible-text-nodes.js +25 -0
  134. data/node_modules/axe-core/lib/commons/text/visible-virtual.js +1 -1
  135. data/node_modules/axe-core/lib/core/base/audit.js +90 -15
  136. data/node_modules/axe-core/lib/core/base/cache.js +33 -0
  137. data/node_modules/axe-core/lib/core/base/check.js +48 -1
  138. data/node_modules/axe-core/lib/core/base/context.js +15 -14
  139. data/node_modules/axe-core/lib/core/base/rule.js +223 -46
  140. data/node_modules/axe-core/lib/core/base/virtual-node/abstract-virtual-node.js +40 -0
  141. data/node_modules/axe-core/lib/core/base/virtual-node/serial-virtual-node.js +86 -0
  142. data/node_modules/axe-core/lib/core/base/virtual-node/virtual-node.js +85 -0
  143. data/node_modules/axe-core/lib/core/constants.js +10 -2
  144. data/node_modules/axe-core/lib/core/imports/index.js +28 -3
  145. data/node_modules/axe-core/lib/core/index.js +2 -4
  146. data/node_modules/axe-core/lib/core/public/configure.js +28 -1
  147. data/node_modules/axe-core/lib/core/public/run-rules.js +2 -0
  148. data/node_modules/axe-core/lib/core/public/run-virtual-rule.js +50 -0
  149. data/node_modules/axe-core/lib/core/public/run.js +13 -2
  150. data/node_modules/axe-core/lib/core/reporters/helpers/process-aggregate.js +1 -1
  151. data/node_modules/axe-core/lib/core/reporters/na.js +4 -0
  152. data/node_modules/axe-core/lib/core/reporters/raw-env.js +12 -0
  153. data/node_modules/axe-core/lib/core/reporters/raw.js +25 -1
  154. data/node_modules/axe-core/lib/core/utils/are-styles-set.js +4 -7
  155. data/node_modules/axe-core/lib/core/utils/assert.js +12 -0
  156. data/node_modules/axe-core/lib/core/utils/collect-results-from-frames.js +2 -2
  157. data/node_modules/axe-core/lib/core/utils/contains.js +27 -13
  158. data/node_modules/axe-core/lib/core/utils/css-parser.js +2 -0
  159. data/node_modules/axe-core/lib/core/utils/element-matches.js +5 -1
  160. data/node_modules/axe-core/lib/core/utils/escape-selector.js +1 -2
  161. data/node_modules/axe-core/lib/core/utils/flattened-tree.js +47 -61
  162. data/node_modules/axe-core/lib/core/utils/get-check-option.js +0 -1
  163. data/node_modules/axe-core/lib/core/utils/get-friendly-uri-end.js +1 -1
  164. data/node_modules/axe-core/lib/core/utils/get-node-attributes.js +21 -0
  165. data/node_modules/axe-core/lib/core/utils/get-scroll.js +39 -0
  166. data/node_modules/axe-core/lib/core/utils/get-selector.js +9 -6
  167. data/node_modules/axe-core/lib/core/utils/get-stylesheet-factory.js +51 -0
  168. data/node_modules/axe-core/lib/core/utils/get-xpath.js +0 -1
  169. data/node_modules/axe-core/lib/core/utils/is-hidden.js +16 -4
  170. data/node_modules/axe-core/lib/core/utils/is-html-element.js +5 -5
  171. data/node_modules/axe-core/lib/core/utils/is-shadow-root.js +3 -3
  172. data/node_modules/axe-core/lib/core/utils/memoize.js +17 -0
  173. data/node_modules/axe-core/lib/core/utils/parse-crossorigin-stylesheet.js +53 -0
  174. data/node_modules/axe-core/lib/core/utils/parse-sameorigin-stylesheet.js +96 -0
  175. data/node_modules/axe-core/lib/core/utils/parse-stylesheet.js +70 -0
  176. data/node_modules/axe-core/lib/core/utils/performance-timer.js +7 -2
  177. data/node_modules/axe-core/lib/core/utils/preload-cssom.js +77 -281
  178. data/node_modules/axe-core/lib/core/utils/preload.js +49 -23
  179. data/node_modules/axe-core/lib/core/utils/qsa.js +39 -50
  180. data/node_modules/axe-core/lib/core/utils/respondable.js +20 -3
  181. data/node_modules/axe-core/lib/core/utils/rule-should-run.js +0 -1
  182. data/node_modules/axe-core/lib/core/utils/scroll-state.js +12 -25
  183. data/node_modules/axe-core/lib/core/utils/select.js +12 -23
  184. data/node_modules/axe-core/lib/core/utils/uuid.js +1 -2
  185. data/node_modules/axe-core/lib/intro.stub +1 -1
  186. data/node_modules/axe-core/lib/misc/incomplete-fallback.json +1 -1
  187. data/node_modules/axe-core/lib/rules/aria-allowed-attr-matches.js +1 -1
  188. data/node_modules/axe-core/lib/rules/aria-form-field-name-matches.js +50 -0
  189. data/node_modules/axe-core/lib/rules/aria-has-attr-matches.js +1 -1
  190. data/node_modules/axe-core/lib/rules/aria-hidden-focus.json +1 -1
  191. data/node_modules/axe-core/lib/rules/aria-input-field-name.json +13 -0
  192. data/node_modules/axe-core/lib/rules/aria-roledescription.json +12 -0
  193. data/node_modules/axe-core/lib/rules/aria-toggle-field-name.json +18 -0
  194. data/node_modules/axe-core/lib/rules/autocomplete-matches.js +14 -10
  195. data/node_modules/axe-core/lib/rules/avoid-inline-spacing.json +12 -0
  196. data/node_modules/axe-core/lib/rules/button-name.json +3 -5
  197. data/node_modules/axe-core/lib/rules/checkboxgroup.json +2 -1
  198. data/node_modules/axe-core/lib/rules/color-contrast-matches.js +37 -22
  199. data/node_modules/axe-core/lib/rules/duplicate-id-active-matches.js +1 -1
  200. data/node_modules/axe-core/lib/rules/duplicate-id-misc-matches.js +2 -2
  201. data/node_modules/axe-core/lib/rules/form-field-multiple-labels.json +1 -1
  202. data/node_modules/axe-core/lib/rules/html-has-lang.json +1 -0
  203. data/node_modules/axe-core/lib/rules/image-alt.json +1 -1
  204. data/node_modules/axe-core/lib/rules/img-redundant-alt.json +3 -3
  205. data/node_modules/axe-core/lib/rules/input-button-name.json +26 -0
  206. data/node_modules/axe-core/lib/rules/landmark-unique-matches.js +41 -0
  207. data/node_modules/axe-core/lib/rules/landmark-unique.json +13 -0
  208. data/node_modules/axe-core/lib/rules/link-name.json +5 -4
  209. data/node_modules/axe-core/lib/rules/meta-refresh.json +8 -1
  210. data/node_modules/axe-core/lib/rules/radiogroup.json +2 -1
  211. data/node_modules/axe-core/lib/rules/role-img-alt.json +18 -0
  212. data/node_modules/axe-core/lib/rules/scrollable-region-focusable-matches.js +30 -0
  213. data/node_modules/axe-core/lib/rules/scrollable-region-focusable.json +12 -0
  214. data/node_modules/axe-core/lib/rules/skip-link-matches.js +1 -1
  215. data/node_modules/axe-core/lib/rules/skip-link.json +1 -1
  216. data/node_modules/axe-core/lib/rules/video-description.json +3 -1
  217. data/node_modules/axe-core/locales/de.json +1 -5
  218. data/node_modules/axe-core/locales/es.json +773 -0
  219. data/node_modules/axe-core/locales/fr.json +15 -19
  220. data/node_modules/axe-core/locales/ja.json +65 -11
  221. data/node_modules/axe-core/locales/ko.json +777 -0
  222. data/node_modules/axe-core/locales/nl.json +35 -35
  223. data/node_modules/axe-core/locales/pt_BR.json +773 -0
  224. data/node_modules/axe-core/package.json +56 -52
  225. data/node_modules/axe-core/sri-history.json +20 -0
  226. data/node_modules/axe-core/typings/axe-core/axe-core-tests.ts +5 -15
  227. data/node_modules/govuk-frontend/package.json +10 -10
  228. metadata +62 -4
  229. data/node_modules/axe-core/doc/axelogo2018.png +0 -0
  230. data/node_modules/axe-core/lib/rules/role-not-button-matches.js +0 -1
@@ -4,7 +4,7 @@ In order to adhere to the manifesto and at the same time be useful to developers
4
4
 
5
5
  ## Accessibility supported
6
6
 
7
- Boiled-down, accessibility supported means that in order for a technique to be valid, it must work on all viable platforms for all assitive technology that are widely used and freely available (paraphrased).
7
+ Boiled-down, accessibility supported means that in order for a technique to be valid, it must work on all viable platforms for all assistive technology that are widely used and freely available (paraphrased).
8
8
 
9
9
  We currently test the following AT combinations for support
10
10
 
@@ -6,18 +6,9 @@ This page contains a list of ARIA 1.1 features that axe-core raises as unsupport
6
6
 
7
7
  For a detailed description about how accessibility support is decided, see [How we make decisions on rules](accessibility-supported.md).
8
8
 
9
- ## Roles
10
-
11
- | aria-role | axe-core support |
12
- | --------- | ---------------- |
13
- | figure | No |
14
-
15
9
  ## Attributes
16
10
 
17
- | aria-attribute | axe-core support |
18
- | -------------------- | ---------------- |
19
- | aria-describedat | No |
20
- | aria-details | No |
21
- | aria-roledescription | Mixed[^1] |
22
-
23
- [^1]: Supported on elements: `<button>`, `<input type="button" | "checkbox" | "image" | "radio" | "reset" | "submit">`, `<img>`, `<select>`, `<summary>`
11
+ | aria-attribute | axe-core support |
12
+ | ---------------- | ---------------- |
13
+ | aria-describedat | No |
14
+ | aria-details | No |
@@ -0,0 +1,93 @@
1
+ # Backwards Compatibility in axe-core
2
+
3
+ ## What is part of the public axe-core API?
4
+
5
+ The axe-core API includes:
6
+
7
+ - Any APIs documented here: [https://github.com/dequelabs/axe-core/blob/develop/doc/API.md](https://github.com/dequelabs/axe-core/blob/develop/doc/API.md)
8
+ - The selectors generated and included in the node information in the results arrays for any given HTML page
9
+ - The JSON structures passed into and out of any API functions
10
+ - Any functions in the `axe.utils` and `axe.commons` collections that are used by one of our standard rules (this document refers to these as the “Public Utils”). This includes use in any of the “matches”, “eval” and “after” functions.
11
+ - The implicit function signature of the matches, eval and after functions (the names of the parameters that are passed-to the functions and the values returned by them)
12
+
13
+ ## What is not included in the public axe-core API?
14
+
15
+ Any other function or attribute on the axe object is not considered part of the public API and is therefore not covered by the guarantee in this document.
16
+
17
+ ## What do we guarantee for the public axe-core API?
18
+
19
+ We guarantee that the API signatures and the return values of functions will not break in patch or minor release versions except that we may add items to JSON structures in minor releases or override parameters. We will not remove items from JSON structures.
20
+
21
+ In a minor release, we may change the implementation of Public Utils to fix bugs or improve performance. This means that a call to a Public Util may return a different value across patch versions.
22
+
23
+ We will not add or remove rules in a patch release. We will not add support for new technologies in a patch release. We will endeavour to return the exact same results across patch releases with the exception of changes that are due to bug fixes. This means that the likelihood of a patch release finding issues on a page that was clean in a previous release is very close to zero but not zero.
24
+
25
+ In a minor release, we may add support for new technologies in the Public Utils or in existing rules and we may add or disable rules. We may also change an experimental rule to become a standard rule (essentially equivalent to adding rule). This means that pages that did not return violations in a particular minor release may return violations in a subsequent release.
26
+
27
+ If the HTML page is unchanged, calls to the analysis function(s) when compared across minor or patch releases will return the same exact selector for the nodes in any of the result arrays. If the HTML page has changed, it is possible for the selector to be different but it is not guaranteed that the selector will be different.
28
+
29
+ APIs may be deprecated in a major or minor release. APIs that have been deprecated for 6 months or more will be removed in the next major release.
30
+
31
+ A major or a minor release may introduce new Public Utils.
32
+
33
+ Major releases may remove rules.
34
+
35
+ ### Table: Summary of What Deque Guarantees with Public axe-core API
36
+
37
+ | | Major | Minor | Patch |
38
+ | :-------------------------------------------- | :------------------------------------------------------ | :-------------------- | :------------------------- |
39
+ | **New Technologies** | | | |
40
+ | Support for new technologies\* | May add support | May add support | Will not add support |
41
+ | **APIS** | | | |
42
+ | API signatures and return values of functions | May break | Will not break | Will not break |
43
+ | APIs deprecated | May be deprecated | May be deprecated | Will not be deprecated |
44
+ | APIs removed | May be removed (will remove previously deprecated APIs) | Will not be removed | Will not be removed |
45
+ | **Public Utils** | | | |
46
+ | Implementation of Public Utils | May change | May change | Will not change |
47
+ | New public Utils | May add | May add | Will not add |
48
+ | **Rules** | | | |
49
+ | Add rules | May add | May add | Will not add |
50
+ | Disable or remove rules | May remove (will remove previously deprecated rules) | May disable or remove | Will not disable or remove |
51
+ | Deprecate rules | May deprecate | May deprecate | Will not deprecate |
52
+
53
+ \*_New OSes, Browsers, ATs, new standards (e.g. introduction of ARIA), new versions of standards (e.g. WCAG 2.1)_
54
+
55
+ ## Implications
56
+
57
+ ### Breaking Builds
58
+
59
+ Patch release upgrades can be applied in CI environments with a high degree of certainty that breakages will not be due to changes in the release. The chance is, however, not zero.
60
+
61
+ ### Custom Rules
62
+
63
+ A custom rule configuration (with-or-without custom rules) is guaranteed to run on any newer version that shares the same major version number as the version for which it was created. A custom rule configuration (with-or-without custom rules) is not guaranteed to work with an older version of axe-core than the version for which it was created.
64
+
65
+ You can write custom rules that utilize the Public Utils and the parameters that are passed to a check function, secure in the knowledge that the API will not change unless a major version is released.
66
+
67
+ However, because we can introduce new rules, it is possible that a custom rule configuration will return additional results when run against a new minor release and may return different results when run against a newer patch release.
68
+
69
+ A custom rule configuration may return different results (more or fewer) when run on a newer patch release due to bug fixes.
70
+
71
+ A major release may completely break a custom rule or even all custom rules because of a change to any of the APIs.
72
+
73
+ ### Table: Implication of axe-core Updates on Custom Rule Function
74
+
75
+ | Axe-core Release Semantic Version | Example | Simple Custom Rules | Complex Custom Rules |
76
+ | :--------------------------------------------- | :------ | :--------------------- | :--------------------- |
77
+ | Prior release (different major release number) | 1.3.4 | Not guaranteed to work | Not guaranteed to work |
78
+ | Release used to create custom rules | 2.0.0 | Guaranteed to work | Guaranteed to work |
79
+ | Next release (minor release) | 2.1.0 | Guaranteed to work\* | Guaranteed to work\* |
80
+ | Next +1 release (patch release) | 2.1.1 | Guaranteed to work\* | Guaranteed to work\* |
81
+ | Next +2 release (major release) | 3.0.0 | Not guaranteed to work | Not guaranteed to work |
82
+
83
+ \*_Minor and patch releases will not break custom rules, but testing results may vary from those tests performed with previous minor and patch releases of axe-core. There may be inconsistencies between what Attest reports and what Comply reports._
84
+
85
+ Please note that with even small changes in versions for simple custom rules, there may be inconsistencies between what Attest reports and what Comply reports. For best results, in both cases, versions should match exactly.
86
+
87
+ ### Tracking Issues Over Time
88
+
89
+ Many systems attempt to identify unique issues using a combination of the page and state, the rule-id and the selector to track an issue across time and across calls to the analysis functions. This will work reliably across patch releases. This could break if a rule is removed or split up across minor releases. In a major release, this could break for the additional reason of a possible change in the selector generation (this did happen in the changes between 2.6.x and 3.x).
90
+
91
+ ### Comply
92
+
93
+ Comply has the ability to add labels and comments to issues and to mark issues as ignored. Comply will lose this information when it is not able to track issues across time. This means that historical issue information may be lost when upgrading to a newer major version of axe-core.
@@ -13,7 +13,7 @@ will kindly ask you to resubmit it in the correct format.
13
13
 
14
14
  We follow Angular's code contribution style with precise rules for formatting git commit messages.
15
15
  This leads to more readable messages that are easy to follow when looking through the project
16
- history. We will also use commit messages to generate the aXe Changelog document.
16
+ history. We will also use commit messages to generate the axe Changelog document.
17
17
 
18
18
  A detailed explanation of Angular's guidelines and conventions can be found [on Google Docs](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#).
19
19
 
@@ -35,9 +35,9 @@ that includes a type, a scope and a subject. Here's a sample of the format:
35
35
  ```sh
36
36
  perf(rule): improve speed of color contrast rules
37
37
 
38
- Use async process to compare elements without UI lockup
38
+ Use async process to compare elements without UI lockup
39
39
 
40
- Closes #1
40
+ Closes #1
41
41
  ```
42
42
 
43
43
  > Commit messages should be 100 characters or less to make them easy to read on Github and
@@ -139,7 +139,7 @@ changes in the pull request, so the git log stays lean. We particularly want to
139
139
  You can use git's interactive rebase to manipulate, merge, and rename commits in your local
140
140
  history. If these steps are followed, a force push shouldn't be necessary.
141
141
 
142
- **Do not force push to develop or master under any circulstances.**
142
+ **Do not force push to develop or master under any circumstances.**
143
143
 
144
144
  To interactively rebase all of your commits on top of the latest in develop, run:
145
145
 
@@ -1,10 +1,15 @@
1
- # aXe Developer Guide
1
+ # Axe Developer Guide
2
2
 
3
- aXe runs a series of tests to check for accessibility of content and functionality on a website. A test is made up of a series of Rules which are, themselves, made up of Checks. aXe executes these Rules asynchronously and, when the Rules are finished running, runs a callback function which is passed a Result structure. Since some Rules run on the page level while others do not, tests will also run in one of two ways. If a document is specified, the page level rules will run, otherwise they will not.
3
+ Axe runs a series of tests to check for accessibility of content and functionality on a website. A test is made up of a series of Rules which are, themselves, made up of Checks. Axe executes these Rules asynchronously and, when the Rules are finished running, runs a callback function which is passed a Result structure. Since some Rules run on the page level while others do not, tests will also run in one of two ways. If a document is specified, the page level rules will run, otherwise they will not.
4
4
 
5
- aXe 3.0 supports open Shadow DOM: see our virtual DOM APIs and test utilities for developing axe-core moving forward. Note: we do not and cannot support closed Shadow DOM.
5
+ Axe 3.0 supports open Shadow DOM: see our virtual DOM APIs and test utilities for developing axe-core moving forward. Note: we do not and cannot support closed Shadow DOM.
6
6
 
7
7
  1. [Getting Started](#getting-started)
8
+ 1. [Environment Pre-requisites](#environment-pre-requisites)
9
+ 1. [Building axe.js](#building-axejs)
10
+ 1. [Running Tests](#running-tests)
11
+ 1. [API Reference](#api-reference)
12
+ 1. [Supported CSS Selectors](#supported-css-selectors)
8
13
  1. [Architecture Overview](#architecture-overview)
9
14
  1. [Rules](#rules)
10
15
  1. [Checks](#checks)
@@ -31,7 +36,7 @@ aXe 3.0 supports open Shadow DOM: see our virtual DOM APIs and test utilities fo
31
36
 
32
37
  ### Building axe.js
33
38
 
34
- To build axe.js, simply run `grunt build` in the root folder of the axe-core repository. axe.js and axe.min.js are placed into the `dist` folder.
39
+ To build axe.js, simply run `grunt build` in the root folder of the axe-core repository. axe.js and axe.min.js are placed into the root folder.
35
40
 
36
41
  ### Running Tests
37
42
 
@@ -47,11 +52,20 @@ You can also load tests in any supported browser, which is helpful for debugging
47
52
 
48
53
  ### API Reference
49
54
 
50
- [See API exposed on aXe](./API.md#section-2-api-reference)
55
+ [See API exposed on axe](./API.md#section-2-api-reference)
56
+
57
+ ### Supported CSS Selectors
58
+
59
+ Axe supports the following CSS selectors:
60
+
61
+ - Type, Class, ID, and Universal selectors. E.g `div.main, #main`
62
+ - Pseudo selector `not`. E.g `th:not([scope])`
63
+ - Descendant and Child combinators. E.g. `table td`, `ul > li`
64
+ - Attribute selectors `=`, `^=`, `$=`, `*=`. E.g `a[href^="#"]`
51
65
 
52
66
  ## Architecture Overview
53
67
 
54
- aXe tests for accessibility using objects called Rules. Each Rule tests for a high-level aspect of accessibility, such as color contrast, button labels, and alternate text for images. Each rule is made up of a series of Checks. Depending on the rule; all, some, or none of these checks must pass in order for the rule to pass.
68
+ Axe tests for accessibility using objects called Rules. Each Rule tests for a high-level aspect of accessibility, such as color contrast, button labels, and alternate text for images. Each rule is made up of a series of Checks. Depending on the rule; all, some, or none of these checks must pass in order for the rule to pass.
55
69
 
56
70
  Upon execution, a Rule runs each of its Checks against all relevant nodes. Which nodes are relevant is determined by the Rule's `selector` property and `matches` function. If a Rule has no Checks that apply to a given node, the Rule will result in an inapplicable result.
57
71
 
@@ -62,7 +76,7 @@ After execution, a Check will return `true` or `false` depending on whether or n
62
76
  Rules are defined by JSON files in the [lib/rules directory](../lib/rules). The JSON object is used to seed the [Rule object](../lib/core/base/rule.js#L30). A valid Rule JSON consists of the following:
63
77
 
64
78
  - `id` - `String` A unique name of the Rule.
65
- - `selector` - **optional** `String` which is a CSS selector that specifies the elements of the page on which the Rule runs. aXe-core will look inside of the light DOM and _open_ [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Shadow_DOM) trees for elements matching the provided selector. If omitted, the rule will run against every node.
79
+ - `selector` - **optional** `String` which is a [CSS selector](#supported-css-selectors) that specifies the elements of the page on which the Rule runs. axe-core will look inside of the light DOM and _open_ [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Shadow_DOM) trees for elements matching the provided selector. If omitted, the rule will run against every node.
66
80
  - `excludeHidden` - **optional** `Boolean` Whether the rule should exclude hidden elements. Defaults to `true`.
67
81
  - `enabled` - **optional** `Boolean` Whether the rule is enabled by default. Defaults to `true`.
68
82
  - `pageLevel` - **optional** `Boolean` Whether the rule is page level. Page level rules will only run if given an entire `document` as context.
@@ -162,7 +176,7 @@ on writing rules and checks, including incomplete results.
162
176
 
163
177
  #### CheckResult
164
178
 
165
- When a Check is executed, its result is then added to a [CheckResult object](../lib/core/base/check-result.js). Much like the RuleResult object, the CheckResult object only contains information that is required to determine whether a Check, and its parent Rule passed or failed. `metadata` from the originating Check is combined later and will not be available until aXe reaches the reporting stage.
179
+ When a Check is executed, its result is then added to a [CheckResult object](../lib/core/base/check-result.js). Much like the RuleResult object, the CheckResult object only contains information that is required to determine whether a Check, and its parent Rule passed or failed. `metadata` from the originating Check is combined later and will not be available until axe reaches the reporting stage.
166
180
 
167
181
  A CheckResult has the following properties:
168
182
 
@@ -178,7 +192,7 @@ Common functions are an internal library used by the rules and checks. If you ha
178
192
  #### Commons and Shadow DOM
179
193
 
180
194
  To support open Shadow DOM while maintaining backwards compatibility, commons functions that
181
- query DOM nodes must operate on an in-memory representation of the DOM using aXe-core’s
195
+ query DOM nodes must operate on an in-memory representation of the DOM using axe-core’s
182
196
  built-in [API methods and utility functions](./API.md#virtual-dom-utilities).
183
197
 
184
198
  Commons functions should do the virtual tree lookup and call a `virtual` function
@@ -211,7 +225,7 @@ which passes on a virtual DOM node with both the light DOM and Shadow DOM (if ap
211
225
 
212
226
  ### Virtual Nodes
213
227
 
214
- To support open Shadow DOM, aXe-core has the ability to handle virtual nodes in [rule matches](#matches-function)
228
+ To support open Shadow DOM, axe-core has the ability to handle virtual nodes in [rule matches](#matches-function)
215
229
  and [check evaluate](#check-evaluate) functions. The full set of API methods for Shadow DOM can be
216
230
  found in the [API documentation](./API.md#virtual-dom-utilities), but the general
217
231
  structure for a virtualNode is as follows:
@@ -230,7 +244,7 @@ structure for a virtualNode is as follows:
230
244
 
231
245
  ### Core Utilities
232
246
 
233
- Core Utilities are an internal library that provides aXe with functionality used throughout its core processes. Most notably among these are the queue function and the DqElement constructor.
247
+ Core Utilities are an internal library that provides axe with functionality used throughout its core processes. Most notably among these are the queue function and the DqElement constructor.
234
248
 
235
249
  #### ARIA Lookup Tables
236
250
 
@@ -285,7 +299,7 @@ will make it easier to work with the virtual DOM.
285
299
 
286
300
  #### Description
287
301
 
288
- Recursvely return an array containing the virtual DOM tree for the node specified, excluding comment nodes
302
+ Recursively return an array containing the virtual DOM tree for the node specified, excluding comment nodes
289
303
  and shadow DOM nodes `<content>` and `<slot>`. This method will return a flattened tree containing both
290
304
  light and shadow DOM, if applicable.
291
305
 
@@ -378,7 +392,7 @@ None
378
392
 
379
393
  #### Returns
380
394
 
381
- An object containg the data, relatedNodes, and a way to reset them.
395
+ An object containing the data, relatedNodes, and a way to reset them.
382
396
 
383
397
  ```js
384
398
  {
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "axe-cdp",
3
3
  "private": true,
4
+ "scripts": {
5
+ "test": "echo 'No test specified.'"
6
+ },
4
7
  "dependencies": {
5
- "axe-core": "^3.1.1",
6
- "chrome-remote-interface": "^0.26.0"
8
+ "axe-core": "^3.3.1",
9
+ "chrome-remote-interface": "^0.27.1"
7
10
  }
8
11
  }
@@ -1,6 +1,6 @@
1
1
  # Jasmine README
2
2
 
3
- This example demonstrates how to use aXe with the Jasmine unit testing framework.
3
+ This example demonstrates how to use axe with the Jasmine unit testing framework.
4
4
 
5
5
  The unit test is in `spec/a11y.js`, and has two test cases: One that shows the
6
6
  expected results from HTML with no errors, and one that shows the expected
@@ -10,15 +10,13 @@ result from HTML with a single error.
10
10
 
11
11
  - Node must be installed; please follow the directions at http://www.nodejs.org
12
12
  to install it.
13
- - `npm install -g grunt-cli` to install the Grunt task runner (may need to be
14
- run with `sudo` on Unix or as Administrator on Windows)
15
13
  - Move to the `doc/examples/jasmine` directory
16
14
  - `npm install` to install dependencies
17
15
 
18
16
  ## To run the example
19
17
 
20
18
  - Move to the `doc/examples/jasmine` directory
21
- - `grunt jasmine` to run Jasmine
19
+ - `npm test` to run Jasmine
22
20
 
23
21
  You should see output indicating that the tests ran successfully, with zero
24
22
  failures.
@@ -32,6 +30,6 @@ to `axe.run`.
32
30
 
33
31
  The third argument to the `axe.run` call should be the function to test
34
32
  the results. The example is simply looking at the count of violations, but much
35
- more detailed information is available if desired. The aXe documentation
33
+ more detailed information is available if desired. The axe documentation
36
34
  should be consulted for more details on customizing and analyzing calls to
37
35
  `axe.run`.
@@ -0,0 +1,29 @@
1
+ module.exports = function(config) {
2
+ config.set({
3
+ basePath: '',
4
+
5
+ frameworks: ['jasmine'],
6
+
7
+ files: ['spec/**/*.js', 'node_modules/axe-core/axe.js'],
8
+
9
+ exclude: [],
10
+
11
+ preprocessors: {},
12
+
13
+ reporters: ['progress'],
14
+
15
+ port: 9876,
16
+
17
+ colors: true,
18
+
19
+ logLevel: config.LOG_INFO,
20
+
21
+ autoWatch: true,
22
+
23
+ browsers: ['ChromeHeadless'],
24
+
25
+ singleRun: true,
26
+
27
+ concurrency: Infinity
28
+ });
29
+ };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axe-jasmine-example",
3
- "description": "aXe Jasmine Example",
3
+ "description": "Axe Jasmine Example",
4
4
  "version": "0.0.1",
5
5
  "private": true,
6
6
  "author": {
@@ -10,11 +10,12 @@
10
10
  },
11
11
  "dependencies": {},
12
12
  "scripts": {
13
- "test": "grunt jasmine"
13
+ "test": "karma start karma.conf.js"
14
14
  },
15
15
  "devDependencies": {
16
- "axe-core": "^3.1.1",
17
- "grunt": "~1.0.2",
18
- "grunt-contrib-jasmine": "~2.0.0"
16
+ "axe-core": "^3.3.1",
17
+ "karma": "^4.2.0",
18
+ "karma-chrome-launcher": "^3.0.0",
19
+ "karma-jasmine": "^2.0.1"
19
20
  }
20
21
  }
@@ -1,6 +1,6 @@
1
1
  # Jest + React README
2
2
 
3
- This example demonstrates how to use aXe to test React components using the
3
+ This example demonstrates how to use axe to test React components using the
4
4
  Jest unit testing framework.
5
5
 
6
6
  The unit test is in `link.test.js`, and has one test cases, showing how to run
@@ -2,11 +2,11 @@ import React from 'react';
2
2
  import axe from 'axe-core';
3
3
  import { mountToDoc } from './test-helpers';
4
4
 
5
- import Link from './Link';
5
+ import Link from './link';
6
6
 
7
- test('Link has no aXe violations', done => {
7
+ test('Link has no axe violations', done => {
8
8
  const linkComponent = mountToDoc(
9
- <Link page="http://www.axe-core.org">aXe website</Link>
9
+ <Link page="http://www.axe-core.org">axe website</Link>
10
10
  );
11
11
  const linkNode = linkComponent.getDOMNode();
12
12
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axe-jest-react-example",
3
- "description": "aXe Jest + React Example",
3
+ "description": "Axe Jest + React Example",
4
4
  "version": "0.0.1",
5
5
  "private": true,
6
6
  "author": {
@@ -13,14 +13,14 @@
13
13
  "test": "jest"
14
14
  },
15
15
  "devDependencies": {
16
- "axe-core": "^3.1.1",
17
- "babel-jest": "^23.0.0",
18
- "babel-preset-es2015": "^6.24.1",
19
- "babel-preset-react": "^6.24.1",
20
- "enzyme": "^3.5.0",
21
- "enzyme-adapter-react-16": "^1.3.0",
22
- "jest": "^22.4.0",
23
- "jest-cli": "^23.0.1",
16
+ "@babel/preset-env": "^7.5.5",
17
+ "@babel/preset-react": "^7.0.0",
18
+ "axe-core": "^3.3.1",
19
+ "babel-jest": "^24.8.0",
20
+ "enzyme": "^3.10.0",
21
+ "enzyme-adapter-react-16": "^1.14.0",
22
+ "jest": "^24.8.0",
23
+ "jest-cli": "^24.8.0",
24
24
  "react": "^16.4.0",
25
25
  "react-dom": "^16.4.0",
26
26
  "react-test-renderer": "^16.2.0"
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "axe-jsdom-example",
3
+ "description": "Axe JSDOM Example",
4
+ "version": "0.0.1",
5
+ "private": true,
6
+ "dependencies": {},
7
+ "scripts": {
8
+ "test": "mocha"
9
+ },
10
+ "devDependencies": {
11
+ "axe-core": "^3.3.1",
12
+ "jsdom": "^15.1.1",
13
+ "mocha": "^6.2.0"
14
+ }
15
+ }
@@ -1,6 +1,6 @@
1
1
  # Mocha README
2
2
 
3
- This example demonstrates how to use aXe with the Mocha unit testing framework.
3
+ This example demonstrates how to use axe with the Mocha unit testing framework.
4
4
 
5
5
  The unit test is in `test/a11y.js`, and has two test cases: One that shows the
6
6
  expected results from HTML with no errors, and one that shows the expected
@@ -10,15 +10,13 @@ result from HTML with a single error.
10
10
 
11
11
  - Node must be installed; please follow the directions at http://www.nodejs.org
12
12
  to install it.
13
- - `npm install -g grunt-cli` to install the Grunt task runner (may need to be
14
- run with `sudo` on Unix or as Administrator on Windows)
15
13
  - Move to the `doc/examples/mocha` directory
16
14
  - `npm install` to install dependencies
17
15
 
18
16
  ## To run the example
19
17
 
20
18
  - Move to the `doc/examples/mocha` directory
21
- - `grunt mocha` to run Mocha
19
+ - `npm test` to run Mocha
22
20
 
23
21
  You should see output indicating that the tests ran successfully, with zero
24
22
  failures.
@@ -32,6 +30,6 @@ to `axe.run`.
32
30
 
33
31
  The third argument to the `axe.run` call should be the function to test
34
32
  the results. The example is simply looking at the count of violations, but much
35
- more detailed information is available if desired. The aXe documentation
36
- should be consulted for more details on customizing and
37
- analyzing calls to `axe.run`.
33
+ more detailed information is available if desired. The axe documentation
34
+ should be consulted for more details on customizing and analyzing calls to
35
+ `axe.run`.