You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
Guarantees the author to provide the page with spatial navigation.
Activate spatial navigation to the part of the document.
For example, if there is a document with too many focusable elements, some people may don't want to navigate all of those with the arrow keys.
Therefore, the author can specify spatial-navigation: active to specific elements which he/she really wants to navigate.
But do we really need this feature in the spec?
Can we let User Agent control the activation of spatial navigation?
This point was raised by @fantasai when I was recently discussing the spec with her.
Making sure we have a clear model for spatnav is important, but whether to use it, and which UI mechanism to invoke it with is a User / UA choice, not an authoring one. UAs may use several arrow-like keys (arrows, num-pad arrows, wasd keys, joysticks...) for different things (scrolling, caret-navigation, spatial navigation...), and it is their prerogative.
By this logic, we should define the detailed processing model (and the events, and the js API... ie sections) if spatnav is triggered by key presses, but we should neither mandate that it must be activated by key presses, nor by which keys. So basically, there should only be the spatial-navigation: auto behavior.
Another argument is that an author settingspatial-navigation: active is neither a necessary nor a sufficient condition for spatnav to work well. There are plenty of pages our there whose design would work well with spatnav but do not use that property. There can also be authors who use that property despite writing a page that works poorly with spatnav. In that case, the breakage is effectively their fault, but it is breakage nonetheless.
This makes me thing that we should:
remove the spatial-navigation: auto | active and always assume the auto behavior
Give some guidance (but no requirements) to UAs as to what UI they may want to provide to invoke spatnav
Remove section 7.1, and replace with normative non-algorithmic prose about how to invoke "the navigation steps" based on whatever mechanism the UA has chosen.
Tweak the Overview section accordingly
I think the upsides are:
Significant simplification of the spec (section 7.1 is gnarly and incomplete)
More freedom for UAs to define the UI the way they want
The essential features of the spec remain unchanged
Downsides:
@supports (spatial-navigation: active) is no longer available to check if spatnav is supported. Need to think of an alternative
Maybe upside, maybe downside depending on how you look at it
Down: No way for authors to make sure that arrow keys are tied to spatial navigation /
Up: authors cannot force spatial navigation on users who prefer to arrow keys for something else
All in all, since this is strictly a subset of what's already here, that means we can always re-introduce the property later if we change our minds, so I am in favor.
Activity
frivoal commentedon Mar 9, 2018
This point was raised by @fantasai when I was recently discussing the spec with her.
Making sure we have a clear model for spatnav is important, but whether to use it, and which UI mechanism to invoke it with is a User / UA choice, not an authoring one. UAs may use several arrow-like keys (arrows, num-pad arrows, wasd keys, joysticks...) for different things (scrolling, caret-navigation, spatial navigation...), and it is their prerogative.
By this logic, we should define the detailed processing model (and the events, and the js API... ie sections) if spatnav is triggered by key presses, but we should neither mandate that it must be activated by key presses, nor by which keys. So basically, there should only be the
spatial-navigation: autobehavior.Another argument is that an author setting
spatial-navigation: activeis neither a necessary nor a sufficient condition for spatnav to work well. There are plenty of pages our there whose design would work well with spatnav but do not use that property. There can also be authors who use that property despite writing a page that works poorly with spatnav. In that case, the breakage is effectively their fault, but it is breakage nonetheless.This makes me thing that we should:
spatial-navigation: auto | activeand always assume theautobehaviorI think the upsides are:
Downsides:
@supports (spatial-navigation: active)is no longer available to check if spatnav is supported. Need to think of an alternativeMaybe upside, maybe downside depending on how you look at it
All in all, since this is strictly a subset of what's already here, that means we can always re-introduce the property later if we change our minds, so I am in favor.
Remove the spatial-navigation property
Remove the spatial-navigation property
fantasai commentedon Mar 22, 2018
Thanks~ :)