css - Display first letter only for glyph fonts (accesible way) -
i have glyph font , want use achieve effect:
my code far:
<div class="ico linkedin">linkedin</div> .ico {border-radius:10em; background:black; color:white} .linkedin {visibility:hidden;} .linkedin:first-letter { font-family:'justvector'; font-size:900%; text-indent:1em; visibility:visible }
this trick in chrome, not in ff or ie(9). also, isn't accesible, because jaws doesn't read hidden
or display:none
elements.
so, tried like:
.linkedin {position:absolute; left:-5em} .linkedin:first-letter {/*etc*/ position:absolute; left:6em}
but doesn't work. there proper , accesible way achieve this?
the accessible way use icons use img
elements adequate alt
attributes, e.g.
<img src=smiley.gif alt="just joking!">
icon fonts (which mean “gliph font”) have inherent accessibility problems. using e.g. letters , trying fool browsers rendering them icons css means css turned off, there letters, wrong information. using elements empty content , css-generated content suffers same problem, except instead of wrong information, there no information, when css (or @ least visual part of css) off.
Comments
Post a Comment