Accordion-Blocks icon indicating copy to clipboard operation
Accordion-Blocks copied to clipboard

Consider Even More Accessible Markup Pattern?

Open mrwweb opened this issue 5 years ago • 6 comments

I generally like the markup of this plugin which was one reason I chose to use it on a recent project. However, I think it could likely be even better if it used Scott O'hara's recommended markup:

<h2> 
  <button aria-expanded="false">Question goes here</button>
</h2>
<div hidden> <!-- not expanded, so hide the content! -->
  <p>My answer goes here!</p>
</div>

That would use a real button as the interactive element (less likely to have weird issues) and also let the heading keep it's native role and appear in outlines consistently.

I have no idea what's involved in making a change like this given that the block is already live, but I'd love for it to be considered!

mrwweb avatar Nov 22 '19 21:11 mrwweb