Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Needs for activating spatial navigation #35

Closed

Description

@jihyerish

I think spatial-navigation CSS property in the spec is needed for

  1. Guarantees the author to provide the page with spatial navigation.

  2. 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?

Activity

  1. frivoal commented on Mar 9, 2018

    @frivoal
    Collaborator

    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.

  2. added
    type:question
    on Mar 9, 2018
  3. self-assigned this
    on Mar 9, 2018
  4. added 2 commits that reference this issue on Mar 20, 2018
    8d6ac29
    27cdd49
  5. fantasai commented on Mar 22, 2018

    @fantasai

    Thanks~ :)

  6. added
    closed:resolved
    on Apr 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

closed:resolvedtopic:spectype:question

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions