<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>11362</bug_id>
          
          <creation_ts>2010-11-21 00:33:21 +0000</creation_ts>
          <short_desc>&lt;style scoped=&quot;scoped&quot;&gt; fails validation unless &lt;div&gt; is added within parent</short_desc>
          <delta_ts>2015-08-23 07:07:43 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML Checker</product>
          <component>General</component>
          <version>unspecified</version>
          <rep_platform>Macintosh</rep_platform>
          <op_sys>MacOS X</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.lavacochesnely.es/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Simpson">Rob.Simpson</reporter>
          <assigned_to name="Michael[tm] Smith">mike</assigned_to>
          <cc>lavacochesmadrid</cc>
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>42668</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Simpson">Rob.Simpson</who>
    <bug_when>2010-11-21 00:33:21 +0000</bug_when>
    <thetext>The HTML 5 specifications indicate that &lt;style scoped=&quot;scoped&quot;&gt; can be used in flow content.  While this validates OK under a parent &lt;div&gt;, it fails under other elements that expect flow content.  For example, when coding a &quot;breadcrumb trail&quot;:

&lt;nav&gt;
&lt;style scoped=&quot;scoped&quot;&gt;
li { display: inline }
&lt;/style&gt;
&lt;ul&gt;
&lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;
&lt;/nav&gt;

The validator reports the following:

XHTML element style not allowed as child of XHTML element nav in this context. (Suppressing further errors from this subtree.)
&lt;style scoped=&quot;scoped&quot;&gt;

Contexts in which element style may be used:
...
If the scoped attribute is present: where flow content is expected, but before any other flow content other than other style elements and inter-element whitespace.

Content model for element nav:
Flow content.

If a &lt;div&gt; is added inside the parent &lt;nav&gt; then it validates OK:

&lt;nav&gt;
&lt;div&gt;
&lt;style scoped=&quot;scoped&quot;&gt;
li { display: inline }
&lt;/style&gt;
&lt;ul&gt;
&lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/nav&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42684</commentid>
    <comment_count>1</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2010-11-22 07:02:11 +0000</bug_when>
    <thetext>This is a known issue that has to do with the HTML5 schema used by the validation backend not being up to date with the spec. See bug 10348 also.

I will try to get the schema updated soonish.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42705</commentid>
    <comment_count>2</comment_count>
    <who name="Robert Simpson">Rob.Simpson</who>
    <bug_when>2010-11-22 19:19:18 +0000</bug_when>
    <thetext>Not sure what bug #10348 has to do with this one since scoped is a boolean attribute and the rule that &quot;The values &apos;true&apos; and &apos;false&apos; are not allowed on boolean attributes&quot;** dictates that all of that issue&apos;s use cases would be expected to be &quot;Invalid&quot;, which in fact are currently the actual results (even for the one that says &quot;Valid&quot;) which means the validation backend _is_ up to date for that issue.

** Quote (from http://www.HTML-5.com/tutorials/converting-to-html-5.html)

(I just double-checked to make sure this is current information, and it comes from Section 2.5.2 of the Working Draft 19 October 2010.)

&gt;&gt; Note that the HTML 5 specifications explicitly state that:
&gt;&gt;
&gt;&gt;    The values &quot;true&quot; and &quot;false&quot; are not allowed on boolean attributes.
&gt;&gt;
&gt;&gt; This is because browsers that look at the coded value for boolean attributes
&gt;&gt; would treat the string &quot;false&quot; as false while browsers that only look for the
&gt;&gt; presence or absence of the attribute would treat that code as true, resulting
&gt;&gt; in very inconsistent behavior.

Thanks for looking at both issues. Maybe bug #10348 could be closed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86459</commentid>
    <comment_count>3</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2013-04-22 03:13:55 +0000</bug_when>
    <thetext>Fixed. You can test at http://validator.w3.org/nu/</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>