WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Star ratings


From: Mark Magennis
Date: Oct 28, 2021 4:03AM

Yes Glen I believe you're right that poor state contrast is not necessarily a WCAG failure and if that's a nit pick it's WCAG that's nit picking. I'm not used to working strictly within WCAG requirements so I sometimes I forget some of the details. Thanks for pointing that out.

-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of glen walker
Sent: 26 October 2021 19:53
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: Re: [WebAIM] [EXTERNAL] Star ratings

> 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.