Skip to content
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

Focus loss when “Clear” button is used in Styles > Color #60614

Open
stokesman opened this issue Apr 9, 2024 · 0 comments
Open

Focus loss when “Clear” button is used in Styles > Color #60614

stokesman opened this issue Apr 9, 2024 · 0 comments
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

Comments

@stokesman
Copy link
Contributor

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 appears ColorPalette does not support such usage. Perhaps it should.

Step-by-step reproduction instructions

  1. In the Site Editor
  2. Go to Styles > Colors
  3. Change a color to something other than the default
  4. Use the “Clear” button
  5. Notice focus is lost (palette dropdown doesn’t close as expected or if you are using the keyboard you're nowhere near where you were)

Screenshots, screen recording, code snippet

styles-colors-focus-loss.mp4

Environment info

  • Gutenberg Trunk

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

@stokesman stokesman added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). labels Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant