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 19591 - Making the main content element a sectioning element
Summary: Making the main content element a sectioning element
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: maincontent element (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: steve faulkner
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords: a11y
Depends on:
Blocks:
 
Reported: 2012-10-18 05:27 UTC by Ian Yang
Modified: 2013-02-18 16:38 UTC (History)
5 users (show)

See Also:


Attachments

Description Ian Yang 2012-10-18 05:27:26 UTC
Because both being elements for content, it is inconsistent that complementary content is sectioning element and main content is not.

Another reason is about document outline. Please take a look at the markup below:

<!DOCTYPE html>
<title>blablabla</title>
<header>
    <h1>Branding</h1>
    <nav>
        <h1>Navigation</h1>
        blablabla
    </nav>
    <aside>
        <h1>Search</h1>
        blablabla
    </aside>
</header>
<main role="main">
    <h1>Main Content</h1>
    <section>
        <h1>Welcome</h1>
        blablabla
    </section>
    <section>
        <h1>Brief Intro</h1>
        blablabla
    </section>
</main>
<aside role="complementary">
    <h1>Complementary Content</h1>
    <article>
        <h1>Latest News</h1>
        blablabla
    </article>
    <article>
        <h1>Recent Comments</h1>
        blablabla
    </article>
</aside>
<footer>
    blablabla
</footer>


If the main content element is a sectioning element, the document outline formed by the above code will be clear and hierarchically correct:

1. Branding
        1. Navigation
        2. Search
        3. Main Content
                1. Welcome
                2. Brief Intro
        4. Complementary Content
                1. Latest News
                2. Recent Comments


But if the the main content element is not a sectioning element, the document outline will be confusing and hierarchically incorrect:

1. Branding
        1. Navigation
        2. Search
2. Main Content
        1. Welcome
        2. Brief Intro
        3. Complementary Content
                1. Latest News
                2. Recent Comments


Both main content and complementary content are content, so they are supposed to be at the same level in document outline.
Comment 1 steve faulkner 2012-10-18 06:53:18 UTC
comment from henri sivonen:

If Hixie had added this element in the same batch as <section>,
<article> and <aside>, he would have made the parsing algorithm
similarly sensitive to this element. However, I'm inclined to advise
against changes to the parsing algorithm at this stage (you have none;
I am mainly writing this for Hixie), since it would move us further
from a stable state for the parsing algorithm and, if the <main>
element is used in a conforming way, it won't have a <p> element
preceding it anyway.
http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Oct/0155.html
Comment 2 steve faulkner 2012-11-07 19:07:50 UTC
from Simon P
http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Nov/0045.html

OTOH, if we wanted <main> to parse like <aside>, we'd add "main" to:

[[
A start tag whose tag name is one of: "address", "article", "aside",  
"blockquote", "center", "details", "dialog", "dir", "div", "dl",  
"fieldset", "figcaption", "figure", "footer", "header", "hgroup", "menu",  
"nav", "ol", "p", "section", "summary", "ul"
]]

and:

[[
An end tag whose tag name is one of: "address", "article", "aside",  
"blockquote", "button", "center", "details", "dialog", "dir", "div", "dl",  
"fieldset", "figcaption", "figure", "footer", "header", "hgroup",  
"listing", "menu", "nav", "ol", "pre", "section", "summary", "ul"
]]
Comment 3 Ian Yang 2012-12-23 02:29:42 UTC
Today I saw a HTML5 template called HTML5 Bones (http://html5bones.com/). In the index.html of the template, I noticed that <aside role="complementary" /> is placed within <section role="main" />. I then realized that the template is right, and the example in my above mentioned proposal is wrong.

Complementary Content belongs to Main Content, so it should be placed within Main Content. If you place Complementary Content outside of Main Content, you are actually indicating that they have no association. Thank the template for reminding me of this important thing.

So please allow me to correct my above example. The ideal HTML code and document outline should be as follows:

<!DOCTYPE html>
<title>blablabla</title>
<header>
    <h1>Branding</h1>
    <nav>
        <h1>Navigation</h1>
        blablabla
    </nav>
    <aside>
        <h1>Search</h1>
        blablabla
    </aside>
</header>
<main role="main">
    <h1>Main Content</h1>
    <section>
        <h1>Welcome</h1>
        blablabla
    </section>
    <section>
        <h1>Brief Intro</h1>
        blablabla
    </section>
    <aside role="complementary">
        <h1>Complementary Content</h1>
        <article>
            <h1>Latest News</h1>
            blablabla
        </article>
        <article>
            <h1>Recent Comments</h1>
            blablabla
        </article>
    </aside>
</main>
<footer>
    blablabla
</footer>

1. Branding
        1. Navigation
        2. Search
        3. Main Content
                1. Welcome
                2. Brief Intro
                3. Complementary Content
                        1. Latest News
                        2. Recent Comments
Comment 4 steve faulkner 2013-01-17 11:22:25 UTC
(In reply to comment #3)
> Today I saw a HTML5 template called HTML5 Bones (http://html5bones.com/). In
> the index.html of the template, I noticed that <aside role="complementary"
> /> is placed within <section role="main" />. I then realized that the
> template is right, and the example in my above mentioned proposal is wrong.
> 
> Complementary Content belongs to Main Content, so it should be placed within
> Main Content. If you place Complementary Content outside of Main Content,
> you are actually indicating that they have no association. Thank the
> template for reminding me of this important thing.
> 
> So please allow me to correct my above example. The ideal HTML code and
> document outline should be as follows:
> 
> <!DOCTYPE html>
> <title>blablabla</title>
> <header>
>     <h1>Branding</h1>
>     <nav>
>         <h1>Navigation</h1>
>         blablabla
>     </nav>
>     <aside>
>         <h1>Search</h1>
>         blablabla
>     </aside>
> </header>
> <main role="main">
>     <h1>Main Content</h1>
>     <section>
>         <h1>Welcome</h1>
>         blablabla
>     </section>
>     <section>
>         <h1>Brief Intro</h1>
>         blablabla
>     </section>
>     <aside role="complementary">
>         <h1>Complementary Content</h1>
>         <article>
>             <h1>Latest News</h1>
>             blablabla
>         </article>
>         <article>
>             <h1>Recent Comments</h1>
>             blablabla
>         </article>
>     </aside>
> </main>
> <footer>
>     blablabla
> </footer>
> 
> 1. Branding
>         1. Navigation
>         2. Search
>         3. Main Content
>                 1. Welcome
>                 2. Brief Intro
>                 3. Complementary Content
>                         1. Latest News
>                         2. Recent Comments

Hi Kevin, 

I disagree with the idea of having branding as the <h1>, branding is just that and usually is site wide and as such does not make a useful main heading (unless on an introductory or homepage.) while looking into it I have noticed some strangley screwy results using the outline algorithm, will look intoit more and get back to you
Comment 5 steve faulkner 2013-02-18 16:22:13 UTC
(In reply to comment #3)
> Today I saw a HTML5 template called HTML5 Bones (http://html5bones.com/). In
> the index.html of the template, I noticed that <aside role="complementary"
> /> is placed within <section role="main" />. I then realized that the
> template is right, and the example in my above mentioned proposal is wrong.
> 
> Complementary Content belongs to Main Content, so it should be placed within
> Main Content. If you place Complementary Content outside of Main Content,
> you are actually indicating that they have no association. Thank the
> template for reminding me of this important thing.
> 
> So please allow me to correct my above example. The ideal HTML code and
> document outline should be as follows:
> 
> <!DOCTYPE html>
> <title>blablabla</title>
> <header>
>     <h1>Branding</h1>
>     <nav>
>         <h1>Navigation</h1>
>         blablabla
>     </nav>
>     <aside>
>         <h1>Search</h1>
>         blablabla
>     </aside>
> </header>
> <main role="main">
>     <h1>Main Content</h1>
>     <section>
>         <h1>Welcome</h1>
>         blablabla
>     </section>
>     <section>
>         <h1>Brief Intro</h1>
>         blablabla
>     </section>
>     <aside role="complementary">
>         <h1>Complementary Content</h1>
>         <article>
>             <h1>Latest News</h1>
>             blablabla
>         </article>
>         <article>
>             <h1>Recent Comments</h1>
>             blablabla
>         </article>
>     </aside>
> </main>
> <footer>
>     blablabla
> </footer>
> 
> 1. Branding
>         1. Navigation
>         2. Search
>         3. Main Content
>                 1. Welcome
>                 2. Brief Intro
>                 3. Complementary Content
>                         1. Latest News
>                         2. Recent Comments

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 chnage
Rationale: <main> does not need to be sectioning content, we already have mulitple elements to serve the document outline + hX elements create implicit sectioning of the document. <main> is designed as a wrapper for sections.
Comment 6 Ian Yang 2013-02-18 16:38:13 UTC
Yeah, Ian Hickson has responded in a recent discussion that <main> actually doesn't need to be a sectioning element.

Please see his respond: http://lists.w3.org/Archives/Public/public-whatwg-archive/2013Feb/0075.html

So the idea markup and document outline should be:

<!DOCTYPE html>
<title>blablabla</title>
<header>
    <h1>Branding</h1>
    <nav>
        <h1>Navigation</h1>
        blablabla
    </nav>
    <section>
        <h1>Search</h1>
        blablabla
    </section>
</header>
<main role="main">
    <section>
        <h1>Welcome</h1>
        blablabla
    </section>
    <section>
        <h1>Brief Intro</h1>
        blablabla
    </section>
    <aside role="complementary">
        <h1>Complementary Content</h1>
        <article>
            <h1>Latest News</h1>
            blablabla
        </article>
        <article>
            <h1>Recent Comments</h1>
            blablabla
        </article>
    </aside>
</main>
<footer>
    blablabla
</footer>

1. Branding
        1. Navigation
        2. Search
        3. Welcome
        4. Brief Intro
        5. Complementary Content
                1. Latest News
                2. Recent Comments