Skip to content

Commit e852c96

Browse files
committed
Clarifications and reorganizing.
1 parent 8f0f3e5 commit e852c96

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
@@ -90148,75 +90148,92 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
9014890148

9014990149
<p>The <dfn element-attr for="html-global"><code data-x="attr-focusgroup">focusgroup</code></dfn>
9015090150
content attribute provides declarative focus navigation for a group of related focusable
90151-
elements. When applied to an element, it enables directional arrow key navigation among its
90152-
focusable descendants, forming a <dfn>focus group</dfn>.</p>
90151+
elements. When applied to an element, it enables <dfn>Directional Navigation</dfn> among its
90152+
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>
90153+
90154+
<h5>Concepts</h5>
9015390155

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

90159-
<h5>Concepts</h5>
90160-
90161-
<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>
90161+
<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>
9016290162

90163-
<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>
90163+
<p>The following interaction patterns are defined:</p>
9016490164

90165-
<p>A <dfn>focusgroup item</dfn> is any <span>focusable</span> element within the focusgroup scope.</p>
90165+
<ul>
90166+
<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>
90167+
</ul>
9016690168

9016790169
<table>
9016890170
<thead>
9016990171
<tr>
9017090172
<th>Token
9017190173
<th>Type
90174+
<th><span data-x="interaction pattern">Interaction</span>
9017290175
<th>Description
9017390176
<tbody>
9017490177
<tr>
9017590178
<td><dfn data-x="attr-focusgroup-toolbar"><code>toolbar</code></dfn>
90176-
<td>Behavior
90177-
<td>Indicates a toolbar pattern. Infers a <code data-x="attr-focusgroup-toolbar">toolbar</code> role.
90179+
<td><span data-x="behavior token">Behavior</span>
90180+
<td><span data-x="linear interaction pattern">Linear</span>
90181+
<td>Indicates a toolbar pattern. Infers a <code data-x="attr-aria-role-toolbar">toolbar</code> role.
9017890182
<tr>
9017990183
<td><dfn data-x="attr-focusgroup-tablist"><code>tablist</code></dfn>
90180-
<td>Behavior
90184+
<td><span data-x="behavior token">Behavior</span>
90185+
<td><span data-x="linear interaction pattern">Linear</span>
9018190186
<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.
9018290187
<tr>
9018390188
<td><dfn data-x="attr-focusgroup-radiogroup"><code>radiogroup</code></dfn>
90184-
<td>Behavior
90189+
<td><span data-x="behavior token">Behavior</span>
90190+
<td><span data-x="linear interaction pattern">Linear</span>
9018590191
<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.
9018690192
<tr>
9018790193
<td><dfn data-x="attr-focusgroup-listbox"><code>listbox</code></dfn>
90188-
<td>Behavior
90194+
<td><span data-x="behavior token">Behavior</span>
90195+
<td><span data-x="linear interaction pattern">Linear</span>
9018990196
<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.
9019090197
<tr>
9019190198
<td><dfn data-x="attr-focusgroup-menu"><code>menu</code></dfn>
90192-
<td>Behavior
90199+
<td><span data-x="behavior token">Behavior</span>
90200+
<td><span data-x="linear interaction pattern">Linear</span>
9019390201
<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.
9019490202
<tr>
9019590203
<td><dfn data-x="attr-focusgroup-menubar"><code>menubar</code></dfn>
90196-
<td>Behavior
90204+
<td><span data-x="behavior token">Behavior</span>
90205+
<td><span data-x="linear interaction pattern">Linear</span>
9019790206
<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.
9019890207
<tr>
9019990208
<td><dfn data-x="attr-focusgroup-wrap"><code>wrap</code></dfn>
90200-
<td>Modifier
90209+
<td><span data-x="modifier tokens">Modifier</span>
90210+
<td>
9020190211
<td>Enables navigation to wrap from the last item to the first, and vice-versa.
9020290212
<tr>
9020390213
<td><dfn data-x="attr-focusgroup-inline"><code>inline</code></dfn>
90204-
<td>Modifier
90214+
<td><span data-x="modifier tokens">Modifier</span>
90215+
<td>
9020590216
<td>Restricts arrow key navigation to the inline axis (e.g., left/right arrows).
9020690217
<tr>
9020790218
<td><dfn data-x="attr-focusgroup-block"><code>block</code></dfn>
90208-
<td>Modifier
90219+
<td><span data-x="modifier tokens">Modifier</span>
90220+
<td>
9020990221
<td>Restricts arrow key navigation to the block axis (e.g., up/down arrows).
9021090222
<tr>
9021190223
<td><dfn data-x="attr-focusgroup-no-memory"><code>no-memory</code></dfn>
90212-
<td>Modifier
90224+
<td><span data-x="modifier tokens">Modifier</span>
90225+
<td>
9021390226
<td>Disables the "last focused item" memory when re-entering the focus group.
9021490227
<tr>
9021590228
<td><dfn data-x="attr-focusgroup-none"><code>none</code></dfn>
9021690229
<td>Special
90230+
<td>
9021790231
<td>Opts the element and its descendants out of any ancestor focus group. Must be used alone.
9021890232
</table>
9021990233

90234+
<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>
90235+
<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>
90236+
<p>A <dfn>focusgroup item</dfn> is any <span>focusable</span> element within the focusgroup scope.</p>
9022090237
<h5>ARIA Role Inference</h5>
9022190238

9022290239
<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>
@@ -90231,16 +90248,16 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
9023190248
<h6>Directional Navigation</h6>
9023290249

9023390250
<div algorithm>
90234-
<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>
90251+
<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>
9023590252

9023690253
<ol>
90237-
<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>
90238-
<li>Let <var>direction</var> be "forwards" or "backwards" corresponding to the arrow key pressed and the document's direction.</li>
90254+
<li>If the navigation request is not in an allowed axis given the focusgroup owner's modifiers, do nothing.</li>
90255+
<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>
9023990256
<li>Let <var>owner</var> be the <span>focusgroup owner</span>.</li>
9024090257
<li><p>Let <var>currentItem</var> be the currently focused <span>focusgroup item</span>.</p></li>
9024190258
<li><p>Let <var>items</var> be all <span data-x="focusgroup item">focusgroup items</span> in <span>tree order</span>.</p></li>
90242-
<li><p>Determine the <var>nextItem</var> by finding the nearest item in tree order in the <var>direction</var>. </p></li>
90243-
<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>
90259+
<li><p>Determine the <var>nextItem</var> by finding the nearest item in tree order in the <var>direction</var>.</p></li>
90260+
<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>
9024490261
<li><p>If a <var>nextItem</var> is identified, run the <span>focusing steps</span> for it.</p></li>
9024590262
</ol>
9024690263
</div>
@@ -90249,12 +90266,12 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
9024990266

9025090267
<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>
9025190268
<div algorithm>
90252-
<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>
90269+
<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>
9025390270

9025490271
<ol>
90255-
<li><p>Let <var>direction</var> be "forward" for <kbd>Tab</kbd> and "backward" for <kbd>Shift</kbd>+<kbd>Tab</kbd>.</p></li>
90272+
<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>
9025690273

90257-
<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>
90274+
<li><p>Let <var>entryElement</var> be the element from which focus is entering the focusgroup.</p></li>
9025890275

9025990276
<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>
9026090277

0 commit comments

Comments
 (0)