W3C home > Mailing lists > Public > public-html-comments@w3.org > August 2011

Re: Proposal: ALT attibute for text

From: Jukka K. Korpela <jukka.k.korpela@kolumbus.fi>
Date: Wed, 24 Aug 2011 10:41:21 +0300
Message-ID: <4E54AB21.60003@kolumbus.fi>
To: public-html-comments@w3.org
23.8.2011 15:45, Clint Goss wrote:

> The ALT attribute is provided for a small set of tags to specify
 > alternate text for screen readers or other assistive technologies.
> The tags for which the ALT attribute is specified are those portions
> of an HTML that cannot be easily rendered as speech, such as
> <img>, <area>, and <input>.

I'd like to add a few remarks to this description, as they relate to the 
question whether the alt attribute should be generalized to apply to 
other elements as well. Originally, the alt attribute was defined for 
<img>, to contain "text to use in place of the referenced image 
resource, for example due to processing constraints or user preference".

This was generalized to some other elements. It wasn't a particularly 
good idea, since it means that the alternative content is limited to 
plain text. This is one reason why it is questionable to use attributes 
to contain real data content, as opposite to references, metadata, 
options, etc.

Newer media elements have mostly used a different approach, making the 
_content_ of the element to act as "fallback content". This never worked 
particularly well, due to lack of consistent implementations. Yet, if 
you wish to present e.g. a bulleted list of items or a table as fallback 
content for an image, you can do that e.g. using an <object> element. 
But browsers may not do their job properly in all cases.

It was never defined well enough _when_ the alternate content (whether 
in an alt attribute or as element content) should be used. For example, 
if <img> or <object> element refers to an image of a format that the 
browser cannot handle, should the browser use the alternate content, or 
indicate an error, or pass the image to an external program in the hope 
that it can handle it?

> However, there is no way to specify alternate text for text itself.

That is correct. The title attribute is sometimes presented (and use) as 
an attribute for alternate text. While this may help to have something 
done reasonably well at times, it's really a wrong approach. The title 
attribute is supposed to specify an advisory title, and the normal 
expectation is that it will be optionally available for use _along_ with 
the normal content, not instead of it. This of course affects what it 
should contain, if it is used.

 > There are portions of text that can easily be specified in text that
 > render well visually, but which no screen reader can reasonably be
 > expected to render clearly as speech.

Yes, and the typical case commonly presented is "Ascii graphics", i.e. 
text that is effectively coarse graphics using characters as building
blocks, based on their shape alone. A newer issue is rare characters,
like characters added to Unicode very recently, so that we cannot expect
fonts to contain them now. In mathematics, for example, you might want 
to take risks by using new characters, since interested readers might 
install a suitable font. But the risk would be disproportionate in many 
cases if you cannot present a fallback. This is why math symbols are 
still often written using small images in HTML - _then_ you can have 
fallback content.

It would be technically easy to generalize alt to all elements, just 
like HTML5 is generalizing some other attributes. But it would not 
change browser behavior. Browser vendors would probably want both a 
reason and an idea of implementations before taking the issue seriously.

Here, too, we need to ask: _when_ would the alternate content be used 
instead of the primary content? I'm afraid it would be undesirably 
technical and complicated to associate this with screen readers and 
other assistive technologies. Besides, in many cases, the alternate 
content would be needed by people who use normal graphic browsers in a 
normal way.

Quite often, it would probably be a matter of having two or more 
alternatives for some content, without being able to really put them in 
any strict preference order. For example, even for people who can both 
see images and read texts, it may depend on personality ("visual" vs. 
"verbal") whether an image or a text, saying the same thing, is the 
better way to say it. When we add various ability issues and technical 
considerations, it becomes really complex. What we would really need is 
a way to say, for some pieces of content, that there alternative 
presentations of some information, with some properties.

I'm afraid it's difficult to suggest how to proceed, but the need you 
have raised is very real, for several reasons.

Yucca, http://www.cs.tut.fi/~jkorpela/
Received on Wednesday, 24 August 2011 07:41:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:26:27 UTC