Google Blogoscoped

Tuesday, April 5, 2005

Google Images and Alt-Text

Have you ever heard the saying “Google is a blind user with millions of friends?” This is one reason why it makes good sense to think of accessibility, even when all you want to target is SEO, Search Engine Optimization. Now, Tim Bray says he found proof Google (and only Google) can find images based on their “alt” or “title” texts.

To explain, the alt-attribute is used in images or image maps to serve as replacement in those web browsing contexts where the image isn’t displayed; for example, during text-to-speech reading, or when images are turned off, or cannot be rendered by the browser. The alt-text – which is often wrongly called the “alt tag” (it’s not a tag in terms of HTML) – must be used in valid HTML, even though its value can be left empty*. Leaving the alt-text empty is very often appropriate if your point is repeated in the normal text in any case, and the image serves as mere illustrative icon.

While alt-text must serve as replacement, and one that should be integrated in the text flow, an image’s title simply titles an image. For example, the correct alt-text for this blog’s logo is “Google Blogoscoped”, while a correct title could be “Google Blogoscoped Logo” or similar. (The word “logo” in an alt-text, on the other hand, often points to a misunderstanding of the attribute’s purpose.) Sometimes, you may also want to use empty title-text to suppress Internet Explorer’s “tool tip” feature when someone hovers over the image. (Firefox correctly ignores alt-text in terms of tool tips, using only the image’s title text, if available.)

*Many people dislike the alt-text being mandatory, and they have good reasons to; why, if you do not have a reasonable alt-text (or if there’s no reason to provide one in the first place), would you want to include the alt-attribute only to leave it empty?
This has pragmatic reasons, others say; when the alt-attribute is completely missing, the browser may render a replacement. (The Lynx text-only browser displays “[Image]”.) When the alt-attribute is provided but left empty, the browser may suppose this is an intentional author choice and may thus respect it as sensible.
However, this kind of pragmatic guess-work doesn’t really fit well with the rest of the HTML format with its clear focus on document structure, and indeed it mostly fails. These days, many tools automatically include empty alt-texts. Other authors, thinking only filled alt-texts are accessible, provide meaningless values like “photo” or “logo.” I’m curious if the mandatory alt-attribute survives past XHTML2, and I’ll be happy if I see the day it becomes optional.

[Via Danny Sullivan.]


Blog  |  Forum     more >> Archive | Feed | Google's blogs | About


This site unofficially covers Google™ and more with some rights reserved. Join our forum!