W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2012

Re: [whatwg] "content" element, which we need in our documents

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 30 Aug 2012 18:10:15 +0000 (UTC)
To: whatwg <whatwg@whatwg.org>
Message-ID: <Pine.LNX.4.64.1208301801321.30734@ps20323.dreamhostps.com>
On Fri, 29 Jun 2012, Ian Yang wrote:
>
> As many of you may have been aware that there is an important sectioning 
> element we have been short of for a long time: the "content" element.

That's <body>, as far as I can tell.


> Remember how we sectioned our documents in those old days? It's the 
> meaningless <div>s. We used them and added id="header", id="content", 
> id="sidebar", and id="footer" to them.

Having now got <header>, <aside>, and <footer>, the content that is left, 
more or less by process of elimination, is the content.


> However, today, we are still using the meaningless <div> for our 
> content.

Why?

> This example mentioned above is a typical situation that we need an 
> element for the main content. So instead of keep wrapping our contents 
> with the meaningless <div>, why not let the "content" element join 
> HTML5?

What would the element _mean_? If it's just "the main content", then that 
is what the element's contents would mean even without the element, so 
really it means the element is meaningless. And in that case, <div> is 
perfect, since that's what it is: a grouping element with no meaning.


On Fri, 29 Jun 2012, Cameron Jones wrote:
>
> If the content is a special section within the document you should use 
> the <section> element which has semantic meaning over <div>. 
> Alternatively you could use <article> if it's distinct and 
> self-contained. These two elements serve to disambiguate the abstract 
> idea of content into something with semantic meaning which can be 
> instrumented by document consumers.

Indeed, dependong on what exactly you mean by "content" these might be 
more appropriate.


On Fri, 29 Jun 2012, Ian Yang wrote:
>
> As described in whatwg specs, a <section>, in this context, is a 
> thematic grouping of content, typically with a heading.
> 
> As for a <article>, which usually contains its own <header> and 
> <footer>, is used to form an independent content like blog entry, 
> comment, or application.
> 
> Both section and article elements are not the candidate for containing a 
> website or a blog entry's main content. That obviously is the reason 
> that the example of the nav in HTML5 spec doesn't use them.

The element that contains "a website or a blog entry's main content" is 
<body>, as far as I can tell.


On Fri, 29 Jun 2012, Aurelio De Rosa wrote:
>
> I agree with Ian about the use of <article> and <section>, the 
> specifications are really clear on those elements. The are used to wrap 
> an entire entry, not the "content" (in the meaning Ian stated).

Well, the "content" is what is left after you take out the stuff that 
isn't the "content" (<header>, <footer>, etc).


> The read question for me is: What is the problem of having the content 
> at the same level of <header> and <footer> (for example inside an 
> <article>)?
> 
> Can't we treat everything inside an article which is not in <header> or 
> <footer> is the real "content"?

That's the intent of the spec, right.


On Fri, 29 Jun 2012, Ian Yang wrote:
>
> By analyzing the example in HTML5 spec, wrapping all content elements 
> can make the structure of the document become more organized. After all, 
> content elements all being at the same level of <header> and <footer> is 
> unreasonable, and sometimes looks messy, especially when there are many 
> different kinds of content elements (p, figure, pre, a, table, ...... 
> etc).

I don't understand what the problem is here. How is it "messy"?

If you just want to group some elements together without giving them any 
special meaning, that's what <div> is for.


On Fri, 29 Jun 2012, Steve Faulkner wrote:
> 
> ARIA fills the gap in HTML with role="main" 
> http://www.w3.org/TR/wai-aria/roles#main

This role is unnecessary in HTML documents, since browsers can skip the 
non-main content. That's the whole point of elements like <nav>.


> I agree that an explicit element would be nice, but the powers that be 
> have rejected the idea.

It's not clear what the idea is, so it's hard to say that it has been 
rejected. :-)


On Sat, 30 Jun 2012, Aaron Gustafson wrote:
> 
> I’m with Steve here. With so much parity between ARIA and HTML5 with 
> regard to landmarks, it would be nice if we could simplify things with a 
> content/primary/main element.

Could you elaborate on what this element would do and/or mean?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 30 August 2012 18:10:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:10 GMT