pythondotorg icon indicating copy to clipboard operation
pythondotorg copied to clipboard

A11y: Contrast of code formatting too low

Open hugovk opened this issue 1 year ago • 0 comments

Describe the bug

To Reproduce Steps to reproduce the behavior:

  1. Go to https://www.python.org/downloads/release/python-3130a6/
  2. View the list of removed "dead batteries" with code formatting

Actual behavior

The contrast of the green text on a grey background is too low, making it hard to read and affecting accessibility.

It's something like 2.88:1.

https://webaim.org/resources/contrastchecker/?fcolor=11A611&bcolor=F1F2F3

Expected behavior

The ratio should be at least 4.5:1.

WCAG 2.0 level AA requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text. ... WCAG Level AAA requires a contrast ratio of at least 7:1 for normal text and 4.5:1 for large text.

AA is a good target to aim for.

Screenshots

image

Desktop (please complete the following information):

  • OS: macOS
  • Browser Chrome
  • Version 124

Additional context

image

The contrast of the blue links in the table with different grey backgrounds is also a little low, would be good to bump these to 4.5:1+ as well, but the green above is more important.

  • 4.24:1 https://webaim.org/resources/contrastchecker/?fcolor=3776AB&bcolor=F0F0F0

  • 4.47:1 https://webaim.org/resources/contrastchecker/?fcolor=3776AB&bcolor=F6F6F6

hugovk avatar May 08 '24 13:05 hugovk