Did you know?dyk.si

Accordion vs. Tabs vs. Steps

All three cut one page into parts, and they differ in what the user is allowed to do: open and close freely, switch between equals, or move forward through a fixed order.

Accordion (Disclosure)

An accordion is a stack of headers that expand and collapse in place, so the reader opens only the parts they care about and the page grows and shrinks.

Tabs

Tabs are a row of labels above one shared panel, where exactly one view is visible at a time and the views are siblings in no particular order.

Steps (Progress Stepper)

Steps are the numbered stages of a single long task, drawn as a map of where you are, what is done and how much is left.

Rule of thumb: Independent chunks people read some of: accordion. Equal views of one subject: tabs. One task with a fixed order: steps.

When to use each one

Accordion (Disclosure)

Stacked headings that expand and collapse their content — the classic FAQ pattern.

When to use it

For FAQs and long content people only read parts of.

Common mistake

Don’t hide information everyone needs.

Tabs

A row of labels that switches one shared content area between views.

When to use it

To switch views of the same subject without leaving the page.

Common mistake

Don’t use tabs for sequential steps; use a stepper.

Steps (Progress Stepper)

Numbered circles across the top, one per stage of a long flow like checkout.

When to use it

For long flows: checkout, sign-up, setup.

Common mistake

Not needed for fewer than three stages.

Names in code

AccordionTabsSteps
HTML/CSS<details> + <summary>role="tablist" / "tab" / "tabpanel"aria-current="step"
React<Accordion><Tabs><Stepper> — MUI
Jetpack ComposeAnimatedVisibility (custom)PrimaryTabRow + TabCustom Row (no built-in)
SwiftUIDisclosureGroupTabView / PickerCustom HStack

The full guide

The difference in one paragraph

An accordion is a vertical list of headers, each a button that expands or collapses its own block of content in place, so the page gets longer or shorter. Tabs are one row of labels above a shared content area: exactly one label is active, and picking another swaps what fills that area while the page height stays the same. Steps, or a progress stepper, are the numbered stages of one task you move through in order; the indicator maps where you are and what is left, and you advance with a Next button, not by clicking the circles. In short: accordion shows and hides, tabs switch between equals, steps move you forward.

How to tell them apart on screen

An accordion sits in the flow of the page as a stack of rows, each with a chevron that rotates when it opens, and its content pushes everything below it down as the page grows. Tabs are a horizontal strip of labels with an underline on the active one, above a panel, and nothing below it moves when you switch. A stepper is a track of numbered circles joined by lines: past stages done, the current one highlighted, the rest dimmed.

None of the three blocks the page: no backdrop, and no Esc, because nothing floats above the content. On mobile an accordion is the most natural of the three, and often what a desktop tab set becomes below 600 pixels. Tabs survive on a phone only when the labels are short or the strip scrolls sideways, which hides the last ones. A stepper usually shrinks to a line such as "Step 2 of 4" plus the current stage name.

Which one to choose

A FAQ page with 20 questions: accordion. People read two of them, the headers work as an index, and every answer stands alone.

A product page with Description, Specifications and Reviews: tabs on desktop, the same content as an accordion on mobile. Equal views of one subject, in no order.

Checkout with address, shipping, payment and review: steps. The order is fixed, each stage validates before the next opens, and people want to know what is left.

A settings screen with Profile, Notifications, Billing and Security: tabs, with the active tab in the URL so a support reply can link straight to Billing.

A long contract or an API reference people search inside: neither. Use plain headings with a table of contents, because collapsed content is harder to scan, print and search.

Mistakes teams make

Tabs used for a sequence. If the second view makes no sense before the first, tabs still let someone start on the third. Fix: use steps with a Next button and disable unreachable stages.

An accordion that hides what everyone needs. Price, delivery time and the return policy folded behind a header reach few visitors. Fix: keep the universal facts open and collapse only the long tail.

Numbered circles that look clickable but do nothing, or that let people jump ahead before the current stage is valid. Fix: completed stages click back, future stages stay non-interactive.

Every section closed on load with no deep linking, so a link to one FAQ answer lands on a closed row. Fix: open the section named in the URL fragment.

Accessibility and keyboard notes

Accordion: each header is a real button inside a heading element, with aria-expanded for the open state and aria-controls pointing at its panel. Tab moves between headers, Enter or Space toggles, and no Esc is needed because nothing overlays the page. The native details and summary pair gives this for free.

Tabs: the strip is role="tablist", each label role="tab" with aria-selected, each panel role="tabpanel". Only the active tab sits in the Tab order; arrow keys move between tabs and Tab then jumps into the panel. Prefer manual activation, where Enter or Space commits, when the panel loads data.

Steps: mark the current stage with aria-current="step" and put "Step 2 of 4" in visible text, not only a tooltip. Move focus to the first invalid field and announce the error in a live region. On touch, make accordion headers the full row width and at least 44 pixels tall.

How to ask a coding agent for it

Name the pattern and the behaviour, and say what must not happen. Three prompts for Claude Code:

“Turn the FAQ list into an Accordion built on details and summary: headers are buttons inside h3, one section open at a time, and the section named in the URL fragment opens on load.”

“Replace the product-detail sections with Tabs: role="tablist" with Description, Specifications and Reviews, manual activation with the arrow keys, and an Accordion below 600 pixels.”

“Add a four-stage Steps indicator above the checkout form with aria-current="step" and a visible Step 2 of 4 label: completed stages link back and future stages are not clickable.”

Frequently asked questions

Are tabs or an accordion better on mobile?

An accordion, in most cases. Tabs either squeeze the labels until they are unreadable or scroll sideways and hide the last ones.

Can more than one accordion section be open at once?

Yes, that is the default for the details element. Allow several when people compare sections; limit it to one to keep the page height stable.

Do I need a stepper for a two-stage form?

No. Below three stages it takes more room than the orientation it gives. Put both parts on one screen.

Should tabs change the URL?

Yes, if the panels are worth linking to or sharing. Keep the active tab in the query string so a support reply can point at one tab.