Buttons without accessible names #212712
🏷️ Discussion TypeBug 💬 Feature/Topic AreaActions BodyButtons without accessible namesI noticed that some buttons rely only on icons, without an accessible name. For example: <button onClick={toggleMenu}>
<MenuIcon />
</button>Screen readers may announce this as just "button", which isn't very helpful. Wouldn't it be better to add an <button onClick={toggleMenu} aria-label="Open menu">
<MenuIcon />
</button>It's a small detail, but I think it's easy to overlook during UI development. Do you usually check these things manually or rely on tools like Lighthouse and axe? |
Replies: 2 comments
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
yeah i agree this is easy to miss when building custom UI components i usually try to add aria labels to icon only buttons from the beginning lighthouse and axe are useful but they dont catch every accessibility issue so manual testing with a screen reader is still worth doing |
yeah i agree this is easy to miss when building custom UI components
i usually try to add aria labels to icon only buttons from the beginning
lighthouse and axe are useful but they dont catch every accessibility issue so manual testing with a screen reader is still worth doing