Re: Omitting alt Where It's Unknown (Was: Baby Steps or Backwards Steps?)

Jason White writes:

> On Wed, Aug 15, 2007 at 10:52:44PM -0700, Maciej Stachowiak wrote:
> 
> > 1) Photo sharing sites like flickr.com. It would be wildly
> > impractical for such a site to prompt the user for alt text for
> > every image, especially since they allow batch uploads of hundreds
> > of photos. They do allow adding caption text that is visible to
> > everyone, but don't require it.
> 
> They could supply alt="unknown" ... the ALT attribute has a value, and
> expresses something worthwhile - even if only the fact that the
> supplier of the image hasn't bothered to provide an equivalent.

Consider these two alternative scenarios:

* The spec defines the lack of an alt attribute to have the meaning that
  alternative text is unknown, and an img element (in a valid HTML 5
  document, complete with doctype) is missing an alt attribute.

* The spec insists that alt attributes always have a value, and suggests
  using 'unknown' in the case where it isn't known, and an img element
  has alt="unknown".

Exactly the same information is conveyed in both situations.  If a lack
of alt is defined in the spec then that is also expressing something
worthwhile.

Note, there are still other valid reasons for preferring one syntax or
the other.  But this would be a debate about syntax, not expressiveness.

> > 2) Mail clients that generate HTML. A user may be inserting an image
> > or multiple images through drag-and-drop or copy/paste. Again it
> > would be impractical and annoying to prompt the user.
> 
> It would be neither impractical nor improper to prompt the user in
> such a case.

But it would be impractical to _force_ the user to provide something (in
both this and the Flickr cases).  If one mailer or website refused to
include images in HTML unless alt text is provided then users would
merely flock to a rival mailer or website which didn't have such a
restriction.

It's unfortunate that there are users who do not wish to provide good
alt content.  But there are.  And people will be creating software for
them.  We want the creators of such software to follow the HTML5 spec.
Therefore we need for it not to be impossible for them to follow it,
such that they can create software which meets it.

> Furthermore, if the image already has a textual description or
> equivalent in metadata, it is easier to have it supplied as a value of
> @alt on the authoring side

Easier, but still quite potentially wrong.  The HTML5 draft lists
several scenarios stating what the alt text must be in each case, and
making quite clear that the corrext alt text depends on the context on
which an image is used, not just the content of the image.

In particular, it would be non-conforming for a photo to have
alt="Compo, Foggy, and Clegg enjoying a pint" if directly underneath the
photo was the text "Compo, Foggy, and Clegg enjoying a pint": in that
case the text is in no way an alternative, since it's on the page
anyway.

> Thus the arguments outlined above do not constitute a good case for
> making ALT on IMG (or elsewhere) an optional attribute.

It isn't that it's 'optional' in the sense that an author can opt
whether to include it or not; rather, it's that omitting it has a
well-defined meaning, applicable to specific situations; in other
situations it must be included.

Smylers

Received on Thursday, 16 August 2007 10:57:28 UTC