Skip to content

Conversation

jendowns
Copy link
Contributor

Description

This PR sets out to make 2 related improvements to the navigation of the site. Please let me know what you think -- thank you!

1. Ensure that all navigation components use a <nav> element

I noticed that docs page has a secondary navigation wrapped in an <aside>.

In this case I believe it would be more helpful to use <nav> to more directly signal the purpose of the markup, as it includes navigation links (reference: <nav>: The Navigation Section element via MDN). By comparison, an <aside> element is associated with complementary content "indirectly related to the document's main content" (reference: <aside>: The Aside element via MDN).

2. Ensure that all <nav> elements have descriptive aria-label attributes

There are instances where multiple <nav>s appear on a page, as is the case with the newly-revised Docs page and the current News page.

Whenever there are multiple <nav>, it helps to either point to an existing label (via aria-labelledby) or create a label (via aria-label). For this PR, I opted to use aria-label because I did not see any existing headings that would be ideal to point to with aria-labelledby. Related resource: WCAG 2.1 -- Example using aria-label to distinguish between navigation landmarks

Copy link
Contributor

@DerekNonGeneric DerekNonGeneric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great — thanks so much for doing this!

/cc @Trott

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

Successfully merging this pull request may close these issues.

3 participants