@privacybrowser There's a proposal for standardizing a CSS property to let you do this without cluttering your HTML markup.
I'd love to implement it this year so I can use it to implement <details>.
I don't know what the accessibility story will be in other browser engines, I don't think it's actually a thing yet.