Rowan Malin said:
I have seen the use of square brackets in the text of the alt
attribute of <img> tags in a number of places,
It was interesting to read, later in the thread, that you had seen such
usage in an old (1998) book. I have used and suggested the use of
brackets but I don't know where I originally learned the idea; it's not
very common, but I've seen it used.
For example,
<img src="foo.gif" alt="[Picture of a foo]">.
In my opinion, this is adequate for an image that has content of its own,
content that cannot reasonably be expressed using a text equivalent. For
example, a painting or photograph in a gallery (as opposite to use as
decoration on a page with textual content), or a graph describing a
complex system. For a purely decorative image, the alt attribute would be
foolish, but so would it be without the brackets, too, or without the
words "Picture of". The same applies to an arrow symbol, of course;
alt="[Picture of an arrow]" would be absurd.
For
example, do the brackets indicate (via some informal "standard") that
we're talking about an image,
That's the general idea. Using alt="foo" says that the string foo is an
adequate replacement for the image, so that when the image is not shown,
the page should be presented as if the string "foo" appeared in place of
the <img> tag. Using alt="[foo]" or alt="[picture of foo]" is a way of
trying to say that there is an image of foo present on the page and it
has some content and purpose that cannot be (reasonably) described
verbally. A person who has just turned off image loading may decide to
load this particular image since he is interested in foos; a blind person
knows he is missing something (though he migh ask a friend to describe
the image or, maybe some day, use special software and a haptic mouse to
get in touch with the image). When alt="foo" is used, neither type of
user needs to know that "foo" is actually a textual replacement for an
image. That's the big picture (no pun intended). In reality, there are
borderline cases. For my treatise on some details, see
http://www.cs.tut.fi/~jkorpela/html/alt.html
Also, in the case where the image is a picture of something deserving
a description, should the alt attribute include the words "Picture
of" (or similar) or would it be better just to use "A foo"?
It depends. If the image deserves a description, it normally deserves a
caption as text that is present on the page, typically below the image.
In that case I think we should use an alt text that makes it clear that
the alt text is not a textual replacement but just kind of an identifier,
or reference; alt="[foo]", alt="picture of foo", or alt="a foo" (or a
combination of the techniques) might do that reasonably.
Finally, do any modern browsers support the longdesc attribute in a
sensible way?
Not much. Mozilla lets the user right-click on an image and select
"Properties" to get an "Image Properties" popup with information like
Location (URL), width, height, file size, alternate text (alt attribute
value), and "Description", which contains the longdesc value. I haven't
found a direct way to use that value - it's not clickable - but at least
it can be cut & pasted and used that way. So there's support, but not
very elegant, and I'm afraid few users know even of this lame
functionality.
If an adequate textual replacement for an image is long, and one that
should not be present when the image is shown, then the only really
accessible method is to include a normal link near the image. A
simplistic formulation would be "There is a <a href="desc.html">textual
description of the system</a> available, too."