Homeglossary

Accordion

Accordion is a user interface component that lets people expand or collapse related content sections on a webpage or in an app. It shows section labels first and reveals details only when a user selects a label. In software design, a well-built accordion balances space savings with clear labels, keyboard access, and predictable behavior.

Build accessible interfaces with Emergent.

What is an accordion in web and app design?

An accordion is a user interface component that expands or collapses related content on a webpage or in an app. It shows labeled headers and reveals the matching panel when selected, such as shipping, sizing, and returns on a product page or notification, privacy, and account settings.

Each section has collapsed and expanded states. An accordion can allow one open panel or several, depending on whether users need to compare information.

How an accordion component works

A reliable accordion connects each visible control to its content panel and communicates its current state.

  1. Provide a clear, descriptive header for each section.
  2. Make headers usable with a pointer, keyboard, and assistive technology.
  3. Update the component's expanded state.
  4. Reveal or hide the associated panel without unexpectedly changing unrelated content.
  5. Announce the updated state to screen readers and keep keyboard focus logical.
  6. Use single-open mode or preserve open panels in multiple-open mode.

Accordion vs. tabs vs. disclosure controls

These patterns manage content density but create different user expectations.

PatternBest forUser expectation
AccordionStacked, related sections such as FAQs or settingsExpand details in place
TabsPeer views where one panel is active at a timeSwitch between categories
Disclosure controlOptional supporting detail near a specific itemShow or hide extra information

Benefits of accordion menus

Accordions work well when readers need to scan choices before opening details.

  • They support progressive disclosure by showing essential information first.
  • They reduce scrolling on small screens and make grouped content easier to scan.
  • They suit FAQs, documentation, filters, and settings with independent sections.
  • They can simplify long forms when one part needs attention at a time.

Practical limits and accessibility risks

Saving space should not make important information difficult to find or use.

  • Do not hide critical instructions, errors, or required information by default.
  • Avoid vague labels such as “More” and excessive nested accordions.
  • Preserve expanded states after a link or validation error where practical.
  • Use real buttons, visible focus indicators, and programmatic state such as aria-expanded and aria-controls.
  • Do not rely on color, icon changes, or animation alone to show state.

Best practices for accessible accordions

Good accordion design is predictable, readable, and easy to test.

  • Use descriptive, question-like labels that explain each panel.
  • Keep panels understandable on their own and choose the default open state intentionally.
  • Support Enter and Space through native button behavior.
  • Respect reduced-motion preferences when panels animate.
  • Test with keyboard-only navigation and a screen reader, following WCAG accessibility guidance.

Building accordion interfaces with Emergent

When building a web or mobile application with Emergent, describe the labels, single- or multiple-open behavior, responsive layout, accessible states, and test requirements in plain language. This supports thoughtful app design and development, and an AI web app builder can turn those requirements into an interface to review and refine.

Start Building
on Emergent today
Start Building