-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Remove role="document" from the dialog and add aria-modal="true" #30687
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
Comments
/CC @patrickhlauke |
not sure about how widespread support for |
@patrickhlauke So now, May I do it if the above is right? |
@rohit2sharma95 yes. sure, go for it |
oh, as was pointed out separately in #30755 discussion, our script already dynamically adds |
Current Code
Solution code
Rational
Document role is only necessary if there role="application" on a parent that overrides screen reader short cut keys.
The
role="dialog"
doesn't do that, so it's fine without it ... see aria-practices examplehttps://w3c.github.io/aria-practices/examples/dialog-modal/dialog.html
aria-modal="true"
ensure the screen reader user cannot arrow out of the modal inadvertently and replaces the old technique (not used in bootstrap) of aria-hidden on all background content.The text was updated successfully, but these errors were encountered: