-
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
Cover placeholder: color palette not fully operable with keyboard #68639
Comments
Hello, I would like to work on this issue. |
The
Normally, the color palette users But... when In fact, to my understanding, arrow keys navigation within blocks is supposed ot navigate the nested blocks. Instead, other interactive controls like the color options should be naivgated with the Tab key. A quick fix could be setting the |
One more thing to fix: I'm not sure I understand why the When passed an Worth considering the wrapper component may already have a Screenshot of the non-ideal rendered markup: listbox: as buttons: |
I noticed another behavior while reviewing the code and testing the block: If you continue tabbing, it skips the upload button row in the cover block and jumps directly to the color picker last color. Test.cover.block.asc.mp4 |
That's because the color picker, when rendered as a Listbox with arrow keys navigation, implements the 'roving tabindex' keyboard interaction pattern where: 1) only one option is focusable at a time 2) the component 'remembers' the option that was focusable after tabbing away so when you tab back into it, that option is the one that receives initial focus. However, this pattern should not be used inside a block in the blocks list becaue it conflicts with WritingFlow. |
While working on this, I also noticed that when |
On a more general note, it appears that inside the editor canvas any UI that uses arrow keys navigation may conflict with WritingFlow. The conflict does not happen for UIs that are actually rendered outside the editor canvas e.g. the block toolbar menus. But it does happen of UIs inside the block placeholders or anywhere inside the canvas. Cc @WordPress/gutenberg-core how can similar cases be prevented in the future? Would documentation, education and guidelines be enough? Not sure that's the case. Any thoughts? |
(Cross-posting for extra visibility) As I explain in this comment, it looks like there is a parent |
Yes in that case. Not in other cases. This should be investigated becuase a structure like
|
Agreed, it needs investigation to understand why this can happen in the first place, so that we can understand the best course of action to fix it. |
Description
Discovered while working on #68602
The Cover block placeholder now shows a color palette users can use to set a background color:
Navigating the color options with the keyboard isn't fully functional and at some point users may end up in a state where it is impossible to change the selected color option with the keyboard.
It appears this UI change hasn't been tested at all with keyboard, as the non-functional keyboard navigation is very clear and apparent. I would like to remind that any new UI should be tested for at least basic keyboard interaction before being merged and released.
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.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: