<?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>7551</bug_id>
          
          <creation_ts>2009-09-09 13:00:08 +0000</creation_ts>
          <short_desc>People are using &lt;section&gt; incorrectly</short_desc>
          <delta_ts>2010-10-04 14:57:27 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>pre-LC1 HTML5 spec (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>NE</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Pieters">zcorpan</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>dabromeit</cc>
    
    <cc>james</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>webmaster</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>26980</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2009-09-09 13:00:08 +0000</bug_when>
    <thetext>Time and time again, I see people who use &lt;section&gt; where it shouldn&apos;t be used. Almost in all cases, the outline would make sense if all &lt;section&gt; tags would be removed from the markup.

Clearly, this is a bug in the spec.

I see patterns where people wrap parts of the page in &lt;section&gt; without having headings for them, which creates untitled sections in the outline. Making &lt;section&gt; without a heading not affect the outline would fix this; dropping &lt;section&gt; would fix this; evang to use &lt;div&gt; instead might fix this to some extent. Making the spec not discourage use of &lt;div&gt; and give examples for when to use it might help.

I see patterns where people wrap the contents between the &lt;header&gt; and the &lt;footer&gt; (if footer is present) of an &lt;article&gt; in a &lt;section&gt;. Making &lt;section&gt; without a heading not affect the outline would *not* fix this because the article might have sub headings further down. Dropping &lt;section&gt; would fix this. Restricting the content models to somehow catch this case might fix this. Introducing a &lt;content&gt; element might help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27011</commentid>
    <comment_count>1</comment_count>
    <who name="Lars Gunther">webmaster</who>
    <bug_when>2009-09-10 10:52:39 +0000</bug_when>
    <thetext>Actually, I think there has been so much talk about the &quot;evils&quot; of div, that people use section when a div would be the better choice. I&apos;ve seen quite a lot of comments that say &quot;section basically is a more semantic div&quot;, which is partly true, but not the whole truth.

I think we need to convey this message: If in doubt whether section is the better choice than div, use div, since at least the damage done will be less. (I see an article forming: &quot;Overuse of section considered harmful&quot;... Argh!)

An analogy would be when we first learned that *em* is better than *i*, since it was semantic, and people started to use em, even though the text actually was not supposed to be emphasized.

If there was one pedagogic value to XHTML 2 in this regard, it was that it did away with h1-h6 in favor of the generic h-element. This approach made it clear to readers exactly how sections did work. Now, I am not arguing that we should go down the XHTML 2 route. I am only trying to explain some aspects that I think could be useful in fixing this bug, which is pedagogic in nature.

Would this be a good rule of thumb?

Each section SHOULD contain exactly one heading (except subtitles), preferably as the first child element of the section. If no heading can be applied in such a way, one SHOULD use another element than section.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27321</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2009-09-18 21:54:44 +0000</bug_when>
    <thetext>Over the past week or two there&apos;s been a lot of work to try to address this by tweaking text in the spec, adding a boatload of examples, having evang articles, etc. We should probably see if that helps before making more changes.

If there are still problems in a few weeks, please feel free to reopen this bug, ideally with examples showing the confusion so that I can study it in detail.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>