-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVGs failing due to lack of alt attribute #2425
Comments
Thanks for the report @adrianblynch! Right now the support in axe, which is what powers our accessibility audits, seems to be a little iffy for SVG (see dequelabs/axe-core#20). You might want to chime in that thread with the issues you're seeing since they're looking for helpful examples! :) cc: @kaycebasques for potentially updating the docs to mention pending SVG support? |
@adrianblynch what's the source for "the recommended way to do this is with a |
@adrianblynch you said " the recommended way to do this is with a title and/or desc element." can you show that these are preferred over an alt attribute? |
Currently waiting on axe support for this. |
This still seems to be an issue. Rather frustrating, particularly for things like social media icons which which should have titles baked into them. |
Sorry @kaycebasques and @paulirish - It's so long ago I can't remember where I read this. |
I'd go with either: As reasonable example of best practices. |
The |
My report suggests that SVGs should contain an
alt
attribute but the recommended way to do this is with atitle
and/ordesc
element.Adding either an
alt
attribute or atitle
element to SVGs being audited still results in a failure:Adding
title
elements similarly fails:Adding both results in the same failure.
So the question is, what will it take to make this pass in Lighthouse and should the recommendation documentation be updated to reflect this?
https://developers.google.com/web/tools/lighthouse/audits/alt-attribute
The text was updated successfully, but these errors were encountered: