You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Radina Matic edited this page Feb 1, 2016
·
9 revisions
KA Lite A11y Style Guide - Work in Progress
Font based icon sets
Irregardless of icon set you decide to use (Font Awesome, Glyphicons, etc...), here is something to keep in mind to ensure their accessibility. To render icon element invisible to screen readers you need to add aria-hidden="true" attribute, and then add a second span with text only for screen readers - class="sr-only":
DO NOT use semantic tags to assign style to font based icons
Define additional class to style the icons according to your needs.
NO
<h1 class="glyphicon ...></h1>
YES
<span class="icon-h1 glyphicon ...></span>
CSS
.icon-h1 {
(define your style here)
}
Elements with presentational content
Decorative images and graphics that do not have any functional, interactive, or structural relevance, should include role=”presentation”, preferably together with aria-hidden="true". Example: