Accessibility - Fix code syntax highlighting errors (light mode) - #34376
Conversation
|
Looking forward to seeing this! When you are ready for reviews can you include some screenshots of the before and after look? I think that helps a lot to make it clear what the change looks like and what it should look like. That way if I see something that looks different to the screenshot it is clear that it isn't on purpose. |
|
120 contrast errors testing the
With this PR, 0 contrast errors (please note that I'm testing just one example, not the whole website): The remaining error is the empty table header which is a pandas issue. I tried several things and kept getting WAVE errors. Solving it is important: a user with a screen reader loses orientation in the table (with this error). I tried:
The 258 warnings are related to actions available only with the mouse. |
|
Regarding #34376 (comment), |
|
Is there more work you want to do or should we ask for people's opinions/reviews? |
No, thanks again. |
|
Thanks, @DeaMariaLeon, that is a useful small change! On the linter failure: You just have to merge |
No, that is a known limitation.
I know. But I thought what's the point if it's going to be merged with main anyway.
I don't think that trying to help people with disabilities or visual impairments is a small change. |
But have you checked manually (by switching to dark mode in your browser)?
I didn't know a PR can be merged if a test is failing. Sorry for pointing it out then.
I was referring to the small change in code that you found that already made many warnings disappear. I don't understand how you read that into my comment. |
Yes, of course. When I set the dark mode on my browser, the report always comes back "light mode". I also forced the browser dark with the devtools - not only with the icon on the page, but I got the same result from WAVE. So testing dark was not available. There are more tools to test these things, or we can force a page that only has the dark mode (totally eliminating the light mode)... but this needs more investigation/work. I guess the ultimate and best test would be asking someone who actually has visual issues, or at least use a screen reader in dark mode.
Nothing to be sorry about. Maybe it's more safe to do the merge myself like you said. Thanks.
Everybody can get better at communicating. Often, phrases can be interpreted in different ways, that's normal. To be clear: the warnings were not removed, we still have them and need to be fixed. It needs investigation, but it's not that easy. |
AnneBeyer
left a comment
There was a problem hiding this comment.
It is an improvement as is, so LGTM.
|
Let's merge this! It is an improvement to what we have right now. Maybe if we figure out a way to run the audit with dark mode we can make another PR to work on those findings. |
|
It turns out that contrast checks can be done with Firefox, including dark mode. From their docs: So, we still have contrast issues in light mode (on the landing page, logo, etc. -- not in the code highlighting. 🥳). Dark mode's needs fixing as well. |









Reference Issues/PRs
Towards #34366
What does this implement/fix? Explain your changes.
2. Try to eliminate an error generated from a table's empty table head.Point 1:
We get the colors from
pygmentsand set them in conf.py :But
pygmentsdocumentation shows the "tango" style under section Styles with a lower contrast :"The following styles do not meet the WCAG 2.1 AA contrast minimum, so they might be difficult to read for people with suboptimal vision. If you want your highlighted code to be well readable for other people, you should use one of the earlier styles instead."
First time contributor introduction
AI usage disclosure
I used AI assistance for:
Any other comments?
First part of the fix - I want to build the documentation to check if some of the accessibility errors go away in WAVE page.