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

Re: [whatwg] A plea to Hixie to adopt <main>, and main element parsing behaviour

From: Mat Carey <mat@matcarey.co.uk>
Date: Sat, 10 Nov 2012 09:26:13 +0000
Message-Id: <9A2A4D65-B54F-4EDA-AACA-794F28535043@matcarey.co.uk>
To: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>
Roger has put his recommendation on a new post (header body footer), I have put my response on there.  I don't see this particular suggestion as viable, for details please see the other post.

Personally I would love to have a <main> element because I think there is a really useful purpose; I find it much richer to use <article><header/><main/><footer/></article> than <article><header/><div/><footer/></article> but I have no specific use-cases which are not currently supported just a general feeling that we've documented a number of common idioms and this seems to be one that's missing.

Mat Carey

-- 

Web Developer & Consultant 
mat@matcarey.co.uk
www.matcarey.co.uk

On 9 Nov 2012, at 19:36, Roger Hågensen <rescator@emsai.net> wrote:

> On 2012-11-08 10:51, Steve Faulkner wrote:
>> What the relevant new data clearly indicates is that in approx 80% of cases
>> when authors identify the main area of content it is the part of the
>> content that does not include header, footer or navigation content.
>> 
>> 
>> It also indicates that where skip links are present or role=main is used
>> their position correlates highly with the use of id values designating the
>> main content area of a page.
>> 
> 
> I'm wondering if maybe the following might satisfy both "camps" ?
> 
> Example1:
> <!doctype html>
> <html>
> <head>
> <title>test</title>
> </head>
>    <div>div before body</div>
>    <body>body text</body>
>    <div>div after body</div>
> </html>
> 
> Example2:
> <!doctype html>
> <html>
> <head>
> <title>test</title>
> </head>
>    <header>header before body</header>
>    <body>body text</body>
>    <footer>footer after body</footer>
> </html>
> 
> 
> A html document ALWAYS has a body. So why not adjust the specs and free the placement of <body>,
> thus allowing div and header and footer blocks before/after.
> Curretly http://validator.w3.org/check gives warning, but that is easily fixed by allowing it.
> The other issue is how will older browser handle this (backwards compatibility) and how much/little work is it to allow this in current browsers?
> 
> I'd rather see <body> unchained a little than having <main> added that would be almost the same thing.
> And if you really need to layout/place something "inside" <body> then use a <article> or <div> instead of a <main>.
> 
> <body> already have a semantic meaning that's been around since way back when, so why not unchain it?
> As long as <body> and </body> are within <html> and </html> it shouldn't matter if anything is before or after it.
> 
> Only issue that might be confusing would be
> Example3:
> <!doctype html>
> <html>
> <head>
> <title>test</title>
> </head>
>    <header>header before body</header>
>    <body>body text</body>
>    <article>article outside body</article>
>    <footer>footer after body</footer>
> </html>
> 
> In my mind this does not make sense at all.
> So maybe Example2 should be used to "unchain" <body> a little.
> 
> Example2:
> <!doctype html>
> <html>
> <head>
> <title>test</title>
> </head>
>    <header>header before body</header>
>    <body>body text</body>
>    <footer>footer after body</footer>
> </html>
> 
> Example4:
> <!doctype html>
> <html>
> <head>
> <title>test</title>
> </head>
>    <body>
>    <header>header before body</header>
>    <div>body text</div>
>    <footer>footer after body</footer>
>   </body>
> </html>
> 
> Example 4 is how I do it on some projects, while what I actually wish I could do is Example 2 above.
> Maybe simply unchaining <body> enough to allow one <header> and one <footer> outside (but inside <html>) would be enough to satisfy people's need?
> I wondered since the start why <header> and <footer> could not be outside <body>, it seems so logical after all!
> 
> -- 
> Roger "Rescator" Hågensen.
> Freelancer - http://www.EmSai.net/
> 
Received on Saturday, 10 November 2012 09:54:09 GMT

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