Summary elements must have discernible text

How to fix the summary-name accessibility rule. Names of links, buttons and controls.

The message you saw

axe-core, axe DevTools and this checker
Summary elements must have discernible text (rule summary-name)

Lighthouse has no audit for this rule, so you’ll only see it from axe-core based tools.

What it means

The <details> element makes a section that opens and closes; its <summary> is the clickable line that does the opening. The browser treats that summary as a button, so it needs a name. This message means a summary has no text, no aria-label, no aria-labelledby and no title.

It usually happens when the summary holds only an icon (a plus sign or chevron drawn with SVG or CSS). axe only checks the first <summary> directly inside a <details>, because that is the one the browser makes interactive.

Who is affected

The <summary> that opens a <details> section has no text, so screen readers announce only "disclosure triangle" or "button".

Screen-reader users hear “collapsed, button” or “disclosure triangle” without knowing what will open. On an FAQ page with many of these, every one sounds the same.

How to find it

  1. Run the checker, or search the source for <summary.
  2. FAQ sections, “show more” areas and mobile menus often use <details>.

How to fix it

  1. Put words inside the <summary> that say what the section holds (the question, for an FAQ).
  2. If the design shows only an icon, add aria-label to the summary and aria-hidden="true" to the icon, but visible text is better for everyone.

Example

Before

<details>
  <summary><svg>…</svg></summary>
  <p>Delivery takes 3 to 5 days.</p>
</details>

After

<details>
  <summary>How long does delivery take?</summary>
  <p>Delivery takes 3 to 5 days.</p>
</details>

WCAG success criteria

When this rule fails, the page fails:

Check your fix

Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools. Scan again after your change: when the rule no longer appears under the problems, the fix worked.

An automated pass means this rule found nothing wrong. It doesn’t prove the page is accessible: some of what WCAG asks for needs a person to check, and the report’s manual checklist lists those steps.

Related fix guides

More detail