Skip to content

Commit

Permalink
Merge pull request w3c#1 from frivoal/first-draft
Browse files Browse the repository at this point in the history
Merge the recent update
  • Loading branch information
Jihye Hong authored Dec 22, 2017
2 parents 8d6d380 + 7e0f5ee commit 04b49dc
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 104 deletions.
30 changes: 2 additions & 28 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ without risk of interfering with other behavior.

<pre class='propdef'>
Name: arrow-key-behavior
Value: auto | mixed | focus-nav
Value: auto | focus-nav
Initial: auto
Inherited: yes
</pre>

Issue: This could also be named <code>spat-nav: auto | mixed | focus</code>,
Issue: This could also be named <code>spat-nav: auto | focus</code>,
or some other name. Bikeshedding welcome.

How spatial navigation is activated is determined by the value of the 'arrow-key-behavior' property
Expand All @@ -82,18 +82,9 @@ Does that depend on whether the selection is collapsed or not?
it is recommended that arrow keys be used for that purpose without any modifier key.
On devices with a full keyboard,
the User Agent may use a combination of arrow keys with a modifier key.
<dt><dfn>mixed</dfn>
<dd>The User Agent must trigger spatial navigation
<strong>in <a>mixed mode</a></strong>
when the user presses arrow keys.

Additionally, User Agents which allow spatial navigation to be controlled
by keys other than arrow keys without a modifier key
when the value of 'arrow-key-behavior' is auto
must continue to do so.
<dt><dfn>focus-nav</dfn>
<dd>The User Agent must trigger spatial navigation
<strong>in <a>strict mode</a></strong>
when the user presses arrow keys.

Additionally, User Agents which allow spatial navigation to be controlled
Expand All @@ -102,18 +93,6 @@ Does that depend on whether the selection is collapsed or not?
must continue to do so.
</dl>

Note: The difference between <a>strict mode</a> and <a>mixed mode</a>
is that the former only moves the focus,
while the later moves the focus if an appropriate target is visible but scrolls otherwise.
See [[#processing-model]].


Issue: do we need ''mixed''?
It sounds like a generally desirable thing,
but authors should be able to achieve the same thing
by calling preventDefault in the event handler for {{FocusNavigationEvent}}
after checking for visibility of the element to which the focus is about to move.


<h2 id="js-api">
Controlling Spatial Navigation in JavaScript</h2>
Expand Down Expand Up @@ -160,9 +139,6 @@ More directional keywords or a numerical angle could be added.
as determined by the <a>focus navigation heuristic</a>
</dl>

Issue: Should we add an additional (optional) attribute to {{FindFocusableOptions}}
to pick between ''mixed'' and ''focus-nav''?

<h2 id=processing-model>
Processing Model</h2>

Expand All @@ -187,8 +163,6 @@ The <dfn>focus navigation heuristic</dfn> determines which element should be foc
when the user invokes either spatial or sequential navigation.

Issue: Add the details. Link to HTML for the logic on sequential navigation.
Include <dfn>strict mode</dfn> and <dfn>mixed mode</dfn> giving different results when
there is no appropriate target without scrolling.

</div>

Loading

0 comments on commit 04b49dc

Please sign in to comment.