Maciej Stachowiak wrote:
How about:
<img src="gallery2.jpg" alt=""> -- image could be omitted without
changing the meaning of the document (screen readers or text-only
browsers could just skip it)
<img src="gallery2.jpg" noalt> -- image cannot be omitted without
changing the meaning, but no text equivalent is available (screen
readers or text-only browsers / mail clients should give some indication
that an image is there)
I'm not sure I like that better than just omitting alt entirely, but I
thought I'd throw it out there.
When screen readers find img without alt, there typically attempt to
fake alternative text using the src attribute. This can be done crudely
(just reading the whole path) or selectively (just reading the filename,
e.g. gallery2.jpg). Since authors will continue to fail to provide
alternative text, screen readers are likely to continue employing such
heuristics, defeating any attempt to attach a special new meaning to
missing alt attributes. If images without alt are to be allowed, then
noalt would be a reasonable hint.
--
Benjamin Hawkes-Lewis