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

Accessibility #74

Open majkoll opened 3 months ago

majkoll commented 3 months ago

The toggle button provided is currently rendered as a div element instead of a button element. This approach has accessibility implications as it lacks the necessary ARIA attributes and role needed for proper accessibility support.

For accessibility, it would be better if the toggle button is rendered as a button element. If it must be a div, appropriate ARIA attributes and roles should be added to ensure it is accessible (e.g. role, aria-pressed).