Does a CSS-only / disclosure widget need aria-expanded for accessibility?
Since <details>/<summary> already has built-in accessibility semantics (the browser exposes an implicit aria-expanded state via the open attribute), do I still need to manually add aria-expanded to be WCAG/ADA compliant? If aria-expanded is required, is there a no-JavaScript solution — or is scripting unavoidable to keep aria-expanded in sync with the open state? details[open] + div { display: block; } div { display: none; } <details name="my-group"> <summary>Utility menu</summary> </details> <div>Menu content</div>
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.