Skip to content

Commit 015bc0e

Browse files
author
Jihye Hong
authored
Merge pull request w3c#4361 from jihyerish/master
[css-nav-1] Simplify the description of processing model
2 parents 53526fa + 9ddf19d commit 015bc0e

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

css-nav-1/Overview.bs

+13-8
Original file line numberDiff line numberDiff line change
@@ -972,15 +972,17 @@ To run the <dfn>spatial navigation steps</dfn> in <var>direction</var>, do the f
972972
set <var>eventTarget</var> be <a>the body element</a> if it is not <code>null</code>
973973
or to the <a>document element</a> otherwise.
974974
4.
975-
* If <var>searchOrigin</var> is <a>scroll container</a>
975+
* <span class=cssapi>If <var>searchOrigin</var> is <a>scroll container</a>
976976
and the computed value of the 'spatial-navigation-action' property on <var>searchOrigin</var> is ''spatial-navigation-action/scroll''
977977
and <var>searchOrigin</var> [=can be manually scrolled=],
978-
then [=directionally scroll the element=] <var>searchOrigin</var> and return.
979-
* Else, if <var>searchOrigin</var> is either a <a>scroll container</a> or the <a>document</a>
978+
then [=directionally scroll the element=] <var>searchOrigin</var> and return.</span>
979+
* <span class=cssapi>Else,</span> if <var>searchOrigin</var> is either a <a>scroll container</a> or the <a>document</a>
980980
1. Let <var>candidates</var> be the result of <a>finding focusable areas</a>
981981
within <var>searchOrigin</var>
982-
with the argument <var>visibleOnly</var> set to <code>false</code> if computed value of the 'spatial-navigation-action' property on <var>searchOrigin</var>
982+
with the argument <var>visibleOnly</var> set to <code>false</code>
983+
<span class=cssapi>if computed value of the 'spatial-navigation-action' property on <var>searchOrigin</var>
983984
is ''spatial-navigation-action/focus'' or to <code>true</code> otherwise.
985+
</span>
984986
2.
985987
* If <var>candidates</var> contains at least 1 item:
986988
1. Let <var>bestCandidate</var> be the result of <a>selecting the best candidate</a>
@@ -993,23 +995,26 @@ To run the <dfn>spatial navigation steps</dfn> in <var>direction</var>, do the f
993995

994996
and return if the result is <code>false</code>.</span>
995997
3. Run the <a>focusing steps</a> for <var>bestCandidate</var> and return
996-
* Else if the computed value of the 'spatial-navigation-action' property on <var>eventTarget</var> is not ''spatial-navigation-action/focus''
998+
<span class=cssapi>* Else if the computed value of the 'spatial-navigation-action' property on <var>eventTarget</var> is not ''spatial-navigation-action/focus''
997999
and <var>eventTarget</var> <a>can be manually scrolled</a>,
998-
then <a>directionally scroll the element</a> <var>eventTarget</var> in <var>direction</var> and return.
1000+
then <a>directionally scroll the element</a> <var>eventTarget</var> in <var>direction</var> and return.</span>
9991001
* Else, fallback to the next step.
10001002
* Else, fallback to the next step.
10011003
5. Let <var>container</var> be the nearest ancestor of <var>eventTarget</var> that is a <a>spatial navigation container</a>.
10021004
6. <i>Loop</i>: Let <var>candidates</var> be the result of <a>finding focusable areas</a>
10031005
within <var>container</var>
10041006
with the argument <var>visibleOnly</var> set to <code>false</code>
1007+
<span class=cssapi>
10051008
if computed value of the 'spatial-navigation-action' property on <var>container</var> is ''spatial-navigation-action/focus''
10061009
or to <code>true</code> otherwise,
10071010
excluding <var>searchOrigin</var>
1011+
</span>
10081012
7. If <var>candidates</var> is empty:
1009-
* If the computed value of the 'spatial-navigation-action' property on <var>container</var> is not ''spatial-navigation-action/focus''
1013+
* <span class=cssapi>If the computed value of the 'spatial-navigation-action' property on <var>container</var> is not ''spatial-navigation-action/focus''
10101014
and <var>container</var> is a <a>scroll container</a> that <a>can be manually scrolled</a>,
10111015
<a>directionally scroll the element</a> <var>container</var> in <var>direction</var> and return.
1012-
* Else,
1016+
</span>
1017+
* <span class=cssapi>Else,</span>
10131018
1. If <a>navigation-override</a> <a>is enabled</a> in the [=node document=] of <var>eventTarget</var> for the <a spec=html for="/">origin</a> of the [=active document=] of the [=top-level browsing context=], then
10141019
<span class=api><a>fire an event</a> named <a event>navnotarget</a> at <var>eventTarget</var> using {{NavigationEvent}} with:
10151020
* {{NavigationEvent/dir}} set to <var>direction</var>

0 commit comments

Comments
 (0)