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

Make the site higher contrast for accessibility #970

Merged
merged 24 commits into from
Feb 21, 2024

Conversation

TrialDragon
Copy link
Member

@TrialDragon TrialDragon commented Feb 16, 2024

Makes the site higher contrast to address accessibility issues with the site.

Going thru this I think #396 is a good idea to catch any accessibility issues since at the moment I'm just checking the Firefox accessibility tools manually.

Fixes #3

@TrialDragon TrialDragon changed the title Make the site higher contract for accesibility Make the site higher contrast for accesibility Feb 16, 2024
@TrialDragon TrialDragon changed the title Make the site higher contrast for accesibility Make the site higher contrast for accessibility Feb 16, 2024
@TrialDragon
Copy link
Member Author

TrialDragon commented Feb 16, 2024

A side note for myself; should probably do a cleanup of the scss at some point. Remove duplication, centralize more universal variables in _vars.scss (mainly the blue color variable, makes no good sense for it to be limited to the buttons if it's meant to be a general blue color, especially when the pink color for donate already is in _vars.scss), et cetera.

@alice-i-cecile
Copy link
Member

@TimJentzsch if you have time and interest I'd love your opinion on this: you did a great job helping me out with website a11y in the past.

@cart
Copy link
Member

cart commented Feb 17, 2024

Personally not a huge fan of the new button palette ("donate" and "get started"). Feels a bit jarring and out of place with the other colors on the site. "Balanced saturation/lightness" does to a degree imply "less accessible", but I suspect we can find something that fits a bit better.

Old:
image
New:
image

@cart
Copy link
Member

cart commented Feb 17, 2024

(I do support this general idea though)

@TrialDragon
Copy link
Member Author

TrialDragon commented Feb 17, 2024

Hmm; I modified it again to make the borders stand out less.
Before (prior to this PR):
Screenshot from 2024-02-16 21-24-43
After:
Screenshot from 2024-02-16 21-25-56

I'll see if I can make it a bit less saturated so it doesn't pop out in a jarring way like it does now.

@TrialDragon
Copy link
Member Author

Okay, here it is a bit more desaturated, but not too much it starts veering into hard to read again.
Screenshot from 2024-02-16 21-35-29

@TrialDragon
Copy link
Member Author

Okay, I think I've got all the contrast issues based on manual checking. Should note that until #973 is merged the anchor links will still show as having issues.

@TrialDragon TrialDragon marked this pull request as ready for review February 17, 2024 05:50
@TimJentzsch
Copy link
Contributor

A side note for myself; should probably do a cleanup of the scss at some point. Remove duplication, centralize more universal variables in _vars.scss (mainly the blue color variable, makes no good sense for it to be limited to the buttons if it's meant to be a general blue color, especially when the pink color for donate already is in _vars.scss), et cetera.

Agreed. I think it would also be better to use semantic variable names like primary and secondary instead of stuff like blue and pink, that would also make it easier to introduce themes (e.g. a light theme).

@TimJentzsch
Copy link
Contributor

Personally not a huge fan of the new button palette ("donate" and "get started"). Feels a bit jarring and out of place with the other colors on the site. "Balanced saturation/lightness" does to a degree imply "less accessible", but I suspect we can find something that fits a bit better.

Old: image New: image

I made a website for exactly this issue: Finding a higher contrast color while staying as close as possible to the original: https://color-id.timjen.net/?color=%23bb799c&secondary=%23ececec#accessibility

Looks like it suggests #9f517a if we want to keep the #ececec text color in this case, for AA contrast.

Uses the color suggestions provided by `color-id.timjen.net` to minimize
the difference whilst ensuring the colors are contrasting.
In the original the button borders are darker than the primary color.
I'd changed it to be lighter thinking it'd fit more; but since stuff is
wanted similar to original I'm making the border darker again.
@TrialDragon
Copy link
Member Author

Okay, here is how it looks after I used color-id.timjen.net to get the colors for buttons.
image

@TrialDragon
Copy link
Member Author

Also reverted the white color change since I remembered off-white is preferable.

Copy link
Contributor

@TimJentzsch TimJentzsch left a comment

Choose a reason for hiding this comment

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

Personally, I like the changes.
Accessibility by default is always good to pursuit and this would also make it better e.g. when viewing the page on mobile in bright sunlight.

Cart will have to approve this before merging though.

Copy link
Member

@cart cart left a comment

Choose a reason for hiding this comment

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

Alrighty I think this is in a reasonable spot. I opted to lighten the border instead of darken it because I think it makes the buttons pop / feel less drab. Thanks for putting this together!

@cart
Copy link
Member

cart commented Feb 21, 2024

Actually one sec lets not merge yet. I've just noticed the forestgreen image-comparison color 😆

@TrialDragon
Copy link
Member Author

Actually one sec lets not merge yet. I've just noticed the forestgreen image-comparison color 😆

Feel free to change it to whichever color—that is generically contrasting enough—that suits your fancy. That was just the one I found that seemed to work; not attached to it.

@cart
Copy link
Member

cart commented Feb 21, 2024

I strongly suspect that it is somehow confused due to how we are rendering that text. The text is white with a black outline, which should make it pop in pretty much every scenario. The "best case" scenario (black background, white text) fails the firefox contrast test, despite being significantly more contrast-ey than the rest of the site:

image

I'm going to revert this change for now in the interest of moving forward quickly. If you want to make your case for changing this one, lets do it in a separate PR.

@TrialDragon
Copy link
Member Author

Alright. I suspect it will be forced to be dealt with once accessibility linting is added; in that case CI will complain about it until a solution is found.

@cart cart enabled auto-merge February 21, 2024 21:37
@cart cart added this pull request to the merge queue Feb 21, 2024
Merged via the queue into bevyengine:main with commit bf80312 Feb 21, 2024
9 checks passed
@TrialDragon TrialDragon deleted the 3_higher_contrast branch February 21, 2024 23:47
TrialDragon added a commit to TrialDragon/bevy-website that referenced this pull request Mar 2, 2024
Was supposed to be fixed in bevyengine#970, but it got lost in a confusing merge conflict.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve accessibility by using higher contrast on the website.
4 participants