Distraction free mode breaks the ARIA toolbar keyboard interaction #49479
Labels
[Feature] Distraction Free
A preference in the Post and Site Editor that limits distractions to focus the editing experience
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Type] Bug
An existing feature does not function as intended
Description
Hat tip @carolinan for catching this issue.
When Distraction free mode (introduced in #41740) is enabled, the 'Document tools' ARIA toolbar (
NavigableToolbar
component) in the Post editor top bar can't be used with a keyboard.For clarity: the 'Document tools' ARIA toolbar is the portion of the editor top bar that contains the 'Tools', 'Undo', 'Redo', etc. buttons.
Screenshot with Distraction free mode disabled:
Screenshot with Distraction free mode enabled:
With Distraction free mode enabled:
Turns out Distraction free mode hides some of the toolbar buttons with
display: none
. This approach breaks the keyboard interaction of the ARIA toolbar pattern provided byNavigableToolbar
.A quick recap of how the ARIA toolbar pattern is supposed to work is available at the related ARIA Authoring Practices Guide page. See also the roving tabindex mechanism.
Distraction free mode should not use
display: none
to hide the toolbar buttons. Instead, it should make the toolbar render only the desired buttons and make sure the expected keyboard operability and interaction work as expected.On a related note: once again, I'd like to kindly stress the importance of manually testing with the keyboard any new UI. This kind of bugs are so evident that can be easily prevented with just a couple minutes of keyboard testing.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: