Msg#: 4354251 posted 4:45 pm on Aug 22, 2011 (gmt 0)
Can anyone offer what is the correct procedure for image attributes:
I have read in previous posts that a "Title" Attribute should be used - but I use Expression Web 4 (latest version) and there is NO Title attribute in the "Picture Properties".
The two options I have are "Alternate Text" which is fine for example "Green Widget".
The second option is "Long Description" and this is one that I believe I have been using incorrectly. I THOUGHT that the option would be an expanded version of the "Alt" - ie. "Green Widget with attached Yellow Widget" etc.
I have been advised that the "Long Description" should in fact be a link to the image location or an html file with a "Long Description" is present in the content... in short - a web url
Can anyone advise as to what is correct for "Long Description"?
Msg#: 4354251 posted 9:54 pm on Aug 22, 2011 (gmt 0)
The "longdesc" is not recognized by all browsers, so don't rely on it for essential information. It's a link to longer text, not a kind of mega-alt. w3c says
The longdesc attribute is so poorly supported that it should not be used.
A lot of the tutorial is out of date but this bit is even more true today, since "longdesc" is not in html5 at all-- probably precisely because nobody was using it correctly.
"alt" is required by the validator (and by human decency, unless it's just a decoration). Any user who has images turned off for any reason, or who uses a text-reading device, will get their only information from the "alt".
"title" and "alt" should be mutually exclusive. The alt displays when the picture doesn't; the title appears when the picture is there. At one time w3c even had a blurb explaining that the reason Firefox was so odd in it treatment of alt/title is that it was the only browser that did what it was supposed to do. (Haven't checked, but I really hope this is no longer true.)
Msg#: 4354251 posted 9:43 am on Aug 31, 2011 (gmt 0)
the reason Firefox was so odd in it treatment of alt/title is that it was the only browser that did what it was supposed to do.
It confused the **** out of me when I first tested a page in Firefox but I soon unlearned the bad habits that I had developed from using IE. Like lucy24 I haven't actually checked how the later versions of IE are behaving with this.
Msg#: 4354251 posted 8:05 am on Sep 1, 2011 (gmt 0)
"alt" is required by the validator (and by human decency, unless it's just a decoration)
when it is a decoration with no semantic meaning, the alt attribute should be used with a null value. this will make the image "disappear" for most text-based browsers, screen readers and other such user agents.
these w3c-recommended accessibility techniques may provide some useful guidance:
H37: Using alt attributes on img elements: http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/html#H37
H89: Using the title attribute to provide context-sensitive help: http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/html#H89
...the reason Firefox was so odd in it treatment of alt/title is that it was the only browser that did what it was supposed to do. (Haven't checked, but I really hope this is no longer true.)
As far as I'm aware, all modern browsers handle this the same now. As I recall it was IE6 and IE7 that were the anomalies (fixed in IE8), in that they would display the ALT text as a tool tip. However, if a TITLE was specified then this would take priority. The problem came when an IMG that had just an ALT attribute was included in an anchor that had a TITLE attribute. IE6 and 7 would display the ALT text of the image as a tool tip, whereas all other browsers would correctly show the TITLE text of the anchor as a tool tip.