-
Notifications
You must be signed in to change notification settings - Fork 19
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
danacotoran
changed the title
Layout header nav custom aria label
Add custom aria label option for layout header nav
Jan 13, 2021
andysellick
reviewed
Jan 14, 2021
There was a problem hiding this 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.
app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb
Outdated
Show resolved
Hide resolved
app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb
Show resolved
Hide resolved
app/views/govuk_publishing_components/components/docs/layout_header.yml
Outdated
Show resolved
Hide resolved
danacotoran
force-pushed
the
layout-header-nav-label
branch
from
January 14, 2021 12:02
a420b89
to
e31fc25
Compare
danacotoran
force-pushed
the
layout-header-nav-label
branch
from
January 14, 2021 12:11
e31fc25
to
1c7a339
Compare
danacotoran
force-pushed
the
layout-header-nav-label
branch
from
January 14, 2021 12:13
1c7a339
to
e9be425
Compare
danacotoran
force-pushed
the
layout-header-nav-label
branch
from
January 14, 2021 12:14
e9be425
to
07bcc41
Compare
andysellick
approved these changes
Jan 14, 2021
danacotoran
force-pushed
the
layout-header-nav-label
branch
from
January 14, 2021 15:16
07bcc41
to
b292f67
Compare
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.
danacotoran
force-pushed
the
layout-header-nav-label
branch
from
January 14, 2021 15:17
b292f67
to
7dd3d22
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 childul
, however it makes more sense to add thearia-label
to thenav
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