Re: [whatwg] Thoughts on the <nav> element

Hi Andrea,

Yes those are valid points, but the issue I was trying to point out was not
the (implied) semantics (they're great and should remain), but the forced
sectioning it brings.

Although the <title> is appropriate to carry the page's title, the h1 in
general should carry the page's/article's title as well, as <title> is not
part of the document outline.

Example: a page about cats on an animal website could have an h1 of "All
about cats", but it doesn't necessarily mean it should appear before the
<nav> that's related to the site (and therefore precedes the <main> element
for example).

Again: the semantics are important and make sense, but the forced section
is not practical, nor required in my opinion. To provide another use case:
how often do you really find yourself needing a heading in the <nav>
element? I rarely see "Navigation" as a heading before the actual
navigation. Not saying there shouldn't be one, but I think the use cases
for it are poor at best.

Cheers,
Reinier.

On 24 March 2015 at 11:08, Andrea Rendine <master.skywalker.88@gmail.com>
wrote:

> At first sight I wouldn't define this case so "impractical" or "senseless".
> Looking at your example it looks like that the <nav> element is related
> with the site itself (e.g. other articles, other sections of the site), not
> with the page. If you had a heading element for the whole site (e.g. the
> site name), you'd set it above the <nav> itself.
> I don't know your language standards, but IMHO the title of the main
> article of the page is not strictly meant to define the title for the page
> itself, luckily there's the <title> element in <head> to do that.
>
> 2015-03-24 15:49 GMT+01:00 Reinier Kaper <rp.kaper@gmail.com>:
>
> > Hey guys,
> >
> > I've been worrying (maybe too much) about the <nav> element lately.
> > In my experience, it has become more of a burden than a help when it
> comes
> > to the document outline.
> >
> > The <nav> element forces a new outline section, therefore requiring a
> > heading and (implicitly) requiring a heading to precede the <nav> element
> > as its parent.
> >
> > Main navigation tends to be at the (physical) top of the document,
> forcing
> > a heading to precede it is not only impractical, but also irrelevant.
> >
> > Let me demonstrate with a practical example:
> >
> > <body>
> >
> >  <header>
> >   <nav>
> >    <h2>Navigation></h2>
> >    <ul>...</ul>
> >   </nav>
> >  </header>
> >
> >  <main>
> >   <h1>Page/article title</h1>
> >   <p>...</p>
> >  </main>
> >
> >  <footer>...</footer>
> > </body>
> >
> > This will break the outline, as the nav element (regardless of the
> heading
> > used) will create a new part of the outline and "missing" a preceding
> > heading.
> >
> > Unless you have a fixed position navigation/header this will not fly
> from a
> > styling perspective and simply makes no sense. It's completely normal to
> > start with the header of a site/page, including the (global) nav, instead
> > of the site/page title.
> >
> > I would like to see a discussion as to making the nav not sectioning
> > content, but behave more like other semantical elements that don't force
> > part of the outline.
> >
> > If more examples are required I can create a small Gist or something.
> >
> > Thoughts?
> >
> > Kind regards,
> > Reinier Kaper.
> >
>

Received on Tuesday, 24 March 2015 15:16:33 UTC