stimulus-components / stimulus-reveal-controller

A Stimulus controller to toggle a class on one or multiple items to show or hide them.
https://www.stimulus-components.com/docs/stimulus-reveal-controller/
27 stars 5 forks source link

Support aria-expanded #5

Closed tmaier closed 1 week ago

tmaier commented 2 years ago

I wonder how to enable proper accessibility/ARIA support for a navigation menu, which gets revealed with stimulus-reveal-controller.

This is an implementation reference: https://www.w3.org/TR/wai-aria-practices/examples/menu-button/menu-button-links.html The challenge is aria-expanded="true" and aria-expanded="false" respectively, when the menu has been revealed or not.

Is there currently already a way to get this working?

guillaumebriday commented 2 years ago

That would be nice!

Could you open a PR please 🙏

guillaumebriday commented 1 year ago

Hi @tmaier

Can you review this PR please https://github.com/stimulus-components/stimulus-reveal-controller/pull/11?

tmaier commented 1 year ago

Hi @guillaumebriday, I will try to do a test run within the next couple of days.