-
Notifications
You must be signed in to change notification settings - Fork 39
Basic concept of spatial navigation
Jihye Hong edited this page Sep 5, 2018
·
20 revisions
SpatNav Spec is too complicated, so we need to list up the preconditions for the spec.
- The default container is the document element of a browsing context’s document (not limited to the top-level browsing context) or a scroll container.
- Focusable elements in spatnav
- The browsing context is focusable.
- The scrollable area is focusable.
- The negative integer value of tabindex makes the element be omitted from the spatial navigation order.
- There are several elements which the tabindex focus flag be set: (https://html.spec.whatwg.org/multipage/interaction.html#specially-focusable)
- The element with tabindex=-1 is omitted from the spatial navigation order but, if there is a focusable child element, it will be included in the spatial navigation order.
- Candidates are focusable elements which are visible within the scrollport of a specific container.
- Does the spatnav container delegates focus to the element inside it?
- Do candidates need to consider the invisible focusable element within the spatnav container?
- startingPoint: The currently focused **area **of a top-level browsing context. (Searching origin)
- From the startingPoint, spatnav finds the best candidate depends on the direction.
- It can be a node or a position.
-
spatial navigation starting point: The starting point that is specified by UA.
- For example, if UA defines clicking the element can change the starting point, then the clicked element becomes
- spatial navigation focus container(a.k.a. spatnav container): The group of focusable elements which can navigate via spatnav
- Feature: The basic spatial navigation behavior supported by the browser.
-
Feature: Make the elements within a container take higher priority when searching for the best candidate.
-
Basically, the element specified with this property isn't focusable. It needs to be specified with tabindex for being a focusable element.
-
Issue
- Do we need 'delegate focus' option for the container?
-
Feature: Fire before the arrow key triggers some behavior (moving the focus, scrolling, nothing).
- Moving the focus:
navbeforefocus
- Scrolling:
navbeforescroll
- Nothing:
navnotarget
- Moving the focus:
-
Purpose
- Cover the edge cases of SpatNav heuristic
- Using
navbeforescroll
: Move the focus directly to a candidate without scrolling. (But how?)
- Using
- SpatNav customization
- Using
navnotarget
: When there is any candidate at the end of scroll, move the focus to the first element within the spatnav container. (related to the previously proposed "nav-loop")
- Using
- Cover the edge cases of SpatNav heuristic
- Feature: Find the best candidate which will gain the focus.
- Purpose
- Cover the edge cases of SpatNav heuristic
- SpatNav Navigation algorithm customization
- Apply the other spatial focus navigation algorithm. (related to the previously proposed "nav-rule")
- Is there a way to move the focus directly to the invisible focusable within the scrollable spatanv container?