alt size can depend on the specific image (was: RE: Alt has to be short ...)

Charles McCathieNevile wrote:

> I know that old versions of Amaya had a bug 
> that limited alt attributes to about 32 characters, but I think it is 
> the only browser that had that problem, and there is no limitation 
> according to any specification I know of.

A reasonable limit may also depend on the display size of the image
it is replacing.

Opera (and probably other browsers) will try to honor a layout
(or stylesheet) even when graphics are turned off.  If it was
expecting a tiny icon, then even 3 letters of alt can be too many.
They either get cut off (and are almost useless) or overflow and 
cut off the next piece of content (which is often more important).

This is more of a problem with table-based layouts, but it isn't 
restricted to those.  I tend to see it in discussion forums and
bug reporter tools - which really do show tabular data.

Obviously, this problem can be avoided, and it probably is for 
most people who are unable to see the images at all.  But for 
people on a slow connection, or with mere difficulty seeing the
picture, it is fairly common to turn images on selectively -- and
then alt-larger-than-image can be a problem.

So as a guideline, try not to take more space with the words 
(even in a large font) than the image would require if it were
shown.

-jJ

Received on Wednesday, 17 December 2003 09:49:33 UTC