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

Error if trying to select while having a dialog open #27

Open
1 of 2 tasks
bratzie opened this issue Oct 18, 2024 · 0 comments
Open
1 of 2 tasks

Error if trying to select while having a dialog open #27

bratzie opened this issue Oct 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bratzie
Copy link

bratzie commented Oct 18, 2024

Please provide the environment you discovered this bug in.

The relevant packges should be the following:

ngx-sonner: 2.0.2
angular: 18.0.1
angular-cdk: 18.0.6

Description

If you have a dialog open with a backdrop (in my case Angular CDK Dialog) it sets aria-hidden on the things in the backdrop, and in Angulars case - the root element. If you then show a toast and try to click on it (or use the keybind to try to focus it) it will show you an error in the console.

image

Please provide the exception or error you saw

Blocked aria-hidden on a <li> 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. 

Other information

Not sure if you feel this is part of this library or just user error. I figured you might find it interesting though, and maybe you want to disable interaction/focus if the toast is under an active "aria-hidden" flag.

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@bratzie bratzie added the bug Something isn't working label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant