Skip to content

role disclosure

Accordion draft v0.1.0

A stack of sections whose content shows and hides under a header people activate.

An accordion stacks sections of content, each behind a header: activating the header shows the section, activating it again hides it. It saves vertical space when people need only one or two sections at a time (settings groups, frequently asked questions, order details). Several sections may be open at once; the component never closes one when another opens. One section alone is the same thing with a single item.

Guidelines

From apps/docs/content/components/accordion.md

Overview

An accordion stacks sections behind headers: activating a header shows its section, activating it again hides it. It saves vertical space when people need one or two sections at a time: settings groups, frequently asked questions, order details. Several sections may be open at once; the component never closes one when another opens, because that needs script and the reference implementation ships none. One section alone is an accordion with a single item.

This page applies to every platform. Where a platform differs, the difference sits under a sub-heading named after it (Web, iOS, Android, Desktop); everything else holds everywhere.

When to use

  • Long pages whose sections people consult selectively (FAQ, policies, order details).
  • Settings grouped by topic, when the groups would be too long to show at once.

When not to use

  • Content people must read in full. Show it; do not make them open every section.
  • Switching between views of the same thing. That is a tab set, not in the system yet.
  • A menu of actions. Use a Dropdown.

Sizes

Size Use for
Small Dense panels: 40 px triggers with 14 px text and a 20 px chevron.
Medium Pages, the default: 48 px triggers with 16 px text and a 24 px chevron.

States

States belong to the items.

State How it happens What changes
Default Collapsed. The trigger alone, chevron pointing down.
Hover A pointer rests over the trigger. Needs a pointing device: there is no hover on touch. The trigger takes a light tint.
Active Pressed down. The next tint.
Focus visible Keyboard focus on the trigger. The shared focus ring appears around it. Pointer focus shows no ring.
Expanded The item’s open property, or activation. The panel appears under the trigger and the chevron turns.

Content

  • Titles are short noun phrases that let people decide whether to open the section: Shipping and returns, Payment methods.
  • Open at first only the section people most likely need.

Accessibility

The Specification tab lists the full accessibility contract, grouped into what holds on every platform and what is specific to one. Each statement there links the source it comes from. This section explains the decisions behind it.

Web

iOS

  • Disclosure controls reveal and hide information and functionality related to specific controls or views: the counterpart of an accordion section (Apple HIG: Disclosure controls).
  • Dropdown (a menu of actions behind a button)
  • Card (a group of content that is always shown)