W3C home > Mailing lists > Public > w3c-wai-gl@w3.org > April to June 2006

RE: nbsp ok for decorative alt?

From: Michael Cooper <michaelc@watchfire.com>
Date: Mon, 10 Apr 2006 12:34:05 -0400
Message-ID: <A0666B3C59F1634290FDC88674D87C3207D34088@1WFEMAIL.ottawa.watchfire.com>
To: <w3c-wai-gl@w3.org>

I think Christophe summed up the discussion well and my view about
whitespace characters is pretty much what he said:

> It seems more consistent to treat all types of spaces the same: either
> are allowed,
> or none are allowed. 

Any kind of whitespace character (including tab, carriage return, and
nonbreaking space) will be normalized to a single space in the output.
Therefore if we permit whitespace at all, we should permit all
whitespace characters, including nonbreaking space. As Christophe said,
how it's encoded isn't relevant, it's the character itself and it is a
whitespace character.

However, I have the opposite view about whether whitespace should be
permitted as an alt attribute. Christophe said:

> I would not advocate normal spaces in so-called
> "null"
> alt
> attributes, because then you would have to allow other types of
> too.

While I don't "advocate" whitespace characters as a form of empty text
alternative, I think we should permit them. I have never known
whitespace alt to be treated differently from null alt by assistive
technology. In both cases, the image is ignored. However, the whitespace
alt may have an important consequence for text browsers, and possibility
screen readers, e.g., the following example:

Text<img src="spacer.gif" alt=" " />Text

The whitespace alt ensures the text does not run together, if you had
only null alt you'd get "TextText" in the text view.

So in summary, I think there is occasionally a positive benefit to
whitespace alt, no negative effect that I know of, and since all
whitespace characters are treated equivalently all should be permitted.

Received on Monday, 10 April 2006 16:34:17 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 21:07:45 UTC