Table of Contents |
---|
...
An accordion is a list of headers that hide or reveal additional content when selected.
An accordion is similar in purpose to a tabbed interface: a list of items where one item is expanded into a panel at once.
The list items are effectively shortcuts to access separate content sections.
Usage & Behavior
An accordion should be used:
To allow users to have control over the content, by expanding what they want to read and hiding what they want to ignore.
Where there’s only a small space in which to display a lot of content.
When wanting to minimize scrolling.
To make lots of content appear less daunting, by allowing the user to focus on one part at a time.
...
The first content section in the accordion should be open when first loading the page.
Internal Logic
The accordion component delivers large amounts of content in a small space through progressive disclosure.
The user gets key details about the underlying content and can choose to expand content sections within the constraints of the accordion.
Accordions work especially well where vertical space is limited.
States (TBD - not final design)
State | Image | Comment |
---|---|---|
Section header closed | ||
Section header open | ||
Section header hover | ||
Selected content mark |
Special States (TBD - not final design)
State | Image | Comment |
---|---|---|
Selected content mark | ||
Section header with checkbox | ||
Section header with warning |
Interaction
You can click on any part of a section header to select (open) it.
There's always one section open in the accordion.
Only one section can be open at a time.
When opening a new section, the previously-open section should close automatically.
When closing an open section, the section beneath it should open automatically. Closing the last section in the accordion should automatically open the section directly above it.
Hovering over a section header should show a tooltip with the full name of the section header.
...
Make the entire header selectable. Allow users to click anywhere in the header area to expand or collapse the content; a larger target is easier to manipulate.
Give interactive elements enough space. Make sure interactive elements within the collapsible region are far enough from the headers that users don’t accidentally trigger a collapse. (The exact distance depends on the device).
Accessibility
...
<<In general each component should be A11y complied, please follow the 3 guidelines linked below. At the very least we should document that each component is in compliance with each of the 3>>
Focus management
<<How will the component work with keyboard only - without a mouse. Can be reference if written above
We already set a general guidelines described in /wiki/spaces/UX/pages/308969693 >>
Screen reader support
<<Make sure the components support screen reader for content or behaviour where needed - see /wiki/spaces/UX/pages/308248620 >>
Contrast & size compliance
<<Visual designers must comply with the minimal of /wiki/spaces/UX/pages/301498483 for each component>>
Compliance
Unless otherwise specified, see our general compliance information in Fundamentals - Accessibility
Design
Zeplin link | Screen thumbnail |
---|---|
https://zpl.io/VkmX6dq | |
Code
<<a box containing the code - discuss with Femi>>
...