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

Important accessibility issue! No alt text #143

Open
heaversm opened this issue Aug 21, 2019 · 1 comment
Open

Important accessibility issue! No alt text #143

heaversm opened this issue Aug 21, 2019 · 1 comment

Comments

@heaversm
Copy link

Hi! I see that this has been filed previously (#134 ) - but it's pretty crucial (for me at least) to solve, as I'm being sued for accessibility non-compliance (my site uses Shopify, Shopify's theme uses this plugin).

https://github.com/jackmoore/zoom/blob/master/jquery.zoom.js#L92

Seems like the plugin creates a new image element based off the source. Can we get the plugin to copy over the alt text?

@jackmoore
Copy link
Owner

@heaversm Wow, I was just reading up on accessibility lawsuits yesterday. Sorry this is happening and that I may have contributed to that! I wish the party suing you had done their due diligence before flagging this as an accessibility issue, because I think copying over the alt text would go against accessibility guidelines, rather than the other way around.

Zoom's alt behavior is intentional, and a good faith attempt to provide the best accessibility. The zoomed img element is a copy that gets added to the DOM, leaving the original img (which carries it's own alt text) in place. Putting alt text on the copy doesn't provide the disabled user with any new information and lowers the signal to noise ratio.

Since the alt text is provided in an adjacent DOM element, I'm fairly confident this is what accessibility guidelines would categorize as a Decorative Image, or possibly a Group of Images.

The prescription for decorative images (or a group with a single meaning) is to give the redundant image element an empty alt value. Using an empty string (which is what Zoom does), indicates that the alt attribute is intentionally blank, where omitting the alt would indicate that the attribute was overlooked.

I've tried to determine if adding aria-hidden or role='presentation' would be beneficial, but I just haven't seen any evidence to suggest that it would. I believe adding those on top of the empty alt would be superstitious code. The WAI guidelines prescribe that the empty alt attribute is the right solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants