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

[Request]: Improve accessibility by traping focus #870

Open
annalenadavis opened this issue Mar 9, 2021 · 3 comments
Open

[Request]: Improve accessibility by traping focus #870

annalenadavis opened this issue Mar 9, 2021 · 3 comments

Comments

@annalenadavis
Copy link

Trap focus within the lightbox when opened using the keyboard.

When navigating the lightbox with a keyboard this is what currently happens:

  • Arrow keys move through images
  • Esc key exits lightbox
  • Tab key continues to move through images or links on the page behind the lightbox

For improved accessibility, what should happen is:

  • Arrow and esc keys work as-is
  • Tab key moves to the "play/pause" button, then the exit ("X") button
  • (tab could either just move between the play/pause and X or could circle through all four buttons)
  • Then when the lightbox is closed, tab key would return to focus on the last item it was on before opening it

This feature would:

This would help the plugin meet WCAG AA standards 🎉 And make it less confusing for keyboard users :)

If you added this feature, I would:

a) Eat my hat 🤠
b) Jump for joy
c) Shave my cat
d) All of the above

@GabrieleSuzart
Copy link

I came here for the same problem!

@archetyped I can try to solve the accessibility problems of this plugin, can you guide me how I can run the project in the development environment?

@archetyped
Copy link
Owner

@GabrieleSuzart SLB is a standard WordPress plugin. Install and activate it on a WordPress site and update the code as desired.

@Kyashan80
Copy link

Hi, I also join the request to make lightbox accessible. I suggest putting the tabindex attribute on the elements, and turning off the page focus and leaving it modal only.

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

4 participants