Skip to content

Commit 00362d2

Browse files
author
Jihye Hong
committed
Modify the description
* Remove unnecessary code lines in the example * Rename the id of the heading
1 parent 124e105 commit 00362d2

File tree

1 file changed

+4
-22
lines changed

1 file changed

+4
-22
lines changed

css-nav-1/Overview.bs

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,7 @@ follow the following steps:
11321132
<h2 id=declarative>
11331133
Controlling spatial navigation through declarative means</h2>
11341134

1135-
<h3 id=container>
1135+
<h3 id=css-property-spatialnavigationcontain>
11361136
Creating additional spatial navigation containers: the 'spatial-navigation-contain' property</h3>
11371137

11381138
<pre class='propdef'>
@@ -1250,7 +1250,7 @@ Note: the 'spatial-navigation-contain' property is <a>at-risk</a>.
12501250

12511251
</div>
12521252

1253-
<h3 id=container>
1253+
<h3 id=css-property-spatialnavigationaction>
12541254
Defining the spatial navigation behavior : the 'spatial-navigation-action' property</h3>
12551255

12561256
<pre class='propdef'>
@@ -1273,10 +1273,7 @@ the proper spatial navigation behavior.
12731273
Else, the focus moves to the candidates in the viewport.
12741274

12751275
<dt><dfn>focus</dfn>
1276-
<dd>If the element is a <a>scroll container</a>,
1277-
then directional input moves the focus to the candidates(visible or not). The user cannot manually scroll the container.
1278-
1279-
Else, the focus moves to the candidates in the viewport.
1276+
<dd>The directional input moves the focus to the candidates(visible or not). The user cannot manually scroll the container.
12801277

12811278
NOTE: If the 'focus' value is given to 'spatial-navigation-action', 'navnotarget' event occurs
12821279
when there isn’t any visible candidate in the spatial navigation container no matter what it can be scrolled more or not.
@@ -1294,7 +1291,7 @@ Pressing the down arrow key moves the focus directly to it without scrolling man
12941291

12951292
<figure>
12961293
<img alt="" src="images/spatnav-action.png" style="width: 500px;"/>
1297-
<figcaption>Moving focus to the element without manually scrolling</figcaption>
1294+
<figcaption>Moving focus to "Box 3" from "Box 2" without manually scrolling</figcaption>
12981295
</figure>
12991296

13001297
<pre><code highlight=markup>
@@ -1323,21 +1320,6 @@ Pressing the down arrow key moves the focus directly to it without scrolling man
13231320
background-color: red;
13241321
}
13251322
</code></pre>
1326-
<pre><code highlight=js>
1327-
let container = document.getElementById('feed');
1328-
let currentTarget = document.activeElement;
1329-
1330-
container.addEventListener('navnotarget', function(e) {
1331-
e.preventDefault();
1332-
1333-
let nextFocus = currentTarget.spatialNavigationSearch({
1334-
dir: e.dir,
1335-
this.focusableAreas({'mode': 'all'})
1336-
});
1337-
1338-
nextFocus.focus();
1339-
});
1340-
</code></pre>
13411323

13421324
</div>
13431325

0 commit comments

Comments
 (0)