Accordion

Stable
Last updated Jul 1, 2026

An accordion is a vertically stacked list of headers that reveal or hide associated sections of content.

Accordion

What Carbon provides

Design annotations are needed for specific instances shown below, but for the standard accordion component, Carbon already incorporates accessibility.

Carbon bakes keyboard operation into its components, improving the experience of blind users and others who operate via the keyboard. Carbon incorporates many other accessibility considerations, some of which are described below.

Keyboard interactions

Each accordion is a tab stop. Space or Enter keys expand or collapse accordions, which are collapsed by default. Interactive elements within expanded accordions integrate into the tab order automatically.

Example of accordion keyboard interaction

Accordions and interactive elements in the expanded content are in the tab order and keyboard operable.

Labeling and states

The collapsed or expanded state of the accordions is programmatically set by default, eliminating the need for designers to provide text equivalents for the chevron icons.

Expanded and collapsed accordions

Carbon handles the accessibility of the chevron indicators.

Design considerations

Design annotations are needed for the following instances.

Headings

Carbon accordions are not set as headings by default. For improved accessibility, annotate accordions as headings on the first occurrence in a product. Annotate the heading level of accordions as needed. See Indicate heading levels.

H1 and H2 annotations for headings, plus direction to ‘include accordion titles as headings'

If accordion titles act as headings, annotate for development.

Alignment

Carbon chevrons are right-aligned by default, but left-aligned chevrons are more accessible for users with low vision, as the expanded/collapsed indicator is closer to the accordion title.

Annotation stating ‘position chevrons on the left of accordion titles'

Annotate if the accordion chevrons should be left-aligned.

Development considerations

Keep these considerations in mind if you are modifying Carbon or creating a custom component:

  • The accordion header has a role of <button>, with an aria-expanded attribute set to "true" or "false".
  • The button has an aria-controls property set to the unique id of the panel it controls.
  • Since accordions are typically grouped together, Carbon puts each button inside a list item in an unordered list, which provides additional context to screen reader users; where only one accordion is used, it should not be put in a list.
  • When accordion titles are used as headings, the buttons are also wrapped in an element with an appropriate heading level; ARIA can be used to set both the heading role and the level (via aria-level).
  • See the ARIA authoring practices for more guidance.

Accessibility testing status

Latest version: 1.109.0 | Framework: React (@carbon/react)

ComponentAccessibility testStatusLink to source code
AccordionTest(s) that ensure the initial render state of a component is accessible.Automated or manual testing has been temporarily deferred.GitHub link
Tests that ensure additional states of the component are accessible. This could be interactive states of a component or its multiple variants.Automated or manual testing has been temporarily deferred.
Tests that ensure focus is properly managed, and all interactive functions of a component have a proper keyboard-accessible equivalent.Test data is either not available or not applicable for this component state.
This manual testing ensures that the visual information on the screen is properly conveyed and read correctly by screen readers such as JAWS, VoiceOver, and NVDA.Test data is either not available or not applicable for this component state.

Feedback

Help us improve this component by providing feedback, asking questions, and leaving any other comments on GitHub.