bokmann / font-awesome-rails

the font-awesome font bundled as an asset for the rails asset pipeline
http://fortawesome.github.com/Font-Awesome/
MIT License
1.86k stars 244 forks source link

Request aria-hidden="true" #216

Open AxelBriche opened 3 years ago

AxelBriche commented 3 years ago

Can you please add aria-hidden="true" by default on tag when a text is provided for accessibility or add a configuration for add aria-hidden by default?

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-hidden_attribute

mockdeep commented 2 years ago

This would be great! We end up adding it manually to all of our icons.

rmm5t commented 2 years ago

A PR for this would be much appreciated.

I think aria-hidden=true as the default would be fine as long as an option of hidden: false can also be passed to fa_icon to disable this new default attribute. i.e. I can imagine a scenario where voicing shouldn't be suppressed for some uses of an icon.