W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2015

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

From: Andrea Rendine <master.skywalker.88@gmail.com>
Date: Sat, 28 Mar 2015 03:42:25 +0100
Message-ID: <CAGxST9mJPrTsxPUTei3d-G+nPpyCpNUzQsZwVLGjAnsUWd==GQ@mail.gmail.com>
To: WHATWG List <whatwg@whatwg.org>
After a mail confrontation with Reinier, as well as some very simple models
I saw at work, I have to admit that I support this idea.
<nav> has a strong semantic value, for sure. It deserves UAs to easily
highlight navigation elements.
Thus said, is it really needed that <nav> necessarily defines a section? I
think not.
A first point is what Reinier underlined. With a structure as follows:
[header with no heading elements]
[main with its own heading elements]
an author would end up with an ugly and impractical (as stated by Reinier
himself) structure: an untitled body, a navigation, and a main content
presenting a heading, which is no longer the page content title as it was
logically intended. Some authors (I'm among them) prefer different
structures with one title for the page and one for main content, but
defining <main> element as *not* sectioning allows a more agile
structure... actually made non viable by a sectioning <nav> placed before
<main> (and note that this is both a layout choice AND one dictated by
logic, as site navigation is not to be considered part of the main content).
On the other hand, consider a long navigation element enclosed in an
<aside>. The spec suggests it can group a series of <nav> elements, but
even a single <nav> list qualifies as "content tangentially connected to
the page topic". But <aside> is sectioning content too, and when using a
single <nav> in <aside>, it forces an unnecessary further nesting
also forcing authors to put different titles when they want to avoid the
poor default choice of "Untitled <xxx> element".
Having a strong semantic doesn't necessarily mean defining a section for
the document, as emerged for <main> element too. I previously suggested
that <main> itself could become a sectioner, but I have to retract because
this solution is highly impractical... yes, as well as sectioning <nav>.
This element is not even logically suitable to define anything - it just
helps users retrieving navigational structures. Then, if authors need to
*also* use it as a sectioner, nobody can stop them from defining it as a
section, either implicitly (through a heading element) or explicitly
(wrapping it in a strongly sectioning elements such as <aside>).
Received on Saturday, 28 March 2015 02:42:50 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:30 UTC