-
Notifications
You must be signed in to change notification settings - Fork 598
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
[UnderlineNav2]: Add visually hidden heading where aria-label
is present
#2470
[UnderlineNav2]: Add visually hidden heading where aria-label
is present
#2470
Conversation
🦋 Changeset detectedLatest commit: 5288681 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
b115613
to
8427af9
Compare
8a1143d
to
23a3e5b
Compare
8427af9
to
ef2cb54
Compare
23a3e5b
to
e5ff68e
Compare
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.
One small thing. Could we append navigation
to the heading's string?
The reason is a nav
element will be announced as a navigation landmark, but the heading does not indicate it is for navigation without the appended string suppling the context.
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.
Changes look great on the implementation side ✨
Is there a good way to learn more about the technique itself? Was surprised that this would work for visually hidden content but I guess it makes sense if the user can find it and then is expected to hit tab to go to following content
@joshblack This came up in conversation with James (not tagging him here to keep his notifications down). His point was you want to have a heading present to provide quick context to people navigating via heading, which is a very common navigation technique. It's more a quality of life improvement than it is an accessibility issue, but I think a good one! |
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.
Woohoo! 🚀
ef2cb54
to
2b1a8d2
Compare
c0fd5e0
to
5288681
Compare
…esent (#2470) * Add visually hidden heading * add changeset and a test * append 'navigation' to the aria-label string
* Disclosure pattern implementation * use token name for colours instead of accessing them from theme Co-authored-by: Siddharth Kshetrapal <[email protected]> * code review feedback <3 * [UnderlineNav2]: Always show at least 2 items in the overflow menu (A11y remediations) (#2471) * Display at least two items in the menu * add changeset * [UnderlineNav2]: Add visually hidden heading where `aria-label` is present (#2470) * Add visually hidden heading * add changeset and a test * append 'navigation' to the aria-label string * use prop for 'as' * add changeset Co-authored-by: Siddharth Kshetrapal <[email protected]>
Following up the accessibility sign-off review feedback (ref: comment), this PR adds a visually hidden heading where aria-label is present
Story book link: https://primer-a937bd5bd7-13348165.drafts.github.io/storybook/?path=/story/components-underlinenav--default-nav
Screenshots
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.