-
Notifications
You must be signed in to change notification settings - Fork 789
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(presentation-role-conflict): Test img elements with empty alt (#…
- Loading branch information
1 parent
6f7e4a9
commit ea32fa7
Showing
7 changed files
with
40 additions
and
9 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
5 changes: 5 additions & 0 deletions
5
test/act-rules/element-marked-decorative-is-not-exposed-46ca7f.spec.js
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,5 @@ | ||
require('./act-runner.js')({ | ||
id: '46ca7f', | ||
title: 'Element marked as decorative is not exposed', | ||
axeRules: ['presentation-role-conflict'] | ||
}); |
14 changes: 12 additions & 2 deletions
14
test/integration/rules/presentation-role-conflict/presentation-role-conflict.html
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,14 @@ | ||
<li id="violation1" role="presentation" aria-label="My Heading">Hello</li> | ||
<h1 id="violation2" role="none" aria-label="My Heading">Hello</h1> | ||
<h1 id="pass1" role="none">Just some big text</h1> | ||
<h1 id="pass2" role="presentation">Just some big text</h1> | ||
<img id="pass3" alt="" src="img.png" /> | ||
|
||
<li id="fail1" role="presentation" aria-label="My Heading">Hello</li> | ||
<h1 id="fail2" role="none" aria-label="My Heading">Hello</h1> | ||
<img id="fail3" alt aria-label="foo" src="img.png" /> | ||
<img id="fail4" alt="" tabindex="0" src="img.png" /> | ||
<img id="fail5" alt="" aria-live="assertive" src="img.png" /> | ||
|
||
<div id="inapplicable1" role="presentation">Test</div> | ||
<div id="inapplicable2" role="presentation">Test Button</div> | ||
<img id="inapplicable3" alg="foo" src="img.png" /> | ||
<img id="inapplicable4" aria-label="foo" src="img.png" /> |
3 changes: 2 additions & 1 deletion
3
test/integration/rules/presentation-role-conflict/presentation-role-conflict.json
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,6 @@ | ||
{ | ||
"rule": "presentation-role-conflict", | ||
"description": "presentation-role-conflict tests", | ||
"violations": [["#violation1"], ["#violation2"]] | ||
"passes": [["#pass1"], ["#pass2"], ["#pass3"]], | ||
"violations": [["#fail1"], ["#fail2"], ["#fail3"], ["#fail4"], ["#fail5"]] | ||
} |
15 changes: 15 additions & 0 deletions
15
test/integration/virtual-rules/presentation-role-conflict.js
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