Skip to content

Conversation

@hugovk
Copy link
Contributor

@hugovk hugovk commented Jan 17, 2022

I used both WAVE (Web Accessibility Evaluation Tool) and the CSS Overview panel in Chrome DevTools to identify these by checking https://python.github.io/peps/pep-0008/.

https://wave.webaim.org/report#/https://python.github.io/peps/pep-0008/

https://developer.chrome.com/blog/new-in-devtools-87/#css-overview

Some of the colours already met AA (all but one of these are for Native):

image

But I've bumped them all to AAA using Chrome's suggestions. They provide two suggestions, one to meet AA (4.5:1) and another for AAA (7:1).

For example, inspect element:

image

Click the colour box:

image

And click the icon to the right of the 🚫 to select AAA:

image

Demo

Before: https://python.github.io/peps/pep-0008/#other-recommendations
After: https://hugovk.github.io/peps/pep-0008/#other-recommendations

Before, 137 contrast errors: https://wave.webaim.org/report#/https://python.github.io/peps/pep-0008/
After, no contrast errors: https://wave.webaim.org/report#/https://hugovk.github.io/peps/pep-0008/

@Anteru
Copy link
Collaborator

Anteru commented Jan 17, 2022

First of all: Thanks for working on improved accessibility! However, I think something is up with your demo, both links show the exact same colors, and if I run the wave.webaim.org links , they show the same number of contrast errors? Am I missing something here?

@hugovk
Copy link
Contributor Author

hugovk commented Jan 17, 2022

Ah sorry, I should have added this needs to be in dark mode. Either put your OS into dark mode or click the icon at the top right:

image

@hugovk
Copy link
Contributor Author

hugovk commented Jan 23, 2022

Some screenshots because my demo page will likely get reset to upstream/main at some point.

Before

image

After

image

@Anteru Anteru added this to the 2.12.0 milestone Jan 23, 2022
@Anteru Anteru added A-theming area: changes to themes changelog-update Items which need to get mentioned in the changelog labels Jan 23, 2022
@Anteru Anteru merged commit 1458c66 into pygments:master Jan 23, 2022
@Anteru
Copy link
Collaborator

Anteru commented Jan 23, 2022

Merged, thanks! The changes are subtle but worth it, IMHO, thanks for working on this.

@hugovk hugovk deleted the native-contrast branch January 23, 2022 14:55
@hugovk
Copy link
Contributor Author

hugovk commented Jan 23, 2022

And thank you for maintaining Pygments, I find code in documentation much easier to read with syntax highlighting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-theming area: changes to themes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants