Join GitHub today
Block: Consider changing focusable block wrapper from outer to inner #6687
Previously: #5102 (comment)
Currently the block's focusable wrapper is the top-level (root) element of
This element includes as descendents both the UI of a block (its movers, toolbar, menu) and the editable form of the block itself. The impact here is that when a block wrapper is focused (e.g. when no other text inputs exist as in a newly inserted image placeholder block), the user must tab through all of the movers, toolbar buttons, and menu before reaching the content of the block itself.
It's been proposed that instead the first tab should transition focus into the block's editable form, and that Shift-Tab would reverse navigate through focusable items in the surrounding UI:
In implementation, this would be represented by changing the focusable wrapper to the
Whichever behavior is decided upon should be reflected with end-to-end tests verifying the expectations.
referenced this issue
May 10, 2018
I believe this is the current editor's behavior? I know it's not ideal, and I believe this is what Andrea hoped to solve with the unified "ctrl/cmd" command to enter the toolbar back in the day.
Also an open question how, if any, the navigation mode that @youknowriad is working on might play into this. If for example you are in "isEditing mode" when you are typing, does that change the tab behavior? Probably not but worth mentioning.
It's very unlikely users would expect that, as all the previous controls would be basically "skipped" and some users wouldn't have a clue they even exist. Also, visual order and tab order should always match.
From an accessibility perspective, it's the order that matters. If the editable content is the main content, then it should be placed as first element in the block keeping the native tab order. I'd warn against programmatically managing focus to assume a specific workflow. That would be just an assumption, while often users find several, different, unexpected, ways to use an UI.
I understand the formatting toolbar at the top is useful for mouse users. However, other users have different needs. Mobile brings in new issues too. After several months we're using this UI, I'm starting to think there's no single solution able to address all users needs. I'd tend to think this is probably one of the cases where an option would make sense.