Skip to content

Commit c110050

Browse files
author
Jihye Hong
authored
Merge pull request w3c#13 from frivoal/api-note
Add note about the APIs
2 parents 1ca2c48 + 007edd9 commit c110050

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

index.bs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,10 @@ before going up the tree to search in the nearest ancestor <a>spatnav container<
627627
<h2 id="js-api">
628628
Javascript API</h2>
629629

630+
Note: These APIs are designed to be low level constructs following the processing model closely.
631+
As such, they should be easy to use by authors who want to extend or override the way spatial navigation works.
632+
More user-friendly and higher level APIs may be considered based on use cases.
633+
630634
<pre class=idl>
631635
enum SequentialNavigationDirection {
632636
"forward",

index.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,6 +1178,7 @@
11781178
</style>
11791179
<meta content="Bikeshed version 166744eb86a34dbc5493268ea410dc65275aa964" name="generator">
11801180
<link href="http://wicg.github.io/spatial-navigation" rel="canonical">
1181+
<meta content="1ca2c48113d259dab3fd4bad8029e8bf38fb44ac" name="document-revision">
11811182
<style>
11821183
code.key {
11831184
border: solid 1px;
@@ -1623,8 +1624,8 @@ <h2 class="non-normative heading settled" data-level="3" id="overview"><span cla
16231624
such as using calling the <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/interaction.html#dom-focus" id="ref-for-dom-focus">focus()</a></code> method on a different
16241625
element of the author’s choosing.</p>
16251626
<p>See <a href="#events-nav-type">§5.2 Navigation Event Types</a> for details about the various events.</p>
1626-
<div class="example" id="example-aa5bea16">
1627-
<a class="self-link" href="#example-aa5bea16"></a> In this example, a series of elements are arranged in the <a data-link-type="dfn" href="#spatial-navigation-focus-container" id="ref-for-spatial-navigation-focus-container⑤">spatial navigation focus container</a>.
1627+
<div class="example" id="example-75e2aca1">
1628+
<a class="self-link" href="#example-75e2aca1"></a> In this example, a series of elements are arranged in the <a data-link-type="dfn" href="#spatial-navigation-focus-container" id="ref-for-spatial-navigation-focus-container⑤">spatial navigation focus container</a>.
16281629
This example allows the arrow keys to move focus among elements within a scrollable <a data-link-type="dfn" href="#spatial-navigation-focus-container" id="ref-for-spatial-navigation-focus-container⑥">spatial navigation focus container</a> using the <a class="property" data-link-type="propdesc" href="#propdef-spatial-navigation" id="ref-for-propdef-spatial-navigation">spatial-navigation</a> property.
16291630
<figure>
16301631
<img alt="An image about enabling spatnav using active value" src="images/scroll-spatnav1.png" style="width: 200px;"> <img alt="An image about enabling spatnav using active value" src="images/scroll-spatnav2.png" style="width: 200px;">
@@ -1938,8 +1939,8 @@ <h4 class="non-normative heading settled" data-level="5.2.3" id="event-type-navn
19381939
<dd>The direction of the navigation as requested by the user
19391940
</dl>
19401941
</table>
1941-
<div class="example" id="example-8c902f79">
1942-
<a class="self-link" href="#example-8c902f79"></a> This example shows the <a href="https://www.w3.org/TR/uievents/#event-order">UI Events §event-order</a> when pressing the <code class="key">ArrowDown</code> key in the situation like the following figure.
1942+
<div class="example" id="example-dbcf5285">
1943+
<a class="self-link" href="#example-dbcf5285"></a> This example shows the <a href="https://www.w3.org/TR/uievents/#event-order">UI Events §event-order</a> when pressing the <code class="key">ArrowDown</code> key in the situation like the following figure.
19431944
<figure>
19441945
<img alt="An image about navnotarget" src="images/navnotarget-example.png" style="width: 200px;">
19451946
<figcaption>Moving focus when there isn’t any candidate in the <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scroll-container" id="ref-for-scroll-container③">scroll container</a>.</figcaption>
@@ -2028,6 +2029,9 @@ <h4 class="non-normative heading settled" data-level="5.2.3" id="event-type-navn
20282029
</pre>
20292030
</div>
20302031
<h2 class="heading settled" data-level="6" id="js-api"><span class="secno">6. </span><span class="content"> Javascript API</span><a class="self-link" href="#js-api"></a></h2>
2032+
<p class="note" role="note"><span>Note:</span> These APIs are designed to be low level constructs following the processing model closely.
2033+
As such, they should be easy to use by authors who want to extend or override the way spatial navigation works.
2034+
More user-friendly and higher level APIs may be considered based on use cases.</p>
20312035
<pre class="idl highlight def"><span class="kt">enum</span> <dfn class="nv dfn-paneled idl-code" data-dfn-type="enum" data-export="" id="enumdef-sequentialnavigationdirection"><code>SequentialNavigationDirection</code></dfn> {
20322036
<dfn class="s idl-code" data-dfn-for="SequentialNavigationDirection" data-dfn-type="enum-value" data-export="" data-lt="&quot;forward&quot;|forward" id="dom-sequentialnavigationdirection-forward"><code>"forward"</code><a class="self-link" href="#dom-sequentialnavigationdirection-forward"></a></dfn>,
20332037
<dfn class="s idl-code" data-dfn-for="SequentialNavigationDirection" data-dfn-type="enum-value" data-export="" data-lt="&quot;backward&quot;|backward" id="dom-sequentialnavigationdirection-backward"><code>"backward"</code><a class="self-link" href="#dom-sequentialnavigationdirection-backward"></a></dfn>

0 commit comments

Comments
 (0)