Skip to content
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

Image elements pointing to SVG src might not read correctly in VoiceOver #38

Open
emilbjorklund opened this issue May 23, 2019 · 0 comments

Comments

@emilbjorklund
Copy link
Owner

Not an SVG bug in itself, but rather a browser/a11y bug that pertains to using SVG images.

This markup:

<img src="image.svg" alt="hi">

...will not get read properly in VoiceOver/Safari.
From the excellent post on image accessibility by Scott O'Hara:

Desktop Safari and VoiceOver will announce “hi, group” with no announcement of the element being an “image”. However, what’s more problematic is that iOS Safari and VoiceOver will skip over the element all together, as if it were decorative.

The fix is to add a role="img" attribute to the markup. More from Scott:

Proving an image element with a role="img" will announce the “image” role as intended with macOS Safari, and fix it from being ignored on iOS. You’ll get some automated testing tools throwing warnings for the redundant role, but that’s better than it being incorrectly announced or ignored, in my opinion.

Link to WebKit issue

@emilbjorklund emilbjorklund changed the title <img> elements pointing to SVG src might does not read correctly in VoiceOver Image elements pointing to SVG src might does not read correctly in VoiceOver May 23, 2019
@emilbjorklund emilbjorklund changed the title Image elements pointing to SVG src might does not read correctly in VoiceOver Image elements pointing to SVG src might not read correctly in VoiceOver May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant