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

Prevent focus after closing an image #225

Open
alt-bazza opened this issue Oct 3, 2019 · 2 comments
Open

Prevent focus after closing an image #225

alt-bazza opened this issue Oct 3, 2019 · 2 comments

Comments

@alt-bazza
Copy link

Hi,

Great app, but how do I prevent the focus lines around the last viewed image when closing a lightbox image. It looks pretty ugly and I can't seen any CSS styling for it so I assume it's being added with javascript. Is there an option to disable it without having to hack the source?

@zalevsk1y
Copy link

zalevsk1y commented Oct 7, 2019

I did not see any focus lines around the last viewed images on the demo page. Could you send a screenshot.

@delrueba
Copy link

delrueba commented Oct 7, 2019

They are there, and they should be.
For accessibility purposes it's very important that focus is restored when you close the lightbox.

You can override the focus style with your own implementation in CSS by targeting the :focus pseudo selector on the wrapper links.
But please do not remove the focus style entirely.

For more information as to why this is important: https://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-focus-visible.html

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

3 participants