[csswg-drafts] [mediaqueries-5] prefers-contrast: infer contrast preference from forced colors (#5224)

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

== [mediaqueries-5] prefers-contrast: infer contrast preference from forced colors ==
As discussed in #2943 and #3856 at the moment there is limited OS level support for detecting when `high` or `low` contrast is preferred in the [prefers-contrast media query](https://drafts.csswg.org/mediaqueries-5/#prefers-contrast). When colors are being forced, an additional way to detect these preferences might be to compare the [contrast ratio](https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef) of the forced background color and text color.

Threshold values could be taken from the [Web Content Accessibility Guidelines](https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast). For example, a contrast ratio below 4.5:1 (the lowest allowed contrast for AA text) would toggle `low` for the media query and a contrast ratio at or above 7:1 (lowest for AAA text) would toggle `high`.

This would interpolate well with existing extensions and otherwise that try and make websites high/low contrast by forcing colors on webpages.

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

Received on Tuesday, 16 June 2020 22:57:26 UTC