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

Feedback - Accessibility: Button links fail color contrast on Learn website #2232

Closed
amberhinds opened this issue Feb 21, 2024 · 3 comments · Fixed by #2235
Closed

Feedback - Accessibility: Button links fail color contrast on Learn website #2232

amberhinds opened this issue Feb 21, 2024 · 3 comments · Fixed by #2235
Assignees
Labels
[Type] Bug Something isn't working on the Learn website.

Comments

@amberhinds
Copy link

Type of feedback

//dev

Description

The buttons on learn.wordpress.org use #0085ba as the background color with 13px white text. This blue fails both AA and AAA color contrast for normal text. Here's the relevant CSS:

.is-style-primary .wp-block-button__link, .is-style-primary .wp-block-button__link:visited, .is-style-primary-full-width .wp-block-button__link, .is-style-primary-full-width .wp-block-button__link:visited, .is-style-secondary .wp-block-button__link, .is-style-secondary .wp-block-button__link:visited, .is-style-secondary-full-width .wp-block-button__link, .is-style-secondary-full-width .wp-block-button__link:visited {
    background: #0085ba;
    border: 1px solid #006799;
    box-shadow: 0 1px 0 #006799;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 32px;
    padding: 0.9rem;
    text-align: center;
    text-decoration: none;
}

Step-by-step reproduction instructions (optional)

Go to the learn home page and inspect the buttons. Here's a color contrast report for reference.

Other information (optional)

It would be great if the color contrast on buttons and links would pass color contrast at a AAA level, so we can set an example of the best practice. This could be achieved by darkening the blue to #005B80.

@amberhinds amberhinds added the Awaiting Triage Issues awaiting triage. See Training Team handbook for how to triage issues. label Feb 21, 2024
@github-actions github-actions bot added the [Type] Bug Something isn't working on the Learn website. label Feb 21, 2024
@devmuhib009 devmuhib009 removed the Awaiting Triage Issues awaiting triage. See Training Team handbook for how to triage issues. label Feb 21, 2024
@jonathanbossenger
Copy link
Collaborator

Hey @amberhinds, thanks for logging this issue.

In testing your suggested color of #005B80, I noticed that it doesn't match the other colors on the site.

If I use the color of the Lesson Plan panel at the top of the page, #006899, it passes WCAG 2.0 AA, which the WordPress project requires, and it matches the colors used in the current design.

Would this change be an acceptable compromise in your opinion?

@amberhinds
Copy link
Author

amberhinds commented Feb 21, 2024 via email

@jonathanbossenger
Copy link
Collaborator

Thanks @amberhinds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug Something isn't working on the Learn website.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants