-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Focus loss when “Clear” button is used in Styles > Color #60614
Copy link
Copy link
Open
Labels
[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).Changes that impact accessibility and need corresponding review (e.g. markup changes).[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Metadata
Metadata
Assignees
Labels
[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).Changes that impact accessibility and need corresponding review (e.g. markup changes).[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
In the Styles > Colors panel (or the Styles > Blocks > {block} > {block variation} panel) the “Clear” button is removed when the color is cleared. This results in a focus loss.
Color editing on a individual block does not suffer from this.
Apart from the specific issue this raises the question of whether the
ColorPalettecomponent could be enhanced to make this problematic scenario less likely. 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 appearsColorPalettedoes 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