Skip to content

Commit bab95aa

Browse files
committed
More cleanup, remove the previous explainer from the sidebar to reduce confusion (keep link)
1 parent 111469c commit bab95aa

File tree

2 files changed

+34
-54
lines changed

2 files changed

+34
-54
lines changed

site/src/pages/components/focusgroup.explainer.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
menu: Non-active Proposals
32
name: focusgroup (Explainer)
43
layout: ../../layouts/ComponentLayout.astro
54
---

site/src/pages/components/scoped-focusgroup.explainer.mdx

Lines changed: 34 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
menu: Active Proposals
3-
name: Scoped Focusgroup (Explainer)
3+
name: Focusgroup (Explainer)
44
path: /components/scoped-focusgroup.explainer
55
layout: ../../layouts/ComponentLayout.astro
66
---
@@ -11,13 +11,14 @@ layout: ../../layouts/ComponentLayout.astro
1111
- Last updated: 2025-10-6
1212

1313
## Table of Contents
14+
<details>
15+
<summary><strong>Show / Hide Table of Contents</strong></summary>
1416

1517
- [Introduction](#introduction)
16-
- [Keyboard Navigation Modes](#keyboard-navigation-modes)
17-
- [Keyboard Navigation Modes](#keyboard-navigation-modes)
18-
- [1. Sequential focus navigation](#1-sequential-focus-navigation)
19-
- [2. Directional navigation](#2-directional-navigation)
20-
- [Before / After at a glance](#before--after-at-a-glance)
18+
- [Keyboard Navigation Modes](#keyboard-navigation-modes)
19+
- [1. Sequential focus navigation](#1-sequential-focus-navigation)
20+
- [2. Directional navigation](#2-directional-navigation)
21+
- [Before / After at a glance](#before--after-at-a-glance)
2122
- [Focusgroup Tokens](#focusgroup-tokens)
2223
- [Differences from the original explainer](#differences-from-the-original-explainer)
2324
- [CSS support is now a future consideration](#css-support-is-now-a-future-consideration)
@@ -53,18 +54,9 @@ layout: ../../layouts/ComponentLayout.astro
5354
- [Nested Focusgroups](#nested-focusgroups)
5455
- [Disabling focusgroup memory](#disabling-focusgroup-memory)
5556
- [Adjustments to sequential focus navigation](#adjustments-to-sequential-focus-navigation)
56-
- [Adjustments to sequential focus navigation](#adjustments-to-sequential-focus-navigation)
57-
- [Guaranteed tab stop algorithm](#guaranteed-tab-stop-algorithm)
57+
- [Guaranteed tab stop algorithm](#guaranteed-tab-stop-algorithm)
5858
- [(Future Consideration) Grid focusgroups](#future-consideration-grid-focusgroups)
59-
- [Applicability to tabular data](#applicability-to-tabular-data)
60-
- [Setting up a grid focusgroup](#setting-up-a-grid-focusgroup)
61-
- [Manual grids: row and cell connections](#manual-grids-row-and-cell-connections)
62-
- [Grid focusgroup nesting](#grid-focusgroup-nesting)
63-
- [Empty Cell data](#empty-cell-data)
64-
- [Non-uniform cells](#non-uniform-cells)
6559
- [(Future Consideration) Additional Keyboard support](#future-consideration-additional-keyboard-support)
66-
- [(Future Consideration) Additional Keyboard support](#future-consideration-additional-keyboard-support)
67-
- [Authoring guidance](#authoring-guidance)
6860
- [Alternatives considered](#alternatives-considered)
6961
- [Open Questions](#open-questions)
7062
- [Privacy and Security Considerations](#privacy-and-security-considerations)
@@ -73,13 +65,15 @@ layout: ../../layouts/ComponentLayout.astro
7365
- [Design decisions](#design-decisions)
7466
- [Index of focusgroup values](#index-of-focusgroup-values)
7567
- [Acknowledgments](#acknowledgments)
68+
69+
</details>
7670
## Introduction
7771

78-
Authors routinely hand-code “roving tabindex” logic for composite widgets like toolbars, tablists, menus, listboxes and grids. In practice, this means providing a single tab stop (see [Sequential focus navigation](#keyboard-navigation-modes)) to enter the control, then using directional navigation (arrow keys / D-pad—see [Directional navigation](#keyboard-navigation-modes)) to move focus between items.
72+
Authors routinely hand-code “roving tabindex” logic for composite widgets like toolbars, tablists, menus, listboxes and grids. In practice, this means providing a single tab stop to enter the control, then using directional navigation (arrow keys / D-pad) to move focus between items.
7973

8074
Authors may use the proposed `focusgroup` HTML attribute to declare that
8175
a subtree of focusable elements will get:
82-
1. Focus navigation ([not selection](#non-goals)) using keyboard directional arrow keys (D-pad style) for linear groups (see [Directional navigation](#keyboard-navigation-modes)).
76+
1. Focus navigation ([not selection](#non-goals)) using directional navigation (arrow key, D-pads, etc.).
8377
2. A guaranteed tab stop (when at least one focusable element is present) (see [Guaranteed tab stop](#guaranteed-tab-stop)).
8478
3. Automatic return to the last focused focusable element (unless [`no-memory`](#disabling-focusgroup-memory) is set).
8579
4. Optional limited-axis arrow key navigation and optional wrap-around semantics.
@@ -93,26 +87,15 @@ navigation, we acknowledge that there are other input modalities that work (or c
9387
to work) equally well for `focusgroup` navigation behavior (e.g., game controllers,D-pads, remote controls, gesture
9488
recognizers, touch-based assistive technologies (AT), etc.).
9589

96-
## Keyboard Navigation Modes
90+
Benefits over ad-hoc scripts (FocusZone, Tabster, bespoke roving tabindex): less boilerplate, standardized axis + wrap behavior (including RTL / vertical), reduced misapplication, and a consistent, testable baseline for AT and UA interoperability.
91+
92+
### Keyboard Navigation Modes
9793
Two complementary navigation paradigms are often used on the web today:
9894

99-
### 1. Sequential focus navigation
95+
#### 1. Sequential focus navigation
10096
(Tab / Shift+Tab): The browser-managed order of tabbable elements (`tabindex` / native semantics). Used to enter or leave a composite.
101-
### 2. Directional navigation
102-
(Arrow keys, D-pad, some AT commands): Moves focus among a logically related set of items inside a composite without leaving it (the “[roving tabindex](https://developer.mozilla.org/en-US/docs/Web/Accessibility/Guides/Keyboard-navigable_JavaScript_widgets#technique_1_roving_tabindex)” pattern when hand-authored).
103-
104-
`focusgroup` standardizes the directional layer for supported composite patterns and guarantees exactly one sequential entry point per [focusgroup segment](#focusgroup-segments)—without authors having to dynamically set and unset `tabindex` across items. Authors only ensure that intended items are focusable; `focusgroup` handles: (a) roving single tab stop per segment, (b) directional navigation (inline/block aware), (c) optional wrap, (d) memory (unless `no-memory`).
105-
106-
Key points:
107-
* Tab / Shift+Tab enters or exits a focusgroup segment at one guaranteed entry point.
108-
* Arrow keys / D-pad move internally among items.
109-
* Multiple naturally tabbable descendants do NOT create multiple tab stops; focusgroup collapses them to one per segment.
110-
* Authors do not need to force `tabindex="-1"` on every non-active item; it is optional.
111-
112-
See: [Guaranteed tab stop](#guaranteed-tab-stop) and the [Guaranteed tab stop algorithm](#guaranteed-tab-stop-algorithm).
113-
114-
115-
Benefits over ad-hoc scripts (FocusZone, Tabster, bespoke roving tabindex): less boilerplate, standardized axis + wrap behavior (including RTL / vertical), reduced misapplication, and a consistent, testable baseline for AT and UA interoperability.
97+
#### 2. Directional navigation
98+
(Arrow keys, D-pad, some AT commands): Moves focus among a logically related set of items inside a composite without leaving it, the “[roving tabindex](https://developer.mozilla.org/en-US/docs/Web/Accessibility/Guides/Keyboard-navigable_JavaScript_widgets#technique_1_roving_tabindex)” pattern when hand-authored.
11699

117100
### Before / After at a glance:
118101

@@ -201,15 +184,15 @@ Minimum role application (container & children): User agents apply the minimum c
201184

202185
Current behavior tokens (APG alignment & minimum roles). All listed (except the future grid token) produce the same linear navigation semantics—only semantic expectations & child inference differ:
203186

204-
| Behavior | APG Pattern | MDN Role Docs | Minimum container role (when applied) | Minimum child role(s) (when applied) | APG Pattern Link |
205-
|---|---|---|---|---|---|
206-
| `toolbar` | Toolbar | [MDN `role=toolbar`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/toolbar_role) | `toolbar` | (none) | [APG Toolbar](https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/) |
207-
| `tablist` | Tabs | [MDN `role=tablist`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tablist_role) | `tablist` | `tab` | [APG Tabs](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/) |
208-
| `radiogroup` | Radio Group | [MDN `role=radiogroup`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/radiogroup_role) | `radiogroup` | `radio` | [APG Radio Group](https://www.w3.org/WAI/ARIA/apg/patterns/radio/) |
209-
| `listbox` | Listbox | [MDN `role=listbox`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role) | `listbox` | `option` | [APG Listbox](https://www.w3.org/WAI/ARIA/apg/patterns/listbox/) |
210-
| `menu` | Menu | [MDN `role=menu`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/menu_role) | `menu` | `menuitem` | [APG Menu / Menubar](https://www.w3.org/WAI/ARIA/apg/patterns/menu/) |
211-
| `menubar` | Menubar | [MDN `role=menubar`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/menubar_role) | `menubar` | `menuitem` | [APG Menu / Menubar](https://www.w3.org/WAI/ARIA/apg/patterns/menu/) |
212-
| `grid` (future) | Grid (2-D) | [MDN `role=grid`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/grid_role) | `grid` | (TBD) | [APG Grid](https://www.w3.org/WAI/ARIA/apg/patterns/grid/) |
187+
| Behavior | APG Pattern | Minimum container role (when applied) | Minimum child role(s) (when applied) | APG Pattern Link |
188+
|---|---|---|---|---|
189+
| `toolbar` | Toolbar | [`toolbar`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/toolbar_role) | (none) | [APG Toolbar](https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/) |
190+
| `tablist` | Tabs | [`tablist`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tablist_role) | [`tab`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tab_role) | [APG Tabs](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/) |
191+
| `radiogroup` | Radio Group | [`radiogroup`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/radiogroup_role) | [`radio`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/radio_role) | [APG Radio Group](https://www.w3.org/WAI/ARIA/apg/patterns/radio/) |
192+
| `listbox` | Listbox | [`listbox`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role) | [`option`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/option_role) | [APG Listbox](https://www.w3.org/WAI/ARIA/apg/patterns/listbox/) |
193+
| `menu` | Menu | [`menu`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/menu_role) | [`menuitem`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/menuitem_role) | [APG Menu / Menubar](https://www.w3.org/WAI/ARIA/apg/patterns/menu/) |
194+
| `menubar` | Menubar | [`menubar`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/menubar_role) | [`menuitem`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/menuitem_role) | [APG Menu / Menubar](https://www.w3.org/WAI/ARIA/apg/patterns/menu/) |
195+
| `grid` (future) | Grid (2-D) | [`grid`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/grid_role) | (TBD) | [APG Grid](https://www.w3.org/WAI/ARIA/apg/patterns/grid/) |
213196

214197
#### Behavior → role mapping & precedence
215198
2. No explicit container `role`: UA maps behavior token to its minimum role (subject to minimum-role conditions described above).
@@ -986,29 +969,27 @@ last-focused element in a `focusgroup`, a change to sequential focus navigation
986969

987970
When a user navigates into a focusgroup using Tab or Shift+Tab, the user agent must:
988971

989-
1. **Determine direction:** "forward" for Tab, "backward" for Shift+Tab.
972+
#### 1. **Determine direction:** "forward" for Tab, "backward" for Shift+Tab.
990973

991-
2. **Identify the focusgroup segment:** The set of `focusgroup` items that are reachable without crossing any [opted-out items](#opting-out) in tree order from the entry point in the direction of navigation.
974+
#### 2. **Identify the focusgroup segment:** The set of `focusgroup` items that are reachable without crossing any [opted-out items](#opting-out) in tree order from the entry point in the direction of navigation.
992975

993-
3. **Apply focus priority (first match wins):**
976+
#### 3. **Apply focus priority (first match wins):**
994977
- If the focusgroup has a **last focused item** and the [`no-memory`](#disabling-focusgroup-memory) token is not present, and the last focused item is within the current segment, focus that item.
995978
- Otherwise, if an item within the segment is **sequentially focusable** (e.g., has `tabindex="0"` or is a natively focusable element like `<button>`), focus the first such item in tree order (regardless of direction).
996979
- Otherwise, if direction is "forward", focus the **first** focusable `focusgroup` item in the segment in tree order (including elements with negative `tabindex` values).
997980
- Otherwise, if direction is "backward", focus the **last** focusable `focusgroup` item in the segment in tree order (including elements with negative `tabindex` values).
998981

999-
4. **Update tab navigation:** All other `focusgroup` items are not considered in sequential focus navigation order. Memory is updated to be on the newly focused item if the [`no-memory`](#disabling-focusgroup-memory) token is not present.
1000-
982+
#### 4. **Update tab navigation:**
983+
All other `focusgroup` items are not considered in sequential focus navigation order. Memory is updated to be on the newly focused item if the [`no-memory`](#disabling-focusgroup-memory) token is not present.
984+
____
1001985
This algorithm ensures that each [focusgroup segment](#focusgroup-segments) has a single [guaranteed tab stop](#guaranteed-tab-stop), without the need for authors to manage `tabindex` values except to customize the first focused element when entering a `focusgroup`.
1002986

1003987
Additionally, when focus is within [native key conflict elements](#key-conflict-elements), immediate
1004988
neighboring focusgroup items are automatically made available in the tab order to provide an
1005989
[escape mechanism](#escape-behavior-for-native-key-conflict-elements).
1006990

1007-
<details>
1008-
<summary><strong>(Future Consideration) Grid focusgroups</strong></summary>
1009-
1010991
## (Future Consideration) Grid focusgroups
1011-
992+
<details>
1012993
Some focusable data is structured not as a series of nested linear groups, but as a
1013994
2-dimensional grid such as in a spreadsheet app, where focus can move logically from
1014995
cell-to-cell either horizontally or vertically. In these data structures, it makes

0 commit comments

Comments
 (0)