An accordion is a stack of vertical headers which hides or reveals chunks of content. The title of an accordion lets our users choose the sections of content they wish to read. It simplifies information discovery and processing for users.
The state of an accordion changes when the user presses the collapse/expand icon.
An accordion can be small, medium or large.
The accordion aligns with page content which it relates to, and can be placed on the left or right.
An accordion is placed on the main page or can be contained in a card or drawer.
Ensure the title is clear, descriptive and concise.
Larger amounts of content must only scroll vertically, and be split into paragraphs with sub-headings if necessary.
An accordion should scroll vertically - never horizontally - if its content is longer than the viewport. Content within an individual panel should not scroll.
Each section of an accordion can be independently collapsed or expanded.
Shell DS components are programmatically determinable with appropriate semantic markup and are designed to meet colour contrast requirements. If you’re not using Shell DS code, you will need to cover the accessibility considerations for each component in this pattern.
Tab moves focus to the next focusable element (label, title, heading etc), and all focusable elements in the accordion are included in the page tab sequence.
When focus is on the accordion header of a collapsed section, the enter key expands the section.
Shift + tab moves focus to the previous focusable element and all focusable elements in the accordion are included in the page tab sequence.
Users can change the state of an accordion by clicking on the chevron icon or near its header.
Ensure that semantic markup supports users of assistive technology so that they can scan accordion sections in the same way that a sighted user would.
Every effort has been made to ensure that the Shell Design System follows accessibility best practice.
The Shell DS React framework incorporates keyboard operation to support the widest variety of assistive technologies and devices. For any future frameworks other than React, accessibility will need to be reviewed.
Help us to help you by contacting the Accessibility team for support and information regarding any questions relating to accessibility.
Is this page useful for you?
Your feedback helps to improve our documentation.