Skip to content

Commit 3a1c93b

Browse files
author
Jihye Hong
committed
[css-nav-1] Modify spatialNavigationSearch with more detail
1 parent 3fb0de2 commit 3a1c93b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

css-nav-1/Overview.bs

+8-4
Original file line numberDiff line numberDiff line change
@@ -534,10 +534,14 @@ the User Agent must run the steps described below:
534534
: <dfn method for=Element lt="spatialNavigationSearch(options)">spatialNavigationSearch(<var>dir</var>, <var>options</var>)</dfn>
535535
::
536536
1. Let <var>direction</var> be the value of <var>dir</var>.
537-
2. Let <var>container</var> be the the value of {{SpatialNavigationSearchOptions/container}} attribute of <var>options</var>
538-
if it is not <code>null</code>, the element's nearest <a>spatial navigation container</a> ancestor otherwise.
539-
3. Let <var>areas</var> be the value of {{SpatialNavigationSearchOptions/candidates}} attribute of <var>options</var>
540-
if it is not <code>null</code>, result of <a>finding focusable areas</a> within <var>container</var> otherwise.
537+
2. Let <var>container</var> be
538+
* if the value of {{SpatialNavigationSearchOptions/container}} attribute of <var>options</var> is not null,
539+
* itself, if it is <a>sptial navigation container</a>.
540+
* its nearest <a>spatial navigation container</a> ancestor, otherwise.
541+
* else the element's nearest <a>spatial navigation container</a> ancestor.
542+
3. Let <var>areas</var> be
543+
* the value of {{SpatialNavigationSearchOptions/candidates}} attribute of <var>options</var> if it is not <code>null</code>,
544+
* result of <a>finding focusable areas</a> within <var>container</var> otherwise.
541545
4. Return the result of <a>selecting the best candidate</a> among <var>areas</var> within <var>container</var> in <var>direction</var> from the element.
542546

543547
Note: When neither a container nor a list of candidates is provided,

0 commit comments

Comments
 (0)