Skip to content

Commit 50003fb

Browse files
author
Jihye Hong
authored
Add the description of "spatnav-container"
Add the description of "spatnav-container". Details are in http://rawgit.com/wicg/spatial-navigation/first-draft/index.html#container
1 parent 40402b5 commit 50003fb

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

explainer.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@
33

44
To support the spatial navigation in the Web, we need to develop several standard APIs. The APIs seem to be discussed with the suitable working groups in W3C (mainly in CSS WG). In this explainer page, the latest status of the spatial navigation would be summarized so that the overall progress could be tracked at a glance.
55

6-
## API for enabling the spatial navigation mode
6+
## Enabling the spatial navigation mode
77
It makes author set the spatial navigation mode. The following APIs could be considered for the possibilities to support the feature:
88

99
#### * CSS property
1010
- If the proposed property below is applied to the element, the DOM subtree rooted at the element can be managed by the spatial navigation.
1111
```css
1212
// CSS property
13-
arrow-key-behavior: auto | navigation | scroll
13+
arrow-key-behavior: auto | focus-nav
1414
```
1515
- auto: The arrow keys work as the UA-defined manner.
16-
- navigation: The arrow keys work for the spatial navigation.
17-
- scroll: The arrow keys work for scrolling.
16+
- focus-nav: The arrow keys work for the spatial navigation.
1817

19-
#### * DOM method (JS)
20-
```javascript
21-
// JavaScript
22-
setSpatialNavigationEnabled(boolean)
18+
## Establishing focus navigation containers
19+
- If the proposed property below is applied to the element, the local logical grouping is created with the DOM subtree rooted at the element.
20+
```css
21+
// CSS property
22+
spatnav-container: auto | create
2323
```
24-
- If the parameter is `true`, the spatial navigation mode is enabled.
25-
- Otherwise, the arrow keys work as the UA-defined manner.
24+
- auto: If the element is either the document element of a browsing context’s document (not limited to the top-level browsing context) or a scroll container then it establishes a spatial navigation focus container, otherwise it does not.
25+
- create: The element establishes a spatial navigation focus container.
2626

2727
## Overriding methods on top of the heuristic algorithm
2828
Developers can customize the spatial navigation with CSS properties by overriding the heuristic spatial navigation.

0 commit comments

Comments
 (0)