Skip to content

Commit

Permalink
fix(aria-allowed-attr): allow figure role (#1558)
Browse files Browse the repository at this point in the history
* fix(aria-allowed-attr): allow figure role

* remove unsupported role table
  • Loading branch information
straker authored May 24, 2019
1 parent 2416ed3 commit a4b5240
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 17 deletions.
7 changes: 1 addition & 6 deletions build/tasks/aria-supported.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']
};

Expand All @@ -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(
Expand All @@ -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.
Expand Down
6 changes: 0 additions & 6 deletions doc/aria-supported.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion lib/commons/aria/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ lookupTable.role = {
},
figure: {
type: 'structure',
unsupported: true
unsupported: false
},
form: {
type: 'landmark',
Expand Down
2 changes: 1 addition & 1 deletion test/integration/rules/aria-roles/aria-roles.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
<div role="doc-subtitle" id="pass106">ok</div>
<div role="doc-tip" id="pass107">ok</div>
<div role="doc-toc" id="pass108">ok</div>
<div role="figure" id="pass109">ok</div>
</div>
<div id="violation">
<!-- abstract roles -->
Expand All @@ -125,5 +126,4 @@
<div role="lol" id="fail13">fail</div>
<div role="text" id="fail14">ok</div>
<!-- unsupported roles -->
<div role="figure" id="fail15">fail</div>
</div>
6 changes: 3 additions & 3 deletions test/integration/rules/aria-roles/aria-roles.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
["#fail11"],
["#fail12"],
["#fail13"],
["#fail14"],
["#fail15"]
["#fail14"]
],
"passes": [
["#pass1"],
Expand Down Expand Up @@ -125,6 +124,7 @@
["#pass105"],
["#pass106"],
["#pass107"],
["#pass108"]
["#pass108"],
["#pass109"]
]
}

0 comments on commit a4b5240

Please sign in to comment.