Skip to content

Modal previous Focus #2879

Answered by shleewhite
arecesj asked this question in Q&A
Dec 12, 2022 · 7 comments · 3 replies
Discussion options

You must be logged in to vote

Thank you for coming to office hours @arecesj!

Here is a summary of what we talked about:

This is actually intended behavior for the Modal component because it is really important for accessibility to not move the user's focus around the page without them explicitly asking to move focus.

There is a very strict rule for accessibility auditors that the user's focus cannot be automatically moved when they focus on a form element. This is because it is really jarring for the user to have to figure out where they are now and how to get back to what they were doing.

For modals, the way they are supposed to work is that there is a button that a user can choose to click which opens the modal and …

Replies: 7 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@gloriliale
Comment options

@gloriliale
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@arecesj
Comment options

Answer selected by shleewhite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants