-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Different focus behavior when clicking the toolbar buttons #6336
Comments
Discussed during today's accessibility bug-scrub: focus should be moved consistently. When activating these buttons, either focus should always be moved back to the content or it should say on the buttons. We're open to discuss which of the two behaviors would be better for usability and accessibility. |
Not really convinced this needs design feedback, and I agree with you; this is bad for accessibility but beyond that is bad usability. This should be consistent, and always return focus to the content. |
I'm having a bit of trouble following the code path for these controls and where the reset happens. It seems like the reset of focus is a by-product/side-effect of https://github.com/WordPress/gutenberg/blob/master/packages/editor/src/components/rich-text/index.js#L448, so I'm not exactly clear on how to get the alignment controls (which are located elsewhere with different @iseulde or someone else with more RichText knowledge than me: any chance you'd know off the top-of-your-head how to get the alignment controls to focus the block's content after interaction? |
@ellatrix - is this something you have planned to work on? |
Related #18534 |
Related #17617 |
Splitting this out from #3003
When clicking or pressing Enter on some buttons, for example the alignment buttons, focus stays on that button. Instead, when activating other buttons, for example bold/italic/strikethrough, focus is moved back to the editing area.
This is inconsistent: all buttons should behave the same. It's also different from what TinyMCE does in the classic editor, where focus is always moved back to the editing area.
The text was updated successfully, but these errors were encountered: