Tabs
The tabs component allows people to show and hide content by selecting the corresponding tab control.
It's inspired by physical paper folders, where pages of content are grouped in sections and indexed with a protruding labelled tab.
The tabs component is made up of three parts:
tablist- a container to hold thetabelementstab- the controls the user interacts withtabpanel- the containers which hold the content
Example
What problems it solves
The tabs component helps people find, read, and understand related content by breaking it down into more manageable chunks to minimise cognitive load. It allows to toggle between sections rather than scrolling large amounts of content, which can help prevent people from becoming overwhelmed or frustrated.
When to use it
Use the tabs component when:
- The content can be separated into clearly labelled sections
- The first section is more relevant than the others for most users
- Users do not need to view more than one section at once
When not to use it
Do not use the tabs component for:
- Unrelated sections of content (use separate pages instead)
- Important information; some people may miss it
- Content that needs to accessed in a specific order, such as a step-by-step process
- Blocks of information that users may need to compare; having to memorise the information while switching in between tabs can be frustrating and difficult
Where to use it
Tabs are often found on product pages, dashboards, settings screens and profile pages, where a few related views share the same space on the page.
How it works
Above 800 pixels wide, the sections are shown as a row of tabs with one tabpanel visible at a time. Only the selected tab is in the tab order, the arrow keys move between the tabs, and the tabpanel itself is not focusable, so pressing Tab from the selected tab moves to the first focusable element in its content, or out of the component when there is none.
Below that width the sections become an accordion which keeps one section open at a time, matching the one at a time variant of the accordion component: each toggle is a button with an aria-expanded state and a chevron before its label, and activating the open section's toggle collapses it. The layout switches as the element is resized, keeping the same section selected.
Without JavaScript
The markup is a list of in-page links, followed by a heading and the content for each section. Without the script, people get a table of contents as a list of links, and can read every section in full. The script replaces that markup with the tabs or the accordion, so nobody sees a control which is broken, and no content is unreachable.
Assistive technology compatibility
This component has been tested with the following browsers and assistive technologies.
| Assistive technology | Result | Notes |
|---|---|---|
| Keyboard | No issues | No notes |
| Voice Access/Chrome 154.0.8/Windows 11 | No issues | No notes |
| JAWS 2026.2603.86/Chrome 154.0.8/Windows 11 | No issues | No notes |
| NVDA 2026.1.1/Firefox 157.0/Windows 11 | No issues | No notes |
| VoiceOver/Safari macOS Tahoe 26.6 | No issues | No notes |
| VoiceOver/Safari/iOS 26.0 | No issues | No notes |
| TalkBack/Chrome 154.0.8/Android 17 | No issues | No notes |
| Windows Contrast themes | No issues | No notes |
| Windows Magnifier and/or Apple Zoom | No issues | No notes |
| Browser zoom | No issues | No notes |
| prefers-reduced-motion | Not applicable | There are no animations to reduce |
Last updated: 13 October 2026.