Re: [csswg-drafts] [css-color-6] `contrast-color()` MVP in Level 5 (#9166)

I’m the PM for Web UI at Chrome, my team would be implementing color contrast if it were ready. I would like to get to resolution on this issue sooner than later because it is a high priority for us this year. This is my suggestion about how we could move forward. We don’t yet know what the optimal algorithm for color contrast will be, and I believe we need to find a way to make this an iterative process, so we can start experimenting with it as soon as possible. 

TL;DR I’m proposing that we specify an MVP contrast-color() function which has a UA controlled algorithm.

We want to support both user needs and author intent in a way that is performant, usable, accessible, readable, and beautiful. An example of where we've done this by initially specifying UA control is  `text-wrap: balance`, where we started with only a couple heuristics, but plan to expand and refine over time.

Looking at this diagram, it is clear that there are a lot of cases where WCAG 2.1 can be improved on, however it may take time to find those opportunities and experiment to determine if they work.

<img width="2039" alt="PastedGraphic-1" src="https://github.com/w3c/csswg-drafts/assets/39398/bd79b390-9f4e-471e-ad93-cfae22a6a303">

If the author specifies the algorithm now, UAs won’t be able to make improvements and up-level the web. However, if we provide a basic color contrast function now, we can always allow more author control over the algorithm in the future. Going the other way around would require each site to manually upgrade, which would take a long time for users to realize the value.

An iterative, UA-first approach would also remove the burden to get everything right up front and instead move us to a more agile process. For example, we could try improvements behind a flag, effectively allowing us to see how that would affect UX across the web. 

Yes, initially this would make the property a bit less predictable for the values in the middle of that chart, but the user benefit of being able to iterate in the UA outweighs author control (just for now). I am excited to see how much better we can make contrast-color() given time and iteration. 

I propose that we: 

1. Specify an MVP contrast-color() function which has a UA controlled algorithm.
1. Follow up on issues against that algorithm that can be considered independently.
1. Begin UA experimentation on algorithm improvements
1. After we’ve discovered the most important levers in contrast from our experiments, consider exposing them to authors on a case by case basis


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


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

Received on Sunday, 6 August 2023 19:57:32 UTC