Accessibility
Tabs from @prepared911/ui-core implements the WAI-ARIA Tabs pattern via Radix Tabs. Trigger-to-panel association, orientation, and keyboard behavior are handled by the primitive; your job is to provide an accessible group label and to keep focus behavior inside panels sensible.
TabsList → tablist, TabsTrigger → tab with aria-selected and aria-controls, TabsContent → tabpanel with aria-labelledby.aria-orientation reflects horizontal or vertical layout and drives arrow-key direction.label (renders aria-label) or labelledBy (renders aria-labelledby) on Tabs. Without one, screen-reader users hear "tablist" with no context.| Key | Action |
|---|---|
| Tab | Moves focus into the active trigger, then into the panel. |
| Arrow Left / Right | Moves between triggers in horizontal layouts. |
| Arrow Up / Down | Moves between triggers in vertical layouts. |
| Enter / Space | Activates the focused trigger. |
| Home / End | Jumps to the first / last trigger. |
| Element | Role | Key attributes |
|---|---|---|
TabsList | tablist | aria-orientation |
TabsTrigger | tab | aria-selected, aria-controls |
TabsContent | tabpanel | aria-labelledby |
Provide a group label:
Typical sequence when navigating:
tabpanel can confuse assistive tech.Modal; never rely on a tab change to "cancel" a destructive flow.