WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: coding for breadcrumbs in html4

for

From: Jukka K. Korpela
Date: Dec 16, 2014 10:08AM


2014-12-16, 17:18, Patrick H. Lauke wrote:

> And dirty secret: <nav> will "work" (i.e. be recognised as a block-level
> element, with appropriate role correctly exposed) in modern browsers,
> regardless of what the <!DOCTYPE ...> of the page is...

More secrets: It hardly ever matters, since the content of <nav> is
normally block elements anyway – but admittedly there may be specialized
software, like speech browsers, that actually utilize the idea of <nav>
and e.g. let the user skip navigation even when the page has no
constructs for that.

Additional secret: If you assign styles to <nav>, things are different.
Old versions of IE ignore such settings, and you need something like
document.createElement('nav') in JavaScript to handle that.

Bottom line: <nav> is useless for most practical purposes. It is
harmless unless you rely on it. If you want to have some styling for the
<nav> element, either use the JavaScript trick or set the style on a
<div> element wrapped in or wrapping the <nav> element.

Yucca