Bug 32936 - HTML5 <section> element support
: HTML5 <section> element support
Status: RESOLVED FIXED
: WebKit
HTML DOM
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To:
: http://www.whatwg.org/specs/web-apps/...
:
:
: 32934
  Show dependency treegraph
 
Reported: 2009-12-25 11:07 PST by
Modified: 2010-04-05 05:34 PST (History)


Attachments
Proposed patch (10.46 KB, patch)
2009-12-25 11:17 PST, Kent Tamura
darin: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-12-25 11:07:26 PST
Implement <section> element. It should be very similar to <nav> we already have.
------- Comment #1 From 2009-12-25 11:17:21 PST -------
Created an attachment (id=45494) [details]
Proposed patch

The patch is very similar to http://trac.webkit.org/changeset/47489 for <nav>.
------- Comment #2 From 2009-12-25 11:19:06 PST -------
style-queue ran check-webkit-style on attachment 45494 [details] without any errors.
------- Comment #3 From 2009-12-25 20:18:17 PST -------
(From update of attachment 45494 [details])
> +debug('&lt;section> can be nest nested inside &lt;section>:');

Looks like "nest" here is an extra word.
------- Comment #4 From 2009-12-25 21:30:15 PST -------
(In reply to comment #3)
> (From update of attachment 45494 [details] [details])
> > +debug('&lt;section> can be nest nested inside &lt;section>:');
> 
> Looks like "nest" here is an extra word.

Right! Removed and reset the expected result.

Landed as r52564: <http://trac.webkit.org/changeset/52564>
------- Comment #5 From 2010-04-03 02:30:45 PST -------
As far as I can tell, this bug did not include the actual sectioning behaviour? I.e.

<h1>foo</h1>
<p>Lorem</p>
<section>
  <h1>bar</h1>
  <p>Lorem</p>
</section>

Should be functionally equivalent to:

<h1>Foo</h1>
<p>Lorem</p>
<h2>Bar</h2>
<p>Lorem</p>

I see no open bug about sectioning. Should one be opened?
------- Comment #6 From 2010-04-03 03:09:23 PST -------
(In reply to comment #5)
> As far as I can tell, this bug did not include the actual sectioning behaviour?

What part of the HTML5 spec are you talking about?
------- Comment #7 From 2010-04-03 09:32:37 PST -------
Sectioning is described here:

http://dev.w3.org/html5/spec/dom.html#sectioning-content-0

http://dev.w3.org/html5/spec/semantics.html#headings-and-sections

We also have this unofficial resource: http://gsnedders.html5.org/outliner/
------- Comment #8 From 2010-04-05 02:28:18 PST -------
(In reply to comment #7)

Two fragments in Comment #5 are equivalent in the outline algorithm, and they should not be equivalent as DOM trees.
I don't know we have reasons to implement the outline algorithm in WebKit.
------- Comment #9 From 2010-04-05 05:34:07 PST -------
(In reply to comment #8)

> Two fragments in Comment #5 are equivalent in the outline algorithm, and they
> should not be equivalent as DOM trees.
> I don't know we have reasons to implement the outline algorithm in WebKit.

It's not about the DOM tree, since they should not be equivalent. But it is about semantics and thus about accessibility and default styling.

When users jump between headings in programs like JAWS, an H1 within a section is not equal to an H1 outside of it.

Also, H1 within a section should probably not have the same default styling as an H1 outside of it.