Comments on: Semantic navigation with the nav element https://stevefaulkner.github.io/html5doctored/nav-element/ helping you implement HTML5 today Thu, 28 Jul 2016 17:36:34 +0000 hourly 1 By: some wacko https://stevefaulkner.github.io/html5doctored/nav-element/#comment-48949 Tue, 08 Apr 2014 16:07:31 +0000 http://html5doctor.com/?p=473#comment-48949 @Jed
Why do you think a list of navigation items is not a list? That is really weird.

Sorry for beeing harsh, but thoase nav__* classing is not OOCSS, it is rubbish. Use selectors what they are meant for and do not clutter everything up with classes.

]]>
By: Steve Faulkner https://stevefaulkner.github.io/html5doctored/nav-element/#comment-48894 Sat, 05 Apr 2014 07:51:33 +0000 http://html5doctor.com/?p=473#comment-48894

Steve, can you clarify why the search box on HTML5 Doctor is embedded in a one item list within the ‘nav’?

That’s a bug in the code, there is no need to have 1 item lists, thanks for the heads up will see if I can get it fixed.

]]>
By: Sjoerd Kranendonk https://stevefaulkner.github.io/html5doctored/nav-element/#comment-48830 Mon, 31 Mar 2014 12:56:28 +0000 http://html5doctor.com/?p=473#comment-48830

A list is not the most semantic for navigation elements.

I don’t understand how you arrive at this conclusion. If links are organised as a list then use a list.

Steve, can you clarify why the search box on HTML5 Doctor is embedded in a one item list within the ‘nav’? I understand the reasons of having search inside the ‘nav’. But what is the significance of having another separate ‘ul’ with only one item? It sounds very strange if you listen to it in a screen reader.

]]>
By: Steve Faulkner https://stevefaulkner.github.io/html5doctored/nav-element/#comment-48688 Fri, 14 Mar 2014 10:28:41 +0000 http://html5doctor.com/?p=473#comment-48688

A list is not the most semantic for navigation elements.

I don’t understand how you arrive at this conclusion. If links are organised as a list then use a list.

]]>
By: RABP https://stevefaulkner.github.io/html5doctored/nav-element/#comment-48687 Fri, 14 Mar 2014 10:28:05 +0000 http://html5doctor.com/?p=473#comment-48687 Is the element you can put the item article?

]]>
By: Jed Mao https://stevefaulkner.github.io/html5doctored/nav-element/#comment-48640 Tue, 11 Mar 2014 06:59:56 +0000 http://html5doctor.com/?p=473#comment-48640 I don’t think it’s a good idea to suggest ul and li tags within an already-semantic nav tag. A list is not the most semantic for navigation elements.

Instead, as was previously suggested, I prefer the following:


<nav class="nav">
<a href="/" class="nav__item">Home</a>
<a href="/about" class="nav__item">About</a>
<a href="/blog" class="nav__item">Blog</a>
</nav>

This is both semantically sound as well as BEM friendly. That is, the CSS could look like this:


.nav {
width: 720px;
}
.nav__item {
display: inline-block;
padding: 10px 20px;
}

You say you want a header or a footer? That’s what the HTML5 header and footer tags are for:


<nav class="nav">
<header class="nav__header">
<!-- header content -->
</header>
<a href="/" class="nav__item">Home</a>
<a href="/about" class="nav__item">About</a>
<a href="/blog" class="nav__item">Blog</a>
<footer class="nav__footer">
<!-- footer content -->
</footer>
</nav>

This is OOCSS :)

]]>
By: skip405 https://stevefaulkner.github.io/html5doctored/nav-element/#comment-38589 Tue, 15 Oct 2013 13:48:21 +0000 http://html5doctor.com/?p=473#comment-38589 Thanks a lot for the article. It got me wondering if we could use the <menu< element to markup the tabs links. I mean you click a tab and see some content… would the following markup be semantic? I doubt that it is, but still :)


<menu<
<li<<button<Button showing tab 1</button<</li<
<li<<button<Button showing tab 2</button<</li<
</menu<
<div class="tabs"<
<div class="tab"<</div<
<div class="tab"<</div<
</div<

From the “nav”-perspective the code looks more natural, imho.

<nav<
<li<<a href="#tab1"<Link to tab 1</a<</li<
<li<<a href="#tab2"<Link to tab 2</a<</li<
</nav<
<div class="tabs"<
<div class="tab"<</div<
<div class="tab"<</div<
</div<

]]>
By: Lucas Krause https://stevefaulkner.github.io/html5doctored/nav-element/#comment-38543 Sat, 05 Oct 2013 09:41:17 +0000 http://html5doctor.com/?p=473#comment-38543 My answer to the question “Why are the first 3 links in the first example no primary navigation?”:

I think the first example’s first <h1> changes with the the document it is placed in. However, the subsequent links keep the same, regardless of the called document. Therefore they aren’t primary navigation links in context of the called document (article). But the next 3 links, inside of the <nav> are.

In my opinion it would have been better to move the <nav> into a <header> inside of <article> and wrap the first 3 links (in context of the whole doc) into <nav>. This would cause 2 <nav>, each for its own context (whole doc, article).
This is the same solution used in the 2nd example.

]]>
By: Lucas Krause https://stevefaulkner.github.io/html5doctored/nav-element/#comment-38542 Sat, 05 Oct 2013 09:28:48 +0000 http://html5doctor.com/?p=473#comment-38542 Yes, that’s exactly what matters. Moreover also screenreaders rely on semantically structured markup.

]]>
By: Mohammad Karam https://stevefaulkner.github.io/html5doctored/nav-element/#comment-38195 Wed, 18 Sep 2013 04:24:54 +0000 http://html5doctor.com/?p=473#comment-38195 I’m not a html5 pro, so I ask you why should I use “nav” or even why should I use “article” or “aside” etc. instead of “div” ? is it a matter of seo or application developing ?
I’m sorry for this silly question but I really want to know

]]>