Skip to content

fix: give the Support tabs a real tablist - #702

Merged
enaboapps merged 3 commits into
mainfrom
feat/support-tabs-690
Sep 8, 2026
Merged

fix: give the Support tabs a real tablist#702
enaboapps merged 3 commits into
mainfrom
feat/support-tabs-690

Conversation

@enaboapps

@enaboapps enaboapps commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Closes #690. Stacked on the #697 PR — base is feat/update-status-off-tab-697.

The Support view's Setup/Troubleshooting control carried role="tablist"/role="tab" but none of the behaviour: both tabs were tab stops, arrows did nothing, and the content had no tabpanel, so the roles promised a widget that was not there.

What changes

  • Tabs/TabPanel move from src/settings/ to src/Tabs.tsx, take a name that scopes element ids (support-tab-setup, settings-panel-general, …) so two tablists can share a page, and are generic over the tab id type.
  • Support uses them: single tab stop via roving tabindex, Arrow/Home/End with wraparound, manual activation, aria-controls on the selected tab, labelled tabpanel.
  • Settings ids are unchanged, so no existing test moved.
  • CSS classes renamed from settings-tabs/settings-panel to tab-bar/tab-panel.

Visual

The Support tab bar changes from an inline two-button pair (min-width: 280px) to the full-width bar Settings uses. Verified in headless Chrome; the content below is untouched.

Validation

Check Result
npm run lint pass
npm test pass — 99 tests (98 → 99)
npm run build pass

New test: Support roving tabindex, arrow-key focus without activation, aria-controls, and the labelled panel switching on click. Headless Chrome confirms Troubleshooting now reports tabindex=-1 while unselected (it was 0 before).

🤖 Generated with Claude Code


Review history

  • SupportView hand-wrote the "setup" | "troubleshooting" union that supportTabs already declared; it is now indexed off the list.

  • The tab id generic stopped at Tabs; TabPanel is generic too and SettingsView names its ids as a union, so a misspelt id no longer compiles.

  • tabId/panelId had no importers and are module-private now.

  • With the last bare .segmented consumer gone, its inline-grid, 280px minimum width and narrow-viewport override were dead and are removed; the two-column template stays for OptionGroups without a column count. Verified in headless Chrome.

  • Not changed: name is passed to Tabs and TabPanel separately. Binding the pair is a larger API change than this issue warrants, and Settings and Support are mutually exclusive views, so the collision it guards against is not reachable today.

@enaboapps
enaboapps force-pushed the feat/update-status-off-tab-697 branch from bb51bf6 to 91b81ae Compare September 8, 2026 15:58
@enaboapps
enaboapps force-pushed the feat/support-tabs-690 branch from d138381 to 05f7889 Compare September 8, 2026 15:59
@enaboapps
enaboapps force-pushed the feat/update-status-off-tab-697 branch from 91b81ae to 72f7a75 Compare September 8, 2026 16:07
@enaboapps
enaboapps force-pushed the feat/support-tabs-690 branch 2 times, most recently from d939a62 to 3fb926b Compare September 8, 2026 16:31
@enaboapps
enaboapps force-pushed the feat/update-status-off-tab-697 branch from 18572e1 to e625f4e Compare September 8, 2026 16:31
@enaboapps
enaboapps force-pushed the feat/support-tabs-690 branch 3 times, most recently from 5a13234 to 0a3146a Compare September 8, 2026 17:00
@enaboapps
enaboapps changed the base branch from feat/update-status-off-tab-697 to main September 8, 2026 17:17
OwenMcGirr and others added 3 commits September 8, 2026 18:17
The Support view's Setup/Troubleshooting control carried tablist roles
but none of the behaviour: no roving tabindex, so both tabs were tab
stops; no arrow-key movement; and no tabpanel for the content, so the
roles promised a widget that was not there.

Tabs and TabPanel move out of settings/ to src/Tabs.tsx, take a `name`
that scopes their element ids so two tablists can share a page, and are
generic over the tab id type. Support now uses them, which gives it the
same single tab stop, arrow and Home/End movement with wraparound,
manual activation and labelled panel as Settings. Ids for the Settings
tablist are unchanged.

The Support tab bar changes from an inline pair to the full-width bar
Settings uses, verified in headless Chrome; the content below it is
untouched.

Tests: 98 -> 99.

Closes #690

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
SupportView hand-wrote "setup" | "troubleshooting" in its useState while
supportTabs already declared the same ids as const, so adding a tab
would have compiled to a confusing error on onSelect rather than at the
source of the drift. The union is now indexed off supportTabs, matching
the [number] pattern App.tsx already uses.

Refs #690

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Review follow-ups on the Support tablist.

The tab id generic stopped at Tabs: TabPanel still took any string, and
SettingsView instantiated it with plain strings, so a misspelt id
compiled and rendered an empty panel. TabPanel is generic too, and
SettingsView names its ids as a union, so both callers are checked.

tabId and panelId had no importers; they are module-private now, like
descriptionId. With the last bare .segmented consumer gone, its
inline-grid display, 280px minimum width and the narrow-viewport
override were overridden by every remaining use and are removed; the
two-column template stays for OptionGroups without a column count.

Refs #690

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@enaboapps
enaboapps force-pushed the feat/support-tabs-690 branch from d765125 to 9c55d07 Compare September 8, 2026 17:17
@enaboapps
enaboapps merged commit 288bcb6 into main Sep 8, 2026
6 checks passed
@enaboapps
enaboapps deleted the feat/support-tabs-690 branch September 8, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retrofit Support tablist with the shared accessible Tabs primitive

2 participants