Mobile app version of vmapp.org
Login or Join
Gretchen104

: SEO penalty by hiding text for sighted people but not for screenreaders Let’s say I have this setup: HTML: <a href="#" class="menu_links"><span class="hidetext">Graphic </span>Design</a>

@Gretchen104

Posted in: #Accessibility #Css #GoogleSearch #HiddenText #Seo

Let’s say I have this setup:

HTML:

<a href="#" class="menu_links"><span class="hidetext">Graphic </span>Design</a>


CSS:

.hidetext {
height: 1px;
width: 1px;
position: absolute;
overflow: hidden;
top: -10px;
}


It will only display "Design" for sighted people and when you toggle CSS off, it will show "Graphic Design".

Is this bad/good for SEO? And will you get a penalty via Google by doing this?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Gretchen104

2 Comments

Sorted by latest first Latest Oldest Best

 

@Harper822

Your goal is excellent, and I think the approach you are looking for is already existent in CSS as @media and display.

One option

HTML

<a href="#" class="menu_links"><span class="hidetext">Graphic </span>Design</a>


CSS
@media screen {
span.hidetext {
display: none;
}
}
@media aural {
span.hidetext {
display: inline;
}
}


Useful references


CSS Media Types
CSS display Property
If IE prior to 8.0 is important to you, you might want HTML5 Shiv


Second option

Serve different HTML based on the media type. If you do that, you will probably want to use the alternative meta element.

10% popularity Vote Up Vote Down


 

@BetL925

I don't think your site can be penalized for this even if it's not a good practice.

However, you should know this kind of practice on the entire link is not allowed at all. Indeed, Google penalizes when an entire link is hidden for users but not for Googlebot. You can read the Google support page for more details.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme