Re: [csswg-drafts] [css-color] color-contrast() default algorithm (#7361)

Hello everyone @alastc @dbaron @fantasai @SebastianZ @argyleink @svgeesus 

I will strive to make this post as brief and succinct as possible _(I'll fail, but the thought is there)._

## My position:

**A)** "Best available" when discussing human perception is intangible. And in general, this approach leads to ambiguity, so IMO **A** is a bad idea.

**B)** I am already on the record for my objection here.

**C)** In the future, this will "probably" be necessary in conjunction with the use of multiple different display color spaces, as HDR and SDR, and color spaces like Rec2020 have distinctly different needs here, not just for accessibility, but for all sighted users.

**D)** Of the four listed, I'd say this one, but wait there's more...

**E)** I was going to suggest a different **E** option than Sebastian, as I was under the understanding that color-contrast() was being moved to CSS 6, and I'd expect (hope) WCAG 3 would be moving to recommendation by then.

But there is something not mentioned here, that I have mentioned in the past elsewhere, and this is probably a good time to discuss. Let's call it option **DE** .... **∆E** if you like _(itty bitty pun intended)._

**The gist is:** Per **D**, default to a WCAG 3 specification when adopted, but in the interim _independently_ fast-track the candidate method which has been developed in conjunction with the Visual Contrast Subgroup of Silver/WCAG 3 for three years, has been in public beta over a year, and is already being adopted in beta with tools being developed and used, and has received generally positive feedback from early adopters, and [positive third party reviews](https://git.myndex.com/#apca-peer-review--third-party-discussion).

## _Background and Supporting Arguments_
### WICG Incubator Proposal
A couple months ago, I floated [this proposal in the incubator.](https://github.com/WICG/proposals/issues/55) The purpose as stated in that post relates directly to the conundrum we face today. It was inspired in part by the assertion by some accessibility advocates that _"visual contrast is not the important part of accessibility"_. Without delving into the veracity of this assertion (which I generally disagree with) let's consider the utility of a separate set of guidelines which include non-normative but useful design guidance, and which are intended ultimately to be a superset of (and incorporating) any adopted normative guidance.

### Hey Normative
Normative standards tend to gravitate to a minimum acceptable level for the "shall" or "must" and ideally also include a "should" or "preferred". An example is the related ISO standard: "shall" be at least 3:1 but "should" be 10:1, on the other hand, the NIST guide on voting systems states "Luminance contrast must be at least 10:1"¹. These figures are using different math than WCAG 2, so the values are relatively different, nevertheless all including WCAG 2 will progressively over-report as the lightest color gets darker than ` #ffffff `.

A useable metric that is perceptually uniform over the visual range has been a challenge historically, as Dr. Arditi mentions in his 2017 paper "Rethinking ADA Signage"² where he questions the use of contrast as a normative metric at all. Congress removed math-based contrast specifications from the ADA signage requirement, at one point it used Weber though now it's simply "text must contrast against the background" with no actual specified contrast. Around the world there are a few contrast maths being used for signage, ranging from questionable to bizarre. The problem is the vast uncontrollable ambient lighting in the environment and the effects on light adaptation, makes a reasonable standard for architectural signage very challenging.

The problem of visual contrast of text and non-text graphics on self-illuminated monitors is a much smaller problem, with a reasonable solution for the reason that adaptation is substantially affected by the self-illuminated display itself. This opens the door for reasonable estimations and points to some best practices that can become actionable with reasonable normative guidelines.

Still, normative guidelines will usually prefer a set of simple minimums that are testable. But designers and developers, particularly those developing design systems, will want more complete guidance, beyond normative minimums and more in tune with best practices. 

### The Spectrum of Reading
The thing is, visual contrast for readability is a spectrum, where _"how readable does it need to be for what it is"_ is a completely valid question, and in fact an important question. The copyright bug on the side of an image does not need the same size and contrast as a column of main content body text. And the copyright bug _SHOULD_ be at a much lower contrast to be unobtrusive. 

A well designed visual hierarchy requires contrast modulation, and I include in that all forms of contrast, not just luminance and color, but contrasts of size, contrasts of position, contrasts of shape, etc. But it is challenging to make such a wide swath of metrics normative without also including so many exceptions as to make the normative part less that instructive. Nevertheless, there needs to be actionable guidance, and it is an open discussion as to where the conformance to a normative standard best lay; such a standard will always be a subset of the grand scheme fo design guidance.


## Accessible For All
The spectrum of human perception is as wide as the human experience itself. The WHO has reported the median vision worldwide at 20/40, a reality for non-industrialized nations without access to affordable eye care. In industrialized nations, 20/20 is a commonly considered standard vision: but that is not "perfect" vision. Perfect vision is more along the lines of 20/12 to 20/16 (the world record for a human is 20/09, eagles are around 20/04). And over the course of a year or two, someone using glasses may have a shift from 20/20 to 20/30 before getting a new refraction.

The majority of people have less than _standard_ eye sight, and even fewer have anything close to "perfect" eyesight. Youth don't reach peak contrast sensitivity until age 20, and a mere 25 years later, presbyopia sets in and reading glasses are required. Another 15 years after that, and the toll of aging drags visual function ever downward.

### _Readability is for ALL, and ALL have user needs._ 
Guidelines for readability-for-all can arguably exist as an advisory superset that includes or references normative guidelines. In fact one could argue that leading as an advisory set paves the way to better and more useful normative guidelines in the future.


Thank you for reading,

Andy


[1] Maureen Stone    NISTIR 7537
Guidelines for Using Color in Voting Systems
National Institute of Standards and Technology

[2] Aries Arditi
Rethinking ADA signage standards for low-vision accessibility.
Journal of Vision 2017;17(5):8. doi: https://doi.org/10.1167/17.5.8.


-- 
GitHub Notification of comment by Myndex
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7361#issuecomment-1159620488 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 19 June 2022 05:25:57 UTC