[Dialog/Modal] Dialog and Modals should trap focus. #14509
Labels
accessibility
a11y
component: modal
This is the name of the generic UI component, not the React module!
duplicate
This issue or pull request already exists
Expected Behavior 🤔
Dialogs and modals should trap your browsers focus when tabbing to just that open dialog of modal. This is for accessibility and ease of keyboard use of a site.
The breaking behavior is when focus reaches the last focusable element of a dialog, the focus should loop around to the first element.
This is described in these recommendations from W3.
Current Behavior 😯
When focus reaches the last focusable element of a dialog, the focus continues outside the dialog area.
Steps to Reproduce 🕹
Link:
Context 🔦
This is an issue for accessibility and those who use a keyboard to navigate, you lose track of where your focus is and the focus may be completely behind the dialog that you must interact with.
Your Environment 🌎
The text was updated successfully, but these errors were encountered: