-
Notifications
You must be signed in to change notification settings - Fork 788
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(aria-prohibited-attr): add rule aria-prohibited-attr (#4088)
* feat(aria-prohibited-attr): add rule aria-prohibited-attr * fix act * fixes * Apply suggestions from code review Co-authored-by: Wilco Fiers <[email protected]> --------- Co-authored-by: Wilco Fiers <[email protected]>
- Loading branch information
1 parent
f151508
commit 7b115d3
Showing
15 changed files
with
197 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"id": "aria-prohibited-attr", | ||
"matches": "aria-allowed-attr-matches", | ||
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"], | ||
"actIds": ["5c01ea"], | ||
"impact": "serious", | ||
"metadata": { | ||
"description": "Ensures ARIA attributes are not prohibited for an element's role", | ||
"help": "Elements must only use permitted ARIA attributes" | ||
}, | ||
"all": [], | ||
"any": [], | ||
"none": ["aria-prohibited-attr"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
require('./act-runner.js')({ | ||
id: '5c01ea', | ||
title: 'ARIA state or property is permitted', | ||
axeRules: ['aria-allowed-attr'] | ||
axeRules: ['aria-allowed-attr', 'aria-prohibited-attr'] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
<div id="incomplete0" aria-label="foo">Foo</div> | ||
<div id="incomplete1" aria-labelledby="missing">Foo</div> | ||
<my-custom-elm id="incomplete2" aria-expanded="true">Foo</my-custom-elm> | ||
<div id="incomplete3" aria-label="foo" role="code">Foo</div> | ||
<my-custom-elm id="incomplete1" aria-expanded="true">Foo</my-custom-elm> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
{ | ||
"description": "aria-allowed-attr incomplete tests", | ||
"rule": "aria-allowed-attr", | ||
"incomplete": [ | ||
["#incomplete0"], | ||
["#incomplete1"], | ||
["#incomplete2"], | ||
["#incomplete3"] | ||
] | ||
"incomplete": [["#incomplete1"]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.