Many respected accessibility experts (like Scott O’Hara and Adrian Roselli) have correctly urged caution when considering <details> in years past, because of its inconsistent implementations in various browsers and assistive technologies.

But are these concerns still valid in mid-2024? I’ve read the latest specification, perused the browser engine Bugzillas, and done a ton of browser and screen reader testing to get the current state of HTML’s most interactive element. The results are below.

This page is adapted from a presentation I recorded for HighEdWeb’s 2024 Accessibility Summit.

Browser and accessibility considerations

When should you use it?

As-is, <details> may not be the perfect choice for all use cases, but I feel a solid argument can at least be made for the following:

The current HTML specification may also include recommendations regarding <details> usage (both for and against).

Implementation tips

The non-<summary> content within a <details> doesn’t need to be in a single container for grouping. But for the sake of styling this section separately from the summary, I do recommend putting it in a <section> (which can then be targeted via details[open] > section in CSS).

<details>
  <summary>The summary</summary>
  <section>
    <p>Some content.</p>
    <p>More content</p>
  </section>
</details>

I also like adding a cursor: default property to my <summary> elements, so the mouse pointer will be an arrow on hover. This is in line with button behavior. By default, the mouse pointer is a text selection icon when hovering over a <summary>. This just feels off to me, even if the text is selectable.

<details> demos

You can test out different implementations of <details> with various browsers and assistive tech via these CodePen links.

Browsers (and paired screen readers) used in testing

I used the latest versions of all these technologies, as of July 2024.