Why this wireframe works | Mobile accordion tabs
Every item name visible on mobile
On mobile the tabs become a vertically stacked accordion, so every name is visible without scrolling sideways.
Several items open at once on mobile
In an accordion, readers can keep as many items open as they like. The one-at-a-time limit of tabs disappears.
Roles that match each shape
On desktop the tab roles (tab, tabpanel) are used; on mobile the disclosure-button role (aria-expanded). Not only the look changes; how the control is described to screen readers matches each shape.
The same content on desktop and mobile
The headings, descriptions and bullets are the same on desktop and mobile, so mobile never ends up with less content.
Common mistakes | Mobile accordion tabs
The tab role kept on the mobile accordion
If role=”tab” remains after the look changes to an accordion, the screen reader describes an operation that does not match. Change the role to a disclosure button (aria-expanded) along with the shape.
The same content written twice
Writing the same text once for the tabs and once for the accordion means one copy gets missed on every edit. Keep the content in one place and switch only the presentation.
Every item closed on mobile
With everything closed, readers may not realize there is content inside. When the explanation at the top of the page is not enough, opening the first item shows that items can be opened.
Unclear open/close marks
Without “+”, “−” or an arrow, nothing says that pressing opens the item. Add the mark, and convey the state with aria-expanded too.
Not carrying state across the PC/mobile role switch
When switching between PC tablist, tab and tabpanel and mobile heading buttons with aria-expanded, take the hidden controls out of the focus order and carry over the selected item and open state.
FAQ | Mobile accordion tabs
Do I need two sets of HTML for desktop and mobile?
To avoid writing the content twice, one set of HTML can be rearranged with JavaScript, or the headings and content can be shared components used by both. The point is to have one place to edit.
At what width should it switch?
At the width where the tabs no longer fit on one line. It depends on the number of items and the length of the names, so test by changing the width.
Are there cases where tabs should stay tabs on mobile?
With two or three items with short names that fit on one line, tabs are fine on mobile too.













