w3c / aria-practices

WAI-ARIA Authoring Practices Guide (APG)
https://www.w3.org/wai/aria/apg/
Other
1.18k stars 312 forks source link

Disclosure Native HTML Example #2770

Open j-mendez opened 11 months ago

j-mendez commented 11 months ago

The example for the disclosure pattern at https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/examples/disclosure-faq/ uses custom html, css, and js to build the view. HTML has the disclosure pattern built in using

. The details element works with all browsers and provides the same functionality without needing extra javascript.

It would be better to display the native counter part on the example instead of using aria properties.

j-mendez commented 11 months ago

Link to the details HTML element https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details

csarven commented 2 weeks ago

See also https://github.com/w3c/aria-practices/issues/3046