Forum Moderators: Robert Charlton & goodroi
They are suggesting that Googlebot follows links that contain images which had alt="something" but they are saying googlebot WILL NOT follow the link if we remove the alt tag! The HTML looks like this...
Code:
<a href="http://example.com"><img src="file.gif" alt="company name" /></a>
I have never heard of this before and I am worried about advice like this being given to our clients, should I be?
[edited by: Receptional_Andy at 2:55 pm (utc) on Feb. 11, 2009]
[edit reason] No specifics, please [/edit]
Longer answer is that PR will be passed in the same way, but the link will have severely reduced relevancy 'juice' as you need G to gather contextually acquired info from around the link.
It is best practice to have a good, meaningful alt, and preferably a title tag too.
P1R, should he care to comment, will advise that you NEED an an empty tag (alt="") if you can't be bothered to actually fill it.
you NEED an an empty tag (alt="") if you can't be bothered to actually fill it.
I can't agree with that statement. You should use an empty alt attribute on images that are purely for design and/or convey no meaning - this ensures assistive technologies know to ignore the image. Empty alt on an image with meaning is bad practice: at best hiding useful information and at worst entirely misleading for users.
Using an empty alt on a meaningful image (such as the example above) would only serve the purpose of "tricking" automated accessibility or validation tests, and would have no other value whatsoever.
I wish I hadn't brought it up, as I dislike speaking for someone else, and I didn't need to as its not stictly necessary in the context of the OP, as to if the link 'works' or not.
I know of one instance where a company cloaked pages for the validator when the client wanted to pass the automated test. They didn't understand why I considered this unacceptable!
They are suggesting that Googlebot follows links that contain images which had alt="something"
The issue isn't simply "following" links - Googlebot will discover the target url and send PR through any link. But PR is not the only kind of link juice. Without an alt attribute, there is no text in the anchor element - even an image of text is not so good. Google could use OCR to pull out words that are part of an image, but as far as I know, they don't.
So without an alt attribute, a linked image has very little keyword relevance information to vote across to the target page - essentially very minor hints from nearby text, the page's title etc. With alt attributes, the amount of relevance information voted for those words is a lot less than the power of true anchor text would be, but at least it is there.
With alt attributes, the amount of relevance information voted for those words is a lot less than the power of true anchor text would be
i wonder how much that statement would apply to <h1> header images with alt attributes [webmasterworld.com].
Guidelines on alt texts in img elements
[cs.tut.fi...]
Empty alt on an image with meaning is bad practice: at best hiding useful information and at worst entirely misleading for users.
Not really. There are instances where a null alt attribute is suggested.
<a href="address"><img src="imagefile" alt=""> linktext</a>An important reason for using a single link instead of two links is that when the user tabs from one link to another, redundant links make the use less convenient. Moreover, if there are two links, the question easily arises whether they really point to the same resources.
Note that the alt attribute should have an empty value, since the image is "redundant". You might wish to tune the visual appearance of the construct using presentational HTML attributes, or CSS, or both.
Emphasis mine.
In the example above, either the image conveys meaning, which should also be available to users unable to see the image or it doesn't convey meaning, in which case a blank alt allows them to safely ignore the image. I don't see how this is any different to what I said (which wasn't that you should never use an empty alt attribute).
They are suggesting that Googlebot follows links that contain images which had alt="something" but they are saying googlebot WILL NOT follow the link if we remove the alt tag! The HTML looks like this.
Googlebot will follow the link because there is an href there. Without the alt attribute on the image, Googlebot will revert to the domain address as the link. With the alt attribute on the image, the alt attribute is converted to the anchor text and serves an important purpose here.
<a href="http://example.com"><img src="file.gif" alt="company name" /></a> That would be correct advice given the above code. In this case, the bot will end up with...
<a href="http://example.com/">company name</a> Which is "exactly" what you want. But, I'd correct the use of case in this instance. ;)
P.S. Add that trailing slash on the domain to eliminate that one micro process of adding via the browser.
P.S.S. I kind of mirrored what tedster said above minus this part...
With alt attributes, the amount of relevance information voted for those words is a lot less than the power of true anchor text would be, but at least it is there.
I believe relevancy is based on the implementation and that the "general" statement that the alt has less value may not be 100% true. tedster, you know I follow almost every byte of information you write and generally agree with 98% of it. I'm allowed my 2% disagreement, aren't I? :)