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 12247 - <section> is not associated with the conceptual section it creates
Summary: <section> is not associated with the conceptual section it creates
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
Depends on:
Reported: 2011-03-05 10:15 UTC by contributor
Modified: 2011-08-04 05:03 UTC (History)
5 users (show)

See Also:


Description contributor 2011-03-05 10:15:23 UTC

<section> is not associated with the conceptual section it creates

Posted from: by
User agent: Opera/9.80 (X11; Linux i686; U; en) Presto/2.8.115 Version/11.10
Comment 1 Philip Jägenstedt 2011-03-05 11:09:42 UTC
I extended Geoffrey's <> to also keep track of the node associations that the spec mentions (code available if anyone wants it). Using that, I tried splitting the following document into sections as defined by the outlining algorithm:

<!doctype html>
<section id="main">
  <section id="first">
    Foofoo <b>bold</b>
  <section id="second">
    Barbar <i>italic</i>

The resulting list of conceptual sections are these:

Section created for outlinee <body>. Associated nodes:
<section id=main>


Section created for outlinee <section id=main>. Associated nodes:
  <section id=first>
  <section id=second>

Section created for outlinee <section id=first>. Associated nodes:
    Foofoo <b>bold</b>

Section created for outlinee <section id=second>. Associated nodes:
    Barbar <i>italic</i>

What I consider a bug here is that the <section> elements aren't associated with the section they create, rather they are associated with their parent elements.
Comment 2 Philip Jägenstedt 2011-03-05 11:13:49 UTC
Apart from being weird, it's also inconsistent, because <body> is associated with the section it creates, and if <section> isn't used <h1> elements are also associated with the elements they create.

To be honest, it's not clear to me what the point of the associations are, but it was fun to play with and seems buggy.
Comment 3 Philip Jägenstedt 2011-03-05 11:28:06 UTC
The problem is the same for other sectioning content: article, aside, nav
Comment 4 Ian 'Hixie' Hickson 2011-05-06 00:20:37 UTC
I never thought about associating the sectioning elements with sections... I figured it was clear that the section element was related to the section it created. :-) Fixed.

The use case here, FWIW, is allowing a UA to report the "current section title" at any point. The idea is that a UA can now unambiguously determine which heading element applies to any other element in the DOM.

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:

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.
Comment 5 contributor 2011-05-06 00:20:54 UTC
Checked in as WHATWG revision r6092.
Check-in comment: Associate sectioning elements with their sections, in case anyone actually tries to use this algorithm as written even for sections.
Comment 6 Michael[tm] Smith 2011-08-04 05:03:08 UTC
mass-moved component to LC1