4 ms·
What's the story for accessibility in font-based icon sets? Do you bind the glyphs to long self-descriptive ligatures or something?
by addaon 5y ago
What's the story for accessibility in font-based icon sets? Do you bind the glyphs to long self-descriptive ligatures or something?
- noduerme 5y agoNo, generally we just have a few dozen at most per font, so we put them in the latin alphabet where they'll be relatively easy to find, and then keep a corresponding SCSS file where each is mapped to a single character of content by a descriptive name, similar to how FontAwesome does it.
- addaon 5y agoWhat does a screen reader do with that? Not familiar with SCSS.
- noduerme 5y agoThat's a reasonable question. I don't know. As a ::before content some readers might issue a verbal hiccup, but they're generally never used in inline text; they're isolated in a div tag of their own as graphical elements, the way an SVG graphic would be. I'm struggling to think of a case where they'd ever need to be read out loud, but if there was you could add aria tags. It's usually used inside a header or float that isn't meant to be printed or read aloud.