You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 16, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 16, 2026. It is now read-only.
aria-hidden strategy outdated with aria-modal="true" #948
"Applying the aria-modal property to the dialog element replaces the technique of using aria-hidden on the background for informing assistive technologies that content outside a dialog is inert."
The focus trap works better when I have VoiceOver enabled. Without VoiceOver enabled, You can tab through to the save changes button, and then start shift tabbing back. Past the top right x for close window, the modal will scroll the background content of the page and the focus is on an unknown item at this point.
I can create a separate ticket for the focus trap issues with more details if needed.
? A modal shouldn't allow focus outside of its focusable content while it is open though. The behaviour is different here than all other modal libraries I've compared to. Only a dialog that's not a modal should allow focus to shift outside to the main window. https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/dialog_role
Dialogs can be either non-modal (it's still possible to interact with content outside of the dialog) or modal (only the content in the dialog can be interacted with).
Activity
jquense commentedon May 18, 2021
We do both to cover all the bases, last I checked aria-modal wasn't super well supported by SRs. Is this causing a problem or a heads up?
naomiaro commentedon May 18, 2021
Using MacOS for all:
It's causing some axe errors to be reported when using axe run on the content (both chrome plugin/cypress-axe use etc)
I'm noticing an issue with the focus trap, but perhaps unrelated.
Chrome 90 on this demo using "Launch Demo Modal":
https://react-bootstrap.github.io/components/modal/#modals-live
The focus trap works better when I have VoiceOver enabled. Without VoiceOver enabled, You can tab through to the save changes button, and then start shift tabbing back. Past the top right x for close window, the modal will scroll the background content of the page and the focus is on an unknown item at this point.
I can create a separate ticket for the focus trap issues with more details if needed.
Vue Bootstrap modals seem to follow the focus trap more of W3
https://bootstrap-vue.org/docs/components/modal
jquense commentedon May 18, 2021
The focus trap behavior is intentional in how focus can shift out of the window and back in
naomiaro commentedon May 18, 2021
? A modal shouldn't allow focus outside of its focusable content while it is open though. The behaviour is different here than all other modal libraries I've compared to. Only a dialog that's not a modal should allow focus to shift outside to the main window.
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/dialog_role
https://reactcommunity.org/react-modal/accessibility/#keyboard
https://van11y.net/downloads/modal/demo/index.html
https://bootstrap-vue.org/docs/components/modal
https://www.w3.org/TR/wai-aria-practices-1.1/examples/dialog-modal/dialog.html#rps_label
http://reactcommunity.org/react-modal/examples/minimal/