- From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
- Date: Mon, 04 Aug 2008 15:34:48 +0200
- To: public-html <public-html@w3.org>
Hi,
With the new draft text recently added for the alt attribute, there
are a few cases that covered properly. In the section describing "What
an img element represents depends on the src attribute and the alt
attribute", the 2nd condition states:
"If the src attribute is set and the alt attribute is set to a string
with at least one character whose first character is not a U+007B
LEFT CURLY BRACKET character ({) or whose last character is not a
U+007D RIGHT CURLY BRACKET character (})"
With the way that's written, it's quite difficult to comprehend, and
unnecessarily complex. I suggest changing that condition to instead read:
"If the src attribute is set and the alt attribute is set to anything
else"
And then moving it down to be the 3rd condition, below these two:
"If the src attribute is set and the alt attribute is set to the
empty string"
...
"If the src attribute is set and the alt attribute is set to a string
whose first character is a U+007B LEFT CURLY BRACKET character ({)
and whose last character is a U+007D RIGHT CURLY BRACKET character
(})"
...
I also suggest making the equivalent changes to the other 3 conditions
below those, which begin with "If the src attribute is not set..."
The spec isn't clear about what alt="{}" means, nor whether or not it
would be conforming. It states that:
"The string consisting of all the characters between the first and the
last character of the value of the alt attribute gives the kind of
image"
and then states:
"the user agent should display some sort of indicator that the image
is not being rendered, providing to the user the information
regarding the kind of image that is (as derived from the alt
attribute)"
It's not clear about what the UA should do when there is no kind given.
In IRC the other day when we discussed this proposal, you said that
alt="{}" would probably be conforming, even though it says nothing about
what kind of image it is.
http://krijnhoetmer.nl/irc-logs/whatwg/20080803#l-95
However, the spec isn't clear about this, since it just states:
"In such cases, the alt attribute's value must be a description of the
kind of image, surrounded by braces ("{" and "}")".
Either say that the kind must not be omitted (making "{}"
non-conforming), or state that "{}" can be used when the kind of image
is unknown.
Finally, why does the spec still allow for alt to be omitted in emails,
instead of just requiring the email client to use alt="{attached image}"
(or similar), when the user doesn't provide anything better?
--
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/
Received on Monday, 4 August 2008 13:35:29 UTC