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

Component is Inaccessible #24

Open
malcalevak opened this issue Oct 8, 2019 · 0 comments
Open

Component is Inaccessible #24

malcalevak opened this issue Oct 8, 2019 · 0 comments

Comments

@malcalevak
Copy link

I like the look and general function of this lightbox, but anyone who relies on the keyboard or accessible tech to navigate would be locked out of using this component. You could "fake" it by adding role="button", tabindex="0", and some keyboard handlers that trigger the same event as a click when space or return/enter are pressed, but it should really be using buttons. On the plus side, the images that have click handlers do have alt text, which is important for screen readers (so long as it's accurate).

That said, once opened, you are using buttons, but they have no accessible names. This could easily be remedied by adding aria-label="button purpose". They also don't have focus states, which should mirror the hover states (this would apply to the image "buttons" above as well).

You can't close the lightbox with the escape key.

The main image being a background image creates an interesting challenge, since it's semantically a meaningless div; I imagine there's a good reason for it, but it would be preferably to actually use a native image element, along with the same alt text. There's probably a better way to associate the description with the image as well, though I can't think of how off the top of my head. Technically, though, it actually isn't hidden from screen readers.

I realize this isn't the most well worded ticket, but it would be great to see this become a fully accessible option!

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

1 participant