Rule
Disclosure names
Disclosure controls (<summary>) need an accessible name.
- Rule
summary-name- WCAG 2.2
- 4.1.2 Name, Role, Value (opens in a new tab) (Level A)
- Severity
- Serious
What it checks
The rule looks at the <summary> that opens and closes each <details> element. Only the first <summary> child acts as the control, so only that one is judged. It fails when the summary has no accessible name, such as one holding only an icon, because a screen reader announces an unnamed control and the user cannot tell what it expands. A <details> with no summary is not judged, since the browser supplies its own label.
Example
Fails
<details>
<summary><span class="icon-chevron"></span></summary>
<p>Orders arrive within three working days.</p>
</details>
Passes
<details>
<summary>Delivery times</summary>
<p>Orders arrive within three working days.</p>
</details>
The engine is tested against both examples.
How to fix it
Put text inside the <summary> that names what it reveals, or add an aria-label when it shows only an icon.
Check your own pages
This rule runs in every pour audit: the browser extension, the bookmarklet, the command line and the editor. Get pour, free.