- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
A11y: adjust colour contrast for dark theme #5599
Comments
Thanks for reporting. I agree that we can improve link colors in the theme-provided colors. However, for PyPI, the story is different. It seems that they customized the theme, and changed the primary color to their CI colors, but didn't adjust some other colors to fit dark mode. Thus, I would recommend to raise this problem to the maintainers of the PyPI blog. |
Aha, thanks for pointing that out, I've opened pypi/warehouse#13972 to fix the main PyPI contrast problem. |
Thanks again for the report and the directions to fix the issue. Applied your suggested changes in a4babcf. They will be released with 9.2.0b3 and subsequently the stable release. |
Thank you! |
Released as part of 9.2.0b3. |
Context
No response
Bug description
With the dark theme, pages such as:
don't have enough contrast for the links, making them hard to read and affecting accessibility.
The ratio doesn't meet the WCAG guidelines.
Related links
Reproduction
example.zip
Steps to reproduce
Expected results:
Score: 100 and no contrast issues
Actual results:
Several contrast issues found:
Details
In my view, the top priority would be to fix the colour used for links (
var(--md-typeset-a-color)
) which especially problematic for pages like https://blog.pypi.org/Suggestion:
Inspect the problematic text using Chrome:
Details
Click the colour square in the styles pane and expand the bit next to Contrast ratio:
Details
Click the box next to AA 4.5 to get a suggested colour:
Details
This gives
#7299e1
which is a good replacement for the problematic#6c91d5
.Note: make sure not to change colours for light mode at the same time, or it may make the contrast worse for light mode.
Browser
Chrome
Before submitting
The text was updated successfully, but these errors were encountered: