Are icon fonts like Font Awesome necessary?

In the following presentation “Death to Icon Fonts” from the London Web Standards conference, Seren Davies makes the case for using SVGs instead of icon fonts (like Font Awesome). The presentation highlights several serious accessibility problems caused by icon fonts, like incompatibility with special fonts used by many people with dyslexia (a condition which affects 10% of the population).

Is Discourse doing a disservice to 10% of its potential users by using an icon font so widely throughout the site? This presentation suggests it is. What do you think?

4 Likes

That is interesting but I have to admit I have yet to see one bug report for someone using a dyslexic font like that. Maybe 10% of users are dyslexic but almost none of them are using that solution?

Having said that, while icons are an important part of Discourse, I am not attached to keeping them as fonts. One thing I’ve been doing over the last few releases is converting our font icon HTML to a helper {{fa-icon}}, because in the past changes to how our icons have rendered as HTML have really bitten us. I think @neil spent a whole day once refactoring old font HTML.

In theory those {{fa-icon}} components could spit out SVG if we wanted. I’d entertain a pull request that did that, although we would be wary of performance regressions and file size.

(also I am also curious why a dyslexic font couldn’t just ignore the icons and only apply to letters)

5 Likes

So to be fair I made the topic title a bit opinionated on purpose.

But I am curious about performance of things like Font Awesome vs. inline SVG markup that could draw things like hearts and other simple icons:

http://codepen.io/anon/pen/WvJzxb

1 Like

Because many of the icons substitute letters in the character set, which results in a dyslexic reader such as JAWS reading the equivalent lettering out.

The two obvious long-term solutions are unicode (once it has been sufficiently extended, we’re not far off) or some form of Title property, but I’m not sure any reader products at the moment would support either approach.

Font Awesome uses the Unicode Private Use Area, so that shouldn’t be a problem.

2 Likes

This is Discourse with the Dyslexie font installed on a mac according to the instructions that they include with the font.

Inline SVG would solve the problem.

4 Likes

This is very insightful. Any chance you could show a screenshot of an “inside” topic page?

Unfortunately, there is no easy fix for disallowing webfonts.

If you’re willing to do a bit more work, you can make this work.

Get Stylish and add this as a style for all sites:

* {
  font-face: "Dyslexie" !important;
}
i.fa {
  font-face: "Font Awesome" !important;
}
4 Likes

1 Like

Follow @riking’s instructions, above – if you force override all fonts, you’re gonna have a bad time.

But overriding everything except <i class="fa"> should work just fine.

3 Likes

It’s not limited to people using a dyslexic font. It’s people using any own-font, or having a browser that fights you, like my firefox (I can’t really see why it blocks fonts, but I had to go look up how to enable them in some freaky about.config setting and then several reboots later it somehow either reset, or I had to undo it to get ZoomText to work in firefox, where stuff like font smoothing and any other weirdness usually has to be off to make ZT work well).

(ZT is screen magnification)

I’ve gotten used to seeing boxes everywhere, and if it’s decorative, who cares.
When it’s the sole visible text of something you use, like a button or a call to action, then it’s a problem.

Another set of users to think of: Dragon users. Can they always guess correctly the name of something represented with an image? Is a heart “love button” or “like button”? Only the Shadow knows…

(luckily you can get around stuff like no (known) names in dragon often by just looking for “buttons” or “links”, apparently… whew. Still sounds like a pain in the butt though)

Re bug reports: most users are like me: we’re lazy. We go elsewhere. We don’t go dive into the pit of figuring out bug reports. Instead, if we do anything, we b*tch on twitter or tumblr or something. Of course, without a bug report, how is anyone supposed to know there’s a problem? But, I’m just mentioning.

4 Likes

I’m sorry if I’m offending anyone by asking, but what the heck is a “Dragon” user? I knew a kid in college who thought he was a dragon, but I think that was mostly the LSD he was on talking…

This is a solved problem, same issue with image buttons. What happens if you disable images and thus SVG?

Changing fonts is easy, just change everything except stuff with a class of fa and you’re good.

Isn’t that approach a bit like asking people who use a wheelchair to build their own ramp to get into a building?

1 Like

I wouldn’t go that far. They’re already adding the font themselves.

Perhaps we can add the second part of @riking’s commit to core, then font awesome is forced always even if overwritten? Unless the font is doing something really odd.

1 Like

Because they implemented a font that doesn’t play well with another font?

That’s an interesting idea.

1 Like

Yes … IMHO that’s like telling someone since they chose to use a wheelchair, they’re responsible for workarounds to get equal access. :confused:

But agree that the @riking patch might be a good way to accommodate people with that extra need for accessibility, without affecting any standard users.

1 Like

So to you, they altered their Discourse to use a strange font, overriding ALL fonts on Discourse, and thus have no part of the blame for the Font Awesome icons disappearing?!? I don’t see how that is in any way part of Discourse’s problem.

They very well could have chosen to not override the font-awesome parts. Even if the person is not running Discourse and they override ALL fonts, that is a bit different, but they will likely be accustom to the fact it breaks some parts of each website they visit.

SVG sort of solves the problem, but at what cost? How much larger does the page become that must be served to the Desktop and Mobile? I’d imagine it becomes significantly larger.

Plus wouldn’t you run into scaling issues with SVG? For those who have limited vision and run their browser at a larger font size than normal?

Deciding to use FontAwesome’s default implementation strategy is an implicit decision to “break” web accessibility guidelines because there is no semantic meaning contained inside the <i></i> markup. Personally, I think putting the blame on people who use a tool that doesn’t break web standards to assist with their disability is not an acceptable way to avoid creating web sites that can be used by as many people as possible.

There are lots of discussions online about this; here are some random ones:
http://www.purplebabyhippo.co.uk/make-font-awesome-accessible/
https://www.drupal.org/node/1985504

Update accessibility · Issue #6133 · FortAwesome/Font-Awesome · GitHub

These are good questions and should be explored before committing to SVG as a way to solve the problem. There are several different approaches and SVG was just one suggested by the presenter in the original post. :slight_smile:

3 Likes

Can’t you use aria attributes to provide the accessibility data for font-awesome usage? I do admit, that just including the CSS styles doesn’t help, but that’s like putting an SVG image without any alt/title attributes. It isn’t the underlying image/font that is the problem, but the way the dev implemented it. Right?