From a4b524084cb8fd61e5ac802b3b6bc7a0d5f86668 Mon Sep 17 00:00:00 2001 From: Steven Lambert Date: Fri, 24 May 2019 09:24:18 -0600 Subject: [PATCH] fix(aria-allowed-attr): allow figure role (#1558) * fix(aria-allowed-attr): allow figure role * remove unsupported role table --- build/tasks/aria-supported.js | 7 +------ doc/aria-supported.md | 6 ------ lib/commons/aria/index.js | 2 +- test/integration/rules/aria-roles/aria-roles.html | 2 +- test/integration/rules/aria-roles/aria-roles.json | 6 +++--- 5 files changed, 6 insertions(+), 17 deletions(-) diff --git a/build/tasks/aria-supported.js b/build/tasks/aria-supported.js index 12ff0ab2df..79cc4b3cec 100644 --- a/build/tasks/aria-supported.js +++ b/build/tasks/aria-supported.js @@ -32,7 +32,6 @@ module.exports = function(grunt) { '(https://www.deque.com/blog/weve-got-your-back-with-accessibility-supported-in-axe/).\n\n' + 'For a detailed description about how accessibility support is decided, see [How we make ' + 'decisions on rules](accessibility-supported.md).', - rolesMdTableHeader: ['aria-role', 'axe-core support'], attributesMdTableHeader: ['aria-attribute', 'axe-core support'] }; @@ -41,10 +40,6 @@ module.exports = function(grunt) { axe.commons.aria.lookupTable.role, listType ); - const rolesTableMarkdown = mdTable([ - headings.rolesMdTableHeader, - ...rolesTable - ]); const ariaQueryAriaAttributes = getAriaQueryAttributes(); const { diff: attributesTable, notes: attributesFootnotes } = getDiff( @@ -63,7 +58,7 @@ module.exports = function(grunt) { const content = `${ headings.main - }\n\n## Roles\n\n${rolesTableMarkdown}\n\n## Attributes\n\n${attributesTableMarkdown}\n\n${footnotes}`; + }\n\n## Attributes\n\n${attributesTableMarkdown}\n\n${footnotes}`; const destFile = this.data.destFile; // Format the content so Prettier doesn't create a diff after running. diff --git a/doc/aria-supported.md b/doc/aria-supported.md index e568c0db0f..e4db5f1814 100644 --- a/doc/aria-supported.md +++ b/doc/aria-supported.md @@ -6,12 +6,6 @@ This page contains a list of ARIA 1.1 features that axe-core raises as unsupport For a detailed description about how accessibility support is decided, see [How we make decisions on rules](accessibility-supported.md). -## Roles - -| aria-role | axe-core support | -| --------- | ---------------- | -| figure | No | - ## Attributes | aria-attribute | axe-core support | diff --git a/lib/commons/aria/index.js b/lib/commons/aria/index.js index f782587722..9e39efe0b9 100644 --- a/lib/commons/aria/index.js +++ b/lib/commons/aria/index.js @@ -1028,7 +1028,7 @@ lookupTable.role = { }, figure: { type: 'structure', - unsupported: true + unsupported: false }, form: { type: 'landmark', diff --git a/test/integration/rules/aria-roles/aria-roles.html b/test/integration/rules/aria-roles/aria-roles.html index e9d125a94e..95380ac162 100644 --- a/test/integration/rules/aria-roles/aria-roles.html +++ b/test/integration/rules/aria-roles/aria-roles.html @@ -106,6 +106,7 @@
ok
ok
ok
+
ok
@@ -125,5 +126,4 @@
fail
ok
-
fail
diff --git a/test/integration/rules/aria-roles/aria-roles.json b/test/integration/rules/aria-roles/aria-roles.json index d1ade397fa..39460d1c93 100644 --- a/test/integration/rules/aria-roles/aria-roles.json +++ b/test/integration/rules/aria-roles/aria-roles.json @@ -15,8 +15,7 @@ ["#fail11"], ["#fail12"], ["#fail13"], - ["#fail14"], - ["#fail15"] + ["#fail14"] ], "passes": [ ["#pass1"], @@ -125,6 +124,7 @@ ["#pass105"], ["#pass106"], ["#pass107"], - ["#pass108"] + ["#pass108"], + ["#pass109"] ] }