Skip to content

fix: retrofit full WAI-ARIA keyboard support into Tabs component (#24) - #185

Open
rafaio1 wants to merge 1 commit into
MergeFi:mainfrom
rafaio1:fix/24-tabs-wai-aria-keyboard
Open

fix: retrofit full WAI-ARIA keyboard support into Tabs component (#24)#185
rafaio1 wants to merge 1 commit into
MergeFi:mainfrom
rafaio1:fix/24-tabs-wai-aria-keyboard

Conversation

@rafaio1

@rafaio1 rafaio1 commented Aug 20, 2026

Copy link
Copy Markdown

Fixes #24.

  • Add role=tablist/role=tab, aria-selected, and aria-controls/id pairing for correct screen reader announcements
  • Implement roving tabindex: only the active tab has tabIndex=0, all others have tabIndex=-1 so Tab key enters/exits the tablist once
  • Arrow Left/Right navigates between tabs with wrapping; Home/End jump to first/last tab
  • Automatic activation on focus per WAI-ARIA recommended pattern for dashboard-style tabs
  • Preserve existing visual styling, count badges, and generic type API unchanged
  • All current call sites continue to work without modification

TypeScript compiles cleanly with npx tsc --noEmit.

…geFi#24)

- Add role=tablist/tab, aria-selected, aria-controls/id pairing for screen readers
- Implement roving tabindex: only active tab has tabIndex=0, others -1
- Arrow Left/Right navigates between tabs with wrapping; Home/End jump to first/last
- Automatic activation on focus per WAI-ARIA recommended pattern for dashboards
- Preserve existing visual styling and count badge behavior unchanged
- All call sites continue to work without API changes

TypeScript compiles cleanly with npx tsc --noEmit.
@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

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 full WAI-ARIA keyboard support into the Tabs component

1 participant