Skip to content

fix: Avoid using aria-hidden on a focused element #7821

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

Closed
wants to merge 1 commit into from

Conversation

edbond88
Copy link

@edbond88 edbond88 commented Sep 4, 2024

Problem

When I open a Modal I have error in browser's console:

Caution

Blocked aria-hidden on a div element because the element that just received 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. <div tabindex=​"0" aria-hidden=​"true" style=​"width:​ 0px;​ height:​ 0px;​ overflow:​ hidden;​ outline:​ none;​">​</div>​

image

Solution

I removed aria-hidden attribute like in react-component/dialog#449

Related issues

#7769 #7783

Copy link

github-actions bot commented Nov 4, 2024

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the Stale label Nov 4, 2024
@tangjinzhou tangjinzhou closed this Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants