Update link and body colors to be WCAG AAA compliant#11556
Open
kailan wants to merge 7 commits intorust-lang:mainfrom
Open
Update link and body colors to be WCAG AAA compliant#11556kailan wants to merge 7 commits intorust-lang:mainfrom
kailan wants to merge 7 commits intorust-lang:mainfrom
Conversation
… compliant), resolves rust-lang#1233
Member
|
thanks for the PR! due to the number of changes it's a bit hard to review/discuss them individually though. I like some of the changes, but others will probably need a discussion first 😅
|
Contributor
Author
Member
|
I just realized that #11523 caused quite a bit of conflict with this PR... sorry! 😞
yeah, I guess that would probably make it easier to review, discuss and rebase them 😅
for the dark mode screenshot that seems okay, but the grey of light yellow in light mode seems a bit off |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




This PR updates the following colors to have a contrast ratio of at least 7:1 in the environments in which they are used:
main-color-lightis now slightly darker in light modelink-colorandlink-hover-colorare now darker in light mode and lighter in dark modeIt also updates some colors throughout the application to reference these color variables where applicable.
Look at those links pop!
On the category page, the entire row is now a hoverable and clickable link, so that there is no need to differentiate the title as a link (and thus the accessibility checker is happy)
Listed dependencies and dependents now have increased contrast.
I'm sure you can determine which one is before and after :)
I added underlines in places where differentiating the links from the text via color at a ratio that the checker is happy with is not feasible.
Finally, the size of the tap targets for pagination has been slightly increased to pass a Lighthouse audit.
Tested with the built-in test suite
pnpm test(which now all pass) as well as with Lighthouse in both dark and light mode.Closes #1233.