I've done a few quick SEO tests of a page and they all suggest "consider adding text to links". The links they were referring to are all social icons, and are displayed using icon fonts. I've read a few different questions similar to this and most of the answers were unclear or didn't help.
Here are some similar answers to other questions (with how I would respond for my situation):
- Don't put SEO first (I haven't, since I'm already done with the site).
- Don't over think it (I'm not. It never even crossed my mind before doing seo scans).
- Do what's best for your readers (This affect readers one way or another since I'm not actually changing the display (although it might actually screen readers by adding this.. not sure).
Right now they're being displayed as social icons empty but appear as links without any text to search engines. More so it's adding unnecessary tags.
Here's an example:
With a little manipulation I can remove the I tag and replace with span (not sure if that's better or even matters). I can also now add text to that span with a text-hide or sr-only class which would hide it.
I know that it's generally not good to hide text, but in situations like this would I get penalized or is this actually better to do? This would add text to an empty link and possibly help screen readers if using the sr-only class.
New example with hidden text:
<a href="https://www.facebook.com/disputebills" class="fa fa-md fa-facebook">
<span class="text-hide"">Dispute Bills Facebook Page</span>
</a>
I'm using twitter bootstrap which has two css classes to hide text. If hiding the text is ok in this situation, I'm not sure if sr-only would be better to use then .text-hide (in terms of seo).
.text-hide {
font: 0/0 a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0,0,0,0);
border: 0;
}
title
attribute?