Skip to content

Commit b998d1f

Browse files
committed
Clarifications and reorganizing.
1 parent c7b00e9 commit b998d1f

File tree

1 file changed

+43
-26
lines changed

1 file changed

+43
-26
lines changed

source

Lines changed: 43 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -90166,75 +90166,92 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
9016690166

9016790167
<p>The <dfn element-attr for="html-global"><code data-x="attr-focusgroup">focusgroup</code></dfn>
9016890168
content attribute provides declarative focus navigation for a group of related focusable
90169-
elements. When applied to an element, it enables directional arrow key navigation among its
90170-
focusable descendants, forming a <dfn>focus group</dfn>.</p>
90169+
elements. When applied to an element, it enables <dfn>Directional Navigation</dfn> among its
90170+
focusable descendants, forming a <dfn>focus group</dfn>. <span>Directional Navigation</span> is navigation by spatial direction (such as up, down, left, or right), as determined by the user agent and input device (for example, arrow keys, gamepad, remote control, etc.). In contrast, <span>Sequential focus navigation</span> refers to navigation in the order defined by the <span>sequential focus navigation order</span> (see <a href="#sequential-focus-navigation">definition</a>), often via <kbd>Tab</kbd> and <kbd>Shift+Tab</kbd>.</p>
90171+
90172+
<h5>Concepts</h5>
9017190173

9017290174
<p>The attribute's value is a string of space-separated tokens. The first token must either be a
9017390175
<dfn>behavior token</dfn>, which defines the primary interaction pattern, or the special token
9017490176
<code data-x="attr-focusgroup-none">none</code> which is used alone to opt out of focusgroup behavior. If a behavior token is
9017590177
specified, <dfn>modifier tokens</dfn> can be provided subsequently.</p>
9017690178

90177-
<h5>Concepts</h5>
90178-
90179-
<p>A <dfn>focusgroup owner</dfn> is an element with a valid <code data-x="attr-focusgroup">focusgroup</code> attribute specified, where the attribute value contains a <span data-x="behavior token">behavior token</span> (not <code data-x="attr-focusgroup-none">none</code>).</p>
90179+
<p><span data-x="behavior token">Behavior tokens</span> define the <dfn>interaction pattern</dfn>, which refers to how the directional navigation inputs are used to move focus between focusgroup items.</p>
9018090180

90181-
<p>The <dfn>focusgroup scope</dfn> of a focusgroup owner is the owner itself and all of its <span data-x="shadow-including descendant">shadow-including descendants</span>, excluding any descendants that are in a different <span data-x="focusgroup scope">focusgroup scope</span> or have opted out with <code data-x="attr-focusgroup-none">focusgroup="none"</code>.</p>
90181+
<p>The following interaction patterns are defined:</p>
9018290182

90183-
<p>A <dfn>focusgroup item</dfn> is any <span>focusable</span> element within the focusgroup scope.</p>
90183+
<ul>
90184+
<li><p><dfn data-x="linear interaction pattern">Linear</dfn>: Enables sequential navigation forwards and backwards through a set of focusable items. In a <span data-x="linear interaction pattern">linear interaction pattern</span>, even when both directional input axes are allowed (such as when neither <code data-x="attr-focusgroup-inline">inline</code> nor <code data-x="attr-focusgroup-block">block</code> modifiers are specified), navigation follows the document order of the items rather than spatial positioning.</p></li>
90185+
</ul>
9018490186

9018590187
<table>
9018690188
<thead>
9018790189
<tr>
9018890190
<th>Token
9018990191
<th>Type
90192+
<th><span data-x="interaction pattern">Interaction</span>
9019090193
<th>Description
9019190194
<tbody>
9019290195
<tr>
9019390196
<td><dfn data-x="attr-focusgroup-toolbar"><code>toolbar</code></dfn>
90194-
<td>Behavior
90195-
<td>Indicates a toolbar pattern. Infers a <code data-x="attr-focusgroup-toolbar">toolbar</code> role.
90197+
<td><span data-x="behavior token">Behavior</span>
90198+
<td><span data-x="linear interaction pattern">Linear</span>
90199+
<td>Indicates a toolbar pattern. Infers a <code data-x="attr-aria-role-toolbar">toolbar</code> role.
9019690200
<tr>
9019790201
<td><dfn data-x="attr-focusgroup-tablist"><code>tablist</code></dfn>
90198-
<td>Behavior
90202+
<td><span data-x="behavior token">Behavior</span>
90203+
<td><span data-x="linear interaction pattern">Linear</span>
9019990204
<td>Indicates a tablist pattern. Infers a <code data-x="attr-aria-role-tablist">tablist</code> role for the owner and a <code data-x="attr-aria-role-tab">tab</code> role for items.
9020090205
<tr>
9020190206
<td><dfn data-x="attr-focusgroup-radiogroup"><code>radiogroup</code></dfn>
90202-
<td>Behavior
90207+
<td><span data-x="behavior token">Behavior</span>
90208+
<td><span data-x="linear interaction pattern">Linear</span>
9020390209
<td>Indicates a radiogroup pattern. Infers a <code data-x="attr-aria-role-radiogroup">radiogroup</code> role for the owner and a <code data-x="attr-aria-role-radio">radio</code> role for items.
9020490210
<tr>
9020590211
<td><dfn data-x="attr-focusgroup-listbox"><code>listbox</code></dfn>
90206-
<td>Behavior
90212+
<td><span data-x="behavior token">Behavior</span>
90213+
<td><span data-x="linear interaction pattern">Linear</span>
9020790214
<td>Indicates a listbox pattern. Infers a <code data-x="attr-aria-role-listbox">listbox</code> role for the owner and an <code data-x="attr-aria-role-option">option</code> role for items.
9020890215
<tr>
9020990216
<td><dfn data-x="attr-focusgroup-menu"><code>menu</code></dfn>
90210-
<td>Behavior
90217+
<td><span data-x="behavior token">Behavior</span>
90218+
<td><span data-x="linear interaction pattern">Linear</span>
9021190219
<td>Indicates a menu pattern. Infers a <code data-x="attr-aria-role-menu">menu</code> role for the owner and a <code data-x="attr-aria-role-menuitem">menuitem</code> role for items.
9021290220
<tr>
9021390221
<td><dfn data-x="attr-focusgroup-menubar"><code>menubar</code></dfn>
90214-
<td>Behavior
90222+
<td><span data-x="behavior token">Behavior</span>
90223+
<td><span data-x="linear interaction pattern">Linear</span>
9021590224
<td>Indicates a menubar pattern. Infers a <code data-x="attr-aria-role-menubar">menubar</code> role for the owner and a <code data-x="attr-aria-role-menuitem">menuitem</code> role for items.
9021690225
<tr>
9021790226
<td><dfn data-x="attr-focusgroup-wrap"><code>wrap</code></dfn>
90218-
<td>Modifier
90227+
<td><span data-x="modifier tokens">Modifier</span>
90228+
<td>
9021990229
<td>Enables navigation to wrap from the last item to the first, and vice-versa.
9022090230
<tr>
9022190231
<td><dfn data-x="attr-focusgroup-inline"><code>inline</code></dfn>
90222-
<td>Modifier
90232+
<td><span data-x="modifier tokens">Modifier</span>
90233+
<td>
9022390234
<td>Restricts arrow key navigation to the inline axis (e.g., left/right arrows).
9022490235
<tr>
9022590236
<td><dfn data-x="attr-focusgroup-block"><code>block</code></dfn>
90226-
<td>Modifier
90237+
<td><span data-x="modifier tokens">Modifier</span>
90238+
<td>
9022790239
<td>Restricts arrow key navigation to the block axis (e.g., up/down arrows).
9022890240
<tr>
9022990241
<td><dfn data-x="attr-focusgroup-no-memory"><code>no-memory</code></dfn>
90230-
<td>Modifier
90242+
<td><span data-x="modifier tokens">Modifier</span>
90243+
<td>
9023190244
<td>Disables the "last focused item" memory when re-entering the focus group.
9023290245
<tr>
9023390246
<td><dfn data-x="attr-focusgroup-none"><code>none</code></dfn>
9023490247
<td>Special
90248+
<td>
9023590249
<td>Opts the element and its descendants out of any ancestor focus group. Must be used alone.
9023690250
</table>
9023790251

90252+
<p>A <dfn>focusgroup owner</dfn> is an element with a valid <code data-x="attr-focusgroup">focusgroup</code> attribute specified, where the attribute value contains a <span data-x="behavior token">behavior token</span> (not <code data-x="attr-focusgroup-none">none</code>).</p>
90253+
<p>The <dfn>focusgroup scope</dfn> of a focusgroup owner is all of its <span data-x="shadow-including descendant">shadow-including descendants</span>, excluding any descendants that are a <span>focusgroup owner</span> themselves or are are in a different <span data-x="focusgroup scope">focusgroup scope</span> or have opted out with <code data-x="attr-focusgroup-none">focusgroup="none"</code>.</p>
90254+
<p>A <dfn>focusgroup item</dfn> is any <span>focusable</span> element within the focusgroup scope.</p>
9023890255
<h5>ARIA Role Inference</h5>
9023990256

9024090257
<p>When a <span data-x="behavior token">behavior token</span> is used, the user agent may infer a corresponding ARIA role for the <span data-x="focusgroup owner">focusgroup owner</span> and its <span data-x="focusgroup item">items</span>. This inference must only occur if the element would otherwise have a generic role (such as a <code>div</code> or <code>span</code>) and does not have an explicit <code data-x="attr-aria-role">role</code> attribute.</p>
@@ -90249,16 +90266,16 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
9024990266
<h6>Directional Navigation</h6>
9025090267

9025190268
<div algorithm>
90252-
<p>When a user presses an arrow key and focus is within a <span data-x="focusgroup scope">focusgroup scope</span>, the user agent must run these steps:</p>
90269+
<p>When a user requests <span>Directional Navigation</span> and focus is within a <span data-x="focusgroup scope">focusgroup scope</span>, the user agent must run these steps:</p>
9025390270

9025490271
<ol>
90255-
<li>If the arrow key pressed is not in an allowed axis given the focusgroup owners's modifiers, do nothing, and do not consume the arrow key event.</li>
90256-
<li>Let <var>direction</var> be "forwards" or "backwards" corresponding to the arrow key pressed and the document's direction.</li>
90272+
<li>If the navigation request is not in an allowed axis given the focusgroup owner's modifiers, do nothing.</li>
90273+
<li>Let <var>direction</var> be the spatial direction requested (e.g., up, down, left, right) as determined by the user agent and input device.</li>
9025790274
<li>Let <var>owner</var> be the <span>focusgroup owner</span>.</li>
9025890275
<li><p>Let <var>currentItem</var> be the currently focused <span>focusgroup item</span>.</p></li>
9025990276
<li><p>Let <var>items</var> be all <span data-x="focusgroup item">focusgroup items</span> in <span>tree order</span>.</p></li>
90260-
<li><p>Determine the <var>nextItem</var> by finding the nearest item in tree order in the <var>direction</var>. </p></li>
90261-
<li><p>If no <var>nextItem</var> is found and the <code data-x="attr-focusgroup-wrap">wrap</code> token is present, wrap to the first item in the specified direction. Otherwise, do nothing, do not consume the arrow key event.</p></li>
90277+
<li><p>Determine the <var>nextItem</var> by finding the nearest item in tree order in the <var>direction</var>.</p></li>
90278+
<li><p>If no <var>nextItem</var> is found and the <code data-x="attr-focusgroup-wrap">wrap</code> token is present, wrap to the first item in the specified direction. Otherwise, do nothing.</p></li>
9026290279
<li><p>If a <var>nextItem</var> is identified, run the <span>focusing steps</span> for it.</p></li>
9026390280
</ol>
9026490281
</div>
@@ -90267,12 +90284,12 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
9026790284

9026890285
<p>A <span data-x="focus group">focus group</span> must have at least one <dfn>guaranteed tab stop</dfn>. When elements opt-out of a focusgroup using <code data-x="attr-focusgroup-none">focusgroup="none"</code>, they divide the focusgroup for <span>sequential focus navigation</span> purposes, creating one tab stop per focusgroup segment.</p>
9026990286
<div algorithm>
90270-
<p>When a user navigates into a <span data-x="focus group">focus group</span> using <kbd>Tab</kbd> or <kbd>Shift</kbd>+<kbd>Tab</kbd>, the user agent must run these steps:</p>
90287+
<p>When a user requests <span>sequential focus navigation</span> into a <span data-x="focus group">focus group</span>, the user agent must run these steps:</p>
9027190288

9027290289
<ol>
90273-
<li><p>Let <var>direction</var> be "forward" for <kbd>Tab</kbd> and "backward" for <kbd>Shift</kbd>+<kbd>Tab</kbd>.</p></li>
90290+
<li><p>Let <var>direction</var> be "forward" or "backward" as determined by the user agent and input device (for example, <kbd>Tab</kbd> or <kbd>Shift</kbd>+<kbd>Tab</kbd>).</p></li>
9027490291

90275-
<li><p>Let <var>entryElement</var> be the element from which focus is entering the focusgroup (the element with focus before the tab key was pressed).</p></li>
90292+
<li><p>Let <var>entryElement</var> be the element from which focus is entering the focusgroup.</p></li>
9027690293

9027790294
<li><p>Let <var>focusgroupSegment</var> be the set of <span data-x="focusgroup item">focusgroup items</span> in the nearest focusgroup scope that are reachable without crossing any opted-out elements in <span>tree order</span> from <var>entryElement</var> in the direction of navigation.</p></li>
9027890295

0 commit comments

Comments
 (0)