Repository navigation
fix(ui): give filter radios one Tab stop and the arrow keys - #3853
Merged
Merged
Conversation
A single-choice facet in the shared FilterPanel was a row of plain buttons with role="radio": every option was a Tab stop, and the arrow keys did nothing. Opening the panel from the keyboard also left the focus on Filter, so the next Tab went on down the page and closed the panel before the keyboard reached any facet. The facet is now the Radix radio group the shared RadioGroup is built on. It has one Tab stop (the chosen option, else the first), arrow keys that move the focus and the choice together and wrap, and Tab and Shift+Tab that leave it. Each option shows the focus ring. A click or Space on the chosen option still sets the facet back to its resting selection, which clears an optional one. Radix checks an option only while the arrow key is still down when its deferred focus lands, which a page busy with the last choice misses; the panel then chooses the option itself, never twice. The panel opens with the focus on its first facet's header, not on Clear all, so the keyboard reaches every option. The fix is in the one shared component, so every consumer gets it: task board, inbox, metrics periods, governance lists and data tables. Closes #3746
Review follow-ups for the filter radios. - An arrow key landing on the chosen option no longer clears it. Radix clicks the option an arrow key's focus lands on, and the panel read that click as a second press of the chosen option. - Home and End (and PageUp and PageDown) move the choice with the focus, as the arrow keys do, so the focus and the choice never part. - The panel decides that a key moved the focus by the focus event's own relatedTarget, so a key that moved nothing can never make a later Tab entry choose, and a quick second key cannot leave nobody choosing. - The focus ring is inset, so the list's scroll edge never cuts it off. - The Chromium test holds the main thread before Radix's deferred focus, as a busy page does, so the panel's own choosing is what it proves. New unit cases cover Home and End, an arrow onto the chosen option, a Tab entry after a key that moved nothing, and Shift+Tab out of a group. - The docs say Space chooses the focused option. A11Y-A19 names its routes and keys, sets up Clear all, and says what a screen reader announces.
…o-keyboard The manual readme keeps main's totals; its counts are recounted once after the open PRs land.
…o-keyboard The task docs keep both new paragraphs in EN/DE/FR: main's search and failed-load paragraphs after the Filter sentence, then this branch's keyboard walk-through of the filter panel before the board's own keyboard steps.
yannickmonney
added a commit
that referenced
this pull request
Sep 29, 2026
…s-refresh-and-focus The manual readme is recounted on the merged tree (995 boxes). This branch's A11Y-A19 collided with the A11Y-A19 that #3853 adds, so it becomes A11Y-A20 in the suite, pins.md and the automation register.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The shared
FilterPanel's single-choice facets are now a real radio group. From the keyboard there is one Tab stop per group, the arrow keys move the focus and the choice together, and Tab leaves the group. The panel also opens with the focus inside it, so a keyboard alone can reach the facets at all.What was wrong
<button role="radio">. Every option was its own Tab stop (tabIndex=0on all five priorities), and ArrowDown did nothing.main, not reported elsewhere (I searched open and closed issues): opening Filter with Enter left the focus on the button, becauseonOpenAutoFocuswas prevented. The next Tab moved to the next page control (Create task on the board), and the non-modal popover closed on that focus move. A keyboard-only reader never reached any facet. It is the same shared component and the same keyboard contract, so it is fixed here too.What changed (
packages/ui/src/components/filters/filter-panel.tsx)@radix-ui/react-radio-group, the primitive the sharedRadioGroupis built on:aria-checked.The full-row look stays, with the shared focus ring added (
focus-visible:ring-ring ring-2). Each grouped segment keeps its own labelledradiogroup, asCONV-A4documents.defaultValues ?? []: an optional facet clears, and a mandatory one (a metrics period) goes back to its default. Radix's own click on an option that an arrow key lands on is not read as such a press. What changes is Enter, which no longer chooses: Radix follows the WAI-ARIA radio pattern there.relatedTarget, and it mirrors Radix's key state, so exactly one of the two chooses. Radix's roving tab stop is untouched.preventScroll. Escape still closes the panel and returns focus to Filter, and Tab loops inside the non-modal panel.Consumers swept
The fix is in the one shared component, so every single-choice facet gets it. On
mainthose are:useListPagemanaged filters.Multi-choice facets (checkboxes) are unchanged.
How it was verified
filter-panel.test.tsx, 8 new cases:onChangeper key,tabIndexroving, Tab and Shift+Tab;6 of the 8 fail on
main's component; the other two are behaviour-preservation controls. The quick-press case also fails on a pure-Radix version of this change, as do the Home/End and landing cases on the first head of this PR. All 28 cases in the file pass.filter-panel.browser.test.tsx, 1 new case with CDP key presses: Tab to Filter, Enter, the focus is on the Priority header, Enter, Tab, the focus ring shows, held arrows, Space clears, Tab and Shift+Tab, Escape. Two more arrow presses run on a page kept busy by a 150 ms task queued ahead of Radix's deferred focus; there the key comes up first, and the choice must still follow.main. The busy-page part fails on a pure-Radix version (the focus reaches Medium, the choice stays on High).packages/uidata-table, catalog, metrics anduseListPagetests: 19 files, 206 tests pass;data-table-toolbarand target-size browser tests pass;providers-settings.test.tsxtimed out twice in the batch while the shared machine was saturated, and passed 28/28 alone.accounts-screentest passes.backend/main.ts,vite previewof the production build; loopback only, synthetic organizations. Keyboard only on the task board with four fixture tasks:c1e46d6b0. The maintainer's later merge ofmain(9d2bbe9c0) leaves every file these runs exercise byte-identical (git diff --quiet).main: Enter opens, and the next Tab lands on Create task with the panel closed. With pointer entry, every radio hastabIndex=0and ArrowDown does not move.tabIndex=-1throughout.oxlint --type-aware --type-checkandoxfmton the changed files,bun run lint:manual, andcheck-guide.tson the accessibility and conversations suites (no new findings againstorigin/main) all pass. The docs locale and structure checks and the ui-docs content tests pass.Docs and manual
services/ui-docs/content/components/data-table.mddescribes the panel's keyboard path.docs/{en,de,fr}/platform/projects/tasks.mdexplains how to filter the board with the keyboard.A11Y-A19insuites/accessibility.md(Cost 27), withreadme.md's totals recounted to 982 (fix(platform): keep cleared and typed values in task history #3813 adds one tasks box too, so whichever lands second counts 983): the board's Assignee and Priority with Clear all showing, then the mandatory metrics Period.CONV-A4loses its "fully keyboard-operable" claim for the precise contract.reference/automation.mdrow for the component half.Scope
role="radio"buttons follow the old pattern too. They are not aFilterPaneland are left as they are.ShareAccessOption) and Improvement: Accessibility polish — aria-modal on dialogs, run-code radiogroup arrow-keys, duplicate preview heading, fake checkbox on protected rows #1998 (Run code format) are separate components, as Bug: shared filter radios ignore arrow keys and expose every option as a tab stop #3746 says.Closes #3746