Re: [csswg-drafts] [css-mediaqueries-5] nav-controls future proofing concerns (should each control have its own feature?) (#6785)

Fantastic, I did not realise MQs were essentially a bag of Booleans, as opposed to an enum.

Re-reading the text of that green box, I now understand what it means. But I had a totally different read of it. I think the last sentence is somewhat misleading:

> However, given that navigation back is arguably the most fundamental navigation operation, the CSS Working Group does not anticipate user interfaces with explicit navigation controls but no back button, so this problem is not expected to occur in practice.

I thought you were advising people to use `@media (nav-controls)`, but you're actually advising people to use `@media (nav-controls: back)` (but saying it probably doesn't matter).

I think this is probably bad advice. Regardless of whether the new features will generally come with a back button, `@media (nav-controls)` controlling the back button is semantically incorrect. Widespread usage of this on websites could mean that websites break in the unlikely but allowable scenario where the user agent shows another feature without a back button, creating a de facto standard where UAs effectively can't do that.

I would therefore propose two non-normative changes:

1. Remove the second (erroneous) example of using `@media (nav-controls)` to control a back button.
2. Replace the green box with some other explanatory text. e.g. "Note: This media feature can also be used in a boolean context, e.g. `@media (nav-controls)`. However, as there could be new values in a future extension of this media feature other than 'back', use of the 'nav-controls' feature in a boolean context could cause the page to incorrectly interpret some other control as a "back" button, and its usage is therefore discouraged."

Reopening for discussion.

-- 
GitHub Notification of comment by mgiuca
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6785#issuecomment-960496124 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 4 November 2021 06:41:52 UTC