content icon indicating copy to clipboard operation
content copied to clipboard

Summary as headline - a11y-proven?

Open hexabinaer opened this issue 2 years ago • 2 comments

MDN URL

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary

What specific section or headline is this issue about?

Summaries as headings

What information was incorrect, unhelpful, or incomplete?

Summaries in headings might be hidden from screen reader JAWS (not sure about support in more recent versions).

What did you expect to see?

Accessibility-tested example - or caveat (see below).

Do you have any supporting links, references, or citations?

See example: https://www.openculturas.org/en/events/openculturas-dojo

Do you have anything more you want to share?

We conducted several screen reader tests (back in March 2022) with a <summary><h2>Headline</h2></summary>.

  • NVDA passed
  • MS Narrator passed
  • JAWS did not recognize the headline level - which was of course a major accessibility issue.

Interested in workarounds? We tried <summary role="heading" aria-level="2"> to no effect and ended up adding an extra visually hidden h2 before each details element containing such a structuring headline.

If it is not possible to test with different JAWS versions (I do not have access to a current one otherwise I would have re-tested), please add a caveat.

MDN metadata

Page report details
  • Folder: en-us/web/html/element/summary
  • MDN URL: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary
  • GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/html/element/summary/index.md
  • Last commit: https://github.com/mdn/content/commit/78005ac1a20c9ad7d61ff3228e93b25d390a32db
  • Document last modified: 2024-03-14T23:29:14.000Z

hexabinaer avatar Jun 06 '24 12:06 hexabinaer

Don't we already have a warning below?

Warning: Because the <summary> element has a default role of button (which strips all roles from child elements), this example will not work for users of assistive technologies such as screen readers. The <h4> will have its role removed and thus will not be treated as a heading for these users.

Josh-Cena avatar Jun 09 '24 04:06 Josh-Cena

Closing because this should already be warned.

Josh-Cena avatar Jun 19 '24 23:06 Josh-Cena