WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: alt="" vs alt=" "

for

From: Holly Marie
Date: Apr 7, 2002 7:43AM


The Possible Case for space?
from: ALT of IMG at: http://www.htmlhelp.com/feature/art3.htm
*an older piece at the WDG group... re ALTs and a good read, some bad
examples of ALTs are displayed.

Subheading topic - Spacing between alt texts -
---
trailing space might be needed with a situation where images are side by
side and have one word or the words next to each other may run together
and display *one word*. Now I am not sure if this is true today in a
Lynx type browser display or even with a reading device. I will check on
the Lynx.

[image coffee][image cake]
[1] alt="coffee" ; alt="cake"
displays as coffeecake
[2] alt="coffee " alt="cake "
displays as coffee cake (though the audible difference may not be that
significant, the text display might)

This may be more important with image buttons for links are right next
to each other. There is an example of this on the WDG page.

Another good read on ALTs is at pantos.org.
The Art of ALT - http://www.pantos.org/atw/35534.html
----

However... a conflict does exist between using trailing or leading white
space and guidelines

HTML 4
And a warning about the use of leading or trailing space via the W3C....
<http://www.w3.org/TR/REC-html40/types.html#type-cdata>;

from XHTML 1.0 -[ the W3C Differences page.
<http://www.w3.org/TR/xhtml1/#diffs>;
4.7 Whitespace handling in attribute values
In attribute values, user agents will strip leading and trailing
whitespace from attribute values and map sequences of one or more
whitespace characters (including line breaks) to a single inter-word
space (an ASCII space character for western scripts). See Section 3.3.3
of [XML].

---

So I am wondering? If text mode display does not put a space between
image alts that are side by side... Would it be good to pop a -
&nbsp - in the alt tag before the endquote, or ?

holly



From: Jim Thatcher
> The mathematical (my background) answer to your question is that
alt="" (quote quote)
> is null or empty alt text, whereas alt=" " (quote space quote) is alt
text consisting of a string
> of characters of length one - a space character, ASCII 32. The former
is, in my opinion, the
> correct alternative text for an image that conveys no information,
null, empty. The latter doesn't
> convey much information but it is not null and is not empty; it is
sort of sloppy and shows up like []
> on the tool tip.

> From: Kitzzy Aviles
>> I was wondering what is the main difference between using alt="" (no
space between quotes)
>> or alt=" " (space between quotes)? Is there one? Is one better to use
than the other? I have
>> searched the archive and the WebAIM website and could not find a
reason for why one is better
>> than the other, except maybe for the tooltip that appears if you add
the space. If anyone can shed
>> some light on this, it would be greatly appreciated.



----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/