tailwindlabs / heroicons

A set of free MIT-licensed high-quality SVG icons for UI development.
https://heroicons.com
MIT License
21.33k stars 1.28k forks source link

Add `aria-hidden="true"` by default #257

Closed neupauer closed 3 years ago

neupauer commented 3 years ago

Because icons are almost always a purely decorative element, it would be handy to mark them as aria-hidden="true" by default.

They can be re-exposed to Accessibility Tree explicitly later in code if needed ( aria-hidden="false" ).

rashidul0405 commented 8 months ago

Usually, icons are linked. doesn't pass accessibility test https://dequeuniversity.com/rules/axe/4.8/link-name

mockdeep commented 7 months ago

You can put aria-label on your a tag to satisfy accessibility standards.

rashidul0405 commented 7 months ago

Yep, that's always needed to do. It's fine; my thought was that buttons are not necessarily used primarily as decorative elements nowadays.