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

Afternoon: Update button colors #556

Merged
merged 2 commits into from
Oct 11, 2024
Merged

Afternoon: Update button colors #556

merged 2 commits into from
Oct 11, 2024

Conversation

carolinan
Copy link
Contributor

@carolinan carolinan commented Oct 11, 2024

Description
This PR implements the changes to the color-mix CSS used for the button hover colors discussed here:
#492

In my testing, these are the resulting contrast ratios:

Outside section styles, section style 1, 3,
Contrast Ratio: 6.5:1

Section style 2
Contrast Ratio: 7.18:1

Section style 4
Contrast Ratio: 7.96:1

Section style 5
Contrast Ratio: 4.52:1

Screenshots

buttons.mp4

Testing Instructions
Go to Appearance > Editor > Styles.
Activate "Afternoon".

Insert a buttons block:
One button with the filled variation, one with the outline variation. Remember to add the links.

Insert one group for each section style, add a copy of the buttons inside.

Test that the button colors have the expected, and accessible, colors on hover.

Copy link

github-actions bot commented Oct 11, 2024

Preview changes

You can preview these changes by following the link below:

I will update this comment with the latest preview links as you push more changes to this PR.
⚠️ Note: The preview sites are created using WordPress Playground. You can add content, edit settings, and test the themes as you would on a real site, but please note that changes are not saved between sessions.

@carolinan carolinan marked this pull request as ready for review October 11, 2024 07:21
Copy link

github-actions bot commented Oct 11, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: carolinan <[email protected]>
Co-authored-by: juanfra <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Member

@juanfra juanfra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Carolina. It's looking good.

The only one that I get a warning for is the fill button on Style 5. On hover I'm getting a warning that's 4.48

Screen.Recording.2024-10-11.at.09.54.35.mov

@carolinan
Copy link
Contributor Author

I don't trust this tool's capability of finding the correct colors but I am not going to object against a suggestion to increase a color contrast.

I have already tried changing from transparent to black, and it did not look good, it turned even more grey or muddy looking than in the video.

@juanfra
Copy link
Member

juanfra commented Oct 11, 2024

I don't trust this tool's capability of finding the correct colors but I am not going to object against a suggestion to increase a color contrast.

What tool would you recommend me to use for testing?

From what I tested changing this (and the other one in the colors file) to 90% will fix the issue with the tool I tested.

@carolinan
Copy link
Contributor Author

Yes we can change to 90%.

The accessibility-team links to a list of color contrast checkers, I don't know how much of a recommendation it is over a list of what is available.
https://make.wordpress.org/accessibility/handbook/design/use-of-color/#tools
https://www.webaxe.org/color-contrast-tools/

I like WebAim's even if the picker is a bit "fiddly" because you have to click outside for the color value to update.

@juanfra
Copy link
Member

juanfra commented Oct 11, 2024

Thank you for sharing. Will take a look at those!

styles/04-afternoon.json Outdated Show resolved Hide resolved
Copy link
Member

@juanfra juanfra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 🙌

@juanfra juanfra added [Type] Enhancement A suggestion for improvement. Accessibility (a11y) Needs accessibility testing or feedback labels Oct 11, 2024
@juanfra juanfra merged commit d50a919 into trunk Oct 11, 2024
6 of 7 checks passed
@juanfra juanfra deleted the update/afternoon-button branch October 11, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility (a11y) Needs accessibility testing or feedback [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants