3 ms·
I don't understand this. Most icon fonts use PUA codepoints to avoid issues with screen readers. If you're not going to use icon fonts, what are you going to u
by madeofpalk 10y ago
I don't understand this.
Most icon fonts use PUA codepoints to avoid issues with screen readers. If you're not going to use icon fonts, what are you going to use? Images? CSS Backgrounds? Inline SVGs?
Screen readers can't read any of them. Thankfully there are ways to make all of these accessible, with things like ARIA attributes.
- progval 10y agoWe can use SVG images/sprites with an alt="" attribute.
- pseudosavant 10y agoWhile that is probably 'better' how in practice does it matter. SVG (esp with sprints) vs icon font are basically the same. Both are ways of embedding multiple vector images in one resource that you attribute meaning to using `title` attributes. In practice they will behave pretty much exactly the same.
- matthewmacleod 10y agoThere are still some issues with that – for example, it's easier to change attributes like text colour when using an icon font, something that becomes substantially more awkward with SVG. This is appropriate for things like buttons and other elements with hover effects.
- Theodores 10y agoJust inherit the colour, in the spritesheet use: fill: currentColor; Same with stroke. Works great.
- tedunangst 10y agoIf you must use a magic font, why not use ligatures to replace words?