Bruce Lawson's personal site

Edge Conf: notes on User Queries

Edge Conference is basically like TPAC for web developers, so there are always great hallway and pub chats sparked by the main speeches. I’ll write up the breakout session that my boss, Andreas Bovens gave on Installable Web Apps/ Progressive Apps (the jury is out on the preferred name) tomorrow, but there was another interesting conversation I was asked about, so here goes.

In the CSS breakout session (which I didn’t attend) the idea of user queries was discussed. Orde Saunders wrote it up:

The twitter pitch for user queries is: “Like media queries but for user preferences.” … With user queries there would be a number of settings available in the user agent. Presented via a settings UI these would allow users to set certain preferences that were then made available in the runtime in the way media queries provide information about the user agent.

One problem with this is the classic web dev chicken-and-egg problem. Web developers wouldn’t use it until it’s in browsers, browser makers wouldn’t add it until consumers requested it, and consumers won’t request it because they don’t know it’s (theoretically) possible.

Another problem is that most developers wouldn’t care enough to add something to stylesheets that reacted to an expressed user preference for high contrast like this:

@user (contrast: high) {
  background-color: white;
  color: black;
}

and consumers wouldn’t bother expressing preferences if only a handful of sites took note of them.

The proper place for acting on user preferences, I think, is in the browser rather than in the stylesheets of individual sites. We’ve seen the latter experiment in the early 2000s in which some sites gave a method of upping the font size on their sites and remembering the user choice with a cookie. But this only worked for that site. So browsers and operating systems provided a mechanism for zooming, or over-riding the author stylesheets and imposing a minimum font size for all sites.

There are many examples of this: night mode settings that reverse colours; Opera Mini’s image quality setting that will always choose the lowest-quality image, regardless of what <picture> and srcset say, in order to save bandwidth (or even download no images at all); mouse gestures for those who prefer to browse that way; settings to avoid auto-start media; extensions that spoof location to get over location-based content blocking. or block advertising. These work on all sites, regardless of whether the developer cares about user preferences.

And I declare an interest here: I work for a browser vendor and such settings are exactly the kind of personalisation and UX enhancements that we compete on, now we’ve seen the light and stopped building nonsensical proprietary web “standards” to lock users in.

2 Responses to “ Edge Conf: notes on User Queries ”

Comment by Charlie

Spot on, Bruce. I’ve spent years with clients explaining to them why they don’t need to provide font settings for their websites as it is the browser’s responsibility to do the best job of rendering their site (and everyone else’s) for the user.

It seems like only yesterday that I bought your intro to HTML5, when the subject was still new and take-up was slow. Fast-forward and people are busy making the same kind of mistakes of the early 2000s by overloading expectations and putting differentiation over interoperability. How does it go? “people who do not learn from history are determined to repeat it”.

PS
I’ll add to my quixotic list: dedicated style sheets for printing and using HTML5 form elements.

Leave a Reply

HTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> . To display code, manually escape it.