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

Contrast Checker should work for all text / background color pair settings for all blocks #60824

Open
afercia opened this issue Apr 17, 2024 · 1 comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Block editor /packages/block-editor [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Apr 17, 2024

Description

Discovered while exploring #58936 (comment)

Some blocks have a setting to change the text and background colors. The Contrast Checker should work for all these settings for all blocks. It appears it doesn't.

Note: there may be different reasons why it doesn't work for some blocks. Some guessing:

  • Some blocks do apply the colors on their inner blocks e.g. the Search block.
  • For other blocks, it could be that is just buggy.

The Contrast Checker is an important feature that should work 'out of the box' for all color paris that apply to text and background.

Since WordPress 6.6 is supposed to be a 'bug fixes' release, I'd like to propose to fix the Contrast Checker and make it work reliably for 6.6. Some e2e tests would be nice.

Step-by-step reproduction instructions

  • Create a new post and add a Paragraph, a Table, and a Search block.
  • On each of these blocks, set the text and background colors to a color pari that is clearly below the accessible contrast ratio threshold. Try to get something like what is illustrated in the screenshot below:

Screenshot 2024-04-17 at 15 58 29

  • Select the Paragraph block and observe in the settings sidebar, after the color settings, the Contrast Checker does appear. - - Select the Table block and observe in the settings sidebar, after the color settings, the Contrast Checker does not appear. Try to change colors, set new insufficient contrast to trigger again the Contrast Checker and observe it still does not appear.
  • Select the Search block and observe in the settings sidebar, after the color settings, the Contrast Checker does not appear. Try to change colors, set new insufficient contrast to trigger again the Contrast Checker and observe it still does not appear.

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.

Yes

@afercia afercia 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). [Package] Block editor /packages/block-editor labels Apr 17, 2024
@afercia
Copy link
Contributor Author

afercia commented May 7, 2024

One more place where the ContrastChcker should work is the InlineColorUI component, that is; from the block toolbat > More > Highlight. This is part of the 'inline formatting' features and allows to 'highlight' the selected text by setting text and background colors 'inline'. Screenshot:

Screenshot 2024-05-07 at 09 19 26

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). [Package] Block editor /packages/block-editor [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

1 participant