Although I think developers are getting more aware of a11y, I think these issues:
- requires localization
- different devs use different labels.
- in some languages the label combined with the control type might not read out ideally, such as the correct order
…are major arguments to why we need this, and will be relevant for the forseeable future.
The very same issues quoted above applies to skip-links (https://webaim.org/techniques/skipnav/).
But using the proposed
type attribute with
<nav> to solve this for skip-links would require an extra
<nav> element for just a single anchor, because we want the skip-link before the nav-
<button> which should reside inside the main/site
<nav> element which could be hidden until we press the nav-
<button>, so we might end up doing this:
<nav type="skip-navigation"><a href="#main">Some localized text (e.g. "skip to content")</a></nav>
But the argument for using the
role attribute allows to omit an extra
<a href="#main" role="skip-navigation">Some localized text ("skip to content/skip navigation")</a>. This however, doesn’t solve the localized text for skip-links.
I too agree, we need to be able to define different types of
<nav>, and while the same issues applies to skip-links I think skip-links needs separate handling.