Eslint-plugin-jsx-a11y: Add an exception to <nav> for no-redundant-roles

Created on 12 Dec 2017  路  3Comments  路  Source: jsx-eslint/eslint-plugin-jsx-a11y

The no-redundant-rules throws when detecting something like <nav role="navigation">, but w3 still recommends adding it to that particular element. https://www.w3.org/WAI/GL/wiki/Using_HTML5_nav_element#Example:The_.3Cnav.3E_element

Browser support for nav is all the way back to IE9, but if we want to support older browsers this seems like a valid case to allow.

bug help wanted

Most helpful comment

Working on this now, hope to have a PR out later today.

All 3 comments

Great point. navigation should be allowed on <nav>. We can make it config and then build this into the recommended configuration.

@calinoracation if you propose a PR, I'm happy to review it. I probably can't get to this until closer to the end of December.

@jessebeach Thanks for the reply, happy to put up a PR soon for review.

Working on this now, hope to have a PR out later today.

Was this page helpful?
0 / 5 - 0 ratings