You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Working on #65124 surfaced an edge case where the buttons in the color picker may end up in a state where they're not focusable because they all have a tabindex="-1" attribute.
I'm not sure what is the root cause but I see some recent work on the CircularOptionPicker and the underlying Composite components in #64833
It appears to me the UI may end up in a state where the value of the circular option picker optionactiveId value doesn't match any HTML id attribute in the UI. As such, none of the color buttons is considered 'active'. Worth reminding the 'actice' button is expected to be the only button that is focusable with the Tab key, while navigation to the other buttons works via arrow keys.
Cc @WordPress/gutenberg-components
Three prerequisites to reproduce the bug:
Seems the bug can be reproduced only with themes that display more than one color palette in the panel:
Twenty Twenty-Three: Theme and Default palettes - can reproduce
Worth also noting that the ID values in the HTML are not consecutive. I would expect to be numbers progressively incremented by 1. Instead, they appear to be pretty inconsistent, which makes me think to some timing issue and the ID being genereated randomly across the multiple instances of the color picker.
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.
Description
Working on #65124 surfaced an edge case where the buttons in the color picker may end up in a state where they're not focusable because they all have a
tabindex="-1"attribute.I'm not sure what is the root cause but I see some recent work on the
CircularOptionPickerand the underlyingCompositecomponents in #64833It appears to me the UI may end up in a state where the value of the circular option picker option
activeIdvalue doesn't match any HTML id attribute in the UI. As such, none of the color buttons is considered 'active'. Worth reminding the 'actice' button is expected to be the only button that is focusable with the Tab key, while navigation to the other buttons works via arrow keys.Cc @WordPress/gutenberg-components
Three prerequisites to reproduce the bug:
Aniamted GIF to illustrate; Notice that after randomizing the colors, tabbing through the UI entirely skipcs the color picker buttons:
Step-by-step reproduction instructions
Inspecting the source:
tabindex="-1"attribute.tabindex="0").activeIdmay return a value that doesn't match any ID attribute in the DOM. for example:activeIdvalue iscomponents-circular-option-picker-3-75.activeIde.g.:Worth also noting that the ID values in the HTML are not consecutive. I would expect to be numbers progressively incremented by 1. Instead, they appear to be pretty inconsistent, which makes me think to some timing issue and the ID being genereated randomly across the multiple instances of the color picker.
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.