W3C home > Mailing lists > Public > www-html@w3.org > February 2000

alt element (was: naming custom/extended tags)

From: <JOrendorff@ixl.com>
Date: Mon, 14 Feb 2000 11:14:47 -0500
Message-ID: <CD8E2CDBC6D0D111ACB900805FBBD97E0263019E@mem-131.ixl.com>
To: www-html@w3.org
Arjun Ray wrote:
> > Some such convention is a good idea, although I'm not sure I like
> > yours.  An <alt> element, and an html:alt="" attribute for short,
> > might cover the same ground better.
> 
> I'm not sure what the attribute means, but I see no reason to
> introduce factitious elements into the document hierarchy where an
> attribute would do the job.

'htign' does one job; 'alt' would do that job and a little more, and I
think it would solve a few other minor problems.  The choice between
'htign' and 'alt' is, imho, one of complexity:  is 'alt' too complex
for UAs to implement?

An <alt> element wouldn't be any more "factitious" than, say, <noframes>
or the use of <object>'s children as alternate content.

'alt' would provide a way for the author to tell the UA what to use
and what to ignore when it finds an unsupported tag.  It lets the author
provide useful fallback content, if appropriate (htign wouldn't.)  The
rules would be:

   On finding an unsupported element:
   - If one of its children is an <alt> element, use its contents and
     ignore the unrecognized element and all its other children.
   - If the html:alt attribute is present, use its contents as text,
     and ignore the rest of the unrecognized element.
   - Otherwise, ignore the unrecognized attributes on the element,
     and process the children in an implementation-defined
     manner (but try not to ignore them.)

   On finding an html:alt attribute or <alt> element anywhere else,
   ignore it.

["use" and "ignore" will be defined in a later draft (0.7 wink)]

When using tags that some UAs won't understand, you could define an
attribute (in the DTD) that defaults html:alt to the empty string.
This would be like defaulting htign to "yes" (or whatever) under your
proposal.

If the server has a profile of the client's capabilities, <alt> can be
processed server-side (whether this is even remotely desirable is
questionable of course.)

-- 
Jason Orendorff
Received on Monday, 14 February 2000 11:15:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:42 GMT