Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add rule aria-deprecated-role #4074

Merged
merged 6 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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