Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

role="navigation" in navbars is redundant since they use <nav>? #15109

Closed
cvrebert opened this issue Nov 13, 2014 · 6 comments · Fixed by #15125
Closed

role="navigation" in navbars is redundant since they use <nav>? #15109

cvrebert opened this issue Nov 13, 2014 · 6 comments · Fixed by #15125

Comments

@cvrebert
Copy link
Collaborator

All the navbars in the docs examples use <nav> rather than <div>, which I believe means that their role="navigation" attributes are redundant.
So we might be able to remove the role="navigation"s and adjust this callout to advocate for using <nav>s as opposed to including role="navigation"s.
CC: @patrickhlauke

@hnrch02
Copy link
Collaborator

hnrch02 commented Nov 13, 2014

All the navbars in the docs examples use <nav> rather than <div>, which I believe means that their role="navigation" attributes are redundant.

That's correct. The HTML5 spec even states (emphasis mine):

Allowed ARIA role attribute values:
navigation role (default - do not set) or presentation.

Source: http://www.w3.org/TR/html5/sections.html#the-nav-element.
See also http://www.w3.org/TR/html5/dom.html#aria-usage-note.

@hnrch02 hnrch02 added this to the v3.3.2 milestone Nov 13, 2014
@patrickhlauke
Copy link
Member

LGTM

@rs459
Copy link

rs459 commented Feb 12, 2015

Voice-over don't provide navigation landmark if you remove role="navigation" inside nav. Tested with safari, voice-over, OSX

This website says also NVDA :
https://dequeuniversity.com/assets/html/jquery-summit/html5/slides/landmarks.html

@patrickhlauke
Copy link
Member

Recent bug in VO/OS X (VO/iOS recognises <nav> without a problem, and VO/OS X used to not long ago).

IE/NVDA is a long-standing bug.

Further discussion here bab3622#commitcomment-9712024

@rs459
Copy link

rs459 commented Feb 12, 2015

OSX/VO chrome canary, chrome, FF, FF dev edition => OK, landmark listed
OSX/VO Safari => Bad, landmark not listed

Safari Version 7.1.3 (9537.85.12.18) - OSX version 10.9.5 (mavericks)

<body>
  <header>
    <h1>test VO - OSX without nav role="navigation"</h1>
  </header>
  <nav>
    <ul>
      <li><a href="#">Link</a></li>
      <li><a href="#">Link</a></li>
      <li><a href="#">Link</a></li>
    </ul>
  </nav>
  <footer></footer>
</body>

It look like it's a bug in Safari.

@patrickhlauke
Copy link
Member

thanks for further testing. yeah, once I get a second, I'll start pestering Apple devs with a bug report...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants