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

Patterns: Inactive "All, Synced and Standard" toggle group options have too low color contrast #52555

Closed
carolinan opened this issue Jul 12, 2023 · 5 comments · Fixed by #52678
Assignees
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Feedback Needs general design feedback. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@carolinan
Copy link
Contributor

Description

In Appearance > Editor > Patterns > My patterns, the inactive options in the toggle group control for the synced status does not have a high enough color contrast to pass WCAG 2 AA:

Text: #757575
Background: #2F2F2F
Contrast Ratio: 2.9:1

Required: 3:1
Preferred: 4.5:1

Step-by-step reproduction instructions

Go to Appearance > Editor > Patterns > My patterns
-Test the color contrast of the inactive toggle group options.
-Try reading the text of the inactive toggle group options.

Screenshots, screen recording, code snippet

toggle group color contrast on the My patterns page.

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

@carolinan carolinan added [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 labels Jul 12, 2023
@carolinan carolinan added the [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced label Jul 14, 2023
@ndiego
Copy link
Member

ndiego commented Jul 14, 2023

I can confirm. I think rgb(150 150 150) would get it to pass. Also, the padding around the button looks a little off.

Image

@carolinan
Copy link
Contributor Author

carolinan commented Jul 17, 2023

I am not sure about introducing a new color. I think the next step is ccc:

// WordPress grays.
$black: #000;
$gray-900: #1e1e1e;

$gray-800: #2f2f2f; This is the current background color for these buttons
$gray-700: #757575; This is the current text color of these buttons
$gray-600: #949494; This is the current text color of the "inactive" unselected menu items like "Manage all of my patterns", but it is too dark to be used with gray-800 as background, it does not have a high enough contrast.

$gray-400: #ccc;
$gray-300: #ddd;
$gray-200: #e0e0e0;
$gray-100: #f0f0f0;
$white: #fff;

@carolinan carolinan added the Needs Design Feedback Needs general design feedback. label Jul 17, 2023
@carolinan
Copy link
Contributor Author

Example of using ccc: It now does not match the placeholder or icon in the search bar:

Toggle group for selecting pattern type in the Site Editor Patterns page

@carolinan
Copy link
Contributor Author

carolinan commented Jul 17, 2023

Actually on a second look, #949494 does have a high enough contrast. I must have been looking at the wrong element in the color contrast report.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jul 17, 2023
@bph bph moved this from 📥 Todo to 🔎 Needs Review in WordPress 6.3.x Editor Tasks Jul 17, 2023
@ndiego ndiego moved this from 🔎 Needs Review to 🏗️ In Progress in WordPress 6.3.x Editor Tasks Jul 17, 2023
@annezazu
Copy link
Contributor

annezazu commented Jul 24, 2023

@WordPress/gutenberg-design flagging for you all as we look at future iterations here and build on the work in the Site Editor. Let's make sure we automatically have the right color contrast!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Feedback Needs general design feedback. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants