Disclosure
The disclosure component allows people to reveal or hide additional content.
It is made up of two parts:
- Trigger: Control to expand or collapse content
- Expandable / collapsible section: The content which is shown or hidden
To show several related disclosures one after another, use the accordion component.
Example
What problems it solves
The disclosure component helps reduce clutter by hiding additional content until people decide to show it. This makes it easier for people to find and focus on important information first, and access additional content only if and when needed.
When to use it
Use the disclosure component when you have content that people may or may not need to access.
When not to use it
Do not use the disclosure component for important information as some people may miss it.
Where to use it
Disclosures are generally used on busy pages to reduce overwhelm. They are also often found in settings panels, FAQs, and long forms.
How it works
The markup is a native <details> element, labelled by a <summary> element. The open attribute can be added to load it in an expanded state.
The component is enhanced with JavaScript, and when the script runs, it rebuilds each disclosure as a <button>. The reason for this, is that browsers and screen readers expose a <summary> less consistently than a <button>, and some do not expose a heading placed inside a <summary>. TalkBack on Android still does not, and older versions of Safari did not. So, to make the component behave more consistently, we use a custom disclosure component. See TalkBack does not expose a heading inside a summary element and Safari does not expose a heading inside a summary element in the compatibility notes for more information.
When enhanced, the button describes its expanded or collapsed state using aria-expanded. It also points at the content it controls using aria-controls.
Keyboard focus stays on the button after it is activated.
Collapsed content is hidden using hidden="until-found", so anything focusable inside a collapsed section still revealed when using the browsers in-page search. Older browsers treat the attribute as plain hidden, so the content stays hidden until the button is used. See Hidden versus hidden until found in the compatibility notes for more information.
When the page is printed, every disclosure is shown expanded.
Without JavaScript
Without JavaScript, the disclosure falls back to just rendering a native <details> element with some custom CSS styling.
Assistive technology compatibility
This component has been tested with the following browsers and assistive technologies.
| Assistive technology | Result | Notes |
|---|---|---|
| Keyboard | No issues | No notes |
| Voice Access/Chrome 154.0.8/Windows 11 | No issues | No notes |
| JAWS 2026.2603.86/Chrome 154.0.8/Windows 11 | No issues | No notes |
| NVDA 2026.1.1/Firefox 157.0/Windows 11 | No issues | No notes |
| VoiceOver/Safari macOS Tahoe 26.6 | No issues | No notes |
| VoiceOver/Safari/iOS 26.0 | No issues | Does not announce expanded or collapsed immediately after state change. This is a known bug with WebKit. See aria-expanded states are not announced immediately following a change on iOS in the compatibility notes. |
| TalkBack/Chrome 154.0.8/Android 17 | No issues | No notes |
| Windows Contrast themes | No issues | No notes |
| Windows Magnifier and/or Apple Zoom | No issues | No notes |
| Browser zoom | No issues | No notes |
| prefers-reduced-motion | Not applicable | There are no animations to reduce |
Last updated: 13 October 2026.