W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2006

[whatwg] Definition of alt= attribute

From: Anne van Kesteren <fora@annevankesteren.nl>
Date: Thu, 19 Jan 2006 13:05:30 +0100
Message-ID: <20060119130530.9k32bbnf0ddwowss@webmail.annevankesteren.nl>
Quoting Alexey Feldgendler <alexey at feldgendler.ru>:
>>> I wonder why alt is a required attribute for IMG in HTML while an  
>>> empty  value is allowed.
>
>> Because an empty value means that there is no alternate text and no  
>> attribute at
>> all means that alternate text is missing. (Which is clearly not what 
>> you  want.)
>
> The same could be said about title="", for example:
>
> "An empty value means that there is no title, and no attribute at all 
>  means that the title is missing." But HTML doesn't declare the title 
>  attribute as required.

That is because the "title" attribute is not important for the element its
_contents_. Without the "alt" attribute <img> becomes meaningless for devices
(and people) who can not interpreted images. Now I guess that in some way no
"alt" could have been designed to mean that there is no alternative content,
but that's not how it is. I believe UAs are free to make up alternate content
in such situations. By for example trying to get information from the file
name...


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
Received on Thursday, 19 January 2006 04:05:30 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:44 UTC