The Web Preference API aims to provide a way for sites to override the value for a given user preference (e.g. color-scheme preference) in a way that fully integrates with existing Web APIs.
Currently, website authors have a choice when wishing to honour a user's preference for a given setting. They can choose to "use the platform" where the user must indicate their preference via their OS or, if lucky, they can override in the browser. This comes with a number of issues: - Relies on the user's OS or browser offering the ability to change the setting - Relies on the user knowing how to change the setting in their OS or browser - No ability to override the setting for a specific site - No ability to sync preferences for a site across devices Alternatively, sites can and do offer site-level settings, but this currently comes with a number of issues: - No integration with CSS preference media queries - No integration with conditional resource loading (e.g. using <source media="(prefers-contrast: more)">) - No integration with JS APIs for retrieval of these preferences (e.g. matchMedia) - No integration with User Preference Client Hints - No integration with the color-scheme CSS property - The various client storage mechanisms that could store these preferences can be cleared in a number of scenarios The Web Preferences API aims to solve this by providing a way for sites to indicate a user preference for a given pre-defined setting.
None
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
None
No milestones specified