@@ -109,7 +109,7 @@ Historically, most browsers have not offered features to let the user move the f
109
109
Some, such as TV browsers, have enabled the user to move the focus using the arrow keys out of necessity,
110
110
since no other input mechanism is available on a typical TV remote control.
111
111
112
- Others, have enabled different key combinations to control spatial navigation,
112
+ Others have enabled different key combinations to control spatial navigation,
113
113
such as pressing the <code class=key> Shift</code> key together with arrow keys.
114
114
115
115
This ability to move around the page directionally is called <dfn lt="spatial navigation | spatialNavigation" export>spatial navigation</dfn> .
@@ -139,8 +139,7 @@ enabling the author to control and override how spatial navigation works.</span>
139
139
140
140
Note: Some aspects of this specification, such as the JavaScript Events and APIs
141
141
could also be extended to sequential navigation,
142
- in order to make sure that keyboard navigation in general
143
- has a consistent and well defined model.
142
+ in order to make sure that keyboard navigation has a consistent and well defined model in general.
144
143
145
144
Note: As a general principle,
146
145
keyboard navigation,
@@ -193,7 +192,7 @@ More specifically,
193
192
the User Agent will first search for visible and focusable items
194
193
in the direction indicated
195
194
within the current <a>spatial navigation container</a>
196
- (<span class=cssapi> by default </span> the root element, scrollable elements, and iframes<span class=cssapi> ,
195
+ (<span class=cssapi> by default, </span> the root element, scrollable elements, and iframes<span class=cssapi> ,
197
196
but other elements can be made into <a>spatial navigation containers</a>
198
197
using the 'spatial-navigation-contain' property</span> ).
199
198
@@ -366,8 +365,8 @@ the following requirements apply:
366
365
the text insertion caret when an editable element is focused,
367
366
the arrow keys should by default to moving the caret.
368
367
Spatial navigation would only be triggered by the arrow keys
369
- when the focused element is not editable,
370
- or when it is editable but the caret cannot move any further in the requested direction.
368
+ when the focused element is not editable
369
+ or when it is editable, but the caret cannot move any further in the requested direction.
371
370
</div>
372
371
373
372
An exception is made for scrolling:
@@ -401,7 +400,7 @@ The {{Window/navigate()}} method enables the author to trigger spatial navigatio
401
400
as if the user had done so manually
402
401
(for instance, by pressing the arrow keys in a browser where that is the way to trigger spatial navigation).
403
402
404
- Note: As this triggers the same processing model as a manual navigation,
403
+ Note: As this triggers the same processing model as manual navigation,
405
404
all the same results should be expected:
406
405
the same chain of events will be fired and
407
406
the same element will be scrolled or focused.
@@ -412,7 +411,7 @@ such as mapping to different keys,
412
411
or triggering spatial navigation from a clickable on-screen directional pad,
413
412
or in reaction to other events than UI ones.
414
413
It could also be used when an author wants to interrupt navigation to do some asynchronous operation
415
- (e.g. load more content in an infinite scroller) then resume the navigation where they cancelled .
414
+ (e.g. load more content in an infinite scroller) then resume the navigation where they canceled .
416
415
417
416
Note: This API is also useful for testing purposes,
418
417
as there it is difficult to trigger spatial navigation
@@ -536,7 +535,7 @@ the User Agent must run the steps described below:
536
535
1. Let <var> direction</var> be the value of <var> dir</var> .
537
536
2. Let <var> container</var> be
538
537
* if the value of {{SpatialNavigationSearchOptions/container}} attribute of <var> options</var> is not null,
539
- * itself, if it is <a>sptial navigation container</a> .
538
+ * itself, if it is <a>spatial navigation container</a> .
540
539
* its nearest <a>spatial navigation container</a> ancestor, otherwise.
541
540
* else the element's nearest <a>spatial navigation container</a> ancestor.
542
541
3. Let <var> areas</var> be
@@ -1114,6 +1113,8 @@ If the status of <var>focus target</var> changed not by moving the focus,
1114
1113
3. If <var> focus target</var> is completely off-screen,
1115
1114
then let <var> searchOrigin</var> be the viewport of <var> focus target</var> 's nearest visible <a>spatial navigation container</a> .
1116
1115
1116
+ NOTE: The User Agent should <a>update the search origin</a> , for example,
1117
+ when the focused element was scrolled out by mouse scrolling or vanished from the viewport.
1117
1118
</div>
1118
1119
1119
1120
<div algorithm="to find focusable areas">
@@ -1140,7 +1141,7 @@ run the following steps:
1140
1141
Except for elements that are in the currently non visible part of a scroller,
1141
1142
spatial navigation does not automatically exclude
1142
1143
elements which cannot be clicked on,
1143
- for example due to being obscured by some other element.
1144
+ for example, due to being obscured by some other element.
1144
1145
To avoid breaking assumptions in
1145
1146
the application logic if a user actually focuses and activates such an element,
1146
1147
and to avoid confusing users by focusing invisible or apparently unreachable elements,
@@ -1292,14 +1293,14 @@ The meaning of each term is as follows:
1292
1293
</dl>
1293
1294
1294
1295
Note: This general formula was picked from several plausible alternatives,
1295
- based on which one most often match intuition
1296
+ based on which one most often matches intuition
1296
1297
when used to select the best candidate
1297
1298
in a series of <a href="https://wicg.github.io/spatial-navigation/tests/ux/list.html">UX test cases</a> .
1298
1299
Similarly, the values of <var> alignWeight</var> and <var> orthogonalWeight</var>
1299
1300
were also determined experimentally based on the same test cases.
1300
1301
The resulting formula is somewhat complicated,
1301
1302
but seems to give good answers.
1302
- Suggestions on improvements or simplifications are welcome.
1303
+ Suggestions for improvements or simplifications are welcome.
1303
1304
1304
1305
</div>
1305
1306
@@ -1713,6 +1714,7 @@ The editors of this specification would like to thank the following individuals
1713
1714
* Alice Boxhall
1714
1715
* Brian Kardell
1715
1716
* Elika Etemad
1717
+ * Eric Seong
1716
1718
* Hugo Holgersson
1717
1719
* Hyojin Song
1718
1720
* Jeonghee Ahn
0 commit comments