Skip to content

Commit 9ef245b

Browse files
author
Jihye Hong
committed
Change the description about low level APIs
1 parent 184b7b0 commit 9ef245b

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

css-nav-1/Overview.bs

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ enum FocusableAreaSearchMode {
451451
"all"
452452
};
453453

454-
dictionary FocusableAreasOptions {
454+
dictionary FocusableAreasOption {
455455
FocusableAreaSearchMode mode;
456456
};
457457

@@ -463,8 +463,8 @@ dictionary SpatialNavigationSearchOptions {
463463

464464
partial interface Element {
465465
Node getSpatialNavigationContainer();
466-
sequence<Node> focusableAreas(optional FocusableAreasOptions arg);
467-
Node? spatialNavigationSearch(SpatialNavigationSearchOptions arg);
466+
sequence<Node> focusableAreas(optional FocusableAreasOption option);
467+
Node? spatialNavigationSearch(SpatialNavigationSearchOptions options);
468468
};
469469
</pre>
470470

@@ -475,19 +475,20 @@ More directional keywords or a numerical angle could be added.
475475
Note: the {{focusableAreas()}} and {{getSpatialNavigationContainer()}} methods are <a>at-risk</a>.
476476

477477
<div algorithm="getSpatialNavigationContainer steps">
478-
The {{Element/getSpatialNavigationContainer()}} method must follow these steps:
478+
: <dfn method for=Element lt="getSpatialNavigationContainer()">{{Element/getSpatialNavigationContainer()}}</dfn>
479+
:: Follows these steps:
479480
1. Return the element if it is a <a>spatial navigation container</a>,
480481
or the nearest ancestor of the element that is a <a>spatial navigation container</a>,
481482
or the <a>document</a> if the nearest <a>spatial navigation container</a> is the viewport.
482-
483483
</div>
484484

485485
<div algorithm="focusableAreas steps">
486-
The {{Element/focusableAreas()}} method must follow these steps:
486+
: <dfn method for=Element lt="focusableAreas(option)">focusableAreas(<var>option</var>)</dfn>
487+
:: Follows these steps:
487488
1. Let <var>visibleOnly</var> be <code>false</code>
488-
if the argument's {{FocusableAreasOptions/mode}} attribute is present and equal to <code>'all'</code>,
489+
if <var>option</var> is present and it's value is equal to <code>'all'</code>,
489490
or <code>true</code> otherwise.
490-
2. Let <var>areas</var> be the result of <a>finding focusable areas</a> within the element with the <var>visibleOnly</var> argument.
491+
2. Let <var>areas</var> be the result of <a>finding focusable areas</a> within the element with the <var>visibleOnly</var>.
491492
3. Let <var>anchors</var> be a <a for=list>clone</a> of <var>areas</var>,
492493
with every <a>focusable area</a> which is not itself a <a>Node</a> replaced with its <a>DOM anchor</a>.
493494
4. Return <var>anchors</var>
@@ -523,12 +524,13 @@ The {{Element/focusableAreas()}} method must follow these steps:
523524
</div>
524525

525526
<div algorithm="spatialNavigationSearch steps">
526-
The {{Element/spatialNavigationSearch()}} method must follow these steps:
527-
1. Let <var>direction</var> be the argument's {{SpatialNavigationSearchOptions/dir}} attribute.
528-
2. If the argument's {{SpatialNavigationSearchOptions/candidates}} attribute is not <code>null</code>,
529-
then let <var>areas</var> be that attribute.
527+
: <dfn method for=Element lt="spatialNavigationSearch(options)">spatialNavigationSearch(<var>options</var>)</dfn>
528+
:: Follows these steps:
529+
1. Let <var>direction</var> be the value of {{SpatialNavigationSearchOptions/dir}} attribute from <var>options</var>.
530+
2. If the value of {{SpatialNavigationSearchOptions/candidates}} attribute from <var>options</var> is not <code>null</code>,
531+
then let <var>areas</var> be the corresponding value.
530532
3. Else, let <var>container</var> be
531-
* the argument's {{SpatialNavigationSearchOptions/container}} attribute, if it is not <code>null</code>,
533+
* the value of {{SpatialNavigationSearchOptions/container}} attribute from <var>options</var>, if it is not <code>null</code>,
532534
* the element's nearest <a>spatial navigation container</a> ancestor, otherwise.
533535
4. Let <var>areas</var> be the result of <a>finding focusable areas</a> within <var>container</var>.
534536
3. Return the result of <a>selecting the best candidate</a> within <var>areas</var> in direction <var>direction</var> from the element.

0 commit comments

Comments
 (0)