Skip to content

[Accessibility] Make frames invisible for screen readers #31

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

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

theanxy
Copy link

@theanxy theanxy commented Oct 1, 2014

The most important issue to solve is to hide images from screen readers, solved by:

  • empty ALT,
  • role="presentation" on frames container.

We don’t need to force labels for every gif image, as most of them will have blank alternative text for sure.

@geelen
Copy link
Owner

geelen commented Oct 2, 2014

I don't think you need the role on the image elements if they're within the role='presentation'?

Thanks for the PR though, gonna go through and merge a few in the next couple of days.

@theanxy
Copy link
Author

theanxy commented Oct 3, 2014

@geelen Role='presentation' on the container is enough as it should hide its children. As a rule of a thumb, all imgs need an alt attribute. Empty alt is not an equivalent to the lack of alt. I think that’s what you meant :)

Also I saw your #11, IMHO role='presentation' fits better here than aria-hidden: http://john.foliot.ca/aria-hidden/. Aria-label with role="img" is a great idea, but according to w3c authors MUST provide alternative text or a label determined by the accessible name calculation. I’m leaning towards suggesting to skip role="img" with aria-label, because some authors could skip aria-label and keep the role attr. Role="img" with no alternative content will be worse than x-gif element with no role and hidden from accessibility APIs. I suppose most GIFs out there will have no alternative content anyway. That’s only my view though.

P.S. I’ve decided to open a new PR and skip dist files to keep this as clear as possible.

Cheers and good job 👍

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

Successfully merging this pull request may close these issues.

2 participants