Properly-structured SVG incorrectly fails svg-img-alt
See original GitHub issueExpectation: SVG with a <title/>
child element should pass test.
Actual: Failure cites lack of a <title/>
child element when one exists.
axe-core version: 4.0.2
jest-axe: 4.0.0
- Node version: v12.16.1
- Platform: Mac
SVG element markup:
<svg role="img">
<title>Accessible title</title>
<path d="M4,2 C4,3.104 3.104,4 2,4 C0.896,4 0,3.104 0,2 C0,0.896 0.896,0 2,0 C3.104,0 4,0.896 4,2" />
</svg>
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Accessible SVGs | CSS-Tricks
Scalable Vector Graphic (SVG) is emerging as the preferred graphic format to use on ... All <img> tags need the alt attribute to...
Read more >Chrome not rendering SVG referenced via <img> element
This happens when refreshing the page and initial page load. I can get the image to show up by "Inspecting Element" then right...
Read more >SVG images and graphics require accessible text | Axe Rules
SVG images and graphics require accessible text. Rule ID: svg-img-alt. Ruleset: axe-core 4.2 ... How to Fix the Problem. Ensure that all SVG...
Read more >Accessibility Features of SVG - W3C
SVG's vector-graphics format stores structural information about graphical shapes as an integral part of the image. As we discuss below, this ...
Read more >include svg images with the svg package - TeX
ERROR: LaTeX Error: Unknown graphics extension: .svg. How can I fix this problem? I'll prefer not having to convert all my svg files...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It seems the issue is with jsdom and setting the svg title node to always be
display: none
. I have filed an issue with jsdom.In case this is still relevant and could be useful (since the jsdom issue #3064 seems to be still opened), the temporary workaround by following @straker’s PR might be adding the following to the global Jest config: