WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Star ratings

for

From: glen walker
Date: Oct 26, 2021 12:53PM


>
> But since the star colour is used to indicate state (checked or not
> checked), then a star also has to contrast against stars in the other
> state, so either the star colour should contrast or the outline should
> contrast (different thicknesses for example).
>

I don't think WCAG 1.4.11 says this. I think it's a great practice to have
different states contrast with each other but WCAG doesn't require it.
1.4.11 starts off by saying "adjacent colors" before it qualifies whether
it's a "User Interface Components" or "Graphical Objects". The key is that
1.4.11 is talking about colors that are literally touching each other.
With states, you typically don't see them at the same time, or in the star
rating example where you *can* see them at the same time, they're not
touching each other so technically they're not "adjacent" and 1.4.11
doesn't apply.

If you take the state by itself and not compared to other states, then any
particular state must have sufficient contrast with its adjacent colors in
order to "identify" (WCAG wording) the state.

That might be a nit pick and perhaps it's just my interpretation, but the
different star states do not have to contrast with each other.