Re: More on IMG ALT (was Re: Questionable implementation of IMG ALT attribute as tooltips)

Walter Ian Kaye <walter@natural-innovations.com> wrote:
>At 10:06a -0500 01/26/98, Chris Maden wrote:
>>[James Green]
>>> So the "" *does* work then??! Do you *know* that it is valid syntax?
>>
>>It's valid syntax.  The null string satisfies a CDATA restriction for
>>an attribute type.
>>
>>> My my, I presume you've not heard of HTML 4.0 then? The ALT
>>> attribute is a requirement.
>>
>>Yes, and the null string satisfies the requirement.  What is required
>>is that *something* is specified, and specifying nothing is different
>>from not specifying anything.
>
>Actually, it depends on the browser. Some versions of Lynx, and MSIE,
>treat <IMG SRC="foo.gif" ALT=""> the same as <IMG SRC="foo.gif"> --
>the null attribute value is minimized to attribute absence, resulting
>in the ugly "(Image)" text being displayed. :/  The workaround is to
>specify *something*, most popularly a space (ALT=" ").

	No version of Lynx since 1993 (v2.3) ignores an explicit
ALT="", and I doubt previous versions did either.  Perhaps you are
thinking of the situation in which Lynx is running with the option
to create links for the SRC of IMG or homologous elements which can
them be downloaded or passed to a helper app.  In those cases Lynx
must use some string as the link name, and will use the TITLE
attribute (presumed tooltip string) if there is one, otherwise uses
a pseudo-ALT indicating the nature or function in the markup ([INLINE],
[IMAGE], [ISMAP], [USEMAP], (OBJECT), [FIGURE], [OVERLAY], [EMBED],
[APPLET], or [BGSOUND]).  In such case, users typically also have Lynx
set up to show its URL in the statusline.

	As far as using spaces as the value is concerned, they are
collapsible (what you actually get is based on the adjacent characters)
and Lynx treats them as indicating the equivalent of a NULL string
for assessing the author's intention.

				Fote

=========================================================================
 Foteos Macrides            Worcester Foundation for Biomedical Research
 MACRIDES@SCI.WFBR.EDU         222 Maple Avenue, Shrewsbury, MA 01545
=========================================================================

Received on Tuesday, 27 January 1998 19:58:16 UTC