Hi folks,
One more time I’m wondering if what I usually do to provide accessible content is good or not. Is it really accessible, is it visible for search engines, isn’t it seen as spamdexing ?..
Help me !
Well, here is a situation and my solution. Is it good ? what do you do in that situation ?..
I have a header that is treated as an image. This image conveys text but for me, it’s not an illustration, therefore it shall not be treated as an <img>.
What I do :
<h2><span class="accessibility">Last News</span></h2>
with this stylesheet :
h2 {
background:url("last-news.png") no-repeat;
height:60px;
width:180px;
}
.accessibility {
font-size:0;
height:0;
left:-9999em;
overflow:hidden;
position:absolute;
top:-9999em;
width:0;
}
With this technique, the text content is here (so it’s accessible), and a modern browser hides the text and replaces it with the image. But what about the search engines ? Do they see the text ? Do they think it’s spamdexing ?
What do you think of this “accessibility” class ?