Re: ISSUE-107 Change Proposal: Replace <object> fallback example

This change proposal doesn't validate as HTML5. From

> Error: Element p not allowed as child of element object in this 
> context. (Suppressing further errors from this subtree.)
> Contexts in which element p may be used:
> Where flow content is expected.
> Content model for element object:
> Zero or more param elements, then, transparent.

The error is due to HTML5 defining the content model of <object> as 
transparent. [1] This means that <object> may only contain what the 
parent element may contain. And so, if the parent is a <p> element, 
like in Lachlan's change proposal, then the <object> cannot contain a 

Although this change is not without logic, it represents a big change 
from HTML4.  In HTML4/XHTML1.x, if you e.g. try to nest a <p> inside a 
<p> (<p><p></p></p>), then the W3 validator *specifically* points the 
solution that Lachlan has in his example, as one of the solutions. From

]] document type does not allow element "p" here; missing one of 
"object", "ins", "del", "map", "button" start-tag [[

Thus all the following nesting examples are valid as HTML4/XHTML1.x - 
but nevertheless forbidden in HTMl5:

object:     <p>Foo <object data="x"><p>Bar</p></object> Bas</p>
   ins:                 <p>Foo <ins><p>Bar</p></ins> Bas</p>
   del:                 <p>Foo <del><p>Bar</p></del> Bas</p>
button:              <p>Foo <button><p>Bar</p></button> Bas</p>
   map: <p>Foo <map name="x" id="x"><p>Bar</p></map> Bas</p>

Defining specifically <object>'s content model as transparent means 
that <object> looses much of its accessibility advantage. E.g., it 
causes that it becomes impossible to use <object> as a container for 
e.g. a transcript of video whenever the <object> appears inside a <p> 
element – due to the restrictions of the content model of the <p> 

Bug about the content model of object filed under number 9657. [1]  The 
restrictions of the content model of ins, del, button and map, is also 
something that we need to discuss.

(I punch myself for not having noticed it before. But then, even 
Lachlan didn't see it ...) 



Leif Halvard Silli

Lachlan Hunt, Thu, 22 Apr 2010 14:15:24 +0200:
> Hi,
>   This is an alternate change proposal for ISSUE-107.
> *Summary*
> The example provided for using the the param element to pass 
> parameters to a plugin within a page does not demonstrate best 
> practice.  This example should be replaced with a more appropriate 
> example.
> *Rationale*
> The current spec providedes an unrealistic example designed to 
> discourage the use of plugins due to their proprietary nature.  While 
> encouraging the use of vendor-neutral technologies over proprietary 
> technologies is a noble goal, the example would better serve web 
> developers by demonstrating how plugins can be used without being 
> detrimental to those without the plugin installed.
> *Details*
> Replace the example provided in "The param Element" section 
> (currently section 4.8.5) with the following:
> ---
> <html lang="en">
>  <head>
>   <title>O3D Utah Teapot</title>
>  </head>
>  <body>
>   <p>
>    <object type="application/">
>     <param name="o3d_features" value="FloatingPointTextures">
>     <img src="o3d-teapot.png" alt="3D teapot illustration rendered 
> using O3D.">
>     <p>For an enhanced experience, we recommend that you install
>        the <a href="/get-plugin">O3D plugin</a>.
>    </object>
>    <script src="o3d-teapot.js"></script>
>   </p>
>  </body>
> </html>
> ---
> Note: This example is based on this commonly used 3D teapot

> As in the current example in the spec, the param element in the 
> example needs to be highlighted.
> *Impact*
> *Positive Effects*
> * Shows a more realistic example, illustrating the use of the param element.
> * Encourages best practice by providing better quality fallback.
> *Negative Effects*
> None.
> *Conformance Classes Changes*
> None.  This is a change to a non-normative example only.
> *Describe any risks.*
> None.
> *References*
> None.
> -- 
> Lachlan Hunt - Opera Software


Received on Wednesday, 5 May 2010 03:14:41 UTC