@@ -199,32 +199,31 @@ next time spatial navigation in the same direction is requested.
199
199
If the <a>spatial navigation focus container</a> cannot be scrolled,
200
200
either because it is not a scrollable element
201
201
or because it is already scrolled to the maximum in that direction,
202
- the User Agent will select the next <a>spatial navigation focus container</a> up the ancestry chain,
203
- and repeat the process of
204
- looking for eligible focus targets,
205
- selecting the best one if there's any,
206
- scrolling if not,
207
- going up the ancestry chain if it cannot scroll,
208
- until it has either moved focus,
209
- scrolled,
210
- or reached the root.
211
-
212
- Note: As a consequence of this processing model,
202
+ the User Agent will select the next <a>spatial navigation focus container</a> up the ancestry chain.
203
+
204
+ The process of looking for an eligible focus target and
205
+ if there is any, then move the focus,
206
+ else if the <a>spatial navigation focus container</a> can be scrolled, then scroll,
207
+ otherwise, going up to the next container
208
+ is repeated until the ancestry chain reaches the root element.
209
+
210
+ <div class=note>
211
+ NOTE: As a consequence of this processing model,
213
212
the elements that are reachable by sequential navigation
214
213
and by spatial navigation are almost the same:
215
- elements that are currently outside of the viewport of a scrollable element
216
- can only be reached once they have been scrolled into view,
217
- and those that cannot be scrolled into view,
218
- for instance because they are placed at a negative offset,
219
- are out of reach.
214
+ * Elements that are currently outside of the viewport of a scrollable element
215
+ can only be reached once they have been scrolled into view
216
+ * Elements that cannot be scrolled into view.
217
+ For instance, those are out of reach because they are placed at a negative offset.
218
+ </div>
220
219
221
220
<div class=api>
222
221
At key points during this search for the appropriate response to the spatial navigation request,
223
222
the User Agent will fire events.
224
223
These enable authors to prevent the upcoming action
225
224
(by calling {{preventDefault()}} ),
226
225
and if desired to provide an alternate action,
227
- such as using calling the {{HTMLOrSVGElement/focus()}} method on a different
226
+ such as using the {{HTMLOrSVGElement/focus()}} method on a different
228
227
element of the author's choosing.
229
228
230
229
To help authors write such alternate actions,
@@ -251,7 +250,7 @@ and [[#js-api]] for details about the JavaScript API.
251
250
</figure>
252
251
253
252
On the left of figure 2, "Box 2" is focused.
254
- Pressing the <code class=key> ArrowDown</code> key moves focus to
253
+ Pressing the <code class=key> ArrowDown</code> key moves the focus to
255
254
"Box 3" without scrolling because "Box 3" is visible in the <a>scrollport</a> of the <a>spatial navigation focus container</a> .
256
255
257
256
<figure>
@@ -880,7 +879,7 @@ The <a>navigation-override</a> [=policy-controlled feature=]</h2>
880
879
881
880
Note: This is to prevent a hostile iframe from using these events
882
881
in order to highjack the focus.
883
- We recognize that there exists other mechanisms predating spatial navigation
882
+ We recognize that there exist other mechanisms predating spatial navigation
884
883
that malicious authors could use
885
884
to interfere with the user's ability to control where the focus goes.
886
885
Despite that, it seems worthwhile to attempt not to increase this attack surface,
0 commit comments