Summary elements must have an accessible name

The <summary> element is the toggle that opens a <details> section, so it needs text that says what will be revealed. Without it, users hear an unnamed control.

Rule IDsummary-name
ImpactSerious
Success criterion 4.1.2 Name, Role, Value · A
StandardsWCAG 2.0 · WCAG 2.1 · WCAG 2.2 · Section 508 · EN 301 549
Readabler fix Fixed with a text: from the page or written by AI

Example

Before
<details>
  <summary class="faq-toggle"></summary>
  <p>Orders ship within two working days.</p>
</details>

A screen reader announces “collapsed” or “details” with no hint of the content.

After
<details>
  <summary class="faq-toggle">When will my order ship?</summary>
  <p>Orders ship within two working days.</p>
</details>

A screen reader announces “When will my order ship?, collapsed”.

Why it matters

Browsers expose <summary> as an interactive control, much like a button that expands and collapses its <details> section. Screen reader users hear its name and state, such as “Shipping times, collapsed”. When the summary is empty, they hear only the state, so on an FAQ page with twenty items they face twenty identical, unnamed toggles and have to open each one to find what they need.

Speech recognition users cannot activate a toggle with no name. An empty summary also often means the designer replaced the text with a CSS icon such as a plus sign, which tells sighted users little and screen reader users nothing.

How to fix it

Put text inside the summary. Use a question or a short topic name:

<details>
  <summary>Return policy</summary>
  <p>You can return items within 30 days.</p>
</details>

The summary shows only an icon. Add text next to it, or name the summary with aria-label when the design truly has no room:

<summary aria-label="Filter options">
  <svg aria-hidden="true" focusable="false">…</svg>
</summary>

The visible heading is outside the summary. Move it inside, so the clickable area and the name match:

<details>
  <summary><h3>Size guide</h3></summary>
  …
</details>

Several toggles share the same text (“More”, “Show details”). Make each one specific, for example “Show details for the Deluxe room”, so they can be told apart in a list of controls.

Avoid giving <summary> a role that changes its behaviour. Native details and summary already handle the keyboard and the expanded state for you.

Checklist

  1. Write text inside every summary element.
  2. Use aria-label only for icon-only summaries.
  3. Make each toggle's text unique on the page.
  4. Keep the visible title inside the summary.

How the check works

The check looks at <summary> elements that act as the toggle of a <details> element (the first summary child). It passes when the summary has visible text, aria-label, aria-labelledby pointing to text, or a title. It fails when no name can be found. Check manually that the text describes what the section reveals.

Resources

Updated October 27, 2026