This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9657 - Content model of object
Summary: Content model of object
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: All All
: P2 major
Target Milestone: LC
Assignee: Erika Doyle Navara
QA Contact: HTML WG Bugzilla archive list
URL: http://dev.w3.org/html5/spec/text-lev...
Whiteboard:
Keywords: a11y, WGDecision
Depends on:
Blocks: 9658
  Show dependency treegraph
 
Reported: 2010-05-05 02:58 UTC by Leif Halvard Silli
Modified: 2012-08-24 17:30 UTC (History)
10 users (show)

See Also:


Attachments

Description Leif Halvard Silli 2010-05-05 02:58:56 UTC
The spec defines the content model of <object> as "Zero or more param elements, then, transparent." Which means that only the content which the parent of <object> permits, is permitted inside <object>.

http://dev.w3.org/html5/spec/embedded-content-0.html#transparent

Compared with HTML4, then this is valid:

<p>
  <span>
     <object type="image/gif" data="image">
        <p>Falback.</p>
        <p>Backfall.</p>
     </object>
    </span>
</p>

Also, iif you try to validate as  HTML4/XHTML1.x a <p> inside a <p>:

<p>Outer <p>Inner</p> Outer</p>

then the validator.w3.org specifically tells us that this is an error, which can be corrected by wrapping it inside a object:

]]
document type does not allow element "p" here; missing one of "object", "ins", "del", "map", "button" start-tag
[[
Comment 1 Leif Halvard Silli 2010-06-27 03:06:30 UTC
ISSUE-107 is related to this.  Lachlan's example breaks with the new content model of HTML5, as it - per HTML5's understanding - is nesting a <p> inside a <p>:

<p>
    <object type="application/vnd.o3d.auto">
     <param name="o3d_features" value="FloatingPointTextures">
     <img src="o3d-teapot.png"
          title="3D Utah Teapot illustration rendered using O3D."
          alt="When O3D renders the Utah Teapot, it appears as a squat
          teapot with a shiny metallic finish on which the
          surroundings are reflected, with a faint shadow caused by
          the lighting.">
     <p>To see the teapot actually rendered by O3D on your
     computer, please download and install the <a
     href="http://code.google.com/apis/o3d/docs/gettingstarted.html#install">O3D plugin</a>.</p>
    </object>
    <script src="o3d-teapot.js"></script>
</p>

http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#the-param-element
Comment 2 Leif Halvard Silli 2010-06-27 16:26:23 UTC
For the claim that HTML4 meant to align the content model of <object> and the content model of <ins> and <del>, then note that   the W3 HTML4 and XHTML1 validation service currently does not implement HTML4.01, but stamps the example which HTML4 lists as illegal, as legal. 

Example found here: http://lists.w3.org/Archives/Public/public-html/2010Jun/0641.html
Comment 3 Leif Halvard Silli 2010-06-27 16:29:34 UTC
Related message w.r.t. <ins>,<del> and <object>: http://lists.w3.org/Archives/Public/public-html/2010Jun/0642.html
Comment 4 Leif Halvard Silli 2010-06-27 16:47:38 UTC
This bug relates to A11Y as it impacts how to place fallback in obejct. See my reply to David: [1]

>> But why would you want to allow nested paragraphs only when there is
>> an object element between them?
> 
> Because, technically, it then isn't a paragraph inside a paragraph. It 
> is a paragraph inside an object inside an a paragraph. From a practical 
> point of view, because <object> is supposed to have fallback, including 
> long fallbacks and transcripts. With the HTML5 limitation, you would 
> have to to this:
> 
> <p>Paragraph 1.
> <div>Paragraph 2: <object data="image"><p>Fallback.</object></div>
> <p>Paragraph 3.
> 
> Whereas the HTML4 model allows us to do the logical thing:
> 
> <p>Paragraph 1.
> <p>Paragraph 2: <object data="image"><p>Fallback.</object>
> <p>Paragraph 3.


[1] http://lists.w3.org/Archives/Public/public-html/2010Jun/0637
Comment 5 Ian 'Hixie' Hickson 2010-08-16 22:27:22 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Did Not Understand Request
Change Description: no spec change
Rationale: I don't understand. Could you elaborate?
Comment 6 Leif Halvard Silli 2010-08-16 23:14:33 UTC
(In reply to comment #5)

> Status: Did Not Understand Request
> Change Description: no spec change
> Rationale: I don't understand. Could you elaborate?

The request is to define a content model for the object element which is compatible with the HTML4 content model for the same elelement.

By defining the content model as transparent, HTML5 makes it forbidden to do the following (which is not forbiddenin HTML4 or XHTML1):

<span>
  <object type="*" data="*">
     <p>
  </object>
</span>
Comment 7 Michael Cooper 2010-08-31 13:37:16 UTC
http://lists.w3.org/Archives/Public/public-html-a11y/2010Aug/0013.html

The bug triage sub-team thinks the HTML A11Y TF does not need to formally follow this bug. Original submitters or other interested parties may choose to continue to push this issue on their own. Notes from the sub-team may follow in a separate comment.
Comment 8 Michael Cooper 2010-08-31 13:37:51 UTC
Bug triage sub-team says as long as fallback can be provided, we're not persnickety about the form
Comment 9 Leif Halvard Silli 2010-08-31 21:18:29 UTC
(In reply to comment #8)
> Bug triage sub-team says as long as fallback can be provided, we're not
> persnickety about the form

This bug is not about form.  But about content model.
Comment 10 Leif Halvard Silli 2010-09-12 13:21:49 UTC
New info has been provided.
Comment 11 Ian 'Hixie' Hickson 2010-09-28 06:07:18 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: I don't understand why we would want to duplicate the error from HTML4 here.  An <object> representing its fallback is essentially acting as if it wasn't there. Having a paragraph contain a paragraph is bogus.
Comment 12 Leif Halvard Silli 2011-01-22 02:38:10 UTC
Adding TrackerRequest.  This change TrackerRequest also relates to Bug 9428.

Suggested title and text for the issue tracker:

TITLE: HTML4's content-model for <object> should continue

TEXT: 

In XHTML1 and HTML4, the <object> element creates a new context, where the parent element is ignored when the content of object is validated.

This permits such constructs such as 
 
   <p>Paragraph 1 
         <object><p>Seemingly nested paragraph</p></object>
          Still paragraph 1</p>

In fact, the solution text to ISSUE-107 resulted that the editor inserted exactly such an example into the specification. http://dev.w3.org/html5/spec/the-iframe-element.html#the-param-element 

http://www.w3.org/html/wg/tracker/issues/107

The change proposal for ISSUE-128 also identifies a compatibility-need for using <object> to avoid that <p> is autoclosed by <figure> in some parsers.

http://www.w3.org/html/wg/wiki/ChangeProposals/FigureInP
Comment 13 Ms2ger 2011-01-22 11:29:03 UTC
Please read the decision policy.
Comment 14 Julian Reschke 2011-01-22 11:38:11 UTC
(In reply to comment #13)
> Please read the decision policy.

Not sure what part you're referring to; is it about the bug being in the state "open"? That seems to be a mistake, as the Editor has set it to "Resolved, Invalid".

Re-adding TrackerRequest.

W3C Team - if the state being "open" is a problem then please set it back to the latest state the Editor set, being "Resolved Invalid".
Comment 15 Ms2ger 2011-01-22 11:39:27 UTC
Open bug with TrackerRequest keyword is an invalid state.
Comment 16 Julian Reschke 2011-01-22 11:43:24 UTC
(In reply to comment #15)
> Open bug with TrackerRequest keyword is an invalid state.

So close the bug.

If you believe what by removing the TrackerRequest keyword you can prevent an Issue being raised, you are wrong.
Comment 17 Ms2ger 2011-01-22 11:45:32 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > Open bug with TrackerRequest keyword is an invalid state.
> 
> So close the bug.

You're free to do that.

> If you believe what by removing the TrackerRequest keyword you can prevent an
> Issue being raised, you are wrong.

I don't. However, I think Leif should decide which action to take.
Comment 18 Sam Ruby 2011-01-22 12:19:28 UTC
http://www.w3.org/html/wg/tracker/issues/158