[csswg-drafts] minimum-font-contrast CSS Rule (#6305)

bkimmelSQSP has just created a new issue for https://github.com/w3c/csswg-drafts:

== minimum-font-contrast CSS Rule ==
(Relocating this issue here after a suggestion from @digilou (thank you!) who caught the first one I put in the dead a11y WG.)

In short I think it would go a long way towards solving the 86% of websites with contrast failure issues if we had a CSS rule like:
```
minimum-font-contrast: 4.5, 4px;
```
Where `4.5` is the "contrast level" as defined by WCAG (which I know isn't entirely non-controversial but play along) and `4px` is the radius behind edge-of-text pixels that are adjusted (either dodging or burning them) to achieve the minimum contrast (presumably from bottom of z-order to the top).

Here's an example (very rough) where I used the new paintApi to make a kind of thing like it: https://github.com/w3c/css-houdini-drafts/issues/1042

I think this would help alleviate text contrast issues on the web because:
1) Developers would like it because it's easy to "set-and-forget" and know that your font will show up regardless of what background you put under it and how it reflows.
2) Designers would accept it because it does a "minimum" amount of damage to creative background assets as opposed to "big blocks for contrast" to keep the message readable.

Thank you for your work.


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6305 using your GitHub account


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

Received on Monday, 24 May 2021 13:57:52 UTC