[whatwg] A plea to Hixie to adopt <main>, and main element parsing behaviour
Roger Hågensen
rescator at emsai.net
Fri Nov 9 11:36:30 PST 2012
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/
More information about the whatwg
mailing list