The color value #777777 is evaluated on some analyser tools as 4.5:1 (pass), and 4.48:1 (fail) on other tools on our resource list.
https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html#visual-audio-contrast-contrast-resources-head
Tests here:
http://davidmacd.com/test/check-color.html
The actual value appears to be 4.48.
https://twitter.com/jared_w_smith/status/751433009316794368
My personal opinion is that the SC wording of "at least 4.5:1" means it cannot be rounded up to the threshold from a lower number.
But this started quite a discussion on twitter with some saying that science, math and case law points to 4.48 passing... it is argued that because we only had one digit in the decimal 4.5:1 for the SC then any 2 digit value can be rounded up or down according to rounding practices.( i.e., 4.44 would round to 4.4 failing and 4.45 would round to 4.5 which is a pass.)
The minimum contrast value up until the last draft of WCAG 2 was 5:1. We reluctantly accepted 4.5:1 on the last draft recommended by the Access Board ... if we had stayed at 5 then the under the argued rounding reasoning, 4.5:1 would still pass because it it rounds up to 5:1.
Let's make a decision and put it in the Understanding. I suggest something explicit such as.
When this Success Criteria says "at least 4.5:1", it means this is the threshold, and that no number less than that can pass, even if it is rounded."
Can the normative SC wording write it out to the decimal place it's expecting folks to round? i.e. 4.50:1.00 and 3.00:1.00? Or something that is very specific about the rounding if you can round or not?
Maybe in 2.1, but we even cringed at 4.5:1 instead of 5:1 which was the original in most drafts, adding more digits seems a little academic.
I think that if you were in a dispute over this somehow that:
1) the rest of the site must be fantastic as this is a very minor difference
2) you would be asked to provide a scientific basis for the treatment of the numbers. 4.5, as written in WCAG 2.0 has 2 significant digits. To compare a number to it, in this case 4.48, you might subtract 4.5-4.48, which gives you 0.02, but since there can only be the same number of significant digits in the answer, the answer for the difference is actually 0. This would mean that 4.46 and greater (or even 4.456 if you have a tool that gives that number of decimal places) could be viewed as meeting a 4.5:1
We can be more prescriptive in the future, but given that the 4.5 value is based on a negotiation between people on the group who pushed for 4:1 and those who pushed for 5:1, I'm not sure that it will make a huge difference. We should be careful not to say 5:1 though, as with the significant figures calculations 4.56:1 would meet a 5:1 (1 significant figure) ratio.
but since there can only be the same number of significant digits in the answer
Not sure why there has to be the same # of digits. There was no discussion of that in WCAG 2.
Historical background: Bruce at the Access Board requested 4.5 in the last months before WCAG 2 release. It was always 5:1 until then. The group didn't want to have a 0.5 digit, so a few discussed 4.0 which was quickly discarded. Lighthouse approved 4.5. Bruce created colour wheel. He and I took an action item to identify the extra colours between 4.5 and 5. We found significant new colours allowed, and the group decided to adopt it.
I've worked with companies that have spent $100,000 on their colors. This stuff is important to them. They are not in great humour if they should have chosen #767676 instead of #777777 after painstaking research to be on the threshold. http://davidmacd.com/test/check-color.html
I think we need to make a clarifying statement on what we intended when we said "at least 4.5:1"
There are tools that are in conflict with each other at the threshold because of rounding. One fails #777 the other passes it. Many organizations choose threshold colours, and are very upset it their colour passes one tool and not the other when both tools are on our list of recommendations. This is a math formula.
I'm curious: What was discussed when the decision about any value—3:1, 5:1, anything—was made? As I see it, there are four factors to consider here:
So when I hear my colleagues say, "Of course we don't round," or "There are no measurements in the calculation. It is defined constants and RGB values, which are integers," I don't hear the well-grounded basis a profession should have for the standards it sets. David has encountered a professional dilemma—some tools round, some don't, the standard has only two significant digits, and the customer's branding professionals say they really need the color that will pass only if the calculated value is rounded.
How many people will not be able to use the Web if we let #777777 pass? What are the circumstances that close that opportunity to them? What alternative means of access exist?
We can't answer those questions—at least I haven't yet seen even one of us give it a try—but we're willing to tell David to pick up that phone or walk into that conference room and tell his client that for all the good it did them on the color scheme, they should have taken that $100,000 to Vegas, because the right answer is off by #010101.
If we really want to stick to that position, then at the very least it would behoove us to add the choice between these two colors to Understanding WCAG as an example to illustrate that when we say 3, 4.5, and 7, we mean that the value truncated to that degree of precision—one digit for 3 and 7; two for 4.5—must equal or exceed the threshold.
Consider this: Making online materials accessible begins with understanding your audience and their needs. David's audience was confused to the tune of a $100,000 mistake—and, by and large, the response I have heard from our profession has been, "The problem isn't with WCAG. It's with whoever decided to round."
In other words, "The tool didn't work for the user, so it's the user's fault."
Much as I like the people who have taken that position, I find the position itself abhorrent. It represents the antithesis of the purpose of our profession.
Personally, I don't care which direction we go. But we need to make a decision and go with it. Let's simply say "yes rounding is OK" or "No it is not"
There are trolls who sue companies for failing WCAG. This represents real loss of $ for companies EVEN if everything that Cliff says is accepted by the court. But if the troll says "I used a tool listed by WCAG and it failed the colour for me" It complicates the issue, especially when some tools fail a threshold colour and others don't.
The other cost is the wasted hours trying to decide threshold colours. I'm working with a major company where these discussions have had to take place among very expensive consultancies.
Currently, I don't know whether to tell my client to change #777 or not. Debating it is a waste of my time and money as well.
Please, let's just make a decision and document it. Here's the new proposal.
"Normal rounding to the nearest 1/10th (0.1) which results in at least 4.5:1 is sufficient"
I completely agree that being specific regarding rounding in WCAG sounds fairly important and urgent.
I'm personally in favour of explicitly allowing rounding because:
I think if rounding were really likely to make or break legibility, we should pick a higher threshold and allow rounding against that.
Just a note: Do the calculation yourself, and you will find that all 7 of the color contrast checkers were rounding. Truncated to 2 digits past the decimal the actual value for #777777 against #FFFFFF is 4.47, not 4.48. (Taken as far as my calculator would go, it was 4.4780894535772137.)
So whether we know it or not, we have been rounding all along. I see this as a clear case where in Understanding WCAG we need to explicitly work through a specific example. To show whether to round, that example must be a case in which rounding changes the status.
Rounding should be allowed for this reason if no other: The value of 4.5 is based on an imprecise calculation. It was obtained by multiplying 3.0 by "roughly 1.5," a number based on the empirical measurement of the difference in contrast sensitivity between 20/20 and 20/40 vision. "Roughly" means that "5" in the tenths column is shaky, so the 5 in the tenths column of 4.5 is shaky, too. In principle, we should round, and we should round to the tenth. We don't know this world precisely enough to go farther.
Then we should also show some examples of enhanced contrast. Show the same text at 3.0, 3.8, 4.5, 5.8, 7.0, 8.5, and 10.0. (Actually, I wouldn't choose arbitrary values other than the thresholds. Instead, I would use the color schemes of the default UI of various phones and popular apps. Make it a real-world scenario.) Find the research, if it exists, to show the practical results of choosing various levels:
It's important to show the impact on people with 20/70 vision because our threshold of 4.5 is based on 20/40, which is approximately where age-related loss of acuity begins but not a relevant measure for disability. In the United States, at least, disability begins with low-moderate vision, which starts at a visual acuity that cannot be corrected to better than 20/70.
Doing so will accomplish four important goals:
Most people just want to do what's best, but they need to know the answer quickly enough to meet a deadline. If we want them to embrace accessibility (or at the very least not to resent it), we need to create guides that are considerate of their needs.
If at all, we need to provide direction on rounding off, I think, it's OK to round-off. As Andrew mentioned above, anything above 4.46:1 would eventually meet 4.5:1. Reason I agree to round off is keeping practical scenarios in mind. Whether we like it or not, in the companies, it's hard to work with folks on design decisions. Since we are not compromising much lower than 4.5:1, I think rounding off would be OK. Practically, if designers comes back and ask how does it matter in ratio of difference of 0.02, we cannot argue every time. Also, asking for dot perfection to 4.5 would not always be accepted; when we talk about 0.02 etc.,
On yesterday's WCAG call there was a brief discussion on what to do with rounding of color contrast. I got an e-mail this morning with a very nice case that gives us the solution.
In axe-core we found a violation that had a contrast of 4.495447083. Axe-core doesn't round, so that ended up as a violation. But in the error message, it showed up as 4.50:1, which obviously confused the user. Given that none of the tools display more then 3 digits in the reporting of the contrast, and many of them only use two, it's probably best to do the rounding, so that nobody ever get's a violation like: "The color contrast ratio of 4.50:1 does not meet the required of 4.5:1".
Upon further review of the rules of significant figures in calculations I'm changing my position on this. There is no doubt that 4.5:1 is restrictive and there can be an impact on design, but it does seem clear that the WG felt that the ratio was a threshold value.
http://www.w3.org/WAI/GL/2008/12/DIFF-WCAG20-UNDERSTANDING-20081211/#visual-audio-contrast-contrast
"(20/40 calculates to approximately 4.5:1[begin delete] which is rounded up to 5 providing a slight additional increase in contrast[end delete].)"
As a result, I'm suggesting adding a note to Understanding for 1.4.3 and 1.4.6 that clarifies that the value computed for the contrast should not be rounded, and then that value is compared to the reference ratio.
For example, if the measured/computed value is 4.4899 then you could compare 4.5 (2 signifiant figures) with 4.4989 (5 significant figures) and the answer is 0.0101 before considering significant figures and 0.010 after considering significant figures. Either way, the value doesn't meet the "at least 4.5:1" threshold.
In the case of the 3:1 ratio, if the measured value is 2.99 (2 significant figs) then 3-2.99 = 0.01.
The point of the significant figures in this discussion is that the mathematical purpose of significant figures is to ensure that the accuracy of an answer is appropriate when there are different levels of precision in the values being compared.
The simplest and most consistent answer for implementers is to treat the ratio as a threshold, in my opinion.
Pull requests:
https://github.com/w3c/wcag/pull/248/files?diff=split
https://github.com/w3c/wcag/pull/247/files?diff=split
@awkawk Did you read my comment above explaining that changing a single color channel by a single bit may cause the contrast ratio to change by as much as 0.04? It seems like we should have a similar granularity in the measurement as we do in our ability to affect it.
I did, but we aren't in a position to change the text of the SC, and to apply a variation like that in the interpretation isn't supported in the original discussions of the group so that would need to wait for a change in the normative document itself.
I vote for no rounding.
Commits updated per the WG call:
https://github.com/w3c/wcag/pull/248/files?diff=split
https://github.com/w3c/wcag/pull/247/files?diff=split
Accepted by CfC: https://www.w3.org/WAI/GL/wiki/Decisions
Most helpful comment
I completely agree that being specific regarding rounding in WCAG sounds fairly important and urgent.
I'm personally in favour of explicitly allowing rounding because:
I think if rounding were really likely to make or break legibility, we should pick a higher threshold and allow rounding against that.