Skip to content

Commit

Permalink
feat: add rule aria-deprecated-role (#4074)
Browse files Browse the repository at this point in the history
* feat: add rule aria-deprecated-role

* more tests

* Update lib/rules/aria-deprecated-role.json

Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>

* run build

---------

Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>
  • Loading branch information
straker and WilcoFiers authored Jul 10, 2023
1 parent 481ade0 commit 03f2771
Show file tree
Hide file tree
Showing 10 changed files with 589 additions and 65 deletions.
113 changes: 57 additions & 56 deletions doc/rule-descriptions.md

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions lib/rules/aria-deprecated-role.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"id": "aria-deprecated-role",
"selector": "[role]",
"matches": "no-empty-role-matches",
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"impact": "minor",
"actIds": ["674b10"],
"metadata": {
"description": "Ensures elements do not use deprecated roles",
"help": "Deprecated ARIA roles must not be used"
},
"all": [],
"any": [],
"none": ["deprecatedrole"]
}
2 changes: 1 addition & 1 deletion lib/rules/aria-roles.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
},
"all": [],
"any": [],
"none": ["invalidrole", "abstractrole", "unsupportedrole", "deprecatedrole"]
"none": ["invalidrole", "abstractrole", "unsupportedrole"]
}
4 changes: 4 additions & 0 deletions locales/_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
"description": "Ensures every ARIA button, link and menuitem has an accessible name",
"help": "ARIA commands must have an accessible name"
},
"aria-deprecated-role": {
"description": "Ensures elements do not use deprecated roles",
"help": "Deprecated ARIA roles must not be used"
},
"aria-dialog-name": {
"description": "Ensures every ARIA dialog and alertdialog node has an accessible name",
"help": "ARIA dialog and alertdialog nodes should have an accessible name"
Expand Down
Loading

0 comments on commit 03f2771

Please sign in to comment.