Skip to content

Commit 03f2771

Browse files
strakerWilcoFiers
andauthored
feat: add rule aria-deprecated-role (#4074)
* 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>
1 parent 481ade0 commit 03f2771

File tree

10 files changed

+589
-65
lines changed

10 files changed

+589
-65
lines changed

doc/rule-descriptions.md

Lines changed: 57 additions & 56 deletions
Large diffs are not rendered by default.

lib/rules/aria-deprecated-role.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"id": "aria-deprecated-role",
3+
"selector": "[role]",
4+
"matches": "no-empty-role-matches",
5+
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
6+
"impact": "minor",
7+
"actIds": ["674b10"],
8+
"metadata": {
9+
"description": "Ensures elements do not use deprecated roles",
10+
"help": "Deprecated ARIA roles must not be used"
11+
},
12+
"all": [],
13+
"any": [],
14+
"none": ["deprecatedrole"]
15+
}

lib/rules/aria-roles.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
},
1111
"all": [],
1212
"any": [],
13-
"none": ["invalidrole", "abstractrole", "unsupportedrole", "deprecatedrole"]
13+
"none": ["invalidrole", "abstractrole", "unsupportedrole"]
1414
}

locales/_template.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
"description": "Ensures every ARIA button, link and menuitem has an accessible name",
2222
"help": "ARIA commands must have an accessible name"
2323
},
24+
"aria-deprecated-role": {
25+
"description": "Ensures elements do not use deprecated roles",
26+
"help": "Deprecated ARIA roles must not be used"
27+
},
2428
"aria-dialog-name": {
2529
"description": "Ensures every ARIA dialog and alertdialog node has an accessible name",
2630
"help": "ARIA dialog and alertdialog nodes should have an accessible name"

0 commit comments

Comments
 (0)