A “stack” of panels featuring descriptive, clickable tabs that enable users to navigate from panel to panel without having to leave the page.
Use Cases:
Guidelines:
Use this interactive layout tool to add informational hierarchy to a page, to help users prioritize related content by concealing non-essential details that supplement the default-open first panel.
Tabs can be especially helpful for people who use a set of information regularly, allowing them to switch quickly between the panels to help them perform tasks.
Avoid:
Avoid using tabs merely to shorten a page that most users would want to read in its entirety. Tabs hide content, and many users will not notice content that’s hidden behind unrevealed tabs.
Because tabs present barriers to reading and require extra clicks to reveal information, they’re best used when the first panel of content is all that is necessary for most users.
If a page feels too long and you’re looking for a way to shorten it, consider breaking it up into multiple pages instead of using patterns that hide content, like tabs or accordions.
Accessiblity:
Tabs add complexity for all users and can make it more difficult for people using keyboard browsing or screen reading software to understand and navigate the content on a page.
Use clear, descriptive labels for each tab, and add headings to the content at the beginning of each panel to help users orient themselves, especially on small screens and screen readers.
The pattern is designed so that when focused on a tab, the user can tap the arrow keys to navigate to and select the other tabs, according to W3C best practice. This is also consistent with the behavior of the WDS search page.
Preview various component colors, widths, and alignments.
First panel is open or in focus by default when the page loads.
Second panel is hidden until the user selects it.
Third panel is hidden until the user selects it.
Fourth panel is hidden until the user selects it.