I have an anchor tag that does not have any text in it and just uses the <i>
element along with glyphicons
. While doing accessibility testing I found out that anchor tags should have text. One strategy is to put the text and visibly hide it using CSS.
I hide it visually using this CSS:
font: 0;
line-height: 0;
color: transparent;
However, this makes the glyphicon go away as well. Is there a way I can just hide the anchor tag but keep the glyphicon as-is?
My achor tag is below for example:
<a class="something"><i class="glyphicons glyphicons-some-icon"></a>