WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Correction for colour contrast fail in a chart

for

From: glen walker
Date: Oct 19, 2022 11:24AM


I'm seeing two different aspects in your question and Jared's response.
The example that Jared posted, figure 20 in the "understanding" section,
shows text values (percentages) on the pie pieces so that one doesn't
necessarily have to see where one pie piece ends and the next one starts in
order to figure out the value, although as Jared said, providing enough
contrast makes it a better experience even if not required by WCAG.

In your original question, you were asking about an alternative to the
chart itself such as a table of values. That would still satisfy the
"required to understand the content" aspect of Jared's response. That is,
if you had a table of values, then you don't necessarily need sufficient
contrast on the chart to figure out the values, although again, that would
be desirable.

Sometimes a chart can be tweaked just a little bit to give it sufficient
contrast. If you had a pie chart with all the pieces different shades of
blue, it's doubtful it would have sufficient contrast. But 1.4.11 talks
about "adjacent" colors. While the blue pie pieces adjacent to each other
might not have sufficient contrast, if you put a border around each piece,
either black or white depending on how light or dark your blue is, then the
pie piece color would be adjacent to the border color and not to its
neighboring pie piece so you'd only need sufficient contrast between the
border color and the pie piece color.

So there are several ways to satisfy contrast.