Icons are symbols that can convey a ton of information and really help people comprehend directions, signs, and interfaces. Its important that we create and use them so that they can reach the largest amount of people possible. That means making sure our icons play well with technology that helps people navigate and use apps and sites.
According to this article, there are a potentially surprising number of folks with sight and hearing impairments: Blindness, low vision, and visual impairment represent 8.4% of the total world population and disabling hearing loss represents 5.3% of the total world population.
We've built-in ways to help technology that supports impairments, like screen readers, either ignore or better understand the Font Awesome icons you're using. In short, we try to help with the following cases:
-
Using Icons are Decorative Elements
If you're using an icon to add some extra decoration or branding, it does not need to be announced to users as they are navigating your site or app aurally. Additionally, if you're using an icon to visually re-emphasize or add styling to content already present in your HTML, it does not need to be repeated to an assistive technology-using user.
-
Using Icons for Semantic or Interactive Purposes
If you're using an icon to convey meaning, ensure that this meaning is also conveyed to users who may be interacting with your UI using different methods or tools by providing text-based alternatives. This goes for content you're abbreviating via icons (e.g. shopping cart status, number of unread messages, etc.) as well as interactive controls (e.g. buttons, form elements, toggles, etc.).
If enabled as a feature in your embed code, Font Awesome CDN will try to identify the scenarios above in your UI as well as provide the modern and proper syntax assistive technologies recognize. For icons that have semantic or interactive meaning, this means you'll need to provide a proper text alternative to be used. Here's how:
For icons that are decorative
Font Awesome CDN's auto accessibility feature will make sure it is ignored by assistive technology. There's nothing extra you need to on top of how you would usually reference an icon.
Here's what your markup should be.
<button type="submit">
<i class="fa fa-envelope"></i> Email Us!
</button>
And Font Awesome CDN changes that to the following.
<button type="submit">
<i class="fa fa-envelope" aria-hidden=”true”></i> Email Us!
</button>
For icons that have semantic or interative meaning
Font Awesome CDN's auto accessibility feature will try to apply a fallback alternative for the icon based on any any alternatives and configuration you set on the icon.
Here's what your markup should be.
<button type="submit">
<i class="fa fa-arrow-right" title="Submit My Tax Return"></i>
</button>
And Font Awesome CDN changes that to the following.
<button type="submit">
<i class="fa fa-arrow-right" title="Submit My Tax Return"></i>
<span class="sr-only">Submit My Tax Return</span>
</button>
More on Font Awesome & Accessibility