Closed KBDevelops closed 6 years ago
Hmm, a more accurate value should definitely be a tooltip. Not sure about flooring, as most people care about having adequate contrast, not passing some arbitrary threshold, and a deviation of 0.05 or less from the threshold doesn't mean bad contrast. The only people who care about the precise value are those who need to pass WCAG as a legal requirement, I'd imagine.
Some good thoughts in here.
Just to chime in, I ran into this issue today. I'm using automated testing to augment my accessiblity-checking abilities, and indeed it checks the WCAG 2.0 AA-specified arbitrary marker of 4.5:1. My test failed and I thought to come to this tool to check. Ultimately I had to go use the WebAIM tool to get the 'real' contrast number. A tooltip could have saved me the trip! ;)
The only people who care about the precise value are those who need to pass WCAG as a legal requirement, I'd imagine.
Yeah, I strongly suspect that is so. Unfortunately, we do exist… :(
IMO, the big button should always should always round down, so it strictly follows the "at least" wording of WCAG, and then I guess give an extra decimal digit (with round to nearest, ties away from zero) in tooltip?
I'll try and write up a PR for this either this weekend or next week.
Yeah, that's a good idea and probably trivial to implement. Looking forward to the PR!
+1 to @gsnedders above. People DO use this tool for legal/strict WCAG testing. An update would help eliminate confusion (as witnessed at day job today).
@LeaVerou Thanks for finally fixing this; sorry I never got around to it!
I had an issue using this tool where the colour combination was compliant here (4.5:1) but was actually 4.47:1 according to Snook's tool, so non-compliant.
Would it be worth changing the mathematical logic to either ignore rounding or round down so that combination would have been 4.4:1?
Alternatively going for a more accurate ratio?