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

Declarative syntax for focus looping #1

Closed
jihyerish opened this issue Oct 27, 2017 · 6 comments
Closed

Declarative syntax for focus looping #1

jihyerish opened this issue Oct 27, 2017 · 6 comments
Assignees
Labels
closed:postponed Considered relevant for a level 2 specification, but not for level 1 topic:spec type:enhancement Feature requests

Comments

@jihyerish
Copy link
Collaborator

In the initial proposal for nav-loop which specifies an ability about the focus looping, it didn't regard the looping for each axis separately.
@frivoal pointed out considering define the focus looping for each axis.

How about adding values to nav-loop for it? Something like:

nav-loop: auto | repeat | repeat-x | repeat-y | no-repeat

Each value means:

  • repeat: The spatial focus navigation loops both horizontally and vertically.
  • repeat-x: The spatial focus navigation loops only horizontally.
  • repeat-y: The spatial focus navigation loops only vertically.
  • no-repeat: The spatial focus navigation doesn't loop.

or having separate properties can be another possibility for this:

nav-loop-x: auto | repeat | no-repeat
nav-loop-y: auto | repeat | no-repeat
@jihyerish jihyerish self-assigned this Oct 27, 2017
@frivoal
Copy link
Collaborator

frivoal commented Oct 31, 2017

I suspect it may be fairly typical in a vertically scrolling document to want the focus to wrap from the left side to the right one (and vice versa), but not from the top to the bottom. The former is a convenient shortcut, but the later could be disorienting.

The suggestion by @jihyerish would address that, so I am supportive.

However, I think the API suggested in #6 could let authors build this on their own. So maybe we should do that first, and come back to this when we have more data about what authors commonly try to achieve.

@cynthia
Copy link

cynthia commented Nov 9, 2017

Vertically wrapping around seems like it would only make sense in very specific contexts (e.g. vertically laid out menus) - in a document context this just doesn't sound natural.

@frivoal
Copy link
Collaborator

frivoal commented Nov 15, 2017

Issue #6 has been closed in favor of the API of issue #2. I'm still in favor of getting that API first, experimenting with it, and coming back to this topic later.

frivoal added a commit that referenced this issue Dec 21, 2017
Modify the terminology and fix spelling errors
frivoal pushed a commit that referenced this issue Jan 1, 2018
@frivoal frivoal added the closed:postponed Considered relevant for a level 2 specification, but not for level 1 label Feb 16, 2018
@frivoal frivoal changed the title Enable x-axis only or y-axis only focus looping Declarative syntax for focus looping Feb 16, 2018
@anawhj
Copy link
Collaborator

anawhj commented Mar 5, 2018

I think nav-loop doesn't seem a primitive feature for the spatial navigation. It could be covered by the relevant events and DOM methods. If we can draw a essential use case that should use kind of 'nav-loop' property later, this issue would be able to be discussed at that time.

@jihyerish
Copy link
Collaborator Author

jihyerish commented Mar 5, 2018

@anawhj
Yes, I agree. That's the same reason for marking this issue with the label "Level 2".

@frivoal
Copy link
Collaborator

frivoal commented Mar 30, 2018

Example 7 Now covers how to add this behavior in Javascript.


Closing this issue, as we do not plan to address it from a syntax point of view in level 1 (keeping the "level 2" label, so that we can find it later).

@frivoal frivoal closed this as completed Mar 30, 2018
jihyerish pushed a commit that referenced this issue Aug 22, 2018
Merge from WICG/spartial-navigation
jihyerish pushed a commit that referenced this issue Aug 22, 2018
Fixed a bug of Enter key behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed:postponed Considered relevant for a level 2 specification, but not for level 1 topic:spec type:enhancement Feature requests
Projects
None yet
Development

No branches or pull requests

4 participants