-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Empty inner block area isn't keyboard accessible when contain text cursor inside block preference is enabled #36710
Comments
I think for this, we need to look at refactoring the code to take in to account Blocks without content editable. Tab key should not focus Sidebar until end of Block content. Can test this with focusable/tabbable I suppose. @tellthemachines Any idea what file handles this? |
@alexstine this seems to be where it's implemented. |
@tellthemachines Which Block uses |
No block uses the region role, but the editor areas such as sidebar and content do. |
Ah okay. That makes sense, probably trying to make sure nothing happens when contained within a region role I guess. Sometimes I wonder how accessible Gutenberg would be without all this tab/focus changing. Would be a crazy experiment. Will you have time to work on this or should I give it a go after I finish my big PR? |
I can work on this @alexstine , will let you know once I have something ready to test. |
I started looking into this, but realised am not super clear on what the expected interaction should be for container blocks that have multiple inner blocks. We want to be able to tab to any block inserter that's inside the container, but if the container also has inner blocks, should we skip those, and just tab straight to the inserter? The problem with making it possible to tab through inner blocks is that there might be lots of them, and some of them might themselves contain inner blocks (e.g if we have a Navigation inside a Group, which is common in site templates), so it's easy to end up lost in a tree of child blocks when all we want to do is get to the inserter and add a new block to the top-level container. |
@tellthemachines I was thinking that the Navigation Mode could still be used for switching from Block to Block and eventually the Navigation Mode could be replaced with the List View. My main focus for this is to make sure you can Tab through Blocks to even get to a point where inner Blocks can exist. E.g. if I insert a Navigation Block but can't select a menu with Tab, there will be no inner Blocks/child Blocks to speak of. Hope this makes sense. I certainly want to think about the interaction model a little more, but maybe we should create a different Issue for the actual inner Blocks navigation if this gets too busy here. |
Description
If the "Contain text cursor inside block" preference is enabled in the post editor, it is impossible to add a block to an empty inner block area using only the keyboard, for example, inside a newly-added Group or Submenu block.
When the text cursor is contained inside the block, it's not possible to use arrow key navigation between blocks in Edit mode, and in Navigation mode the block inserter isn't selectable.
I'm not sure what the best solution would be. Could add the inline inserter to the tabbing order perhaps?
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: