cyntler / hamburger-react

Animated hamburger menu icons for React.js weighs only 1.5 KB.
https://hamburger-react.netlify.app
MIT License
963 stars 36 forks source link

Add aria-expanded for accessibility #46

Closed jgrenat closed 2 years ago

jgrenat commented 2 years ago

Hello!

To implement the disclosure pattern, that would be nice to be able to add the aria-expanded property. We can do something similar to https://github.com/luukdv/hamburger-react/pull/15.

I'd be happy to send a PR if you're okay with this feature :)

Thanks!

luukdv commented 2 years ago

Thanks for the suggestion!

I'd happily accept a PR. I wouldn't introduce a prop like in https://github.com/luukdv/hamburger-react/pull/15, just setting the value to true/false based on the toggled state.