- From: E. Stephen Mack <estephen@emf.net>
- Date: Thu, 10 Jul 1997 01:48:01 -0700
- To: www-html@w3.org
On Wed, 9 Jul 1997, Liam Quinn wrote: >> Is there any reason why HTML 3.0's CAPTION element for use with FIG >> hasn't been re-introduced with the OBJECT element in HTML 4.0? At 02:25 AM 7/10/97 -0400, Jim Wise wrote: >Isn't this role filled by <OBJECT TITLE="foo"> ? The TITLE attribute and the CAPTION element are not the same. The draft 4.0 spec defines the TITLE attribute as an advisory title that does not have to be rendered below, above, or anywhere near its element. From global.html#adef-title: -----8<-----excerpt-----8<----- Values of the title attribute may be rendered by user agents in a variety of ways. For instance, visual browsers frequently display the title as a "tool tip" (a short message that appears when the pointing device pauses over an object). Audio user agents may speak the title information in a similar context. -----8<-----end_excerpt-----8<----- The example that follows this excerpt shows a TITLE attribute describing an IMG element. However, nowhere does the spec indicate that this title must be rendered by a visual browser on-screen (although I imagine that a 4.0-compliant text browser might choose to do so, and that auditory browsers would always render the title). On the other hand, the CAPTION element is defined by HTML 4.0's draft as only appearing in the TABLE element. Unlike the TITLE attribute, CAPTIONs are always rendered, either above, below, to the left of, or to the right of its containing table. (Left and right are not supported by MSIE-pp1 or NS 4.01, however.) CAPTIONs are not advisory. I think Liam's original point is correct, that a CAPTION element to OBJECT, behaving the same as CAPTION does now for a TABLE element, would be a useful addition. One sticky consideration is how the OBJECT's CAPTION should count towards a HEIGHT or WIDTH attribute for that OBJECT. Earlier posters describes caption text appearing near an image through the use of tables. I've also seen some sites make a caption manually part of an image, where text is rendered by a graphics program and added to the image itself. Since the caption content is lost to non-graphical browsers (unless its duplicated in ALT text), I find this approach even less useful than using a TABLE to create a caption. Despite earlier comments disparaging the TABLE approach, at least it provides image caption content that is accessible to a wide range of browsers. That kind of table kludge for captions degrades more usefully for older browsers, since the content is always visible; a TITLE attribute would not be visible at all (short of viewing source) for an older browser, while: <OBJECT src="TheEarth.gif"> <CAPTION>The <STRONG>Earth</STRONG> as seen from space.</CAPTION> <IMG src="TheEarth.gif"> </OBJECT> would provide full content for an older browser. However, including CAPTION as a valid content element for OBJECT is somewhat problematic. HTML 4.0's OBJECT definition requires OBJECT-aware browsers to not display any of the contents of the OBJECT element (to allow alternate renderings for non-OBJECT-compliant browsers). Allowing a mixed model -- where CAPTION (and perhaps other elements) ARE expected to be rendered by OBJECT-compliant browsers, but any other elements are expected to be ignored -- would be confusing and difficult to keep consistent for future versions of HTML and future browsers. -- E. Stephen Mack <estephen@emf.net> http://www.emf.net/~estephen/
Received on Thursday, 10 July 1997 04:47:12 UTC