Hololink UI is under active development. Components, APIs and these docs may change without notice.
Holo Tabs, Tab & Tab Panel
<holo-tabs> manages a tablist of <holo-tab> children (slotted via slot="tab") and a set of
<holo-tab-panel> children. It provides roving-tabindex keyboard navigation (Arrow keys, Home,
End) and, by default, automatically activates a tab as soon as it receives focus.
<holo-tabs> renders a role="tablist" (named by label) around the tab slot. Each <holo-tab> sets role="tab", aria-selected, aria-controls and an id, and takes aria-disabled when disabled. Each <holo-tab-panel> sets role="tabpanel", aria-labelledby pointing to its tab, hidden when inactive, and tabindex="0" when active.
Key
Action
Tab
Moves focus into the tab list (to the selected tab), then to the active panel
ArrowRight
Moves focus to the next enabled tab (wraps)
ArrowLeft
Moves focus to the previous enabled tab (wraps)
Home
Moves focus to the first enabled tab
End
Moves focus to the last enabled tab
Enter, Space
Activates the focused tab (needed in manual mode)
With activation="automatic" (the default), moving focus also selects the tab. With activation="manual", focus moves first and Enter or Space selects.
Tabs use roving tabindex: only the selected tab is a tab stop. Disabled tabs are skipped.
ArrowUp and ArrowDown are not handled.
The active panel is focusable (tabindex="0") and shows a focus ring with :focus-visible.
You provide:
A label that names the tab list.
Matching panel (on the tab) and name (on the panel) values for every tab.