Are icon fonts like Font Awesome necessary?


(Michael Downey) #1

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?


Internal topic link behavior on non-http installs
(Robin Ward) #2

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)


(Michael Downey) #3

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:


(Stephen) #4

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.


(Kane York) #5

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


(Simon Cossar) #6

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.


(Michael Downey) #7

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


(Kane York) #8

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;
}

(Simon Cossar) #10


(Jeff Atwood) #11

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.


(geen slimme) #12

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.


(Scott Trager) #13

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…


(Jeff Atwood) #14

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.


(Michael Downey) #18

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


(Robin Ward) #19

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.


(cpradio) #20

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

That’s an interesting idea.


(Michael Downey) #21

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.


(cpradio) #22

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?


(Michael Downey) #23

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/


http://www.nczonline.net/blog/2013/04/01/making-accessible-icon-buttons/

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:


(cpradio) #24

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?