- From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
- Date: Mon, 03 Dec 2018 07:58:50 +0000
- To: public-css-archive@w3.org
frivoal has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-nav-1] Starting point can be off-screen == --- Migrated from https://github.com/WICG/spatial-navigation/issues/129 Originally created by @hugoholgersson on *Fri, 02 Nov 2018 07:26:42 GMT* --- Even when the focused element F is off the screen, for example after `F.focus({preventScroll: true})`, spatnav uses F as starting point for distance calculations. Why is this a problem? It gives an unpredictable user experience: Imagine F being off-screen, above the visual viewport. If the user goes `up`, she probably wants to search the viewport for candidates from the bottom-most edge. (This is how spatnav would search a focused scroller.) Instead, the current spec calculates distances from the scrolled out F. The closest candidate is the focusable closest to F's position - a position the user can't see. In Chrome we've solved this by skipping off-screen starting points: when F is off-screen, we search from an edge of the first visible enclosing container of F. I've updated https://bit.ly/snav2, my vision for spatnav in Chrome, to cover this case. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3391 using your GitHub account
Received on Monday, 3 December 2018 07:58:53 UTC