|
@@ -1,13 +1,14 @@
|
|
|
-<div id="using-with-accessibility">
|
|
|
- <h2 class="page-header">Using Font Awesome with Acessibility in mind</h2>
|
|
|
- <p>
|
|
|
- When using icons in your UI, there are ways to help assistive technology either ignore or better understand Font Awesome.
|
|
|
- </p>
|
|
|
+<section id="accessibility-manual" class="accessibility-manual">
|
|
|
|
|
|
- <h3>Icons used for pure decoration or visual styling</h3>
|
|
|
- <p>
|
|
|
- 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. You can make sure this is not read by adding the <code>aria-hidden="true"</code> to your Font Awesome markup.
|
|
|
- </p>
|
|
|
+ <h3>
|
|
|
+ <i class="gg-col fa fa-wrench text-muted fa-lg padding-right" aria-hidden="true"></i>
|
|
|
+ Manually make your icons accessible
|
|
|
+ </h3>
|
|
|
+
|
|
|
+ <p>When using icons in your UI, there are manual techniques and ways to help assistive technology either ignore or better understand Font Awesome.</p>
|
|
|
+
|
|
|
+ <h4 class="margin-top-xl">Icons used for pure decoration or visual styling</h4>
|
|
|
+ <p>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. You can make sure this is not read by adding the <code>aria-hidden="true"</code> to your Font Awesome markup.</p>
|
|
|
|
|
|
<div class="margin-top-lg margin-bottom-lg">
|
|
|
{% highlight html %}
|
|
@@ -33,12 +34,12 @@
|
|
|
<small class="text-muted">an icon being used in front of link text</small>
|
|
|
</div>
|
|
|
|
|
|
- <h3>Icons with semantic or interactive purpose</h3>
|
|
|
+ <h4 class="margin-top-xl">Icons with semantic or interactive purpose</h4>
|
|
|
<p>
|
|
|
If you're using an icon to convey meaning (rather than only as a decorative element), ensure that this meaning is also conveyed to assistive technologies. This goes for content you're abbreviating via icons as well as interactive controls (buttons, form elements, toggles, etc.). There are a few techniques to accomplish this:
|
|
|
</p>
|
|
|
|
|
|
- <h4>If an icon is <strong>not</strong> an interactive element</h4>
|
|
|
+ <h4 class="margin-top-xl text-muted">If an icon is <strong>not</strong> an interactive element</h4>
|
|
|
<p>
|
|
|
The simplest way to provide a text alternative is to use the <code>aria-hidden="true"</code> attribute on the icon and to include the text with an additional element, such as a <code><span></code>, with appropriate CSS to visually hide the element while keeping it accessible to assistive technologies. In addition, you can add a <code>title</code> attribute on the icon to provide a tooltip for sighted mouse users.
|
|
|
</p>
|
|
@@ -76,7 +77,7 @@
|
|
|
<small class="text-muted">an icon being used to denote time remaining</small>
|
|
|
</div>
|
|
|
|
|
|
- <h4>If an icon represents an interactive element</h4>
|
|
|
+ <h4 class="margin-top-xl text-muted">If an icon represents an interactive element</h4>
|
|
|
<p>
|
|
|
In the case of focusable interactive elements, there are various options to include an alternative text or label to the element, without the need for any visually hidden <code><span></code> or similar. For instance, simply adding the <code>title</code> attribute to the interactive element itself will be sufficient to provide an accessible alternative name for the element, as well as providing the mouse tooltip.
|
|
|
</p>
|
|
@@ -106,13 +107,14 @@
|
|
|
<small class="text-muted">an icon being used as a delete button's symbol</small>
|
|
|
|
|
|
</div>
|
|
|
-</div>
|
|
|
-
|
|
|
-<div class="alert alert-success">
|
|
|
- <ul class="fa-ul margin-bottom-none">
|
|
|
- <li>
|
|
|
- <i class="fa-li fa fa-info-circle fa-lg" aria-hidden"true"></i>
|
|
|
- <a href="{{ page.relative_path }}examples/#accessible">See more examples of how to add accessibility-minded icons</a> into your UI.
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
-</div>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="alert alert-success">
|
|
|
+ <ul class="fa-ul margin-bottom-none">
|
|
|
+ <li>
|
|
|
+ <i class="fa-li fa fa-info-circle fa-lg" aria-hidden"true"></i>
|
|
|
+ <a href="{{ page.relative_path }}examples/#accessible">See more examples of how to add accessibility-minded icons</a> into your UI.
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+</section>
|