Skip to content

Conversation

@knowler
Copy link
Member

@knowler knowler commented Oct 8, 2021

This pull request improves the primary_navigation menu location in two ways. First, the <nav> element is no longer displayed if nothing is set the menu location. Previously, the contents of the element were conditionally displayed. There’s no point in displaying the element if it’s empty. Second, this menu location now uses the menu name set by the user as the accessible name of the <nav> element. I am using aria-label rather than aria-labelledby (with a hidden element as the label) since the prior issues with translating aria-label in Chrome have been resolved.

The contents of the menu were being conditionally displayed, but it
would display an empty `<nav>` element if the menu location wasn’t set.
@knowler knowler self-assigned this Oct 8, 2021
@knowler knowler requested a review from Log1x October 8, 2021 13:13
@knowler knowler merged commit 8cb0124 into master Oct 8, 2021
@knowler knowler deleted the improve-primary-navigation branch October 8, 2021 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants