W3C home > Mailing lists > Public > public-html@w3.org > November 2009

Inline figures (<object>) no longer valid

From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Tue, 24 Nov 2009 04:15:25 +0100
To: HTMLwg <public-html@w3.org>
Message-ID: <20091124041525338437.705ec3d8@xn--mlform-iua.no>
In HTML 4 one can construct a "figure" using <object> - this way, which 
no longer validates in HTML 5:

<p>This paragraph
	<object>
		<h1>Caption</h1>
		<p>Text/Image etc
	</object>
  ends here </p>

This method allows us to construct inline figures, instead of faking it 
with data URIs or relying on embedded external files, using <iframe> or 
(indeed) <object> or <frame>. (OK, IE has several bugs that must be 
worked around w.r.t. <object>, however workarounds for them exists.)

According to HTML 5, the <object> creates a new outline context, so 
whatever I place inside <object> doesn't affect the general outline of 
the document. Thus I can even use <h1> etc inside <object>.

To be valid HTML 5, however, one must currently add @type or @data to 
the <object>. The @data can be empty, like this:

	<object data > or <object data="" >

However, doing so is not compatible with Webkit, which require at least 
some fake content in the @data, or else it won't "fall back". As for 
@type, something like "inline/html" could have been suitable, perhaps 
... But that MIME type doesn't exist. Nevertheless, having to add @type 
or @data is merely a hack.

The <figure> element is not suitable - it is not defined as an inline 
element. Besides, it doesn't have the backward compatibility that 
<object> has. (I am not certain what <figure> has to offer that 
<object> hasn't - except for the fact that <figure> is paragraph 
level/block level.) But even if <figure> remains part of HTML5, OBJECT 
could still be used as a <figure> wrapper, when needed, to prevent the 
outline created by h1-h6 elements inside <figure> from "spilling over" 
in those user agents which doesn't know the semantics of <figure>.

<object> even has the potential of replacing <hgroup>. For example, in 
iCab's page outline tool, the following only creates one item in the 
outline - whereas if I skip the <object>, then it creates two: 

	<h1><object><h1>Multi level</h1><h2>Heading</h2></object></h1>

Thus I would like to request that <object> without @data or @type is 
restored as valid in HTML 5.
-- 
leif halvard silli
Received on Tuesday, 24 November 2009 03:15:59 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:45:03 UTC