So, I'm wrapping heading tags (h1, h2, h3, h4, h5, h6) in and . The problem is they lose the "heading" ARIA role by default. From the MDN docs:
Warning: Because the
element has a default role ofbutton[...] thewill have its role removed and thus will not be treated as a heading for these users.
But can't you easily fix this by overriding as below? The reason I ask is that I haven't seen this trick anywhere in my Googling, just lots of complaints about how the details-summary elements are broken and unfixable. So maybe I am missing something.
Heading
Lorem ipsum...