web-platform-tests / interop

web-platform-tests Interop project
https://wpt.fyi/interop
315 stars 28 forks source link

Preference Media Queries Privacy Concerns #515

Closed lukewarlow closed 1 year ago

lukewarlow commented 1 year ago

Description

Media Queries Level 5 introduces numerous media queries based on user preferences. While some ship cross browsers others don't and more have been proposed but not specced. This is due to perceived privacy risks, each preference query introduces new fingerprinting vectors that could be abused.

This investigation area would focus on coming up with a satisfactory solution to these privacy concerns while enabling these important accessibility features.

Rationale

I originally proposed https://github.com/web-platform-tests/interop/issues/507 but I decided an investigation proposal for solving the privacy concerns was probably a better idea.

Currently prefers-color-scheme, prefers-contrast and prefers-reduced-motion are implemented cross browser. Along with forced-colors.

inverted-colors exists in WebKit (see https://github.com/web-platform-tests/interop/issues/506), and prefers-reduced-transparency exists in Chromium.

There's also proposals for new additions such as prefers-reduced-strobing, prefers-shapes and others. Probably more that have yet to be proposed.

Investigation Roadmap

https://github.com/w3c/csswg-drafts/issues/3488 tracks the overall privacy considerations work for Media Queries Level 5.

lukewarlow commented 1 year ago

An idea I mentioned in https://github.com/web-platform-tests/interop/issues/507 and @bramus also raised in https://github.com/WebKit/standards-positions/issues/145 was to make it so UAs could by default return a "no-preference" response for media queries where it's deemed the fingerprinting risk is too high vs the perceived benefits. Then allow the user to opt in to exposing their true preferences where the user can decide the privacy trade off is worth it.

cookiecrook commented 1 year ago

FYI MQ editors: @grorg @frivoal @tabatkins @dlibby-

zcorpan commented 1 year ago

This should probably be done in the CSSWG rather than in interop.

lukewarlow commented 1 year ago

Closing to discuss further at https://github.com/w3c/csswg-drafts/issues/3488