W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2017

[csswg-drafts] [mediaqueries-5] detect keyboard navigation abilities

From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
Date: Fri, 27 Oct 2017 07:54:22 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-269018193-1509090860-sysbot+gh@w3.org>
frivoal has just created a new issue for https://github.com/w3c/csswg-drafts:

== [mediaqueries-5] detect keyboard navigation abilities ==
If `@media (pointer)`  (or `@media (any-pointer)`) evaluates to false, presumably the user is using some sort of keyboard input or similar, and pressing tab (or similar) to navigate the focusable elements in the page. Complex layouts are tedious to navigate this way, so in such situations, authors may want to switch to a simpler, linear design.

However, even if there's no pointer, if the user does have a device that is capable of spatial navigation (as discussed in https://drafts.csswg.org/css-ui-4/#nav-dir or https://github.com/lgeweb/spatial-navigation), then using a complex layout may be fine.

There's currently no media feature enabling authors to detect that.

Proposal for a new media feature:

`nav: none | sequential | spatial` (or `key-navigation` instead of `nav` if we want to be verbose)

`@media (nav: sequential)` is true if the user has a tab key or equivalent mechanism
`@media (nav: spatial)` is true if the user can navigate with arrow keys

Both can be true at the same time if the device matches.

cc @tabatkins @jihyerish 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1911 using your GitHub account
Received on Friday, 27 October 2017 07:54:25 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:19 UTC