Skip to content

[css-color-6] It should be possible to specify the contrast algorithm for color-contrast() #7356

Closed
@LeaVerou

Description

@LeaVerou

Since we know that WCAG 2.1 has huge known problems and WCAG 3.0 isn't quite ready yet, we should not ship a color-contrast() that mandates use of a broken algorithm.
Instead, the algorithm should be explicitly specified with either syntax.

Since passing levels depend on the algorithm and 4.5 in WCAG 2.1 may not be the same as 4.5 in another algorithm, I'd suggest it's specified via functions, e.g. color-contrast(white vs yellow, blue to wcag2(4.5)) or color-contrast(white vs yellow, blue to wcag2(AA))

(Issue filed following breakout discussions between @svgeesus, @fantasai, @argyleink and myself)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs Editsa11y-trackerGroup bringing to attention of a11y, or tracked by the a11y Group but not needing response.css-color-6

    Type

    No type

    Projects

    Status

    Tuesday

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions