Focus loss when “Clear” button is used in Styles > Color #60614
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Type] Bug
An existing feature does not function as intended
Description
In the Styles > Colors panel the “Clear” button is removed when the color is cleared. This results in a focus loss.
Other instances of color editing in the editor do not suffer from this so fixing it should be quite simple. This issue does raise the question of whether the
ColorPalette
component could be enhanced to make this problematic scenario less likely. Additionally, hiding the clear button when the color is the default seems like it was done with good intent. It’s an indicator that the default is selected so there is nothing to clear. However that would be better done by disabling the button yet it appearsColorPalette
does not support such usage. Perhaps it should.Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
styles-colors-focus-loss.mp4
Environment info
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: