PDA

View Full Version : hiding anchor links?


kalidust
12-11-2004, 10:33/10:33AM
I've been in a discussion about hiding "skip nav" or "go to content" anchor links so that it is only seen by screen readers.

Knowing that hiding text is a no no for SEO, how would hiding anchor links be seen for SEO purposes?

ihelpyou
12-11-2004, 10:56/10:56AM
I don't know what you mean. Hiding text of any kind is not good.

Webmaster T
12-11-2004, 11:00/11:00AM
Don't do it unless you want to be banned by Google. A buddy had a hidden image used to track pages and that got him banned for more then a few months. You could do it using JavaScript but Google now parses that too so... I don't know a legit way to "hide" links and IMO, that's not neccessarily a bad thing since PR hoarders are quite common these days.

kalidust
12-11-2004, 11:04/11:04AM
Doug, for example using something like this

<span style="display:none"><a href="#content">Skip Navigation</a></span>

Some accessibility designers like to hide the Skip Nav link so that it isn't viewed in a regular browser.

Since I've learned that hiding text isn't good for SEO, I am questioning this method.

srikanthsh
12-11-2004, 12:05/12:05PM
If your page uses asp/php/any other server side scripting, you could do this. In HTML we can not do this without using javascript(as I know).

BTW, how to identify the screen reader?

ihelpyou
12-11-2004, 12:09/12:09PM
That will also "hide" the actual link from browswers. In other words, not a good idea. I know what the intentions are, but we are talking about robots who can't know those intentions. A hidden link is a hidden link.

srikanthsh
12-11-2004, 12:24/12:24PM
Yeppers. we know the intention. It is not to trick SEs. Thats why, we suggested that. We can understand the feelings of a normal user(with no insight into usability and accessibility etc.) when they see that link.

Doug, it will not hide the link. It works this way,

-----------------
If it is a screen reader then
display the link
else
don't display the link here
end if
---------------------

So, the code will be executed at the server itself and the browser will recieve only the html code. Nothing would be hidden in HTML.


[Edited again]

srikanthsh
12-11-2004, 12:32/12:32PM
Oh yes. Now I understand. But, we have no intention to trick the SEs.

ihelpyou
12-11-2004, 12:38/12:38PM
Okay. If that is what the code is, then that's just dandy. It's only detecting screen readers, and besides, it shows html code with no link if the agent that is requesting the page is not a screen reader.

I see no problem with that at all. :) It's not a hidden link. It's no link. LOL

srikanthsh
12-11-2004, 12:51/12:51PM
Yes. Anyway, how to detect the screen reader. i dont know :p. My guess, may be it is possible using javascript only. Using for this purpose is not spam. Because, spiders will not find any content there that would effect the rankings. Completely guess(Yes. I should not post the guessed things).

kalidust
12-11-2004, 12:58/12:58PM
I don't know either how the screen reader sees it. Will need to check into that.

srikanthsh
12-11-2004, 13:04/01:04PM
Please see the second post from bottom.

http://forums.devshed.com/t49960/s.html

srikanthsh
12-11-2004, 13:27/01:27PM
My guess, may be it is possible using javascript only. Using for this purpose is not spam. Because, spiders will not find any content there that would effect the rankings. Completely guess(Yes. I should not post the guessed things).

I am Sorry for posting wrong information in the above posts. Karen, it is not possible either by javascript or server side scripting. You will have to use CSS.

kalidust
12-11-2004, 13:31/01:31PM
Originally posted by srikanthsh
I am Sorry for posting wrong information in the above posts. Karen, it is not possible either by javascript or server side scripting. You will have to use CSS.

Thanks :)

srikanthsh
12-11-2004, 13:41/01:41PM
Oops. You knew that.

kalidust
12-11-2004, 13:42/01:42PM
Someone in an accessibility forum suggests this



<a class="skip" href="#content">Skip Menu</a>


a.skip {
position:absolute;
left:-1000em;
}

a.skip:hover {
left:1em;
}



But that takes it off of the page.

ihelpyou
12-11-2004, 14:01/02:01PM
Then that would make the link hidden. Spiders don't "know" intentions..... yet. They would probably detect a hidden link as spam.

Quadrille
12-11-2004, 14:07/02:07PM
Most pages can accomodate a 1x1 'spacer' transparent gif, which can be a top left link, complete with ALT.

Many other pages, already having an image at top left, could use an imagemap to provide the link.

I don't see how either would upset the SEs, and both would provide a 'skip' link pretty early in the code.

kalidust
17-11-2004, 21:15/09:15PM
Further discussion about a Skip Navigation anchor -- suggests that the anchor text should be "go to content" as opposed to "skip navigation" as this may be less confusing as to the intent of the anchor.

kalidust
10-01-2005, 12:12/12:12PM
I'm having a discussion about invisible/hidden text in another forum and a question came up about comment tags. Since comment tags text in comment tags are invisible to the browser, does this have an impact on SEs?

qwerty
10-01-2005, 12:29/12:29PM
Spiders ignore comment tags, and I expect screen readers to as well. At least I hope they do, otherwise screen readers would be reading out things like "Navigation table here. DO NOT CHANGE ANYTHING BELOW THIS LINE!"

kalidust
10-01-2005, 12:30/12:30PM
Thanks qwerty, I thought it may be as such :)