Skip to content

Commit

Permalink
fix(image-alt): Exclude svg[role="img"] elements (#683)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matty J authored and WilcoFiers committed Feb 1, 2018
1 parent ca54f42 commit 0fe74d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/image-alt.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "image-alt",
"selector": "img, [role='img']",
"selector": "img, [role='img']:not(svg)",
"tags": [
"cat.text-alternatives",
"wcag2a",
Expand Down
1 change: 1 addition & 0 deletions test/integration/rules/image-alt/image-alt.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
<img src="img.jpg" id="pass8" aria-labelledby="ninjamonkeys">
<div role="img" alt="blah" id="violation6"></div>
<div role="img" aria-label="blah" id="pass9"></div>
<svg role="img" id="ignore1"><title>SVG Title</title></svg>

0 comments on commit 0fe74d8

Please sign in to comment.