govuk_publishing_components 18.1.0 → 18.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (513) hide show
  1. checksums.yaml +4 -4
  2. data/lib/govuk_publishing_components/version.rb +1 -1
  3. data/node_modules/axe-core/CHANGELOG.md +741 -0
  4. data/node_modules/axe-core/CONTRIBUTING.md +187 -0
  5. data/node_modules/axe-core/LICENSE +362 -0
  6. data/node_modules/axe-core/README.md +147 -0
  7. data/node_modules/axe-core/axe.d.ts +216 -0
  8. data/node_modules/axe-core/axe.js +15298 -0
  9. data/node_modules/axe-core/axe.min.js +12 -0
  10. data/node_modules/axe-core/bower.json +40 -0
  11. data/node_modules/axe-core/doc/API.md +798 -0
  12. data/node_modules/axe-core/doc/accessibility-supported.md +33 -0
  13. data/node_modules/axe-core/doc/act-rules-format.md +37 -0
  14. data/node_modules/axe-core/doc/aria-supported.md +23 -0
  15. data/node_modules/axe-core/doc/axelogo2018.png +0 -0
  16. data/node_modules/axe-core/doc/code-submission-guidelines.md +178 -0
  17. data/node_modules/axe-core/doc/developer-guide.md +500 -0
  18. data/node_modules/axe-core/doc/examples/chrome-debugging-protocol/README.md +13 -0
  19. data/node_modules/axe-core/doc/examples/chrome-debugging-protocol/axe-cdp.js +81 -0
  20. data/node_modules/axe-core/doc/examples/chrome-debugging-protocol/package.json +8 -0
  21. data/node_modules/axe-core/doc/examples/html-handlebars.md +164 -0
  22. data/node_modules/axe-core/doc/examples/jasmine/README.md +37 -0
  23. data/node_modules/axe-core/doc/examples/jasmine/package.json +20 -0
  24. data/node_modules/axe-core/doc/examples/jasmine/spec/a11y.js +36 -0
  25. data/node_modules/axe-core/doc/examples/jest_react/README.md +41 -0
  26. data/node_modules/axe-core/doc/examples/jest_react/link.js +7 -0
  27. data/node_modules/axe-core/doc/examples/jest_react/link.test.js +24 -0
  28. data/node_modules/axe-core/doc/examples/jest_react/package.json +28 -0
  29. data/node_modules/axe-core/doc/examples/jest_react/test-helpers.js +21 -0
  30. data/node_modules/axe-core/doc/examples/mocha/README.md +37 -0
  31. data/node_modules/axe-core/doc/examples/mocha/package.json +21 -0
  32. data/node_modules/axe-core/doc/examples/phantomjs/README.md +17 -0
  33. data/node_modules/axe-core/doc/examples/phantomjs/axe-phantom.js +51 -0
  34. data/node_modules/axe-core/doc/examples/phantomjs/package.json +19 -0
  35. data/node_modules/axe-core/doc/examples/puppeteer/README.md +12 -0
  36. data/node_modules/axe-core/doc/examples/puppeteer/axe-puppeteer.js +60 -0
  37. data/node_modules/axe-core/doc/examples/puppeteer/package.json +10 -0
  38. data/node_modules/axe-core/doc/examples/qunit/README.md +37 -0
  39. data/node_modules/axe-core/doc/examples/qunit/package.json +21 -0
  40. data/node_modules/axe-core/doc/plugins.md +123 -0
  41. data/node_modules/axe-core/doc/projects.md +44 -0
  42. data/node_modules/axe-core/doc/rule-descriptions.md +79 -0
  43. data/node_modules/axe-core/doc/rule-development.md +95 -0
  44. data/node_modules/axe-core/doc/rule-proposal.md +106 -0
  45. data/node_modules/axe-core/lib/checks/aria/abstractrole.js +1 -0
  46. data/node_modules/axe-core/lib/checks/aria/abstractrole.json +11 -0
  47. data/node_modules/axe-core/lib/checks/aria/allowed-attr.js +39 -0
  48. data/node_modules/axe-core/lib/checks/aria/allowed-attr.json +11 -0
  49. data/node_modules/axe-core/lib/checks/aria/aria-allowed-role.js +28 -0
  50. data/node_modules/axe-core/lib/checks/aria/aria-allowed-role.json +16 -0
  51. data/node_modules/axe-core/lib/checks/aria/aria-hidden-body.js +1 -0
  52. data/node_modules/axe-core/lib/checks/aria/aria-hidden-body.json +11 -0
  53. data/node_modules/axe-core/lib/checks/aria/errormessage.js +33 -0
  54. data/node_modules/axe-core/lib/checks/aria/errormessage.json +11 -0
  55. data/node_modules/axe-core/lib/checks/aria/has-widget-role.js +6 -0
  56. data/node_modules/axe-core/lib/checks/aria/has-widget-role.json +12 -0
  57. data/node_modules/axe-core/lib/checks/aria/implicit-role-fallback.js +6 -0
  58. data/node_modules/axe-core/lib/checks/aria/implicit-role-fallback.json +11 -0
  59. data/node_modules/axe-core/lib/checks/aria/invalidrole.js +3 -0
  60. data/node_modules/axe-core/lib/checks/aria/invalidrole.json +11 -0
  61. data/node_modules/axe-core/lib/checks/aria/required-attr.js +28 -0
  62. data/node_modules/axe-core/lib/checks/aria/required-attr.json +11 -0
  63. data/node_modules/axe-core/lib/checks/aria/required-children.js +117 -0
  64. data/node_modules/axe-core/lib/checks/aria/required-children.json +15 -0
  65. data/node_modules/axe-core/lib/checks/aria/required-parent.js +87 -0
  66. data/node_modules/axe-core/lib/checks/aria/required-parent.json +11 -0
  67. data/node_modules/axe-core/lib/checks/aria/unsupportedattr.js +39 -0
  68. data/node_modules/axe-core/lib/checks/aria/unsupportedattr.json +11 -0
  69. data/node_modules/axe-core/lib/checks/aria/unsupportedrole.js +1 -0
  70. data/node_modules/axe-core/lib/checks/aria/unsupportedrole.json +11 -0
  71. data/node_modules/axe-core/lib/checks/aria/valid-attr-value.js +32 -0
  72. data/node_modules/axe-core/lib/checks/aria/valid-attr-value.json +12 -0
  73. data/node_modules/axe-core/lib/checks/aria/valid-attr.js +25 -0
  74. data/node_modules/axe-core/lib/checks/aria/valid-attr.json +12 -0
  75. data/node_modules/axe-core/lib/checks/aria/valid-scrollable-semantics.js +62 -0
  76. data/node_modules/axe-core/lib/checks/aria/valid-scrollable-semantics.json +12 -0
  77. data/node_modules/axe-core/lib/checks/color/color-contrast.js +70 -0
  78. data/node_modules/axe-core/lib/checks/color/color-contrast.json +24 -0
  79. data/node_modules/axe-core/lib/checks/color/link-in-text-block.js +85 -0
  80. data/node_modules/axe-core/lib/checks/color/link-in-text-block.json +19 -0
  81. data/node_modules/axe-core/lib/checks/forms/autocomplete-appropriate.js +67 -0
  82. data/node_modules/axe-core/lib/checks/forms/autocomplete-appropriate.json +11 -0
  83. data/node_modules/axe-core/lib/checks/forms/autocomplete-valid.js +2 -0
  84. data/node_modules/axe-core/lib/checks/forms/autocomplete-valid.json +11 -0
  85. data/node_modules/axe-core/lib/checks/forms/fieldset-after.js +25 -0
  86. data/node_modules/axe-core/lib/checks/forms/fieldset.js +109 -0
  87. data/node_modules/axe-core/lib/checks/forms/fieldset.json +12 -0
  88. data/node_modules/axe-core/lib/checks/forms/group-labelledby-after.js +16 -0
  89. data/node_modules/axe-core/lib/checks/forms/group-labelledby.js +66 -0
  90. data/node_modules/axe-core/lib/checks/forms/group-labelledby.json +12 -0
  91. data/node_modules/axe-core/lib/checks/keyboard/accesskeys-after.js +19 -0
  92. data/node_modules/axe-core/lib/checks/keyboard/accesskeys.js +5 -0
  93. data/node_modules/axe-core/lib/checks/keyboard/accesskeys.json +12 -0
  94. data/node_modules/axe-core/lib/checks/keyboard/focusable-disabled.js +25 -0
  95. data/node_modules/axe-core/lib/checks/keyboard/focusable-disabled.json +11 -0
  96. data/node_modules/axe-core/lib/checks/keyboard/focusable-no-name.js +6 -0
  97. data/node_modules/axe-core/lib/checks/keyboard/focusable-no-name.json +11 -0
  98. data/node_modules/axe-core/lib/checks/keyboard/focusable-not-tabbable.js +25 -0
  99. data/node_modules/axe-core/lib/checks/keyboard/focusable-not-tabbable.json +11 -0
  100. data/node_modules/axe-core/lib/checks/keyboard/landmark-is-top-level.js +18 -0
  101. data/node_modules/axe-core/lib/checks/keyboard/landmark-is-top-level.json +11 -0
  102. data/node_modules/axe-core/lib/checks/keyboard/page-has-elm-after.js +11 -0
  103. data/node_modules/axe-core/lib/checks/keyboard/page-has-elm.js +9 -0
  104. data/node_modules/axe-core/lib/checks/keyboard/page-has-heading-one.json +15 -0
  105. data/node_modules/axe-core/lib/checks/keyboard/page-has-main.json +15 -0
  106. data/node_modules/axe-core/lib/checks/keyboard/page-no-duplicate-banner.json +15 -0
  107. data/node_modules/axe-core/lib/checks/keyboard/page-no-duplicate-contentinfo.json +15 -0
  108. data/node_modules/axe-core/lib/checks/keyboard/page-no-duplicate-main.json +14 -0
  109. data/node_modules/axe-core/lib/checks/keyboard/page-no-duplicate.js +22 -0
  110. data/node_modules/axe-core/lib/checks/keyboard/tabindex.js +1 -0
  111. data/node_modules/axe-core/lib/checks/keyboard/tabindex.json +11 -0
  112. data/node_modules/axe-core/lib/checks/label/alt-space-value.js +2 -0
  113. data/node_modules/axe-core/lib/checks/label/alt-space-value.json +11 -0
  114. data/node_modules/axe-core/lib/checks/label/duplicate-img-label.js +19 -0
  115. data/node_modules/axe-core/lib/checks/label/duplicate-img-label.json +11 -0
  116. data/node_modules/axe-core/lib/checks/label/explicit.js +15 -0
  117. data/node_modules/axe-core/lib/checks/label/explicit.json +11 -0
  118. data/node_modules/axe-core/lib/checks/label/help-same-as-label.js +23 -0
  119. data/node_modules/axe-core/lib/checks/label/help-same-as-label.json +12 -0
  120. data/node_modules/axe-core/lib/checks/label/hidden-explicit-label.js +12 -0
  121. data/node_modules/axe-core/lib/checks/label/hidden-explicit-label.json +11 -0
  122. data/node_modules/axe-core/lib/checks/label/implicit.js +7 -0
  123. data/node_modules/axe-core/lib/checks/label/implicit.json +11 -0
  124. data/node_modules/axe-core/lib/checks/label/label-content-name-mismatch.js +49 -0
  125. data/node_modules/axe-core/lib/checks/label/label-content-name-mismatch.json +11 -0
  126. data/node_modules/axe-core/lib/checks/label/multiple-label.js +29 -0
  127. data/node_modules/axe-core/lib/checks/label/multiple-label.json +11 -0
  128. data/node_modules/axe-core/lib/checks/label/title-only.js +5 -0
  129. data/node_modules/axe-core/lib/checks/label/title-only.json +11 -0
  130. data/node_modules/axe-core/lib/checks/language/has-lang.js +5 -0
  131. data/node_modules/axe-core/lib/checks/language/has-lang.json +11 -0
  132. data/node_modules/axe-core/lib/checks/language/valid-lang.js +26 -0
  133. data/node_modules/axe-core/lib/checks/language/valid-lang.json +11 -0
  134. data/node_modules/axe-core/lib/checks/language/xml-lang-mismatch.js +5 -0
  135. data/node_modules/axe-core/lib/checks/language/xml-lang-mismatch.json +11 -0
  136. data/node_modules/axe-core/lib/checks/lists/dlitem.js +23 -0
  137. data/node_modules/axe-core/lib/checks/lists/dlitem.json +11 -0
  138. data/node_modules/axe-core/lib/checks/lists/listitem.js +18 -0
  139. data/node_modules/axe-core/lib/checks/lists/listitem.json +11 -0
  140. data/node_modules/axe-core/lib/checks/lists/only-dlitems.js +42 -0
  141. data/node_modules/axe-core/lib/checks/lists/only-dlitems.json +11 -0
  142. data/node_modules/axe-core/lib/checks/lists/only-listitems.js +68 -0
  143. data/node_modules/axe-core/lib/checks/lists/only-listitems.json +11 -0
  144. data/node_modules/axe-core/lib/checks/lists/structured-dlitems.js +22 -0
  145. data/node_modules/axe-core/lib/checks/lists/structured-dlitems.json +11 -0
  146. data/node_modules/axe-core/lib/checks/media/caption.js +8 -0
  147. data/node_modules/axe-core/lib/checks/media/caption.json +11 -0
  148. data/node_modules/axe-core/lib/checks/media/description.js +8 -0
  149. data/node_modules/axe-core/lib/checks/media/description.json +11 -0
  150. data/node_modules/axe-core/lib/checks/media/frame-tested.js +28 -0
  151. data/node_modules/axe-core/lib/checks/media/frame-tested.json +15 -0
  152. data/node_modules/axe-core/lib/checks/mobile/css-orientation-lock.js +132 -0
  153. data/node_modules/axe-core/lib/checks/mobile/css-orientation-lock.json +12 -0
  154. data/node_modules/axe-core/lib/checks/mobile/meta-viewport-large.json +15 -0
  155. data/node_modules/axe-core/lib/checks/mobile/meta-viewport-scale.js +38 -0
  156. data/node_modules/axe-core/lib/checks/mobile/meta-viewport.json +14 -0
  157. data/node_modules/axe-core/lib/checks/navigation/header-present.js +4 -0
  158. data/node_modules/axe-core/lib/checks/navigation/header-present.json +11 -0
  159. data/node_modules/axe-core/lib/checks/navigation/heading-order-after.js +14 -0
  160. data/node_modules/axe-core/lib/checks/navigation/heading-order.js +15 -0
  161. data/node_modules/axe-core/lib/checks/navigation/heading-order.json +12 -0
  162. data/node_modules/axe-core/lib/checks/navigation/internal-link-present.js +4 -0
  163. data/node_modules/axe-core/lib/checks/navigation/internal-link-present.json +11 -0
  164. data/node_modules/axe-core/lib/checks/navigation/landmark.js +3 -0
  165. data/node_modules/axe-core/lib/checks/navigation/landmark.json +11 -0
  166. data/node_modules/axe-core/lib/checks/navigation/meta-refresh.js +4 -0
  167. data/node_modules/axe-core/lib/checks/navigation/meta-refresh.json +11 -0
  168. data/node_modules/axe-core/lib/checks/navigation/p-as-heading.js +93 -0
  169. data/node_modules/axe-core/lib/checks/navigation/p-as-heading.json +30 -0
  170. data/node_modules/axe-core/lib/checks/navigation/region-after.js +1 -0
  171. data/node_modules/axe-core/lib/checks/navigation/region.js +85 -0
  172. data/node_modules/axe-core/lib/checks/navigation/region.json +12 -0
  173. data/node_modules/axe-core/lib/checks/navigation/skip-link.js +5 -0
  174. data/node_modules/axe-core/lib/checks/navigation/skip-link.json +12 -0
  175. data/node_modules/axe-core/lib/checks/navigation/unique-frame-title-after.js +9 -0
  176. data/node_modules/axe-core/lib/checks/navigation/unique-frame-title.js +6 -0
  177. data/node_modules/axe-core/lib/checks/navigation/unique-frame-title.json +12 -0
  178. data/node_modules/axe-core/lib/checks/parsing/duplicate-id-active.json +12 -0
  179. data/node_modules/axe-core/lib/checks/parsing/duplicate-id-after.js +8 -0
  180. data/node_modules/axe-core/lib/checks/parsing/duplicate-id-aria.json +12 -0
  181. data/node_modules/axe-core/lib/checks/parsing/duplicate-id.js +17 -0
  182. data/node_modules/axe-core/lib/checks/parsing/duplicate-id.json +12 -0
  183. data/node_modules/axe-core/lib/checks/shared/aria-label.js +2 -0
  184. data/node_modules/axe-core/lib/checks/shared/aria-label.json +11 -0
  185. data/node_modules/axe-core/lib/checks/shared/aria-labelledby.js +2 -0
  186. data/node_modules/axe-core/lib/checks/shared/aria-labelledby.json +11 -0
  187. data/node_modules/axe-core/lib/checks/shared/button-has-visible-text.js +12 -0
  188. data/node_modules/axe-core/lib/checks/shared/button-has-visible-text.json +11 -0
  189. data/node_modules/axe-core/lib/checks/shared/doc-has-title.js +2 -0
  190. data/node_modules/axe-core/lib/checks/shared/doc-has-title.json +11 -0
  191. data/node_modules/axe-core/lib/checks/shared/exists.js +1 -0
  192. data/node_modules/axe-core/lib/checks/shared/exists.json +11 -0
  193. data/node_modules/axe-core/lib/checks/shared/has-alt.js +4 -0
  194. data/node_modules/axe-core/lib/checks/shared/has-alt.json +11 -0
  195. data/node_modules/axe-core/lib/checks/shared/has-visible-text.js +1 -0
  196. data/node_modules/axe-core/lib/checks/shared/has-visible-text.json +11 -0
  197. data/node_modules/axe-core/lib/checks/shared/is-on-screen.js +4 -0
  198. data/node_modules/axe-core/lib/checks/shared/is-on-screen.json +11 -0
  199. data/node_modules/axe-core/lib/checks/shared/non-empty-alt.js +2 -0
  200. data/node_modules/axe-core/lib/checks/shared/non-empty-alt.json +11 -0
  201. data/node_modules/axe-core/lib/checks/shared/non-empty-if-present.js +11 -0
  202. data/node_modules/axe-core/lib/checks/shared/non-empty-if-present.json +11 -0
  203. data/node_modules/axe-core/lib/checks/shared/non-empty-title.js +2 -0
  204. data/node_modules/axe-core/lib/checks/shared/non-empty-title.json +11 -0
  205. data/node_modules/axe-core/lib/checks/shared/non-empty-value.js +2 -0
  206. data/node_modules/axe-core/lib/checks/shared/non-empty-value.json +11 -0
  207. data/node_modules/axe-core/lib/checks/shared/role-none.js +1 -0
  208. data/node_modules/axe-core/lib/checks/shared/role-none.json +11 -0
  209. data/node_modules/axe-core/lib/checks/shared/role-presentation.js +1 -0
  210. data/node_modules/axe-core/lib/checks/shared/role-presentation.json +11 -0
  211. data/node_modules/axe-core/lib/checks/tables/caption-faked.js +10 -0
  212. data/node_modules/axe-core/lib/checks/tables/caption-faked.json +11 -0
  213. data/node_modules/axe-core/lib/checks/tables/has-caption.js +1 -0
  214. data/node_modules/axe-core/lib/checks/tables/has-caption.json +11 -0
  215. data/node_modules/axe-core/lib/checks/tables/has-summary.js +1 -0
  216. data/node_modules/axe-core/lib/checks/tables/has-summary.json +11 -0
  217. data/node_modules/axe-core/lib/checks/tables/has-th.js +31 -0
  218. data/node_modules/axe-core/lib/checks/tables/has-th.json +11 -0
  219. data/node_modules/axe-core/lib/checks/tables/headers-visible-text.js +30 -0
  220. data/node_modules/axe-core/lib/checks/tables/html5-scope.js +5 -0
  221. data/node_modules/axe-core/lib/checks/tables/html5-scope.json +11 -0
  222. data/node_modules/axe-core/lib/checks/tables/same-caption-summary.js +7 -0
  223. data/node_modules/axe-core/lib/checks/tables/same-caption-summary.json +11 -0
  224. data/node_modules/axe-core/lib/checks/tables/scope-value.js +5 -0
  225. data/node_modules/axe-core/lib/checks/tables/scope-value.json +11 -0
  226. data/node_modules/axe-core/lib/checks/tables/td-has-header.js +29 -0
  227. data/node_modules/axe-core/lib/checks/tables/td-has-header.json +11 -0
  228. data/node_modules/axe-core/lib/checks/tables/td-headers-attr.js +62 -0
  229. data/node_modules/axe-core/lib/checks/tables/td-headers-attr.json +11 -0
  230. data/node_modules/axe-core/lib/checks/tables/th-has-data-cells.js +76 -0
  231. data/node_modules/axe-core/lib/checks/tables/th-has-data-cells.json +12 -0
  232. data/node_modules/axe-core/lib/checks/tables/th-single-row-column.js +39 -0
  233. data/node_modules/axe-core/lib/checks/visibility/hidden-content.js +21 -0
  234. data/node_modules/axe-core/lib/checks/visibility/hidden-content.json +12 -0
  235. data/node_modules/axe-core/lib/commons/aria/arialabel-text.js +15 -0
  236. data/node_modules/axe-core/lib/commons/aria/arialabelledby-text.js +52 -0
  237. data/node_modules/axe-core/lib/commons/aria/attributes.js +45 -0
  238. data/node_modules/axe-core/lib/commons/aria/get-element-unallowed-roles.js +92 -0
  239. data/node_modules/axe-core/lib/commons/aria/get-owned-virtual.js +24 -0
  240. data/node_modules/axe-core/lib/commons/aria/get-role.js +44 -0
  241. data/node_modules/axe-core/lib/commons/aria/index.js +2417 -0
  242. data/node_modules/axe-core/lib/commons/aria/is-accessible-ref.js +55 -0
  243. data/node_modules/axe-core/lib/commons/aria/is-aria-role-allowed-on-element.js +41 -0
  244. data/node_modules/axe-core/lib/commons/aria/is-unsupported-role.js +14 -0
  245. data/node_modules/axe-core/lib/commons/aria/label-virtual.js +54 -0
  246. data/node_modules/axe-core/lib/commons/aria/named-from-contents.js +39 -0
  247. data/node_modules/axe-core/lib/commons/aria/roles.js +208 -0
  248. data/node_modules/axe-core/lib/commons/aria/validate-attr-value.js +63 -0
  249. data/node_modules/axe-core/lib/commons/color/contrast.js +172 -0
  250. data/node_modules/axe-core/lib/commons/color/element-is-distinct.js +88 -0
  251. data/node_modules/axe-core/lib/commons/color/get-background-color.js +411 -0
  252. data/node_modules/axe-core/lib/commons/color/get-foreground-color.js +32 -0
  253. data/node_modules/axe-core/lib/commons/color/incomplete-data.js +50 -0
  254. data/node_modules/axe-core/lib/commons/color/index.js +8 -0
  255. data/node_modules/axe-core/lib/commons/dom/elements-below-floating.js +39 -0
  256. data/node_modules/axe-core/lib/commons/dom/find-elms-in-context.js +28 -0
  257. data/node_modules/axe-core/lib/commons/dom/find-up.js +63 -0
  258. data/node_modules/axe-core/lib/commons/dom/get-composed-parent.js +25 -0
  259. data/node_modules/axe-core/lib/commons/dom/get-element-by-reference.js +34 -0
  260. data/node_modules/axe-core/lib/commons/dom/get-element-coordinates.js +38 -0
  261. data/node_modules/axe-core/lib/commons/dom/get-root-node.js +12 -0
  262. data/node_modules/axe-core/lib/commons/dom/get-scroll-offset.js +34 -0
  263. data/node_modules/axe-core/lib/commons/dom/get-tabbable-elements.js +24 -0
  264. data/node_modules/axe-core/lib/commons/dom/get-viewport-size.js +37 -0
  265. data/node_modules/axe-core/lib/commons/dom/has-content-virtual.js +73 -0
  266. data/node_modules/axe-core/lib/commons/dom/idrefs.js +36 -0
  267. data/node_modules/axe-core/lib/commons/dom/index.js +9 -0
  268. data/node_modules/axe-core/lib/commons/dom/is-focusable.js +90 -0
  269. data/node_modules/axe-core/lib/commons/dom/is-hidden-with-css.js +60 -0
  270. data/node_modules/axe-core/lib/commons/dom/is-html5.js +17 -0
  271. data/node_modules/axe-core/lib/commons/dom/is-in-text-block.js +95 -0
  272. data/node_modules/axe-core/lib/commons/dom/is-node.js +13 -0
  273. data/node_modules/axe-core/lib/commons/dom/is-offscreen.js +62 -0
  274. data/node_modules/axe-core/lib/commons/dom/is-visible.js +77 -0
  275. data/node_modules/axe-core/lib/commons/dom/is-visual-content.js +50 -0
  276. data/node_modules/axe-core/lib/commons/dom/shadow-elements-from-point.js +41 -0
  277. data/node_modules/axe-core/lib/commons/dom/visually-contains.js +62 -0
  278. data/node_modules/axe-core/lib/commons/dom/visually-overlaps.js +47 -0
  279. data/node_modules/axe-core/lib/commons/index.js +11 -0
  280. data/node_modules/axe-core/lib/commons/intro.stub +1 -0
  281. data/node_modules/axe-core/lib/commons/matches/attributes.js +23 -0
  282. data/node_modules/axe-core/lib/commons/matches/condition.js +19 -0
  283. data/node_modules/axe-core/lib/commons/matches/from-definition.js +47 -0
  284. data/node_modules/axe-core/lib/commons/matches/from-function.js +38 -0
  285. data/node_modules/axe-core/lib/commons/matches/from-primative.js +30 -0
  286. data/node_modules/axe-core/lib/commons/matches/index.js +37 -0
  287. data/node_modules/axe-core/lib/commons/matches/node-name.js +34 -0
  288. data/node_modules/axe-core/lib/commons/matches/properties.js +25 -0
  289. data/node_modules/axe-core/lib/commons/outro.stub +2 -0
  290. data/node_modules/axe-core/lib/commons/table/get-all-cells.js +28 -0
  291. data/node_modules/axe-core/lib/commons/table/get-cell-position.js +28 -0
  292. data/node_modules/axe-core/lib/commons/table/get-headers.js +29 -0
  293. data/node_modules/axe-core/lib/commons/table/get-scope.js +54 -0
  294. data/node_modules/axe-core/lib/commons/table/index.js +9 -0
  295. data/node_modules/axe-core/lib/commons/table/is-column-header.js +13 -0
  296. data/node_modules/axe-core/lib/commons/table/is-data-cell.js +22 -0
  297. data/node_modules/axe-core/lib/commons/table/is-data-table.js +190 -0
  298. data/node_modules/axe-core/lib/commons/table/is-header.js +22 -0
  299. data/node_modules/axe-core/lib/commons/table/is-row-header.js +13 -0
  300. data/node_modules/axe-core/lib/commons/table/to-grid.js +38 -0
  301. data/node_modules/axe-core/lib/commons/table/traverse.js +78 -0
  302. data/node_modules/axe-core/lib/commons/text/accessible-text-virtual.js +152 -0
  303. data/node_modules/axe-core/lib/commons/text/form-control-value.js +204 -0
  304. data/node_modules/axe-core/lib/commons/text/index.js +8 -0
  305. data/node_modules/axe-core/lib/commons/text/is-human-interpretable.js +51 -0
  306. data/node_modules/axe-core/lib/commons/text/is-valid-autocomplete.js +118 -0
  307. data/node_modules/axe-core/lib/commons/text/label-text.js +58 -0
  308. data/node_modules/axe-core/lib/commons/text/label-virtual.js +53 -0
  309. data/node_modules/axe-core/lib/commons/text/native-element-types.js +100 -0
  310. data/node_modules/axe-core/lib/commons/text/native-text-alternative.js +50 -0
  311. data/node_modules/axe-core/lib/commons/text/native-text-methods.js +122 -0
  312. data/node_modules/axe-core/lib/commons/text/sanitize.js +18 -0
  313. data/node_modules/axe-core/lib/commons/text/subtree-text.js +89 -0
  314. data/node_modules/axe-core/lib/commons/text/title-text.js +33 -0
  315. data/node_modules/axe-core/lib/commons/text/unicode.js +117 -0
  316. data/node_modules/axe-core/lib/commons/text/unsupported.js +5 -0
  317. data/node_modules/axe-core/lib/commons/text/visible-virtual.js +46 -0
  318. data/node_modules/axe-core/lib/commons/utils/index.js +10 -0
  319. data/node_modules/axe-core/lib/core/base/audit.js +684 -0
  320. data/node_modules/axe-core/lib/core/base/check-result.js +33 -0
  321. data/node_modules/axe-core/lib/core/base/check.js +123 -0
  322. data/node_modules/axe-core/lib/core/base/context.js +273 -0
  323. data/node_modules/axe-core/lib/core/base/rule-result.js +39 -0
  324. data/node_modules/axe-core/lib/core/base/rule.js +383 -0
  325. data/node_modules/axe-core/lib/core/constants.js +68 -0
  326. data/node_modules/axe-core/lib/core/imports/index.js +26 -0
  327. data/node_modules/axe-core/lib/core/index.js +45 -0
  328. data/node_modules/axe-core/lib/core/log.js +12 -0
  329. data/node_modules/axe-core/lib/core/public/cleanup-plugins.js +53 -0
  330. data/node_modules/axe-core/lib/core/public/configure.js +57 -0
  331. data/node_modules/axe-core/lib/core/public/get-rules.js +29 -0
  332. data/node_modules/axe-core/lib/core/public/load.js +66 -0
  333. data/node_modules/axe-core/lib/core/public/plugins.js +47 -0
  334. data/node_modules/axe-core/lib/core/public/reporter.js +24 -0
  335. data/node_modules/axe-core/lib/core/public/reset.js +12 -0
  336. data/node_modules/axe-core/lib/core/public/run-rules.js +94 -0
  337. data/node_modules/axe-core/lib/core/public/run.js +148 -0
  338. data/node_modules/axe-core/lib/core/reporters/helpers/failure-summary.js +35 -0
  339. data/node_modules/axe-core/lib/core/reporters/helpers/get-environment-data.js +39 -0
  340. data/node_modules/axe-core/lib/core/reporters/helpers/incomplete-fallback-msg.js +11 -0
  341. data/node_modules/axe-core/lib/core/reporters/helpers/index.js +3 -0
  342. data/node_modules/axe-core/lib/core/reporters/helpers/process-aggregate.js +102 -0
  343. data/node_modules/axe-core/lib/core/reporters/na.js +20 -0
  344. data/node_modules/axe-core/lib/core/reporters/no-passes.js +18 -0
  345. data/node_modules/axe-core/lib/core/reporters/raw.js +8 -0
  346. data/node_modules/axe-core/lib/core/reporters/v1.js +26 -0
  347. data/node_modules/axe-core/lib/core/reporters/v2.js +22 -0
  348. data/node_modules/axe-core/lib/core/utils/aggregate.js +19 -0
  349. data/node_modules/axe-core/lib/core/utils/aggregateChecks.js +85 -0
  350. data/node_modules/axe-core/lib/core/utils/aggregateNodeResults.js +61 -0
  351. data/node_modules/axe-core/lib/core/utils/aggregateResult.js +37 -0
  352. data/node_modules/axe-core/lib/core/utils/are-styles-set.js +24 -0
  353. data/node_modules/axe-core/lib/core/utils/check-helper.js +38 -0
  354. data/node_modules/axe-core/lib/core/utils/clone.js +27 -0
  355. data/node_modules/axe-core/lib/core/utils/collect-results-from-frames.js +127 -0
  356. data/node_modules/axe-core/lib/core/utils/contains.js +30 -0
  357. data/node_modules/axe-core/lib/core/utils/css-parser.js +5 -0
  358. data/node_modules/axe-core/lib/core/utils/dq-element.js +97 -0
  359. data/node_modules/axe-core/lib/core/utils/element-matches.js +39 -0
  360. data/node_modules/axe-core/lib/core/utils/escape-selector.js +79 -0
  361. data/node_modules/axe-core/lib/core/utils/extend-meta-data.js +17 -0
  362. data/node_modules/axe-core/lib/core/utils/finalize-result.js +11 -0
  363. data/node_modules/axe-core/lib/core/utils/find-by.js +14 -0
  364. data/node_modules/axe-core/lib/core/utils/flattened-tree.js +170 -0
  365. data/node_modules/axe-core/lib/core/utils/get-all-checks.js +12 -0
  366. data/node_modules/axe-core/lib/core/utils/get-base-lang.js +16 -0
  367. data/node_modules/axe-core/lib/core/utils/get-check-option.js +40 -0
  368. data/node_modules/axe-core/lib/core/utils/get-friendly-uri-end.js +144 -0
  369. data/node_modules/axe-core/lib/core/utils/get-root-node.js +17 -0
  370. data/node_modules/axe-core/lib/core/utils/get-selector.js +406 -0
  371. data/node_modules/axe-core/lib/core/utils/get-xpath.js +84 -0
  372. data/node_modules/axe-core/lib/core/utils/index.js +10 -0
  373. data/node_modules/axe-core/lib/core/utils/inject-style.js +38 -0
  374. data/node_modules/axe-core/lib/core/utils/is-hidden.js +40 -0
  375. data/node_modules/axe-core/lib/core/utils/is-html-element.js +135 -0
  376. data/node_modules/axe-core/lib/core/utils/is-shadow-root.js +40 -0
  377. data/node_modules/axe-core/lib/core/utils/is-xhtml.js +14 -0
  378. data/node_modules/axe-core/lib/core/utils/merge-results.js +116 -0
  379. data/node_modules/axe-core/lib/core/utils/node-sorter.js +21 -0
  380. data/node_modules/axe-core/lib/core/utils/performance-timer.js +121 -0
  381. data/node_modules/axe-core/lib/core/utils/pollyfills.js +299 -0
  382. data/node_modules/axe-core/lib/core/utils/preload-cssom.js +456 -0
  383. data/node_modules/axe-core/lib/core/utils/preload.js +109 -0
  384. data/node_modules/axe-core/lib/core/utils/publish-metadata.js +93 -0
  385. data/node_modules/axe-core/lib/core/utils/qsa.js +322 -0
  386. data/node_modules/axe-core/lib/core/utils/queue.js +138 -0
  387. data/node_modules/axe-core/lib/core/utils/respondable.js +243 -0
  388. data/node_modules/axe-core/lib/core/utils/rule-should-run.js +83 -0
  389. data/node_modules/axe-core/lib/core/utils/scroll-state.js +70 -0
  390. data/node_modules/axe-core/lib/core/utils/select.js +146 -0
  391. data/node_modules/axe-core/lib/core/utils/to-array.js +21 -0
  392. data/node_modules/axe-core/lib/core/utils/token-list.js +15 -0
  393. data/node_modules/axe-core/lib/core/utils/uuid.js +242 -0
  394. data/node_modules/axe-core/lib/core/utils/valid-input-type.js +35 -0
  395. data/node_modules/axe-core/lib/core/utils/valid-langs.js +8152 -0
  396. data/node_modules/axe-core/lib/intro.stub +15 -0
  397. data/node_modules/axe-core/lib/misc/any-failure-summary.json +6 -0
  398. data/node_modules/axe-core/lib/misc/incomplete-fallback.json +3 -0
  399. data/node_modules/axe-core/lib/misc/none-failure-summary.json +6 -0
  400. data/node_modules/axe-core/lib/outro.stub +2 -0
  401. data/node_modules/axe-core/lib/rules/accesskeys.json +13 -0
  402. data/node_modules/axe-core/lib/rules/area-alt.json +19 -0
  403. data/node_modules/axe-core/lib/rules/aria-allowed-attr-matches.js +11 -0
  404. data/node_modules/axe-core/lib/rules/aria-allowed-attr.json +12 -0
  405. data/node_modules/axe-core/lib/rules/aria-allowed-role-matches.js +7 -0
  406. data/node_modules/axe-core/lib/rules/aria-allowed-role.json +14 -0
  407. data/node_modules/axe-core/lib/rules/aria-dpub-role-fallback-matches.js +10 -0
  408. data/node_modules/axe-core/lib/rules/aria-dpub-role-fallback.json +13 -0
  409. data/node_modules/axe-core/lib/rules/aria-has-attr-matches.js +11 -0
  410. data/node_modules/axe-core/lib/rules/aria-hidden-body.json +13 -0
  411. data/node_modules/axe-core/lib/rules/aria-hidden-focus-matches.js +18 -0
  412. data/node_modules/axe-core/lib/rules/aria-hidden-focus.json +14 -0
  413. data/node_modules/axe-core/lib/rules/aria-required-attr.json +12 -0
  414. data/node_modules/axe-core/lib/rules/aria-required-children.json +12 -0
  415. data/node_modules/axe-core/lib/rules/aria-required-parent.json +12 -0
  416. data/node_modules/axe-core/lib/rules/aria-roles.json +12 -0
  417. data/node_modules/axe-core/lib/rules/aria-valid-attr-value.json +12 -0
  418. data/node_modules/axe-core/lib/rules/aria-valid-attr.json +12 -0
  419. data/node_modules/axe-core/lib/rules/audio-caption.json +20 -0
  420. data/node_modules/axe-core/lib/rules/autocomplete-matches.js +45 -0
  421. data/node_modules/axe-core/lib/rules/autocomplete-valid.json +12 -0
  422. data/node_modules/axe-core/lib/rules/blink.json +19 -0
  423. data/node_modules/axe-core/lib/rules/button-name.json +27 -0
  424. data/node_modules/axe-core/lib/rules/bypass-matches.js +1 -0
  425. data/node_modules/axe-core/lib/rules/bypass.json +20 -0
  426. data/node_modules/axe-core/lib/rules/checkboxgroup.json +12 -0
  427. data/node_modules/axe-core/lib/rules/color-contrast-matches.js +120 -0
  428. data/node_modules/axe-core/lib/rules/color-contrast.json +16 -0
  429. data/node_modules/axe-core/lib/rules/css-orientation-lock.json +13 -0
  430. data/node_modules/axe-core/lib/rules/data-table-large-matches.js +11 -0
  431. data/node_modules/axe-core/lib/rules/data-table-matches.js +1 -0
  432. data/node_modules/axe-core/lib/rules/definition-list.json +13 -0
  433. data/node_modules/axe-core/lib/rules/dlitem.json +13 -0
  434. data/node_modules/axe-core/lib/rules/document-title.json +13 -0
  435. data/node_modules/axe-core/lib/rules/duplicate-id-active-matches.js +8 -0
  436. data/node_modules/axe-core/lib/rules/duplicate-id-active.json +14 -0
  437. data/node_modules/axe-core/lib/rules/duplicate-id-aria-matches.js +1 -0
  438. data/node_modules/axe-core/lib/rules/duplicate-id-aria.json +14 -0
  439. data/node_modules/axe-core/lib/rules/duplicate-id-misc-matches.js +11 -0
  440. data/node_modules/axe-core/lib/rules/duplicate-id.json +14 -0
  441. data/node_modules/axe-core/lib/rules/empty-heading.json +13 -0
  442. data/node_modules/axe-core/lib/rules/focus-order-semantics.json +13 -0
  443. data/node_modules/axe-core/lib/rules/form-field-multiple-labels.json +13 -0
  444. data/node_modules/axe-core/lib/rules/frame-tested.json +12 -0
  445. data/node_modules/axe-core/lib/rules/frame-title-has-text.js +2 -0
  446. data/node_modules/axe-core/lib/rules/frame-title-unique.json +13 -0
  447. data/node_modules/axe-core/lib/rules/frame-title.json +25 -0
  448. data/node_modules/axe-core/lib/rules/heading-matches.js +15 -0
  449. data/node_modules/axe-core/lib/rules/heading-order.json +13 -0
  450. data/node_modules/axe-core/lib/rules/hidden-content.json +13 -0
  451. data/node_modules/axe-core/lib/rules/html-has-lang.json +12 -0
  452. data/node_modules/axe-core/lib/rules/html-lang-valid.json +12 -0
  453. data/node_modules/axe-core/lib/rules/html-xml-lang-mismatch.json +13 -0
  454. data/node_modules/axe-core/lib/rules/image-alt.json +25 -0
  455. data/node_modules/axe-core/lib/rules/img-redundant-alt.json +12 -0
  456. data/node_modules/axe-core/lib/rules/input-image-alt.json +18 -0
  457. data/node_modules/axe-core/lib/rules/inserted-into-focus-order-matches.js +1 -0
  458. data/node_modules/axe-core/lib/rules/label-content-name-mismatch-matches.js +42 -0
  459. data/node_modules/axe-core/lib/rules/label-content-name-mismatch.json +12 -0
  460. data/node_modules/axe-core/lib/rules/label-matches.js +11 -0
  461. data/node_modules/axe-core/lib/rules/label-title-only.json +13 -0
  462. data/node_modules/axe-core/lib/rules/label.json +26 -0
  463. data/node_modules/axe-core/lib/rules/landmark-banner-is-top-level.json +13 -0
  464. data/node_modules/axe-core/lib/rules/landmark-complementary-is-top-level.json +12 -0
  465. data/node_modules/axe-core/lib/rules/landmark-contentinfo-is-top-level.json +13 -0
  466. data/node_modules/axe-core/lib/rules/landmark-has-body-context.js +8 -0
  467. data/node_modules/axe-core/lib/rules/landmark-main-is-top-level.json +12 -0
  468. data/node_modules/axe-core/lib/rules/landmark-no-duplicate-banner.json +12 -0
  469. data/node_modules/axe-core/lib/rules/landmark-no-duplicate-contentinfo.json +12 -0
  470. data/node_modules/axe-core/lib/rules/landmark-one-main.json +12 -0
  471. data/node_modules/axe-core/lib/rules/layout-table-matches.js +8 -0
  472. data/node_modules/axe-core/lib/rules/layout-table.json +13 -0
  473. data/node_modules/axe-core/lib/rules/link-in-text-block-matches.js +14 -0
  474. data/node_modules/axe-core/lib/rules/link-in-text-block.json +14 -0
  475. data/node_modules/axe-core/lib/rules/link-name.json +26 -0
  476. data/node_modules/axe-core/lib/rules/list.json +13 -0
  477. data/node_modules/axe-core/lib/rules/listitem.json +13 -0
  478. data/node_modules/axe-core/lib/rules/marquee.json +13 -0
  479. data/node_modules/axe-core/lib/rules/meta-refresh.json +13 -0
  480. data/node_modules/axe-core/lib/rules/meta-viewport-large.json +13 -0
  481. data/node_modules/axe-core/lib/rules/meta-viewport.json +13 -0
  482. data/node_modules/axe-core/lib/rules/no-role-matches.js +1 -0
  483. data/node_modules/axe-core/lib/rules/not-html-matches.js +1 -0
  484. data/node_modules/axe-core/lib/rules/object-alt.json +25 -0
  485. data/node_modules/axe-core/lib/rules/p-as-heading-matches.js +17 -0
  486. data/node_modules/axe-core/lib/rules/p-as-heading.json +13 -0
  487. data/node_modules/axe-core/lib/rules/page-has-heading-one.json +12 -0
  488. data/node_modules/axe-core/lib/rules/radiogroup.json +12 -0
  489. data/node_modules/axe-core/lib/rules/region.json +13 -0
  490. data/node_modules/axe-core/lib/rules/role-not-button-matches.js +1 -0
  491. data/node_modules/axe-core/lib/rules/scope-attr-valid.json +12 -0
  492. data/node_modules/axe-core/lib/rules/server-side-image-map.json +18 -0
  493. data/node_modules/axe-core/lib/rules/skip-link-matches.js +1 -0
  494. data/node_modules/axe-core/lib/rules/skip-link.json +13 -0
  495. data/node_modules/axe-core/lib/rules/tabindex.json +12 -0
  496. data/node_modules/axe-core/lib/rules/table-duplicate-name.json +12 -0
  497. data/node_modules/axe-core/lib/rules/table-fake-caption.json +20 -0
  498. data/node_modules/axe-core/lib/rules/td-has-header.json +20 -0
  499. data/node_modules/axe-core/lib/rules/td-headers-attr.json +12 -0
  500. data/node_modules/axe-core/lib/rules/th-has-data-cells.json +13 -0
  501. data/node_modules/axe-core/lib/rules/valid-lang.json +13 -0
  502. data/node_modules/axe-core/lib/rules/video-caption.json +19 -0
  503. data/node_modules/axe-core/lib/rules/video-description.json +19 -0
  504. data/node_modules/axe-core/lib/rules/window-is-top.js +3 -0
  505. data/node_modules/axe-core/lib/rules/xml-lang-mismatch-matches.js +12 -0
  506. data/node_modules/axe-core/locales/de.json +627 -0
  507. data/node_modules/axe-core/locales/fr.json +667 -0
  508. data/node_modules/axe-core/locales/ja.json +728 -0
  509. data/node_modules/axe-core/locales/nl.json +36 -0
  510. data/node_modules/axe-core/package.json +215 -0
  511. data/node_modules/axe-core/sri-history.json +138 -0
  512. data/node_modules/axe-core/typings/axe-core/axe-core-tests.ts +180 -0
  513. metadata +511 -1
@@ -0,0 +1,45 @@
1
+ /* global aria */
2
+
3
+ /**
4
+ * Get required attributes for a given role
5
+ * @method requiredAttr
6
+ * @memberof axe.commons.aria
7
+ * @instance
8
+ * @param {String} role The role to check
9
+ * @return {Array}
10
+ */
11
+ aria.requiredAttr = function(role) {
12
+ var roles = aria.lookupTable.role[role],
13
+ attr = roles && roles.attributes && roles.attributes.required;
14
+ return attr || [];
15
+ };
16
+
17
+ /**
18
+ * Get allowed attributes for a given role
19
+ * @method allowedAttr
20
+ * @memberof axe.commons.aria
21
+ * @instance
22
+ * @param {String} role The role to check
23
+ * @return {Array}
24
+ */
25
+ aria.allowedAttr = function(role) {
26
+ var roles = aria.lookupTable.role[role],
27
+ attr = (roles && roles.attributes && roles.attributes.allowed) || [],
28
+ requiredAttr =
29
+ (roles && roles.attributes && roles.attributes.required) || [];
30
+
31
+ return attr.concat(aria.lookupTable.globalAttributes).concat(requiredAttr);
32
+ };
33
+
34
+ /**
35
+ * Check if an aria- attribute name is valid
36
+ * @method validateAttr
37
+ * @memberof axe.commons.aria
38
+ * @instance
39
+ * @param {String} att The attribute name
40
+ * @return {Boolean}
41
+ */
42
+ aria.validateAttr = function validateAttr(att) {
43
+ const attrDefinition = aria.lookupTable.attributes[att];
44
+ return !!attrDefinition;
45
+ };
@@ -0,0 +1,92 @@
1
+ /* global aria */
2
+
3
+ /**
4
+ * Returns all roles applicable to element in a list
5
+ *
6
+ * @method getRoleSegments
7
+ * @private
8
+ * @param {Element} node
9
+ * @returns {Array} Roles list or empty list
10
+ */
11
+
12
+ function getRoleSegments(node) {
13
+ let roles = [];
14
+
15
+ if (!node) {
16
+ return roles;
17
+ }
18
+
19
+ if (node.hasAttribute('role')) {
20
+ const nodeRoles = axe.utils.tokenList(
21
+ node.getAttribute('role').toLowerCase()
22
+ );
23
+ roles = roles.concat(nodeRoles);
24
+ }
25
+
26
+ if (node.hasAttributeNS('http://www.idpf.org/2007/ops', 'type')) {
27
+ const epubRoles = axe.utils
28
+ .tokenList(
29
+ node
30
+ .getAttributeNS('http://www.idpf.org/2007/ops', 'type')
31
+ .toLowerCase()
32
+ )
33
+ .map(role => `doc-${role}`);
34
+
35
+ roles = roles.concat(epubRoles);
36
+ }
37
+
38
+ // filter invalid roles
39
+ roles = roles.filter(role => axe.commons.aria.isValidRole(role));
40
+
41
+ return roles;
42
+ }
43
+
44
+ /**
45
+ * gets all unallowed roles for a given node
46
+ * @method getElementUnallowedRoles
47
+ * @param {Object} node HTMLElement to validate
48
+ * @param {String} tagName tag name of a node
49
+ * @param {String} allowImplicit option to allow implicit roles, defaults to true
50
+ * @return {Array<String>} retruns an array of roles that are not allowed on the given node
51
+ */
52
+ aria.getElementUnallowedRoles = function getElementUnallowedRoles(
53
+ node,
54
+ allowImplicit = true
55
+ ) {
56
+ const tagName = node.nodeName.toUpperCase();
57
+
58
+ // by pass custom elements
59
+ if (!axe.utils.isHtmlElement(node)) {
60
+ return [];
61
+ }
62
+
63
+ const roleSegments = getRoleSegments(node);
64
+ const implicitRole = axe.commons.aria.implicitRole(node);
65
+
66
+ // stores all roles that are not allowed for a specific element most often an element only has one explicit role
67
+ const unallowedRoles = roleSegments.filter(role => {
68
+ // if role and implicit role are same, when allowImplicit: true
69
+ // ignore as it is a redundant role
70
+ if (allowImplicit && role === implicitRole) {
71
+ return false;
72
+ }
73
+
74
+ // Edge case:
75
+ // setting implicit role row on tr element is allowed when child of table[role='grid']
76
+ if (
77
+ !allowImplicit &&
78
+ !(
79
+ role === 'row' &&
80
+ tagName === 'TR' &&
81
+ axe.utils.matchesSelector(node, 'table[role="grid"] > tr')
82
+ )
83
+ ) {
84
+ return true;
85
+ }
86
+
87
+ // check if role is allowed on element
88
+ return !aria.isAriaRoleAllowedOnElement(node, role);
89
+ });
90
+
91
+ return unallowedRoles;
92
+ };
@@ -0,0 +1,24 @@
1
+ /* global aria, dom */
2
+
3
+ /**
4
+ * Get an element's owned elements
5
+ *
6
+ * @param {VirtualNode} element
7
+ * @return {VirtualNode[]} Owned elements
8
+ */
9
+ aria.getOwnedVirtual = function getOwned({ actualNode, children }) {
10
+ if (!actualNode || !children) {
11
+ throw new Error('getOwnedVirtual requires a virtual node');
12
+ }
13
+ // TODO: Check that the element has a role
14
+ // TODO: Descend into children with role=presentation|none
15
+ // TODO: Exclude descendents owned by other elements
16
+
17
+ return dom.idrefs(actualNode, 'aria-owns').reduce((ownedElms, element) => {
18
+ if (element) {
19
+ const virtualNode = axe.utils.getNodeFromTree(axe._tree[0], element);
20
+ ownedElms.push(virtualNode);
21
+ }
22
+ return ownedElms;
23
+ }, children);
24
+ };
@@ -0,0 +1,44 @@
1
+ /* global aria, axe */
2
+
3
+ /**
4
+ * Return the accessible role of an element
5
+ *
6
+ * @method getRole
7
+ * @memberof axe.commons.aria
8
+ * @instance
9
+ * @param {Element} node
10
+ * @param {Object} options
11
+ * @param {boolean} options.noImplicit Do not return the implicit role
12
+ * @param {boolean} options.fallback Allow fallback roles
13
+ * @param {boolean} options.abstracts Allow role to be abstract
14
+ * @param {boolean} options.dpub Allow role to be any (valid) doc-* roles
15
+ * @returns {string|null} Role or null
16
+ */
17
+ aria.getRole = function getRole(
18
+ node,
19
+ { noImplicit, fallback, abstracts, dpub } = {}
20
+ ) {
21
+ node = node.actualNode || node;
22
+ if (node.nodeType !== 1) {
23
+ return null;
24
+ }
25
+ const roleAttr = (node.getAttribute('role') || '').trim().toLowerCase();
26
+ const roleList = fallback ? axe.utils.tokenList(roleAttr) : [roleAttr];
27
+
28
+ // Get the first valid role:
29
+ const validRoles = roleList.filter(role => {
30
+ if (!dpub && role.substr(0, 4) === 'doc-') {
31
+ return false;
32
+ }
33
+ return aria.isValidRole(role, { allowAbstract: abstracts });
34
+ });
35
+
36
+ const explicitRole = validRoles[0];
37
+
38
+ // Get the implicit role, if permitted
39
+ if (!explicitRole && !noImplicit) {
40
+ return aria.implicitRole(node);
41
+ }
42
+
43
+ return explicitRole || null;
44
+ };
@@ -0,0 +1,2417 @@
1
+ /**
2
+ * Namespace for aria-related utilities.
3
+ * @namespace commons.aria
4
+ * @memberof axe
5
+ */
6
+ const aria = (commons.aria = {});
7
+ const lookupTable = (aria.lookupTable = {});
8
+
9
+ const isNull = value => value === null;
10
+ const isNotNull = value => value !== null;
11
+
12
+ lookupTable.attributes = {
13
+ 'aria-activedescendant': {
14
+ type: 'idref',
15
+ allowEmpty: true,
16
+ unsupported: false
17
+ },
18
+ 'aria-atomic': {
19
+ type: 'boolean',
20
+ values: ['true', 'false'],
21
+ unsupported: false
22
+ },
23
+ 'aria-autocomplete': {
24
+ type: 'nmtoken',
25
+ values: ['inline', 'list', 'both', 'none'],
26
+ unsupported: false
27
+ },
28
+ 'aria-busy': {
29
+ type: 'boolean',
30
+ values: ['true', 'false'],
31
+ unsupported: false
32
+ },
33
+ 'aria-checked': {
34
+ type: 'nmtoken',
35
+ values: ['true', 'false', 'mixed', 'undefined'],
36
+ unsupported: false
37
+ },
38
+ 'aria-colcount': {
39
+ type: 'int',
40
+ unsupported: false
41
+ },
42
+ 'aria-colindex': {
43
+ type: 'int',
44
+ unsupported: false
45
+ },
46
+ 'aria-colspan': {
47
+ type: 'int',
48
+ unsupported: false
49
+ },
50
+ 'aria-controls': {
51
+ type: 'idrefs',
52
+ allowEmpty: true,
53
+ unsupported: false
54
+ },
55
+ 'aria-current': {
56
+ type: 'nmtoken',
57
+ allowEmpty: true,
58
+ values: ['page', 'step', 'location', 'date', 'time', 'true', 'false'],
59
+ unsupported: false
60
+ },
61
+ 'aria-describedby': {
62
+ type: 'idrefs',
63
+ allowEmpty: true,
64
+ unsupported: false
65
+ },
66
+ 'aria-describedat': {
67
+ unsupported: true,
68
+ unstandardized: true
69
+ },
70
+ 'aria-details': {
71
+ unsupported: true
72
+ },
73
+ 'aria-disabled': {
74
+ type: 'boolean',
75
+ values: ['true', 'false'],
76
+ unsupported: false
77
+ },
78
+ 'aria-dropeffect': {
79
+ type: 'nmtokens',
80
+ values: ['copy', 'move', 'reference', 'execute', 'popup', 'none'],
81
+ unsupported: false
82
+ },
83
+ 'aria-errormessage': {
84
+ type: 'idref',
85
+ allowEmpty: true,
86
+ unsupported: false
87
+ },
88
+ 'aria-expanded': {
89
+ type: 'nmtoken',
90
+ values: ['true', 'false', 'undefined'],
91
+ unsupported: false
92
+ },
93
+ 'aria-flowto': {
94
+ type: 'idrefs',
95
+ allowEmpty: true,
96
+ unsupported: false
97
+ },
98
+ 'aria-grabbed': {
99
+ type: 'nmtoken',
100
+ values: ['true', 'false', 'undefined'],
101
+ unsupported: false
102
+ },
103
+ 'aria-haspopup': {
104
+ type: 'nmtoken',
105
+ allowEmpty: true,
106
+ values: ['true', 'false', 'menu', 'listbox', 'tree', 'grid', 'dialog'],
107
+ unsupported: false
108
+ },
109
+ 'aria-hidden': {
110
+ type: 'boolean',
111
+ values: ['true', 'false'],
112
+ unsupported: false
113
+ },
114
+ 'aria-invalid': {
115
+ type: 'nmtoken',
116
+ allowEmpty: true,
117
+ values: ['true', 'false', 'spelling', 'grammar'],
118
+ unsupported: false
119
+ },
120
+ 'aria-keyshortcuts': {
121
+ type: 'string',
122
+ allowEmpty: true,
123
+ unsupported: false
124
+ },
125
+ 'aria-label': {
126
+ type: 'string',
127
+ allowEmpty: true,
128
+ unsupported: false
129
+ },
130
+ 'aria-labelledby': {
131
+ type: 'idrefs',
132
+ allowEmpty: true,
133
+ unsupported: false
134
+ },
135
+ 'aria-level': {
136
+ type: 'int',
137
+ unsupported: false
138
+ },
139
+ 'aria-live': {
140
+ type: 'nmtoken',
141
+ values: ['off', 'polite', 'assertive'],
142
+ unsupported: false
143
+ },
144
+ 'aria-modal': {
145
+ type: 'boolean',
146
+ values: ['true', 'false'],
147
+ unsupported: false
148
+ },
149
+ 'aria-multiline': {
150
+ type: 'boolean',
151
+ values: ['true', 'false'],
152
+ unsupported: false
153
+ },
154
+ 'aria-multiselectable': {
155
+ type: 'boolean',
156
+ values: ['true', 'false'],
157
+ unsupported: false
158
+ },
159
+ 'aria-orientation': {
160
+ type: 'nmtoken',
161
+ values: ['horizontal', 'vertical'],
162
+ unsupported: false
163
+ },
164
+ 'aria-owns': {
165
+ type: 'idrefs',
166
+ allowEmpty: true,
167
+ unsupported: false
168
+ },
169
+ 'aria-placeholder': {
170
+ type: 'string',
171
+ allowEmpty: true,
172
+ unsupported: false
173
+ },
174
+ 'aria-posinset': {
175
+ type: 'int',
176
+ unsupported: false
177
+ },
178
+ 'aria-pressed': {
179
+ type: 'nmtoken',
180
+ values: ['true', 'false', 'mixed', 'undefined'],
181
+ unsupported: false
182
+ },
183
+ 'aria-readonly': {
184
+ type: 'boolean',
185
+ values: ['true', 'false'],
186
+ unsupported: false
187
+ },
188
+ 'aria-relevant': {
189
+ type: 'nmtokens',
190
+ values: ['additions', 'removals', 'text', 'all'],
191
+ unsupported: false
192
+ },
193
+ 'aria-required': {
194
+ type: 'boolean',
195
+ values: ['true', 'false'],
196
+ unsupported: false
197
+ },
198
+ 'aria-roledescription': {
199
+ type: 'string',
200
+ allowEmpty: true,
201
+ unsupported: {
202
+ exceptions: [
203
+ 'button',
204
+ {
205
+ nodeName: 'input',
206
+ properties: {
207
+ type: ['button', 'checkbox', 'image', 'radio', 'reset', 'submit']
208
+ }
209
+ },
210
+ 'img',
211
+ 'select',
212
+ 'summary'
213
+ ]
214
+ }
215
+ },
216
+ 'aria-rowcount': {
217
+ type: 'int',
218
+ unsupported: false
219
+ },
220
+ 'aria-rowindex': {
221
+ type: 'int',
222
+ unsupported: false
223
+ },
224
+ 'aria-rowspan': {
225
+ type: 'int',
226
+ unsupported: false
227
+ },
228
+ 'aria-selected': {
229
+ type: 'nmtoken',
230
+ values: ['true', 'false', 'undefined'],
231
+ unsupported: false
232
+ },
233
+ 'aria-setsize': {
234
+ type: 'int',
235
+ unsupported: false
236
+ },
237
+ 'aria-sort': {
238
+ type: 'nmtoken',
239
+ values: ['ascending', 'descending', 'other', 'none'],
240
+ unsupported: false
241
+ },
242
+ 'aria-valuemax': {
243
+ type: 'decimal',
244
+ unsupported: false
245
+ },
246
+ 'aria-valuemin': {
247
+ type: 'decimal',
248
+ unsupported: false
249
+ },
250
+ 'aria-valuenow': {
251
+ type: 'decimal',
252
+ unsupported: false
253
+ },
254
+ 'aria-valuetext': {
255
+ type: 'string',
256
+ unsupported: false
257
+ }
258
+ };
259
+
260
+ lookupTable.globalAttributes = [
261
+ 'aria-atomic',
262
+ 'aria-busy',
263
+ 'aria-controls',
264
+ 'aria-current',
265
+ 'aria-describedby',
266
+ 'aria-disabled',
267
+ 'aria-dropeffect',
268
+ 'aria-flowto',
269
+ 'aria-grabbed',
270
+ 'aria-haspopup',
271
+ 'aria-hidden',
272
+ 'aria-invalid',
273
+ 'aria-keyshortcuts',
274
+ 'aria-label',
275
+ 'aria-labelledby',
276
+ 'aria-live',
277
+ 'aria-owns',
278
+ 'aria-relevant',
279
+ 'aria-roledescription'
280
+ ];
281
+
282
+ lookupTable.role = {
283
+ // valid roles below
284
+ alert: {
285
+ type: 'widget',
286
+ attributes: {
287
+ allowed: ['aria-expanded', 'aria-errormessage']
288
+ },
289
+ owned: null,
290
+ nameFrom: ['author'],
291
+ context: null,
292
+ unsupported: false,
293
+ allowedElements: ['section']
294
+ },
295
+ alertdialog: {
296
+ type: 'widget',
297
+ attributes: {
298
+ allowed: ['aria-expanded', 'aria-modal', 'aria-errormessage']
299
+ },
300
+ owned: null,
301
+ nameFrom: ['author'],
302
+ context: null,
303
+ unsupported: false,
304
+ allowedElements: ['dialog', 'section']
305
+ },
306
+ application: {
307
+ type: 'landmark',
308
+ attributes: {
309
+ allowed: ['aria-expanded', 'aria-errormessage']
310
+ },
311
+ owned: null,
312
+ nameFrom: ['author'],
313
+ context: null,
314
+ unsupported: false,
315
+ allowedElements: [
316
+ 'article',
317
+ 'audio',
318
+ 'embed',
319
+ 'iframe',
320
+ 'object',
321
+ 'section',
322
+ 'svg',
323
+ 'video'
324
+ ]
325
+ },
326
+ article: {
327
+ type: 'structure',
328
+ attributes: {
329
+ allowed: [
330
+ 'aria-expanded',
331
+ 'aria-posinset',
332
+ 'aria-setsize',
333
+ 'aria-errormessage'
334
+ ]
335
+ },
336
+ owned: null,
337
+ nameFrom: ['author'],
338
+ context: null,
339
+ implicit: ['article'],
340
+ unsupported: false
341
+ },
342
+ banner: {
343
+ type: 'landmark',
344
+ attributes: {
345
+ allowed: ['aria-expanded', 'aria-errormessage']
346
+ },
347
+ owned: null,
348
+ nameFrom: ['author'],
349
+ context: null,
350
+ implicit: ['header'],
351
+ unsupported: false,
352
+ allowedElements: ['section']
353
+ },
354
+ button: {
355
+ type: 'widget',
356
+ attributes: {
357
+ allowed: ['aria-expanded', 'aria-pressed', 'aria-errormessage']
358
+ },
359
+ owned: null,
360
+ nameFrom: ['author', 'contents'],
361
+ context: null,
362
+ implicit: [
363
+ 'button',
364
+ 'input[type="button"]',
365
+ 'input[type="image"]',
366
+ 'input[type="reset"]',
367
+ 'input[type="submit"]',
368
+ 'summary'
369
+ ],
370
+ unsupported: false,
371
+ allowedElements: [
372
+ {
373
+ nodeName: 'a',
374
+ attributes: {
375
+ href: isNotNull
376
+ }
377
+ }
378
+ ]
379
+ },
380
+ cell: {
381
+ type: 'structure',
382
+ attributes: {
383
+ allowed: [
384
+ 'aria-colindex',
385
+ 'aria-colspan',
386
+ 'aria-rowindex',
387
+ 'aria-rowspan',
388
+ 'aria-errormessage'
389
+ ]
390
+ },
391
+ owned: null,
392
+ nameFrom: ['author', 'contents'],
393
+ context: ['row'],
394
+ implicit: ['td', 'th'],
395
+ unsupported: false
396
+ },
397
+ checkbox: {
398
+ type: 'widget',
399
+ attributes: {
400
+ allowed: [
401
+ 'aria-checked',
402
+ 'aria-required',
403
+ 'aria-readonly',
404
+ 'aria-errormessage'
405
+ ]
406
+ },
407
+ owned: null,
408
+ nameFrom: ['author', 'contents'],
409
+ context: null,
410
+ implicit: ['input[type="checkbox"]'],
411
+ unsupported: false,
412
+ allowedElements: ['button']
413
+ },
414
+ columnheader: {
415
+ type: 'structure',
416
+ attributes: {
417
+ allowed: [
418
+ 'aria-colindex',
419
+ 'aria-colspan',
420
+ 'aria-expanded',
421
+ 'aria-rowindex',
422
+ 'aria-rowspan',
423
+ 'aria-required',
424
+ 'aria-readonly',
425
+ 'aria-selected',
426
+ 'aria-sort',
427
+ 'aria-errormessage'
428
+ ]
429
+ },
430
+ owned: null,
431
+ nameFrom: ['author', 'contents'],
432
+ context: ['row'],
433
+ implicit: ['th'],
434
+ unsupported: false
435
+ },
436
+ combobox: {
437
+ type: 'composite',
438
+ attributes: {
439
+ allowed: [
440
+ 'aria-autocomplete',
441
+ 'aria-required',
442
+ 'aria-activedescendant',
443
+ 'aria-orientation',
444
+ 'aria-errormessage'
445
+ ],
446
+ required: ['aria-expanded']
447
+ },
448
+ owned: {
449
+ all: ['listbox', 'textbox']
450
+ },
451
+ nameFrom: ['author'],
452
+ context: null,
453
+ unsupported: false,
454
+ allowedElements: [
455
+ {
456
+ nodeName: 'input',
457
+ properties: {
458
+ type: 'text'
459
+ }
460
+ }
461
+ ]
462
+ },
463
+ command: {
464
+ nameFrom: ['author'],
465
+ type: 'abstract',
466
+ unsupported: false
467
+ },
468
+ complementary: {
469
+ type: 'landmark',
470
+ attributes: {
471
+ allowed: ['aria-expanded', 'aria-errormessage']
472
+ },
473
+ owned: null,
474
+ nameFrom: ['author'],
475
+ context: null,
476
+ implicit: ['aside'],
477
+ unsupported: false,
478
+ allowedElements: ['section']
479
+ },
480
+ composite: {
481
+ nameFrom: ['author'],
482
+ type: 'abstract',
483
+ unsupported: false
484
+ },
485
+ contentinfo: {
486
+ type: 'landmark',
487
+ attributes: {
488
+ allowed: ['aria-expanded', 'aria-errormessage']
489
+ },
490
+ owned: null,
491
+ nameFrom: ['author'],
492
+ context: null,
493
+ implicit: ['footer'],
494
+ unsupported: false,
495
+ allowedElements: ['section']
496
+ },
497
+ definition: {
498
+ type: 'structure',
499
+ attributes: {
500
+ allowed: ['aria-expanded', 'aria-errormessage']
501
+ },
502
+ owned: null,
503
+ nameFrom: ['author'],
504
+ context: null,
505
+ implicit: ['dd', 'dfn'],
506
+ unsupported: false
507
+ },
508
+ dialog: {
509
+ type: 'widget',
510
+ attributes: {
511
+ allowed: ['aria-expanded', 'aria-modal', 'aria-errormessage']
512
+ },
513
+ owned: null,
514
+ nameFrom: ['author'],
515
+ context: null,
516
+ implicit: ['dialog'],
517
+ unsupported: false,
518
+ allowedElements: ['section']
519
+ },
520
+ directory: {
521
+ type: 'structure',
522
+ attributes: {
523
+ allowed: ['aria-expanded', 'aria-errormessage']
524
+ },
525
+ owned: null,
526
+ nameFrom: ['author', 'contents'],
527
+ context: null,
528
+ unsupported: false,
529
+ allowedElements: ['ol', 'ul']
530
+ },
531
+ document: {
532
+ type: 'structure',
533
+ attributes: {
534
+ allowed: ['aria-expanded', 'aria-errormessage']
535
+ },
536
+ owned: null,
537
+ nameFrom: ['author'],
538
+ context: null,
539
+ implicit: ['body'],
540
+ unsupported: false,
541
+ allowedElements: ['article', 'embed', 'iframe', 'object', 'section', 'svg']
542
+ },
543
+ 'doc-abstract': {
544
+ type: 'section',
545
+ attributes: {
546
+ allowed: ['aria-expanded', 'aria-errormessage']
547
+ },
548
+ owned: null,
549
+ nameFrom: ['author'],
550
+ context: null,
551
+ unsupported: false,
552
+ allowedElements: ['section']
553
+ },
554
+ 'doc-acknowledgments': {
555
+ type: 'landmark',
556
+ attributes: {
557
+ allowed: ['aria-expanded', 'aria-errormessage']
558
+ },
559
+ owned: null,
560
+ nameFrom: ['author'],
561
+ context: null,
562
+ unsupported: false,
563
+ allowedElements: ['section']
564
+ },
565
+ 'doc-afterword': {
566
+ type: 'landmark',
567
+ attributes: {
568
+ allowed: ['aria-expanded', 'aria-errormessage']
569
+ },
570
+ owned: null,
571
+ nameFrom: ['author'],
572
+ context: null,
573
+ unsupported: false,
574
+ allowedElements: ['section']
575
+ },
576
+ 'doc-appendix': {
577
+ type: 'landmark',
578
+ attributes: {
579
+ allowed: ['aria-expanded', 'aria-errormessage']
580
+ },
581
+ owned: null,
582
+ nameFrom: ['author'],
583
+ context: null,
584
+ unsupported: false,
585
+ allowedElements: ['section']
586
+ },
587
+ 'doc-backlink': {
588
+ type: 'link',
589
+ attributes: {
590
+ allowed: ['aria-expanded', 'aria-errormessage']
591
+ },
592
+ owned: null,
593
+ nameFrom: ['author', 'contents'],
594
+ context: null,
595
+ unsupported: false,
596
+ allowedElements: [
597
+ {
598
+ nodeName: 'a',
599
+ attributes: {
600
+ href: isNotNull
601
+ }
602
+ }
603
+ ]
604
+ },
605
+ 'doc-biblioentry': {
606
+ type: 'listitem',
607
+ attributes: {
608
+ allowed: [
609
+ 'aria-expanded',
610
+ 'aria-level',
611
+ 'aria-posinset',
612
+ 'aria-setsize',
613
+ 'aria-errormessage'
614
+ ]
615
+ },
616
+ owned: null,
617
+ nameFrom: ['author'],
618
+ context: ['doc-bibliography'],
619
+ unsupported: false,
620
+ allowedElements: ['li']
621
+ },
622
+ 'doc-bibliography': {
623
+ type: 'landmark',
624
+ attributes: {
625
+ allowed: ['aria-expanded', 'aria-errormessage']
626
+ },
627
+ owned: null,
628
+ nameFrom: ['author'],
629
+ context: null,
630
+ unsupported: false,
631
+ allowedElements: ['section']
632
+ },
633
+ 'doc-biblioref': {
634
+ type: 'link',
635
+ attributes: {
636
+ allowed: ['aria-expanded', 'aria-errormessage']
637
+ },
638
+ owned: null,
639
+ nameFrom: ['author', 'contents'],
640
+ context: null,
641
+ unsupported: false,
642
+ allowedElements: [
643
+ {
644
+ nodeName: 'a',
645
+ attributes: {
646
+ href: isNotNull
647
+ }
648
+ }
649
+ ]
650
+ },
651
+ 'doc-chapter': {
652
+ type: 'landmark',
653
+ attributes: {
654
+ allowed: ['aria-expanded', 'aria-errormessage']
655
+ },
656
+ owned: null,
657
+ namefrom: ['author'],
658
+ context: null,
659
+ unsupported: false,
660
+ allowedElements: ['section']
661
+ },
662
+ 'doc-colophon': {
663
+ type: 'section',
664
+ attributes: {
665
+ allowed: ['aria-expanded', 'aria-errormessage']
666
+ },
667
+ owned: null,
668
+ namefrom: ['author'],
669
+ context: null,
670
+ unsupported: false,
671
+ allowedElements: ['section']
672
+ },
673
+ 'doc-conclusion': {
674
+ type: 'landmark',
675
+ attributes: {
676
+ allowed: ['aria-expanded', 'aria-errormessage']
677
+ },
678
+ owned: null,
679
+ namefrom: ['author'],
680
+ context: null,
681
+ unsupported: false,
682
+ allowedElements: ['section']
683
+ },
684
+ 'doc-cover': {
685
+ type: 'img',
686
+ attributes: {
687
+ allowed: ['aria-expanded', 'aria-errormessage']
688
+ },
689
+ owned: null,
690
+ namefrom: ['author'],
691
+ context: null,
692
+ unsupported: false
693
+ },
694
+ 'doc-credit': {
695
+ type: 'section',
696
+ attributes: {
697
+ allowed: ['aria-expanded', 'aria-errormessage']
698
+ },
699
+ owned: null,
700
+ namefrom: ['author'],
701
+ context: null,
702
+ unsupported: false,
703
+ allowedElements: ['section']
704
+ },
705
+ 'doc-credits': {
706
+ type: 'landmark',
707
+ attributes: {
708
+ allowed: ['aria-expanded', 'aria-errormessage']
709
+ },
710
+ owned: null,
711
+ namefrom: ['author'],
712
+ context: null,
713
+ unsupported: false,
714
+ allowedElements: ['section']
715
+ },
716
+ 'doc-dedication': {
717
+ type: 'section',
718
+ attributes: {
719
+ allowed: ['aria-expanded', 'aria-errormessage']
720
+ },
721
+ owned: null,
722
+ namefrom: ['author'],
723
+ context: null,
724
+ unsupported: false,
725
+ allowedElements: ['section']
726
+ },
727
+ 'doc-endnote': {
728
+ type: 'listitem',
729
+ attributes: {
730
+ allowed: [
731
+ 'aria-expanded',
732
+ 'aria-level',
733
+ 'aria-posinset',
734
+ 'aria-setsize',
735
+ 'aria-errormessage'
736
+ ]
737
+ },
738
+ owned: null,
739
+ namefrom: ['author'],
740
+ context: ['doc-endnotes'],
741
+ unsupported: false,
742
+ allowedElements: ['li']
743
+ },
744
+ 'doc-endnotes': {
745
+ type: 'landmark',
746
+ attributes: {
747
+ allowed: ['aria-expanded', 'aria-errormessage']
748
+ },
749
+ owned: ['doc-endnote'],
750
+ namefrom: ['author'],
751
+ context: null,
752
+ unsupported: false,
753
+ allowedElements: ['section']
754
+ },
755
+ 'doc-epigraph': {
756
+ type: 'section',
757
+ attributes: {
758
+ allowed: ['aria-expanded', 'aria-errormessage']
759
+ },
760
+ owned: null,
761
+ namefrom: ['author'],
762
+ context: null,
763
+ unsupported: false
764
+ },
765
+ 'doc-epilogue': {
766
+ type: 'landmark',
767
+ attributes: {
768
+ allowed: ['aria-expanded', 'aria-errormessage']
769
+ },
770
+ owned: null,
771
+ namefrom: ['author'],
772
+ context: null,
773
+ unsupported: false,
774
+ allowedElements: ['section']
775
+ },
776
+ 'doc-errata': {
777
+ type: 'landmark',
778
+ attributes: {
779
+ allowed: ['aria-expanded', 'aria-errormessage']
780
+ },
781
+ owned: null,
782
+ namefrom: ['author'],
783
+ context: null,
784
+ unsupported: false,
785
+ allowedElements: ['section']
786
+ },
787
+ 'doc-example': {
788
+ type: 'section',
789
+ attributes: {
790
+ allowed: ['aria-expanded', 'aria-errormessage']
791
+ },
792
+ owned: null,
793
+ namefrom: ['author'],
794
+ context: null,
795
+ unsupported: false,
796
+ allowedElements: ['aside', 'section']
797
+ },
798
+ 'doc-footnote': {
799
+ type: 'section',
800
+ attributes: {
801
+ allowed: ['aria-expanded', 'aria-errormessage']
802
+ },
803
+ owned: null,
804
+ namefrom: ['author'],
805
+ context: null,
806
+ unsupported: false,
807
+ allowedElements: ['aside', 'footer', 'header']
808
+ },
809
+ 'doc-foreword': {
810
+ type: 'landmark',
811
+ attributes: {
812
+ allowed: ['aria-expanded', 'aria-errormessage']
813
+ },
814
+ owned: null,
815
+ namefrom: ['author'],
816
+ context: null,
817
+ unsupported: false,
818
+ allowedElements: ['section']
819
+ },
820
+ 'doc-glossary': {
821
+ type: 'landmark',
822
+ attributes: {
823
+ allowed: ['aria-expanded', 'aria-errormessage']
824
+ },
825
+ owned: ['term', 'definition'],
826
+ namefrom: ['author'],
827
+ context: null,
828
+ unsupported: false,
829
+ allowedElements: ['dl']
830
+ },
831
+ 'doc-glossref': {
832
+ type: 'link',
833
+ attributes: {
834
+ allowed: ['aria-expanded', 'aria-errormessage']
835
+ },
836
+ owned: null,
837
+ namefrom: ['author', 'contents'],
838
+ context: null,
839
+ unsupported: false,
840
+ allowedElements: [
841
+ {
842
+ nodeName: 'a',
843
+ attributes: {
844
+ href: isNotNull
845
+ }
846
+ }
847
+ ]
848
+ },
849
+ 'doc-index': {
850
+ type: 'navigation',
851
+ attributes: {
852
+ allowed: ['aria-expanded', 'aria-errormessage']
853
+ },
854
+ owned: null,
855
+ namefrom: ['author'],
856
+ context: null,
857
+ unsupported: false,
858
+ allowedElements: ['nav', 'section']
859
+ },
860
+ 'doc-introduction': {
861
+ type: 'landmark',
862
+ attributes: {
863
+ allowed: ['aria-expanded', 'aria-errormessage']
864
+ },
865
+ owned: null,
866
+ namefrom: ['author'],
867
+ context: null,
868
+ unsupported: false,
869
+ allowedElements: ['section']
870
+ },
871
+ 'doc-noteref': {
872
+ type: 'link',
873
+ attributes: {
874
+ allowed: ['aria-expanded']
875
+ },
876
+ owned: null,
877
+ namefrom: ['author', 'contents'],
878
+ context: null,
879
+ unsupported: false,
880
+ allowedElements: [
881
+ {
882
+ nodeName: 'a',
883
+ attributes: {
884
+ href: isNotNull
885
+ }
886
+ }
887
+ ]
888
+ },
889
+ 'doc-notice': {
890
+ type: 'note',
891
+ attributes: {
892
+ allowed: ['aria-expanded']
893
+ },
894
+ owned: null,
895
+ namefrom: ['author'],
896
+ context: null,
897
+ unsupported: false,
898
+ allowedElements: ['section']
899
+ },
900
+ 'doc-pagebreak': {
901
+ type: 'separator',
902
+ attributes: {
903
+ allowed: ['aria-expanded']
904
+ },
905
+ owned: null,
906
+ namefrom: ['author'],
907
+ context: null,
908
+ unsupported: false,
909
+ allowedElements: ['hr']
910
+ },
911
+ 'doc-pagelist': {
912
+ type: 'navigation',
913
+ attributes: {
914
+ allowed: ['aria-expanded']
915
+ },
916
+ owned: null,
917
+ namefrom: ['author'],
918
+ context: null,
919
+ unsupported: false,
920
+ allowedElements: ['nav', 'section']
921
+ },
922
+ 'doc-part': {
923
+ type: 'landmark',
924
+ attributes: {
925
+ allowed: ['aria-expanded']
926
+ },
927
+ owned: null,
928
+ namefrom: ['author'],
929
+ context: null,
930
+ unsupported: false,
931
+ allowedElements: ['section']
932
+ },
933
+ 'doc-preface': {
934
+ type: 'landmark',
935
+ attributes: {
936
+ allowed: ['aria-expanded']
937
+ },
938
+ owned: null,
939
+ namefrom: ['author'],
940
+ context: null,
941
+ unsupported: false,
942
+ allowedElements: ['section']
943
+ },
944
+ 'doc-prologue': {
945
+ type: 'landmark',
946
+ attributes: {
947
+ allowed: ['aria-expanded', 'aria-errormessage']
948
+ },
949
+ owned: null,
950
+ namefrom: ['author'],
951
+ context: null,
952
+ unsupported: false,
953
+ allowedElements: ['section']
954
+ },
955
+ 'doc-pullquote': {
956
+ type: 'none',
957
+ attributes: {
958
+ allowed: ['aria-expanded']
959
+ },
960
+ owned: null,
961
+ namefrom: ['author'],
962
+ context: null,
963
+ unsupported: false,
964
+ allowedElements: ['aside', 'section']
965
+ },
966
+ 'doc-qna': {
967
+ type: 'section',
968
+ attributes: {
969
+ allowed: ['aria-expanded']
970
+ },
971
+ owned: null,
972
+ namefrom: ['author'],
973
+ context: null,
974
+ unsupported: false,
975
+ allowedElements: ['section']
976
+ },
977
+ 'doc-subtitle': {
978
+ type: 'sectionhead',
979
+ attributes: {
980
+ allowed: ['aria-expanded']
981
+ },
982
+ owned: null,
983
+ namefrom: ['author'],
984
+ context: null,
985
+ unsupported: false,
986
+ allowedElements: {
987
+ nodeName: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']
988
+ }
989
+ },
990
+ 'doc-tip': {
991
+ type: 'note',
992
+ attributes: {
993
+ allowed: ['aria-expanded']
994
+ },
995
+ owned: null,
996
+ namefrom: ['author'],
997
+ context: null,
998
+ unsupported: false,
999
+ allowedElements: ['aside']
1000
+ },
1001
+ 'doc-toc': {
1002
+ type: 'navigation',
1003
+ attributes: {
1004
+ allowed: ['aria-expanded', 'aria-errormessage']
1005
+ },
1006
+ owned: null,
1007
+ namefrom: ['author'],
1008
+ context: null,
1009
+ unsupported: false,
1010
+ allowedElements: ['nav', 'section']
1011
+ },
1012
+ feed: {
1013
+ type: 'structure',
1014
+ attributes: {
1015
+ allowed: ['aria-expanded', 'aria-errormessage']
1016
+ },
1017
+ owned: {
1018
+ one: ['article']
1019
+ },
1020
+ nameFrom: ['author'],
1021
+ context: null,
1022
+ unsupported: false,
1023
+ allowedElements: ['article', 'aside', 'section']
1024
+ },
1025
+ figure: {
1026
+ type: 'structure',
1027
+ unsupported: true
1028
+ },
1029
+ form: {
1030
+ type: 'landmark',
1031
+ attributes: {
1032
+ allowed: ['aria-expanded', 'aria-errormessage']
1033
+ },
1034
+ owned: null,
1035
+ nameFrom: ['author'],
1036
+ context: null,
1037
+ implicit: ['form'],
1038
+ unsupported: false
1039
+ },
1040
+ grid: {
1041
+ type: 'composite',
1042
+ attributes: {
1043
+ allowed: [
1044
+ 'aria-activedescendant',
1045
+ 'aria-expanded',
1046
+ 'aria-colcount',
1047
+ 'aria-level',
1048
+ 'aria-multiselectable',
1049
+ 'aria-readonly',
1050
+ 'aria-rowcount',
1051
+ 'aria-errormessage'
1052
+ ]
1053
+ },
1054
+ owned: {
1055
+ one: ['rowgroup', 'row']
1056
+ },
1057
+ nameFrom: ['author'],
1058
+ context: null,
1059
+ implicit: ['table'],
1060
+ unsupported: false
1061
+ },
1062
+ gridcell: {
1063
+ type: 'widget',
1064
+ attributes: {
1065
+ allowed: [
1066
+ 'aria-colindex',
1067
+ 'aria-colspan',
1068
+ 'aria-expanded',
1069
+ 'aria-rowindex',
1070
+ 'aria-rowspan',
1071
+ 'aria-selected',
1072
+ 'aria-readonly',
1073
+ 'aria-required',
1074
+ 'aria-errormessage'
1075
+ ]
1076
+ },
1077
+ owned: null,
1078
+ nameFrom: ['author', 'contents'],
1079
+ context: ['row'],
1080
+ implicit: ['td', 'th'],
1081
+ unsupported: false
1082
+ },
1083
+ group: {
1084
+ type: 'structure',
1085
+ attributes: {
1086
+ allowed: ['aria-activedescendant', 'aria-expanded', 'aria-errormessage']
1087
+ },
1088
+ owned: null,
1089
+ nameFrom: ['author'],
1090
+ context: null,
1091
+ implicit: ['details', 'optgroup'],
1092
+ unsupported: false,
1093
+ allowedElements: [
1094
+ 'dl',
1095
+ 'figcaption',
1096
+ 'fieldset',
1097
+ 'figure',
1098
+ 'footer',
1099
+ 'header',
1100
+ 'ol',
1101
+ 'ul'
1102
+ ]
1103
+ },
1104
+ heading: {
1105
+ type: 'structure',
1106
+ attributes: {
1107
+ required: ['aria-level'],
1108
+ allowed: ['aria-expanded', 'aria-errormessage']
1109
+ },
1110
+ owned: null,
1111
+ nameFrom: ['author', 'contents'],
1112
+ context: null,
1113
+ implicit: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
1114
+ unsupported: false
1115
+ },
1116
+ img: {
1117
+ type: 'structure',
1118
+ attributes: {
1119
+ allowed: ['aria-expanded', 'aria-errormessage']
1120
+ },
1121
+ owned: null,
1122
+ nameFrom: ['author'],
1123
+ context: null,
1124
+ implicit: ['img'],
1125
+ unsupported: false,
1126
+ allowedElements: ['embed', 'iframe', 'object', 'svg']
1127
+ },
1128
+ input: {
1129
+ nameFrom: ['author'],
1130
+ type: 'abstract',
1131
+ unsupported: false
1132
+ },
1133
+ landmark: {
1134
+ nameFrom: ['author'],
1135
+ type: 'abstract',
1136
+ unsupported: false
1137
+ },
1138
+ link: {
1139
+ type: 'widget',
1140
+ attributes: {
1141
+ allowed: ['aria-expanded', 'aria-errormessage']
1142
+ },
1143
+ owned: null,
1144
+ nameFrom: ['author', 'contents'],
1145
+ context: null,
1146
+ implicit: ['a[href]'],
1147
+ unsupported: false,
1148
+ allowedElements: [
1149
+ 'button',
1150
+ {
1151
+ nodeName: 'input',
1152
+ properties: {
1153
+ type: ['image', 'button']
1154
+ }
1155
+ }
1156
+ ]
1157
+ },
1158
+ list: {
1159
+ type: 'structure',
1160
+ attributes: {
1161
+ allowed: ['aria-expanded', 'aria-errormessage']
1162
+ },
1163
+ owned: {
1164
+ all: ['listitem']
1165
+ },
1166
+ nameFrom: ['author'],
1167
+ context: null,
1168
+ implicit: ['ol', 'ul', 'dl'],
1169
+ unsupported: false
1170
+ },
1171
+ listbox: {
1172
+ type: 'composite',
1173
+ attributes: {
1174
+ allowed: [
1175
+ 'aria-activedescendant',
1176
+ 'aria-multiselectable',
1177
+ 'aria-required',
1178
+ 'aria-expanded',
1179
+ 'aria-orientation',
1180
+ 'aria-errormessage'
1181
+ ]
1182
+ },
1183
+ owned: {
1184
+ all: ['option']
1185
+ },
1186
+ nameFrom: ['author'],
1187
+ context: null,
1188
+ implicit: ['select'],
1189
+ unsupported: false,
1190
+ allowedElements: ['ol', 'ul']
1191
+ },
1192
+ listitem: {
1193
+ type: 'structure',
1194
+ attributes: {
1195
+ allowed: [
1196
+ 'aria-level',
1197
+ 'aria-posinset',
1198
+ 'aria-setsize',
1199
+ 'aria-expanded',
1200
+ 'aria-errormessage'
1201
+ ]
1202
+ },
1203
+ owned: null,
1204
+ nameFrom: ['author', 'contents'],
1205
+ context: ['list'],
1206
+ implicit: ['li', 'dt'],
1207
+ unsupported: false
1208
+ },
1209
+ log: {
1210
+ type: 'widget',
1211
+ attributes: {
1212
+ allowed: ['aria-expanded', 'aria-errormessage']
1213
+ },
1214
+ owned: null,
1215
+ nameFrom: ['author'],
1216
+ context: null,
1217
+ unsupported: false,
1218
+ allowedElements: ['section']
1219
+ },
1220
+ main: {
1221
+ type: 'landmark',
1222
+ attributes: {
1223
+ allowed: ['aria-expanded', 'aria-errormessage']
1224
+ },
1225
+ owned: null,
1226
+ nameFrom: ['author'],
1227
+ context: null,
1228
+ implicit: ['main'],
1229
+ unsupported: false,
1230
+ allowedElements: ['article', 'section']
1231
+ },
1232
+ marquee: {
1233
+ type: 'widget',
1234
+ attributes: {
1235
+ allowed: ['aria-expanded', 'aria-errormessage']
1236
+ },
1237
+ owned: null,
1238
+ nameFrom: ['author'],
1239
+ context: null,
1240
+ unsupported: false,
1241
+ allowedElements: ['section']
1242
+ },
1243
+ math: {
1244
+ type: 'structure',
1245
+ attributes: {
1246
+ allowed: ['aria-expanded', 'aria-errormessage']
1247
+ },
1248
+ owned: null,
1249
+ nameFrom: ['author'],
1250
+ context: null,
1251
+ implicit: ['math'],
1252
+ unsupported: false
1253
+ },
1254
+ menu: {
1255
+ type: 'composite',
1256
+ attributes: {
1257
+ allowed: [
1258
+ 'aria-activedescendant',
1259
+ 'aria-expanded',
1260
+ 'aria-orientation',
1261
+ 'aria-errormessage'
1262
+ ]
1263
+ },
1264
+ owned: {
1265
+ one: ['menuitem', 'menuitemradio', 'menuitemcheckbox']
1266
+ },
1267
+ nameFrom: ['author'],
1268
+ context: null,
1269
+ implicit: ['menu[type="context"]'],
1270
+ unsupported: false,
1271
+ allowedElements: ['ol', 'ul']
1272
+ },
1273
+ menubar: {
1274
+ type: 'composite',
1275
+ attributes: {
1276
+ allowed: [
1277
+ 'aria-activedescendant',
1278
+ 'aria-expanded',
1279
+ 'aria-orientation',
1280
+ 'aria-errormessage'
1281
+ ]
1282
+ },
1283
+ owned: null,
1284
+ nameFrom: ['author'],
1285
+ context: null,
1286
+ unsupported: false,
1287
+ allowedElements: ['ol', 'ul']
1288
+ },
1289
+ menuitem: {
1290
+ type: 'widget',
1291
+ attributes: {
1292
+ allowed: [
1293
+ 'aria-posinset',
1294
+ 'aria-setsize',
1295
+ 'aria-expanded',
1296
+ 'aria-errormessage'
1297
+ ]
1298
+ },
1299
+ owned: null,
1300
+ nameFrom: ['author', 'contents'],
1301
+ context: ['menu', 'menubar'],
1302
+ implicit: ['menuitem[type="command"]'],
1303
+ unsupported: false,
1304
+ allowedElements: [
1305
+ 'button',
1306
+ 'li',
1307
+ {
1308
+ nodeName: 'iput',
1309
+ properties: {
1310
+ type: ['image', 'button']
1311
+ }
1312
+ },
1313
+ {
1314
+ nodeName: 'a',
1315
+ attributes: {
1316
+ href: isNotNull
1317
+ }
1318
+ }
1319
+ ]
1320
+ },
1321
+ menuitemcheckbox: {
1322
+ type: 'widget',
1323
+ attributes: {
1324
+ allowed: [
1325
+ 'aria-checked',
1326
+ 'aria-posinset',
1327
+ 'aria-setsize',
1328
+ 'aria-errormessage'
1329
+ ]
1330
+ },
1331
+ owned: null,
1332
+ nameFrom: ['author', 'contents'],
1333
+ context: ['menu', 'menubar'],
1334
+ implicit: ['menuitem[type="checkbox"]'],
1335
+ unsupported: false,
1336
+ allowedElements: [
1337
+ {
1338
+ nodeName: ['button', 'li']
1339
+ },
1340
+ {
1341
+ nodeName: 'input',
1342
+ properties: {
1343
+ type: ['checkbox', 'image', 'button']
1344
+ }
1345
+ },
1346
+ {
1347
+ nodeName: 'a',
1348
+ attributes: {
1349
+ href: isNotNull
1350
+ }
1351
+ }
1352
+ ]
1353
+ },
1354
+ menuitemradio: {
1355
+ type: 'widget',
1356
+ attributes: {
1357
+ allowed: [
1358
+ 'aria-checked',
1359
+ 'aria-selected',
1360
+ 'aria-posinset',
1361
+ 'aria-setsize',
1362
+ 'aria-errormessage'
1363
+ ]
1364
+ },
1365
+ owned: null,
1366
+ nameFrom: ['author', 'contents'],
1367
+ context: ['menu', 'menubar'],
1368
+ implicit: ['menuitem[type="radio"]'],
1369
+ unsupported: false,
1370
+ allowedElements: [
1371
+ {
1372
+ nodeName: ['button', 'li']
1373
+ },
1374
+ {
1375
+ nodeName: 'input',
1376
+ properties: {
1377
+ type: ['image', 'button', 'radio']
1378
+ }
1379
+ },
1380
+ {
1381
+ nodeName: 'a',
1382
+ attributes: {
1383
+ href: isNotNull
1384
+ }
1385
+ }
1386
+ ]
1387
+ },
1388
+ navigation: {
1389
+ type: 'landmark',
1390
+ attributes: {
1391
+ allowed: ['aria-expanded', 'aria-errormessage']
1392
+ },
1393
+ owned: null,
1394
+ nameFrom: ['author'],
1395
+ context: null,
1396
+ implicit: ['nav'],
1397
+ unsupported: false,
1398
+ allowedElements: ['section']
1399
+ },
1400
+ none: {
1401
+ type: 'structure',
1402
+ attributes: null,
1403
+ owned: null,
1404
+ nameFrom: ['author'],
1405
+ context: null,
1406
+ unsupported: false,
1407
+ allowedElements: [
1408
+ {
1409
+ nodeName: [
1410
+ 'article',
1411
+ 'aside',
1412
+ 'dl',
1413
+ 'embed',
1414
+ 'figcaption',
1415
+ 'fieldset',
1416
+ 'figure',
1417
+ 'footer',
1418
+ 'form',
1419
+ 'h1',
1420
+ 'h2',
1421
+ 'h3',
1422
+ 'h4',
1423
+ 'h5',
1424
+ 'h6',
1425
+ 'header',
1426
+ 'iframe',
1427
+ 'li',
1428
+ 'ol',
1429
+ 'section',
1430
+ 'ul'
1431
+ ]
1432
+ },
1433
+ {
1434
+ nodeName: 'img',
1435
+ attributes: {
1436
+ alt: isNotNull
1437
+ }
1438
+ }
1439
+ ]
1440
+ },
1441
+ note: {
1442
+ type: 'structure',
1443
+ attributes: {
1444
+ allowed: ['aria-expanded', 'aria-errormessage']
1445
+ },
1446
+ owned: null,
1447
+ nameFrom: ['author'],
1448
+ context: null,
1449
+ unsupported: false,
1450
+ allowedElements: ['aside']
1451
+ },
1452
+ option: {
1453
+ type: 'widget',
1454
+ attributes: {
1455
+ allowed: [
1456
+ 'aria-selected',
1457
+ 'aria-posinset',
1458
+ 'aria-setsize',
1459
+ 'aria-checked',
1460
+ 'aria-errormessage'
1461
+ ]
1462
+ },
1463
+ owned: null,
1464
+ nameFrom: ['author', 'contents'],
1465
+ context: ['listbox'],
1466
+ implicit: ['option'],
1467
+ unsupported: false,
1468
+ allowedElements: [
1469
+ {
1470
+ nodeName: ['button', 'li']
1471
+ },
1472
+ {
1473
+ nodeName: 'input',
1474
+ properties: {
1475
+ type: ['checkbox', 'button']
1476
+ }
1477
+ },
1478
+ {
1479
+ nodeName: 'a',
1480
+ attributes: {
1481
+ href: isNotNull
1482
+ }
1483
+ }
1484
+ ]
1485
+ },
1486
+ presentation: {
1487
+ type: 'structure',
1488
+ attributes: null,
1489
+ owned: null,
1490
+ nameFrom: ['author'],
1491
+ context: null,
1492
+ unsupported: false,
1493
+ allowedElements: [
1494
+ {
1495
+ nodeName: [
1496
+ 'article',
1497
+ 'aside',
1498
+ 'dl',
1499
+ 'embed',
1500
+ 'figcaption',
1501
+ 'fieldset',
1502
+ 'figure',
1503
+ 'footer',
1504
+ 'form',
1505
+ 'h1',
1506
+ 'h2',
1507
+ 'h3',
1508
+ 'h4',
1509
+ 'h5',
1510
+ 'h6',
1511
+ 'header',
1512
+ 'iframe',
1513
+ 'li',
1514
+ 'ol',
1515
+ 'section',
1516
+ 'ul'
1517
+ ]
1518
+ },
1519
+ {
1520
+ nodeName: 'img',
1521
+ attributes: {
1522
+ alt: isNotNull
1523
+ }
1524
+ }
1525
+ ]
1526
+ },
1527
+ progressbar: {
1528
+ type: 'widget',
1529
+ attributes: {
1530
+ allowed: [
1531
+ 'aria-valuetext',
1532
+ 'aria-valuenow',
1533
+ 'aria-valuemax',
1534
+ 'aria-valuemin',
1535
+ 'aria-expanded',
1536
+ 'aria-errormessage'
1537
+ ]
1538
+ },
1539
+ owned: null,
1540
+ nameFrom: ['author'],
1541
+ context: null,
1542
+ implicit: ['progress'],
1543
+ unsupported: false
1544
+ },
1545
+ radio: {
1546
+ type: 'widget',
1547
+ attributes: {
1548
+ allowed: [
1549
+ 'aria-selected',
1550
+ 'aria-posinset',
1551
+ 'aria-setsize',
1552
+ 'aria-required',
1553
+ 'aria-errormessage'
1554
+ ],
1555
+ required: ['aria-checked']
1556
+ },
1557
+ owned: null,
1558
+ nameFrom: ['author', 'contents'],
1559
+ context: null,
1560
+ implicit: ['input[type="radio"]'],
1561
+ unsupported: false,
1562
+ allowedElements: [
1563
+ {
1564
+ nodeName: ['button', 'li']
1565
+ },
1566
+ {
1567
+ nodeName: 'input',
1568
+ properties: {
1569
+ type: ['image', 'button']
1570
+ }
1571
+ }
1572
+ ]
1573
+ },
1574
+ radiogroup: {
1575
+ type: 'composite',
1576
+ attributes: {
1577
+ allowed: [
1578
+ 'aria-activedescendant',
1579
+ 'aria-required',
1580
+ 'aria-expanded',
1581
+ 'aria-readonly',
1582
+ 'aria-errormessage'
1583
+ ]
1584
+ },
1585
+ owned: {
1586
+ all: ['radio']
1587
+ },
1588
+ nameFrom: ['author'],
1589
+ context: null,
1590
+ unsupported: false,
1591
+ allowedElements: {
1592
+ nodeName: ['ol', 'ul']
1593
+ }
1594
+ },
1595
+ range: {
1596
+ nameFrom: ['author'],
1597
+ type: 'abstract',
1598
+ // @marcysutton, @wilco
1599
+ // - there is no unsupported here (noticed when resolving conflicts) from PR - https://github.com/dequelabs/axe-core/pull/1064
1600
+ // - https://github.com/dequelabs/axe-core/pull/1064/files#diff-ec67bb6113bfd9a900ee27ecef942f74R1229
1601
+ // - adding unsupported flag (false)
1602
+ unsupported: false
1603
+ },
1604
+ region: {
1605
+ type: 'landmark',
1606
+ attributes: {
1607
+ allowed: ['aria-expanded', 'aria-errormessage']
1608
+ },
1609
+ owned: null,
1610
+ nameFrom: ['author'],
1611
+ context: null,
1612
+ implicit: [
1613
+ 'section[aria-label]',
1614
+ 'section[aria-labelledby]',
1615
+ 'section[title]'
1616
+ ],
1617
+ unsupported: false,
1618
+ allowedElements: {
1619
+ nodeName: ['article', 'aside']
1620
+ }
1621
+ },
1622
+ roletype: {
1623
+ type: 'abstract',
1624
+ unsupported: false
1625
+ },
1626
+ row: {
1627
+ type: 'structure',
1628
+ attributes: {
1629
+ allowed: [
1630
+ 'aria-activedescendant',
1631
+ 'aria-colindex',
1632
+ 'aria-expanded',
1633
+ 'aria-level',
1634
+ 'aria-selected',
1635
+ 'aria-rowindex',
1636
+ 'aria-errormessage'
1637
+ ]
1638
+ },
1639
+ owned: {
1640
+ one: ['cell', 'columnheader', 'rowheader', 'gridcell']
1641
+ },
1642
+ nameFrom: ['author', 'contents'],
1643
+ context: ['rowgroup', 'grid', 'treegrid', 'table'],
1644
+ implicit: ['tr'],
1645
+ unsupported: false
1646
+ },
1647
+ rowgroup: {
1648
+ type: 'structure',
1649
+ attributes: {
1650
+ allowed: ['aria-activedescendant', 'aria-expanded', 'aria-errormessage']
1651
+ },
1652
+ owned: {
1653
+ all: ['row']
1654
+ },
1655
+ nameFrom: ['author', 'contents'],
1656
+ context: ['grid', 'table'],
1657
+ implicit: ['tbody', 'thead', 'tfoot'],
1658
+ unsupported: false
1659
+ },
1660
+ rowheader: {
1661
+ type: 'structure',
1662
+ attributes: {
1663
+ allowed: [
1664
+ 'aria-colindex',
1665
+ 'aria-colspan',
1666
+ 'aria-expanded',
1667
+ 'aria-rowindex',
1668
+ 'aria-rowspan',
1669
+ 'aria-required',
1670
+ 'aria-readonly',
1671
+ 'aria-selected',
1672
+ 'aria-sort',
1673
+ 'aria-errormessage'
1674
+ ]
1675
+ },
1676
+ owned: null,
1677
+ nameFrom: ['author', 'contents'],
1678
+ context: ['row'],
1679
+ implicit: ['th'],
1680
+ unsupported: false
1681
+ },
1682
+ scrollbar: {
1683
+ type: 'widget',
1684
+ attributes: {
1685
+ required: [
1686
+ 'aria-controls',
1687
+ 'aria-valuenow',
1688
+ 'aria-valuemax',
1689
+ 'aria-valuemin'
1690
+ ],
1691
+ allowed: ['aria-valuetext', 'aria-orientation', 'aria-errormessage']
1692
+ },
1693
+ owned: null,
1694
+ nameFrom: ['author'],
1695
+ context: null,
1696
+ unsupported: false
1697
+ },
1698
+ search: {
1699
+ type: 'landmark',
1700
+ attributes: {
1701
+ allowed: ['aria-expanded', 'aria-errormessage']
1702
+ },
1703
+ owned: null,
1704
+ nameFrom: ['author'],
1705
+ context: null,
1706
+ unsupported: false,
1707
+ allowedElements: {
1708
+ nodeName: ['aside', 'form', 'section']
1709
+ }
1710
+ },
1711
+ searchbox: {
1712
+ type: 'widget',
1713
+ attributes: {
1714
+ allowed: [
1715
+ 'aria-activedescendant',
1716
+ 'aria-autocomplete',
1717
+ 'aria-multiline',
1718
+ 'aria-readonly',
1719
+ 'aria-required',
1720
+ 'aria-placeholder',
1721
+ 'aria-errormessage'
1722
+ ]
1723
+ },
1724
+ owned: null,
1725
+ nameFrom: ['author'],
1726
+ context: null,
1727
+ implicit: ['input[type="search"]'],
1728
+ unsupported: false,
1729
+ allowedElements: {
1730
+ nodeName: 'input',
1731
+ properties: {
1732
+ type: 'text'
1733
+ }
1734
+ }
1735
+ },
1736
+ section: {
1737
+ nameFrom: ['author', 'contents'],
1738
+ type: 'abstract',
1739
+ unsupported: false
1740
+ },
1741
+ sectionhead: {
1742
+ nameFrom: ['author', 'contents'],
1743
+ type: 'abstract',
1744
+ unsupported: false
1745
+ },
1746
+ select: {
1747
+ nameFrom: ['author'],
1748
+ type: 'abstract',
1749
+ unsupported: false
1750
+ },
1751
+ separator: {
1752
+ type: 'structure',
1753
+ attributes: {
1754
+ allowed: [
1755
+ 'aria-expanded',
1756
+ 'aria-orientation',
1757
+ 'aria-valuenow',
1758
+ 'aria-valuemax',
1759
+ 'aria-valuemin',
1760
+ 'aria-valuetext',
1761
+ 'aria-errormessage'
1762
+ ]
1763
+ },
1764
+ owned: null,
1765
+ nameFrom: ['author'],
1766
+ context: null,
1767
+ implicit: ['hr'],
1768
+ unsupported: false,
1769
+ allowedElements: ['li']
1770
+ },
1771
+ slider: {
1772
+ type: 'widget',
1773
+ attributes: {
1774
+ allowed: [
1775
+ 'aria-valuetext',
1776
+ 'aria-orientation',
1777
+ 'aria-readonly',
1778
+ 'aria-errormessage'
1779
+ ],
1780
+ required: ['aria-valuenow', 'aria-valuemax', 'aria-valuemin']
1781
+ },
1782
+ owned: null,
1783
+ nameFrom: ['author'],
1784
+ context: null,
1785
+ implicit: ['input[type="range"]'],
1786
+ unsupported: false
1787
+ },
1788
+ spinbutton: {
1789
+ type: 'widget',
1790
+ attributes: {
1791
+ allowed: [
1792
+ 'aria-valuetext',
1793
+ 'aria-required',
1794
+ 'aria-readonly',
1795
+ 'aria-errormessage'
1796
+ ],
1797
+ required: ['aria-valuenow', 'aria-valuemax', 'aria-valuemin']
1798
+ },
1799
+ owned: null,
1800
+ nameFrom: ['author'],
1801
+ context: null,
1802
+ implicit: ['input[type="number"]'],
1803
+ unsupported: false,
1804
+ allowedElements: {
1805
+ nodeName: 'input',
1806
+ properties: {
1807
+ type: 'text'
1808
+ }
1809
+ }
1810
+ },
1811
+ status: {
1812
+ type: 'widget',
1813
+ attributes: {
1814
+ allowed: ['aria-expanded', 'aria-errormessage']
1815
+ },
1816
+ owned: null,
1817
+ nameFrom: ['author'],
1818
+ context: null,
1819
+ implicit: ['output'],
1820
+ unsupported: false,
1821
+ allowedElements: ['section']
1822
+ },
1823
+ structure: {
1824
+ type: 'abstract',
1825
+ unsupported: false
1826
+ },
1827
+ switch: {
1828
+ type: 'widget',
1829
+ attributes: {
1830
+ allowed: ['aria-errormessage'],
1831
+ required: ['aria-checked']
1832
+ },
1833
+ owned: null,
1834
+ nameFrom: ['author', 'contents'],
1835
+ context: null,
1836
+ unsupported: false,
1837
+ allowedElements: [
1838
+ 'button',
1839
+ {
1840
+ nodeName: 'input',
1841
+ properties: {
1842
+ type: ['checkbox', 'image', 'button']
1843
+ }
1844
+ },
1845
+ {
1846
+ nodeName: 'a',
1847
+ attributes: {
1848
+ href: isNotNull
1849
+ }
1850
+ }
1851
+ ]
1852
+ },
1853
+ tab: {
1854
+ type: 'widget',
1855
+ attributes: {
1856
+ allowed: [
1857
+ 'aria-selected',
1858
+ 'aria-expanded',
1859
+ 'aria-setsize',
1860
+ 'aria-posinset',
1861
+ 'aria-errormessage'
1862
+ ]
1863
+ },
1864
+ owned: null,
1865
+ nameFrom: ['author', 'contents'],
1866
+ context: ['tablist'],
1867
+ unsupported: false,
1868
+ allowedElements: [
1869
+ {
1870
+ nodeName: ['button', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'li']
1871
+ },
1872
+ {
1873
+ nodeName: 'input',
1874
+ properties: {
1875
+ type: 'button'
1876
+ }
1877
+ },
1878
+ {
1879
+ nodeName: 'a',
1880
+ attributes: {
1881
+ href: isNotNull
1882
+ }
1883
+ }
1884
+ ]
1885
+ },
1886
+ table: {
1887
+ type: 'structure',
1888
+ attributes: {
1889
+ allowed: ['aria-colcount', 'aria-rowcount', 'aria-errormessage']
1890
+ },
1891
+ owned: {
1892
+ one: ['rowgroup', 'row']
1893
+ },
1894
+ nameFrom: ['author'],
1895
+ context: null,
1896
+ implicit: ['table'],
1897
+ unsupported: false
1898
+ },
1899
+ tablist: {
1900
+ type: 'composite',
1901
+ attributes: {
1902
+ allowed: [
1903
+ 'aria-activedescendant',
1904
+ 'aria-expanded',
1905
+ 'aria-level',
1906
+ 'aria-multiselectable',
1907
+ 'aria-orientation',
1908
+ 'aria-errormessage'
1909
+ ]
1910
+ },
1911
+ owned: {
1912
+ all: ['tab']
1913
+ },
1914
+ nameFrom: ['author'],
1915
+ context: null,
1916
+ unsupported: false,
1917
+ allowedElements: ['ol', 'ul']
1918
+ },
1919
+ tabpanel: {
1920
+ type: 'widget',
1921
+ attributes: {
1922
+ allowed: ['aria-expanded', 'aria-errormessage']
1923
+ },
1924
+ owned: null,
1925
+ nameFrom: ['author'],
1926
+ context: null,
1927
+ unsupported: false,
1928
+ allowedElements: ['section']
1929
+ },
1930
+ term: {
1931
+ type: 'structure',
1932
+ attributes: {
1933
+ allowed: ['aria-expanded', 'aria-errormessage']
1934
+ },
1935
+ owned: null,
1936
+ nameFrom: ['author', 'contents'],
1937
+ context: null,
1938
+ implicit: ['dt'],
1939
+ unsupported: false
1940
+ },
1941
+ textbox: {
1942
+ type: 'widget',
1943
+ attributes: {
1944
+ allowed: [
1945
+ 'aria-activedescendant',
1946
+ 'aria-autocomplete',
1947
+ 'aria-multiline',
1948
+ 'aria-readonly',
1949
+ 'aria-required',
1950
+ 'aria-placeholder',
1951
+ 'aria-errormessage'
1952
+ ]
1953
+ },
1954
+ owned: null,
1955
+ nameFrom: ['author'],
1956
+ context: null,
1957
+ implicit: [
1958
+ 'input[type="text"]',
1959
+ 'input[type="email"]',
1960
+ 'input[type="password"]',
1961
+ 'input[type="tel"]',
1962
+ 'input[type="url"]',
1963
+ 'input:not([type])',
1964
+ 'textarea'
1965
+ ],
1966
+ unsupported: false
1967
+ },
1968
+ timer: {
1969
+ type: 'widget',
1970
+ attributes: {
1971
+ allowed: ['aria-expanded', 'aria-errormessage']
1972
+ },
1973
+ owned: null,
1974
+ nameFrom: ['author'],
1975
+ context: null,
1976
+ unsupported: false
1977
+ },
1978
+ toolbar: {
1979
+ type: 'structure',
1980
+ attributes: {
1981
+ allowed: [
1982
+ 'aria-activedescendant',
1983
+ 'aria-expanded',
1984
+ 'aria-orientation',
1985
+ 'aria-errormessage'
1986
+ ]
1987
+ },
1988
+ owned: null,
1989
+ nameFrom: ['author'],
1990
+ context: null,
1991
+ implicit: ['menu[type="toolbar"]'],
1992
+ unsupported: false,
1993
+ allowedElements: ['ol', 'ul']
1994
+ },
1995
+ tooltip: {
1996
+ type: 'widget',
1997
+ attributes: {
1998
+ allowed: ['aria-expanded', 'aria-errormessage']
1999
+ },
2000
+ owned: null,
2001
+ nameFrom: ['author', 'contents'],
2002
+ context: null,
2003
+ unsupported: false
2004
+ },
2005
+ tree: {
2006
+ type: 'composite',
2007
+ attributes: {
2008
+ allowed: [
2009
+ 'aria-activedescendant',
2010
+ 'aria-multiselectable',
2011
+ 'aria-required',
2012
+ 'aria-expanded',
2013
+ 'aria-orientation',
2014
+ 'aria-errormessage'
2015
+ ]
2016
+ },
2017
+ owned: {
2018
+ all: ['treeitem']
2019
+ },
2020
+ nameFrom: ['author'],
2021
+ context: null,
2022
+ unsupported: false,
2023
+ allowedElements: ['ol', 'ul']
2024
+ },
2025
+ treegrid: {
2026
+ type: 'composite',
2027
+ attributes: {
2028
+ allowed: [
2029
+ 'aria-activedescendant',
2030
+ 'aria-colcount',
2031
+ 'aria-expanded',
2032
+ 'aria-level',
2033
+ 'aria-multiselectable',
2034
+ 'aria-readonly',
2035
+ 'aria-required',
2036
+ 'aria-rowcount',
2037
+ 'aria-orientation',
2038
+ 'aria-errormessage'
2039
+ ]
2040
+ },
2041
+ owned: {
2042
+ one: ['rowgroup', 'row']
2043
+ },
2044
+ nameFrom: ['author'],
2045
+ context: null,
2046
+ unsupported: false
2047
+ },
2048
+ treeitem: {
2049
+ type: 'widget',
2050
+ attributes: {
2051
+ allowed: [
2052
+ 'aria-checked',
2053
+ 'aria-selected',
2054
+ 'aria-expanded',
2055
+ 'aria-level',
2056
+ 'aria-posinset',
2057
+ 'aria-setsize',
2058
+ 'aria-errormessage'
2059
+ ]
2060
+ },
2061
+ owned: null,
2062
+ nameFrom: ['author', 'contents'],
2063
+ context: ['group', 'tree'],
2064
+ unsupported: false,
2065
+ allowedElements: [
2066
+ 'li',
2067
+ {
2068
+ nodeName: 'a',
2069
+ attributes: {
2070
+ href: isNotNull
2071
+ }
2072
+ }
2073
+ ]
2074
+ },
2075
+ widget: {
2076
+ type: 'abstract',
2077
+ unsupported: false
2078
+ },
2079
+ window: {
2080
+ nameFrom: ['author'],
2081
+ type: 'abstract',
2082
+ unsupported: false
2083
+ }
2084
+ };
2085
+
2086
+ // Source: https://www.w3.org/TR/html-aria/
2087
+ lookupTable.elementsAllowedNoRole = [
2088
+ {
2089
+ // Plain HTML nodes
2090
+ nodeName: [
2091
+ 'base',
2092
+ 'body',
2093
+ 'caption',
2094
+ 'col',
2095
+ 'colgroup',
2096
+ 'datalist',
2097
+ 'dd',
2098
+ 'details',
2099
+ 'dt',
2100
+ 'head',
2101
+ 'html',
2102
+ 'keygen',
2103
+ 'label',
2104
+ 'legend',
2105
+ 'main',
2106
+ 'map',
2107
+ 'math',
2108
+ 'meta',
2109
+ 'meter',
2110
+ 'noscript',
2111
+ 'optgroup',
2112
+ 'param',
2113
+ 'picture',
2114
+ 'progress',
2115
+ 'script',
2116
+ 'source',
2117
+ 'style',
2118
+ 'template',
2119
+ 'textarea',
2120
+ 'title',
2121
+ 'track'
2122
+ ]
2123
+ },
2124
+ {
2125
+ nodeName: 'area',
2126
+ attributes: {
2127
+ href: isNotNull
2128
+ }
2129
+ },
2130
+ {
2131
+ nodeName: 'input',
2132
+ properties: {
2133
+ type: [
2134
+ 'color',
2135
+ 'data',
2136
+ 'datatime',
2137
+ 'file',
2138
+ 'hidden',
2139
+ 'month',
2140
+ 'number',
2141
+ 'password',
2142
+ 'range',
2143
+ 'reset',
2144
+ 'submit',
2145
+ 'time',
2146
+ 'week'
2147
+ ]
2148
+ }
2149
+ },
2150
+ {
2151
+ nodeName: 'input',
2152
+ attributes: {
2153
+ list: isNull
2154
+ },
2155
+ properties: {
2156
+ type: ['email', 'search', 'tel', 'url']
2157
+ }
2158
+ },
2159
+ {
2160
+ nodeName: 'link',
2161
+ attributes: {
2162
+ href: isNotNull
2163
+ }
2164
+ },
2165
+ {
2166
+ nodeName: 'menu',
2167
+ attributes: {
2168
+ type: 'context'
2169
+ }
2170
+ },
2171
+ {
2172
+ nodeName: 'menuitem',
2173
+ attributes: {
2174
+ type: ['command', 'checkbox', 'radio']
2175
+ }
2176
+ },
2177
+ {
2178
+ nodeName: 'select',
2179
+ condition: node => {
2180
+ return Number(node.getAttribute('size')) > 1;
2181
+ },
2182
+ properties: {
2183
+ multiple: true
2184
+ }
2185
+ },
2186
+ // svg elements (below)
2187
+ {
2188
+ nodeName: [
2189
+ 'clippath',
2190
+ 'cursor',
2191
+ 'defs',
2192
+ 'desc',
2193
+ 'feblend',
2194
+ 'fecolormatrix',
2195
+ 'fecomponenttransfer',
2196
+ 'fecomposite',
2197
+ 'feconvolvematrix',
2198
+ 'fediffuselighting',
2199
+ 'fedisplacementmap',
2200
+ 'fedistantlight',
2201
+ 'fedropshadow',
2202
+ 'feflood',
2203
+ 'fefunca',
2204
+ 'fefuncb',
2205
+ 'fefuncg',
2206
+ 'fefuncr',
2207
+ 'fegaussianblur',
2208
+ 'feimage',
2209
+ 'femerge',
2210
+ 'femergenode',
2211
+ 'femorphology',
2212
+ 'feoffset',
2213
+ 'fepointlight',
2214
+ 'fespecularlighting',
2215
+ 'fespotlight',
2216
+ 'fetile',
2217
+ 'feturbulence',
2218
+ 'filter',
2219
+ 'hatch',
2220
+ 'hatchpath',
2221
+ 'lineargradient',
2222
+ 'marker',
2223
+ 'mask',
2224
+ 'meshgradient',
2225
+ 'meshpatch',
2226
+ 'meshrow',
2227
+ 'metadata',
2228
+ 'mpath',
2229
+ 'pattern',
2230
+ 'radialgradient',
2231
+ 'solidcolor',
2232
+ 'stop',
2233
+ 'switch',
2234
+ 'view'
2235
+ ]
2236
+ }
2237
+ ];
2238
+
2239
+ // Source: https://www.w3.org/TR/html-aria/
2240
+ lookupTable.elementsAllowedAnyRole = [
2241
+ {
2242
+ nodeName: 'a',
2243
+ attributes: {
2244
+ href: isNull
2245
+ }
2246
+ },
2247
+ {
2248
+ nodeName: [
2249
+ 'abbr',
2250
+ 'address',
2251
+ 'canvas',
2252
+ 'div',
2253
+ 'p',
2254
+ 'pre',
2255
+ 'blockquote',
2256
+ 'ins',
2257
+ 'del',
2258
+ 'output',
2259
+ 'span',
2260
+ 'table',
2261
+ 'tbody',
2262
+ 'thead',
2263
+ 'tfoot',
2264
+ 'td',
2265
+ 'em',
2266
+ 'strong',
2267
+ 'small',
2268
+ 's',
2269
+ 'cite',
2270
+ 'q',
2271
+ 'dfn',
2272
+ 'abbr',
2273
+ 'time',
2274
+ 'code',
2275
+ 'var',
2276
+ 'samp',
2277
+ 'kbd',
2278
+ 'sub',
2279
+ 'sup',
2280
+ 'i',
2281
+ 'b',
2282
+ 'u',
2283
+ 'mark',
2284
+ 'ruby',
2285
+ 'rt',
2286
+ 'rp',
2287
+ 'bdi',
2288
+ 'bdo',
2289
+ 'br',
2290
+ 'wbr',
2291
+ 'th',
2292
+ 'tr'
2293
+ ]
2294
+ }
2295
+ ];
2296
+
2297
+ lookupTable.evaluateRoleForElement = {
2298
+ A: ({ node, out }) => {
2299
+ if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
2300
+ return true;
2301
+ }
2302
+ if (node.href.length) {
2303
+ return out;
2304
+ }
2305
+ return true;
2306
+ },
2307
+ AREA: ({ node }) => !node.href,
2308
+ BUTTON: ({ node, role, out }) => {
2309
+ if (node.getAttribute('type') === 'menu') {
2310
+ return role === 'menuitem';
2311
+ }
2312
+ return out;
2313
+ },
2314
+ IMG: ({ node, out }) => {
2315
+ if (node.alt) {
2316
+ return !out;
2317
+ }
2318
+ return out;
2319
+ },
2320
+ INPUT: ({ node, role, out }) => {
2321
+ switch (node.type) {
2322
+ case 'button':
2323
+ case 'image':
2324
+ return out;
2325
+ case 'checkbox':
2326
+ if (role === 'button' && node.hasAttribute('aria-pressed')) {
2327
+ return true;
2328
+ }
2329
+ return out;
2330
+ case 'radio':
2331
+ return role === 'menuitemradio';
2332
+ case 'text':
2333
+ return (
2334
+ role === 'combobox' || role === 'searchbox' || role === 'spinbutton'
2335
+ );
2336
+ default:
2337
+ return false;
2338
+ }
2339
+ },
2340
+ LI: ({ node, out }) => {
2341
+ const hasImplicitListitemRole = axe.utils.matchesSelector(
2342
+ node,
2343
+ 'ol li, ul li'
2344
+ );
2345
+ if (hasImplicitListitemRole) {
2346
+ return out;
2347
+ }
2348
+ return true;
2349
+ },
2350
+ MENU: ({ node }) => {
2351
+ if (node.getAttribute('type') === 'context') {
2352
+ return false;
2353
+ }
2354
+ return true;
2355
+ },
2356
+ OPTION: ({ node }) => {
2357
+ const withinOptionList = axe.utils.matchesSelector(
2358
+ node,
2359
+ 'select > option, datalist > option, optgroup > option'
2360
+ );
2361
+ return !withinOptionList;
2362
+ },
2363
+ SELECT: ({ node, role }) =>
2364
+ !node.multiple && node.size <= 1 && role === 'menu',
2365
+ SVG: ({ node, out }) => {
2366
+ // if in svg context it all roles may be used
2367
+ if (
2368
+ node.parentNode &&
2369
+ node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg'
2370
+ ) {
2371
+ return true;
2372
+ }
2373
+ return out;
2374
+ }
2375
+ };
2376
+
2377
+ /**
2378
+ * Reference -> https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques#Widget_roles
2379
+ * The current lookupTable.role['widget'] widget, yeilds
2380
+ * ->
2381
+ * [
2382
+ * "alert", "alertdialog", "button", "checkbox", "dialog", "gridcell", "link", "log", "marquee", "menuitem", "menuitemcheckbox",
2383
+ * "menuitemradio", "option", "progressbar", "radio", "scrollbar", "searchbox", "slider", "spinbutton", "status", "switch", "tab", "tabpanel",
2384
+ * "textbox", "timer", "tooltip", "treeitem"
2385
+ * ]
2386
+ * There are some differences against specs, hence the below listing was made
2387
+ */
2388
+ lookupTable.rolesOfType = {
2389
+ widget: [
2390
+ 'button',
2391
+ 'checkbox',
2392
+ 'dialog',
2393
+ 'gridcell',
2394
+ 'heading',
2395
+ 'link',
2396
+ 'log',
2397
+ 'marquee',
2398
+ 'menuitem',
2399
+ 'menuitemcheckbox',
2400
+ 'menuitemradio',
2401
+ 'option',
2402
+ 'progressbar',
2403
+ 'radio',
2404
+ 'scrollbar',
2405
+ 'slider',
2406
+ 'spinbutton',
2407
+ 'status',
2408
+ 'switch',
2409
+ 'tab',
2410
+ 'tabpanel',
2411
+ 'textbox',
2412
+ 'timer',
2413
+ 'tooltip',
2414
+ 'tree',
2415
+ 'treeitem'
2416
+ ]
2417
+ };