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

Accessibility [aria-hidden] issue after closing a Fancybox with thumbnails #724

Open
phucbm opened this issue Feb 6, 2025 · 1 comment
Labels
needs triage This issue has not been triaged by maintainers

Comments

@phucbm
Copy link

phucbm commented Feb 6, 2025

Describe the bug

I got this error in the console log after open then close a image gallery with thumbnails

Warning

Blocked aria-hidden on an element because its descendant retained focus. The focus must not be hidden from assistive technology users. Avoid using aria-hidden on a focused element or its ancestor. Consider using the inert attribute instead, which will also prevent focus. For more details, see the aria-hidden section of the WAI-ARIA specification at https://w3c.github.io/aria/#aria-hidden.
Element with focus: div
Ancestor with aria-hidden:

I noticed the error only show when I select or move the the slides that were not visible from the beginning. For example, this demo has 3 images visible on page load and the rest are hidden.

Image

Viewing the hidden images will throw the accessibility error.
Image

Reproduction

This issue can be seen right on the docs page here https://fancyapps.com/fancybox/plugins/thumbs/

Additional context

No response

@phucbm phucbm added the needs triage This issue has not been triaged by maintainers label Feb 6, 2025
@fancyapps
Copy link
Owner

Hi,

The upcoming next major release will use the <dialog> element and this problem will be avoided. And you can safely ignore that warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue has not been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

2 participants