by agwa · 14y ago · 0 comments
This seems like the wrong approach - shouldn't characters have semantic meaning? It also doesn't seem accessible. Screen readers wouldn't know what to do with these invented characters. <img> tags at least have the alt attribute.
<span class="mini-icon notifications"><span>Notifications</span></span>
Using media queries, serve CSS like this only to screen-like media (i.e. not screen readers): .mini-icon.create:before {
content: "\f030";
}
.mini-icon span {
display: none;
}
Hopefully they'll adopt something like this, though it wouldn't help people like me who just want a consistent font across the Web.Of course, screen readers might not respect that, in which your solution would work.
http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-...
Hopefully the 'create' one uses f003, which apparently lies in PRIVATE_USE_AREA [0]
.mini-icon.create::before {
content: "\f003";
}
[0] http://www.fileformat.info/info/unicode/char/f003/index.htmThe fact that I'm forced to override font sizes for usability because sites don't respect my default settings is bad enough. When they break because of it, it becomes terrible design.
This fad is supremely annoying.
And <a> tags have the title attribute.
Does any screen reader actually read the value of a title attribute on a link containing text? I doubt it. Instead it would descend into the <a> tag and try to read the text therein.
At least in 90% of the cases I've seen it used, probably by some overzealous OCD person wanting to fill in _all_ the attributes.
In a perfect world you'd be right, or perhaps even in a world where IE hadn't held the entire Internet back 10 years.