summaryrefslogtreecommitdiff
path: root/pyssg.xyz/live/static/fork-awesome/src/doc/_includes/accessibility
diff options
context:
space:
mode:
Diffstat (limited to 'pyssg.xyz/live/static/fork-awesome/src/doc/_includes/accessibility')
-rw-r--r--pyssg.xyz/live/static/fork-awesome/src/doc/_includes/accessibility/accessibility-manual.html121
-rw-r--r--pyssg.xyz/live/static/fork-awesome/src/doc/_includes/accessibility/background.html15
-rw-r--r--pyssg.xyz/live/static/fork-awesome/src/doc/_includes/accessibility/other.html17
3 files changed, 153 insertions, 0 deletions
diff --git a/pyssg.xyz/live/static/fork-awesome/src/doc/_includes/accessibility/accessibility-manual.html b/pyssg.xyz/live/static/fork-awesome/src/doc/_includes/accessibility/accessibility-manual.html
new file mode 100644
index 0000000..1f68205
--- /dev/null
+++ b/pyssg.xyz/live/static/fork-awesome/src/doc/_includes/accessibility/accessibility-manual.html
@@ -0,0 +1,121 @@
+<section id="accessibility-manual" class="accessibility-manual">
+
+ <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 {{ site.forkawesome.name }}.</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 {{ site.forkawesome.name }} markup.</p>
+
+ <div class="margin-top-lg margin-bottom-lg">
+{% highlight html %}
+<i class="fa fa-fighter-jet" aria-hidden="true"></i>
+{% endhighlight %}
+<small class="text-muted">an icon being used as pure decoration</small>
+ </div>
+
+ <div class="margin-bottom-lg">
+{% highlight html %}
+<h1 class="logo">
+ <i class="fa fa-pied-piper" aria-hidden="true"></i>
+ Pied Piper, A Middle-Out Compression Solution Making Data Storage Problems Smaller
+</h1>
+{% endhighlight %}
+<small class="text-muted">an icon being used as a logo</small>
+ </div>
+
+ <div class="margin-bottom-lg">
+{% highlight html %}
+<a href="https://github.com/FortAwesome/Font-Awesome"><i class="fa fa-github" aria-hidden="true"></i> View this project's code on Github</a>
+{% endhighlight %}
+<small class="text-muted">an icon being used in front of link text</small>
+ </div>
+
+ <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 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>&lt;span&gt;</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>
+
+ <div class="margin-bottom-lg margin-top-lg">
+{% highlight html %}
+<dl>
+ <dt>
+ <i class="fa fa-car" aria-hidden="true" title="Time to destination by car"></i>
+ <span class="sr-only">Time to destination by car:</span>
+ </dt>
+ <dd>4 minutes</dd>
+
+ <dt>
+ <i class="fa fa-bicycle" aria-hidden="true" title="Time to destination by bike"></i>
+ <span class="sr-only">Time to destination by bike:</span>
+ </dt>
+ <dd>12 minutes</dd>
+</dl>
+{% endhighlight %}
+ <small class="text-muted">an icon being used to communicate travel methods</small>
+ </div>
+
+ <div class="margin-bottom-lg margin-top-lg">
+{% highlight html %}
+<i class="fa fa-hourglass" aria-hidden="true" title="60 minutes remain in your exam"></i>
+<span class="sr-only">60 minutes remain in your exam</span>
+
+<i class="fa fa-hourglass-half" aria-hidden="true" title="30 minutes remain in your exam"></i>
+<span class="sr-only">30 minutes remain in your exam</span>
+
+<i class="fa fa-hourglass-end" aria-hidden="true" title="0 minutes remain in your exam"></i>
+<span class="sr-only">0 minutes remain in your exam</span>
+{% endhighlight %}
+ <small class="text-muted">an icon being used to denote time remaining</small>
+ </div>
+
+ <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>&lt;span&gt;</code> or similar. For instance, simply adding the <code>aria-label</code> attribute with a text description to the interactive element itself will be sufficient to provide an accessible alternative name for the element. If you need to provide a visual tooltip on mouseover/focus, we recommend additionally using the <code>title</code> attribute or a <a href="https://github.com/chinchang/hint.css">custom tooltip</a> solution.
+ </p>
+
+ <div class="margin-bottom-lg margin-top-lg">
+{% highlight html %}
+<a href="path/to/shopping/cart" aria-label="View 3 items in your shopping cart">
+ <i class="fa fa-shopping-cart" aria-hidden="true"></i>
+</a>
+{% endhighlight %}
+ <small class="text-muted">an icon being used to communicate shopping cart state</small>
+ </div>
+
+ <div class="margin-bottom-lg margin-top-lg">
+{% highlight html %}
+<a href="#navigation-main" aria-label="Skip to main navigation">
+ <i class="fa fa-bars" aria-hidden="true"></i>
+</a>
+{% endhighlight %}
+ <small class="text-muted">an icon being used as a link to a navigation menu</small>
+ </div>
+
+ <div class="margin-bottom-lg margin-top-lg">
+{% highlight html %}
+<a class="btn btn-danger" href="path/to/settings" aria-label="Delete">
+ <i class="fa fa-trash-o" aria-hidden="true" title="Delete this item?"></i>
+</a>
+{% endhighlight %}
+ <small class="text-muted">an icon being used as a delete button's symbol with a <code>title</code> attribute to provide a native mouse tooltip</small>
+ </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>
diff --git a/pyssg.xyz/live/static/fork-awesome/src/doc/_includes/accessibility/background.html b/pyssg.xyz/live/static/fork-awesome/src/doc/_includes/accessibility/background.html
new file mode 100644
index 0000000..ac26a4a
--- /dev/null
+++ b/pyssg.xyz/live/static/fork-awesome/src/doc/_includes/accessibility/background.html
@@ -0,0 +1,15 @@
+<div id="accessibility-background">
+ <h4 class="margin-top-none">About Icon Fonts &amp; Accessibility</h4>
+ <p>
+ Modern versions of assistive technology, like screen readers, will read CSS generated content (how {{ site.forkawesome.name }} icons are rendered), as well as specific Unicode characters. When reading our default markup for rendering icons, assisistive technology may have the following problems.
+ </p>
+
+ <ul>
+ <li>
+ The assistive technology may not find any content to read out to a user
+ </li>
+ <li>
+ The assistive technology may read the unicode equivalent, which could not match up to what the icon means in context, or worse is just plain confusing
+ </li>
+ </ul>
+</div>
diff --git a/pyssg.xyz/live/static/fork-awesome/src/doc/_includes/accessibility/other.html b/pyssg.xyz/live/static/fork-awesome/src/doc/_includes/accessibility/other.html
new file mode 100644
index 0000000..d3054ba
--- /dev/null
+++ b/pyssg.xyz/live/static/fork-awesome/src/doc/_includes/accessibility/other.html
@@ -0,0 +1,17 @@
+<section id="accessibility-other" class="accessibility-other">
+ <h2 class="page-header">Other cases and information</h2>
+ <p>
+ While the scenarios and techniques here help avoid some serious issues and confusion, they are not exhaustive. There are many complex contexts and use cases when it comes to accessibility, such as users with low vision who need a high color contrast ratio to see UI. There are some great tools and resources to learn from and work on these issues out there. Here are a few reads we recommend.
+ </p>
+
+ <ul>
+ <li><a href="https://www.filamentgroup.com/lab/bulletproof_icon_fonts.html">https://www.filamentgroup.com/lab/bulletproof_icon_fonts.html</a></li>
+ <li><a href="https://css-tricks.com/html-for-icon-font-usage/">https://css-tricks.com/html-for-icon-font-usage/</a></li>
+ <li><a href="http://www.sitepoint.com/icon-fonts-vs-svg-debate/">http://www.sitepoint.com/icon-fonts-vs-svg-debate/</a></li>
+ <li><a href="http://leaverou.github.io/contrast-ratio">http://leaverou.github.io/contrast-ratio/</a></li>
+ </ul>
+
+ <p>
+ We'll continue to work on these under the larger topic of accessibility, but in the meantime, <a href="{{ page.relative_path }}community/#reporting-bugs">let us know if any bugs or issues</a>.
+ </p>
+</section>