You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-nav-1/Overview.bs
+14-17Lines changed: 14 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -117,16 +117,16 @@ This ability to move around the page directionally is called <dfn lt="spatial na
117
117
<a>Spatial navigation</a> can be useful for a web page built using a grid-like layout,
118
118
or other predominantly non linear layouts.
119
119
The figure below represents a photo gallery arranged in a grid layout.
120
-
If the user presses the <code class=key>Tab</code> key to move focus around the images,
120
+
If the user presses the <code class=key>Tab</code> key to move focus around the images,
121
121
they need to press the key many times to reach the desired image element.
122
122
123
123
<figure>
124
124
<img alt="When elements are laid out in a grid pattern, spatial navigation makes it much easier to predict and control where focus should move to." src="images/gallery-app.png" style="width: 500px;"/>
125
125
<figcaption>Photo gallery application example using a grid layout</figcaption>
126
126
</figure>
127
127
128
-
Also, <a>spatial navigation</a> moves the focus to the predictable element for users
129
-
because it moves the focus among focusable elements depending on their position.
128
+
Also, <a>spatial navigation</a> moves the focus to the predictable element for users
129
+
because it moves the focus among focusable elements depending on their position.
130
130
Sometimes elements on the page aren’t arranged independently of their source order.
131
131
Therefore unlike <a>spatial navigation</a>, sequential navigation using the <code class=key>Tab</code> key makes focus navigation unpredictable.
132
132
@@ -219,9 +219,7 @@ the elements that are reachable by sequential navigation
219
219
and by spatial navigation are almost the same.
220
220
Elements that are currently outside of the viewport of a scrollable element
221
221
can only be reached by spatial navigation once they have been scrolled into view.
222
-
Therefore, elements that cannot be scrolled into view
223
-
(for example because they are placed at a negative offset)
224
-
cannot be reached by spatial navigation.
222
+
Therefore, elements that cannot be scrolled into view by default.
225
223
226
224
<div class=api>
227
225
At key points during this search for the appropriate response to the spatial navigation request,
@@ -321,10 +319,9 @@ This intentionally left for User Agents to decide.
321
319
will use spatial navigation as their primary or exclusive navigation mechanism.
322
320
</div>
323
321
324
-
Although it is possible for User Agents
325
-
to implement the processing model and APIs defined by the specification
326
-
without giving any direct means to the user to trigger spatial navigation themselves,
327
-
this specification recommends not to do so:
322
+
Although User Agents can implement the processing model and APIs
323
+
defined by the specification,
324
+
this specification recommends that
328
325
User Agents should offer a means for users to trigger spatial navigation directly,
329
326
without having to use the APIs.
330
327
@@ -623,10 +620,10 @@ This event occurs when there is a valid result of <a>selecting the best candidat
623
620
624
621
The User Agent <dfn lt="dispatches navbeforefocus event | dispatching navbeforefocus event">dispatches <a event>navbeforefocus</a> event</dfn>
625
622
before spatial navigation moves the focus.
626
-
The <a>event target</a> is the element which has focus and
623
+
The <a>event target</a> is the element which has focus and
627
624
the {{NavigationEvent/relatedTarget}} is the element which is about to receive focus.
628
625
629
-
If <a>navigation-override</a> is disabled in the [=node document=] of <var>eventTarget</var> for
626
+
If <a>navigation-override</a> is disabled in the [=node document=] of <var>eventTarget</var> for
630
627
the <a spec=html for="/">origin</a> of the [=active document=] of the [=top-level browsing context=], this event won't be dispatched.
631
628
632
629
<div class='example'>
@@ -733,10 +730,10 @@ when it cannot be scrolled further.
733
730
</table>
734
731
735
732
The User Agent <dfn lt="dispatches navnotarget event | dispatching navnotarget event">dispatches <a event>navnotarget</a> event</dfn>
736
-
with initializing the <a>event target</a> as the element which has focus and
733
+
with initializing the <a>event target</a> as the element which has focus and
737
734
the {{NavigationEvent/relatedTarget}} as <a>spatial navigation container</a> of the <a>event target</a>.
738
735
739
-
If <a>navigation-override</a> is disabled in the [=node document=] of <var>eventTarget</var> for
736
+
If <a>navigation-override</a> is disabled in the [=node document=] of <var>eventTarget</var> for
740
737
the <a spec=html for="/">origin</a> of the [=active document=] of the [=top-level browsing context=], this event won't be dispatched.
741
738
742
739
<div class='example'>
@@ -1024,9 +1021,9 @@ To run the <dfn>spatial navigation steps</dfn> in <var>direction</var>, do the f
1024
1021
<span class=cssapi>if computed value of the 'spatial-navigation-action' property on <var>eventTarget</var>
1025
1022
is ''spatial-navigation-action/focus'' or to <code>true</code> otherwise.
1026
1023
</span>
1027
-
2.
1024
+
2.
1028
1025
<ul>
1029
-
<span class=cssapi><li>If
1026
+
<span class=cssapi><li>If
1030
1027
the computed value of the 'spatial-navigation-action' property on <var>eventTarget</var> is not ''spatial-navigation-action/focus''
1031
1028
and <var>eventTarget</var><a>can be manually scrolled</a>,
1032
1029
then <a>directionally scroll the element</a><var>eventTarget</var> in <var>direction</var> and return.</li></span>
@@ -1204,7 +1201,7 @@ run the following steps:
1204
1201
* bottom edge is above the bottom edge of <var>searchOrigin</var>'s <a>boundary box</a> if <var>dir</var> is {{SpatialNavigationDirection/up}}
1205
1202
* right edge is left of the right edge of <var>searchOrigin</var>'s <a>boundary box</a> if <var>dir</var> is {{SpatialNavigationDirection/left}}
1206
1203
* left edge is right of the left edge of <var>searchOrigin</var>'s <a>boundary box</a> if <var>dir</var> is {{SpatialNavigationDirection/right}}
1207
-
1204
+
1208
1205
NOTE: More detail condition about how the element is overlapped with the search origin affects the sequence of focus movement.
1209
1206
The sequence of focus movement is related to UX, so it depends on the UA-defined mechanism.
0 commit comments