Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom aria label option for layout header nav #1865

Merged
merged 2 commits into from
Jan 14, 2021

Conversation

danacotoran
Copy link
Contributor

What

Introduce the ability to pass a custom aria-label to the layout header navigation.

Set the aria label to "Top level" by default – this was previously set on the nav element's child ul, however it makes more sense to add the aria-label to the nav itself, for screen reader users who navigate pages by navigation landmarks.

Why

On the GOVUK Account there are a few pages with more than one nav element on the page. When there are multiple navigation landmarks of the same kind on a page, they should be labelled in order to help assistive tech users differentiate between them as per WCAG SC 2.4.1: Bypass Blocks.

This change will allow us to be more descriptive in the way we label landmarks, and tailor these labels for different scenarios as needed.

Visual Changes

No visual changes should occur as a result of this update

https://trello.com/c/1cnffruq

@bevanloon bevanloon temporarily deployed to govuk-publis-layout-hea-wk1xyf January 13, 2021 17:41 Inactive
@danacotoran danacotoran changed the title Layout header nav custom aria label Add custom aria label option for layout header nav Jan 13, 2021
@bevanloon bevanloon temporarily deployed to govuk-publis-layout-hea-wk1xyf January 13, 2021 17:46 Inactive
@danacotoran danacotoran marked this pull request as ready for review January 13, 2021 18:01
Copy link
Contributor

@andysellick andysellick left a comment

Choose a reason for hiding this comment

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

Looks good, just a few questions.

@bevanloon bevanloon temporarily deployed to govuk-publis-layout-hea-wk1xyf January 14, 2021 12:02 Inactive
@bevanloon bevanloon temporarily deployed to govuk-publis-layout-hea-wk1xyf January 14, 2021 12:11 Inactive
@bevanloon bevanloon temporarily deployed to govuk-publis-layout-hea-wk1xyf January 14, 2021 12:13 Inactive
@bevanloon bevanloon temporarily deployed to govuk-publis-layout-hea-wk1xyf January 14, 2021 12:14 Inactive
@bevanloon bevanloon temporarily deployed to govuk-publis-layout-hea-wk1xyf January 14, 2021 15:16 Inactive
Introduce the ability to pass a custom aria-label for layout header
navigation. Set the default aria label to "Top level" – this was
previously set on the nav element's child ul, however it makes more
sense to add the aria-label to the nav itself, for screen reader users
who navigate the page by navigation landmarks.
@bevanloon bevanloon temporarily deployed to govuk-publis-layout-hea-wk1xyf January 14, 2021 15:17 Inactive
@danacotoran danacotoran merged commit 19cd9a8 into master Jan 14, 2021
@danacotoran danacotoran deleted the layout-header-nav-label branch January 14, 2021 15:21
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.

None yet

3 participants