# Tabs

Tabs are a set of peer controls that switch between related content panels while keeping one panel visible at a time.

- Type: artifact
- Domain: Experience & interface
- Level: Foundational
- Last reviewed: 2026-09-24
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/tabs/>)

## What it means

A tab interface places labels in a tab list and associates each tab with a corresponding panel. Tabs switch views within the current context; they are not ordinary links between unrelated pages, and their keyboard model differs from global navigation.

## Why it matters

Tabs compact related peer content and let frequent users switch views without leaving the page. Correct semantics and activation behavior make selection, focus, and panel relationships understandable to keyboard and screen-reader users.

## When to use it

Use tabs for a small, stable set of related peer views when users usually need one at a time. Prefer visible sections, links, or an accordion when comparison, deep navigation, narrow screens, or unpredictable labels make a horizontal tab set difficult.

## How it works

1. Choose short, distinct labels and a sensible default panel.
2. Connect each tab programmatically to one panel and expose selected state.
3. Use arrow keys within the tab list and Tab to move from the active tab into its panel.
4. Activate on focus only when panel changes are immediate; otherwise require explicit activation.
5. Preserve state, URLs, and a usable fallback where the content warrants sharing or revisiting.

## A practical example

A case-management tool uses tabs for Overview, Activity, and Documents. Arrow keys move among tabs, only the active tab is in the page Tab sequence, and each panel loads immediately. A shared URL restores the selected view for returning staff.

## Where it breaks

Tabs hide content, constrain labels, and can overflow on small screens or with translation. Remote loading makes automatic activation frustrating, while using tab styling for page navigation creates misleading semantics.

## Common mistakes

- Using Tab key presses, rather than arrow keys, to move through every tab.
- Applying tab semantics to ordinary site navigation links.
- Allowing labels to wrap, truncate ambiguously, or overflow without a plan.
- Losing panel state whenever users switch tabs.

## Sources

1. [Tabs Pattern](<https://www.w3.org/WAI/ARIA/apg/patterns/tabs/>) — W3C Web Accessibility Initiative · Technical guidance
2. [Tabs](<https://design-system.service.gov.uk/components/tabs/>) — GOV.UK Design System · Institutional design system

## Related topics

- [Accordion](<https://wiki.soroush.uk/topic/accordion/>)
- [Navigation Design](<https://wiki.soroush.uk/topic/navigation-design/>)
- [Interaction State](<https://wiki.soroush.uk/topic/interaction-state/>)
