-
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
Writing flow: improved tabbing for Edit mode #19235
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a little bit weird that that tabbing stops at the first block and then when we start over, the post title is skipped.
I still wonder whether it's better to have the "constraint tabbing" behavior when in edit mode and a block UI is focused but I'll defer to other a11y testers. I believe @MarcoZehe already approved the behavior in this PR.
@youknowriad You're right this this might be possible to improve when you first tab into a block. I feel like you should be in Navigation mode when you first tab to a block. That also make sense as it is the mode you |
@youknowriad Thanks for the review! Let's try this, and I'll follow up with more polish to this behaviour. |
// Move the mouse to show the block toolbar | ||
await page.mouse.move( 0, 0 ); | ||
await page.mouse.move( 10, 10 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It troubles me when I see interactions like these in the end-to-end tests, because the first question which comes to mind is: Is there not an easier way to express this as a keyboard interaction? Or, worse, is it even possible to achieve this behavior via keyboard alone?
I'm not sure if it matters much for this specific test, since it seems to be at least somewhat contrived example to verify which options are present, but in general I'm a bit concerned about navigation mode, or at least specifically options for "cancelling" the isTyping
flag. Previously, it was problematic in how it relied on a mouse or clunky selection operations to control. Later, Escape was added as an option to unset the flag (#10906), but I guess now that's been overridden to control whether the block editor is in navigation mode. I worry this all has put us back in a position we were in prior to #10906 where certain interactions are only possible using the cursor.
Description
Spit out from #18779.
Blocks #18779.
This PR changes block navigation (tabbing) behaviour for Edit mode, which is needed for #18779. This turns out to be a drastic improvement from the current tabbing experience.
I believe the new tabbing behaviour creates a beautiful balance between edit mode (super easy access to block controls), navigation mode (easy access to other blocks), and traditional editor navigation (arrow keys to access other blocks).
It also reduces the need for the obscure region shortcut
Ctrl+~
and toolbar shortcutAlt+F10
.From @MarcoZehe:
How has this been tested?
Tab around in Edit and Navigation mode.
Screenshots
Types of changes
Enhancement
Checklist: