Reputation: 41
The menu element has corresponding menuitem child elements.
What is the appropriate html markup for child elements of nav? And what is the corresponding Aria role for those child elements?
I've read the spec, I've looked at MDN, I've read a few tutorials.
I understand that navigation links are best wrapped in nav containers . I'm struggling to understand the most accessible way of tagging the nav items themselves.
Upvotes: 4
Views: 2212
Reputation: 400
The W3c definition for the <nav>
element is:
a section of a page that links to other pages or to parts within the page: a section with navigation links
So it follows that navigation elements most often just contain links, i.e. <a>
or role="link"
children, often wrapped in lists for added semantics, i.e. <ul>
, role="list"
, etc. There is no requirement on what a <nav>
must contain as children.
Upvotes: 5