Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needs for activating spatial navigation #35

Closed
jihyerish opened this issue Mar 9, 2018 · 2 comments
Closed

Needs for activating spatial navigation #35

jihyerish opened this issue Mar 9, 2018 · 2 comments
Assignees
Labels
closed:resolved Changes have been made based on this issue topic:spec type:question Known unknows: things we need to investigate

Comments

@jihyerish
Copy link
Collaborator

jihyerish commented Mar 9, 2018

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?

@frivoal
Copy link
Collaborator

frivoal commented 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: 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.

@frivoal frivoal added the type:question Known unknows: things we need to investigate label Mar 9, 2018
@frivoal frivoal self-assigned this Mar 9, 2018
frivoal added a commit to frivoal/spatial-navigation that referenced this issue Mar 20, 2018
Whether spatnav should get invoked from arrow keys or something else
is for the UA to decide, and we don't need (at least in this level)
to provide control over it.

This also lets us get rid of the monkey-patch on UI-Events.

Closes WICG#35

Also closes WICG#22, WICG#24, and WICG#26 (as invalid / out of scope) by
deleting the section these issues applied to.
@fantasai
Copy link

Thanks~ :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed:resolved Changes have been made based on this issue topic:spec type:question Known unknows: things we need to investigate
Projects
None yet
Development

No branches or pull requests

3 participants