Skip to content

Commit fde7c9e

Browse files
author
Jihye Hong
committed
Refine the overview section
* Refined the overview section * Fix several grammar mistakes
1 parent df20843 commit fde7c9e

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

css-nav-1/Overview.bs

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -199,32 +199,31 @@ next time spatial navigation in the same direction is requested.
199199
If the <a>spatial navigation focus container</a> cannot be scrolled,
200200
either because it is not a scrollable element
201201
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,
213212
the elements that are reachable by sequential navigation
214213
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>
220219

221220
<div class=api>
222221
At key points during this search for the appropriate response to the spatial navigation request,
223222
the User Agent will fire events.
224223
These enable authors to prevent the upcoming action
225224
(by calling {{preventDefault()}}),
226225
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
228227
element of the author's choosing.
229228

230229
To help authors write such alternate actions,
@@ -251,7 +250,7 @@ and [[#js-api]] for details about the JavaScript API.
251250
</figure>
252251

253252
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
255254
"Box 3" without scrolling because "Box 3" is visible in the <a>scrollport</a> of the <a>spatial navigation focus container</a>.
256255

257256
<figure>
@@ -880,7 +879,7 @@ The <a>navigation-override</a> [=policy-controlled feature=]</h2>
880879

881880
Note: This is to prevent a hostile iframe from using these events
882881
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
884883
that malicious authors could use
885884
to interfere with the user's ability to control where the focus goes.
886885
Despite that, it seems worthwhile to attempt not to increase this attack surface,

0 commit comments

Comments
 (0)