Repository navigation
Description
Measured 2026-09-01 on main + #40 (5dc517b) + #41 (3adc8e3) merged, in a live jsdom root (renderToStaticMarkup cannot see the store — useWorkspace's server snapshot is DEFAULT_STATE, which is the trap #41's own PR notes call out).
What happens
TreeRow publishes the tree pattern's roving tabindex off the selection flag:
// system/TreeRow.tsx:130-134
<li
role="treeitem"
aria-selected={selected}
tabIndex={selected ? 0 : -1}ProjectSectionList hard-codes selected={false} on all five rows, because a section is a disclosure and not a selection:
// rail/ProjectTree.tsx:153-157
<TreeRow
key={id}
depth={0}
selected={false}
expanded={expanded}So that role="tree" widget contains five treeitems and zero elements with tabindex="0". Tab skips all five. Arrow keys cannot rescue it: Tree's handler bails on index === -1 (TreeRow.tsx:50), and index is found from document.activeElement, so the arrows only work once focus is already inside the <ul> — and nothing can put it there. The <ul role="tree"> itself has no tabindex; the inner .row div has none; the twisty is a <span aria-hidden="true" data-tree-toggle> with none.
Analyses, Docs, Globals, Imports and Materials cannot be focused or expanded from the keyboard in any state, at any width above 1024px. They are pointer-only controls that announce themselves to a screen reader as five collapsed branches.
Measured
Live root, ProjectTree with the 5-part fixture, counting [role="treeitem"][tabindex="0"] per widget:
| workspace state | role="tree" widgets |
treeitems | tab stops | which |
|---|---|---|---|---|
part = null |
2 | 10 | 0 | — |
part = "tread" (built, 2 geometries) |
2 | 12 | 1 | tread only |
In the second row every one of analyses docs globals imports materials reads tabindex="-1" aria-selected="false" aria-expanded="false", and the one tab stop is inside the parts <ul>, from which the arrows cannot leave (that boundary is #65).
The part = null row is a transient, not the bug: App.tsx:54-62's DefaultPart selects the project's first part once GET /parts resolves, which is the only reason the parts tree has an entry at all. The sections tree has no equivalent, and never gets one. Its emptiness is structural, not a race.
Why this is the primitive's bug and not the caller's
aria-selected and "holds the tree's tab stop" are two different facts and the ARIA tree pattern keeps them apart: it requires exactly one tabbable node per tree at all times, and that node is the tree's focus holder, which may be any row — selection is a separate, optional state. TreeRow fuses them, so the primitive is only correct for trees that always have a selected row. A disclosure-only tree is a legitimate tree and this one is in the shipped rail.
That also means the fix is not "pass selected={true} to Analyses", which would be a lie in the accessibility tree about what is selected. Tree should own a focus-holder index (defaulting to the first row, or to the selected row when there is one) and hand tabIndex={0} to that row, leaving aria-selected to mean selection.
Expected
§3.13.4: "the rail tree implements arrow-key navigation with role="tree"/treeitem/aria-expanded" — a widget with no tab stop implements none of it from the keyboard. §4.7's TreeRow entry lists "Retires: … a tree with no keyboard navigation", and TreeRow.tsx's own header calls the shipped defect "an ARIA role claiming a keyboard contract the code did not implement — worse than no role, because a screen-reader user is told to expect arrows that do nothing." Five rows currently reproduce that sentence exactly.
- Every
Treehas exactly onetabindex="0"row whenever it has any rows, with or without a selection. - Tab reaches the sections; ArrowUp/Down move among them; ArrowRight/Left expand and collapse; Home/End reach the ends.
aria-selectedkeeps meaning selected.
Repro
Load the operator at 1280×800 and Tab from the header. Focus passes through the parts tree's one selected row and then leaves the rail entirely — the five section rows are never reached. There is no keystroke that opens Analyses.
What this is NOT
- Not Rail is two trees; arrows cannot reach Analyses from Parts #65 ("Rail is two trees; arrows cannot reach Analyses from Parts"). Rail is two trees; arrows cannot reach Analyses from Parts #65 is the topology: two
role="tree"widgets, so arrows cannot cross the boundary. This is that the second widget has no entrance from anywhere, including Tab — a different mechanism with a different fix. They are also not each other's fix: merging the two<ul>s leavestabIndex={selected ? 0 : -1}in place, so the merged tree still has zero tab stops in any state where no row is selected, and Rail is two trees; arrows cannot reach Analyses from Parts #65's stated remedy ("collapsed is a tree item state") does not touch the attribute that is wrong here. - Not Part rows report selection as
aria-expanded: the chevron cannot collapse a part, and ArrowRight is a navigation #91 ("Part rows report selection asaria-expanded"). Part rows report selection asaria-expanded: the chevron cannot collapse a part, and ArrowRight is a navigation #91 isexpanded/onToggleconflated on the parts rows, and its consequence is that ArrowRight mutates the workspace. This istabIndex/aria-selectedconflated on the section rows, and its consequence is that no key reaches them at all. Different attribute, different handler, different rows. Part rows report selection asaria-expanded: the chevron cannot collapse a part, and ArrowRight is a navigation #91 also assumes the arrows can be pressed, which on this widget they cannot. - Not Viewport canvas is not keyboard-reachable; no skip link past the rail #64 ("Viewport canvas is not keyboard-reachable; no skip link past the rail"). Viewport canvas is not keyboard-reachable; no skip link past the rail #64 is the canvas and the missing skip links — reachability past the rail. This is reachability inside it.
- Not Selected part row prints one glyph of its name: the label track collapses under the dirty badge + build chip #88 ("Selected part row prints one glyph of its name"). That is the label track of a row that is already focusable.
- Not
Buttondropspressedon every variant buttoggle, so three shipped controls have no on-state at all #101 ("Buttondropspressedon every variant buttoggle"). That is theButtonprimitive discarding a state prop; nothing here goes throughButton. - Not Overlay icon buttons lack explicit 24px min-width for hit targets #87 (icon min-width). No hit-target claim is made: these rows are 26px and clear §3.13.6. They are unreachable, not small.
Web-only. No CAM, no viewport work, no #14/#32.
Related
- INTERFACE.md §3.13.4, §4.7 (
TreeRow) web/src/system/TreeRow.tsx(41-99Tree, 117-198TreeRow, esp. 134)web/src/components/rail/ProjectTree.tsx(141-186ProjectSectionList, esp. 156)web/src/App.tsx(54-62DefaultPart, the reason the parts tree escapes this)- Rail is two trees; arrows cannot reach Analyses from Parts #65, Part rows report selection as
aria-expanded: the chevron cannot collapse a part, and ArrowRight is a navigation #91
Activity