Re: [csswg-drafts] [css-color-6] color-contrast() should take transparency into account (#7358)

## _Undeclared Colors Fail_
Under WCAG 2.x, it is a failure to specify a text color without also specifying a background color or vice versa:  https://www.w3.org/TR/2016/NOTE-WCAG20-TECHS-20161007/F24

By definition, specifying a transparency without specifying the color that transparency exists _on top of_, is the same as failing to fully specify the color at all.

This does not mean that a given element must have both a foreground and background color, it only means that at some point in the cascade an unambiguous foreground and unambiguous background color can be determined (or none).

**What is required, _is only one_ of these cases:**
- **No** colors are the default user agent.
- **All** colors are the default user agent.

### As such, any compositing operations must be completed prior to calculating the colors involved in a pairwise contrast test.

This is true under WCAG2, and I would expect it to remain true under WCAG3 as it would be a mistake for it not to be. **However it's easier said than done.** See my next post for the deeper dive.



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


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

Received on Thursday, 16 February 2023 05:42:24 UTC