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

UnderlineNav2: Add aria-hidden and sr-only class support for a descriptive "More" button label #2552

Merged

Conversation

broccolinisoup
Copy link
Member

@broccolinisoup broccolinisoup commented Nov 8, 2022

Addressing an accessibility sign-off review issue that described below.

The label of the "More" overflow button is not descriptive, and could easily result in multiple buttons with the same name if the component is used multiple times on the same page. The heading text should be added to the accessible name of the button, e.g. "More Repository navigation items" or "More: Repository navigation", e.g. using an off-screen span inside the button and hiding the existing label from screen reader users with aria-hidden. Note that, as with the counter, the visible text of "More" must be included in the accessible name verbatim.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@changeset-bot
Copy link

changeset-bot bot commented Nov 8, 2022

🦋 Changeset detected

Latest commit: eaeff03

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

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

@broccolinisoup broccolinisoup changed the title UnderlineNav2: aria-hidden for visible More menu text and sr-only equivalent for screen readers and add list for ul UnderlineNav2: Add aria-hidden and sr-only class support for a descriptive "More" button label Nov 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2022

size-limit report 📦

Path Size
dist/browser.esm.js 78.89 KB (0%)
dist/browser.umd.js 79.54 KB (0%)

@broccolinisoup broccolinisoup temporarily deployed to github-pages November 8, 2022 03:38 Inactive
@broccolinisoup broccolinisoup marked this pull request as ready for review November 8, 2022 04:39
Copy link
Member

@joshblack joshblack left a comment

Choose a reason for hiding this comment

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

Left a comment above for a structure question, let me know what you think!

src/UnderlineNav2/UnderlineNav.tsx Outdated Show resolved Hide resolved
…button label

Co-authored-by: Josh Black <joshblack@github.com>
@broccolinisoup broccolinisoup temporarily deployed to github-pages November 8, 2022 22:44 Inactive
@broccolinisoup broccolinisoup temporarily deployed to github-pages November 8, 2022 22:58 Inactive
@broccolinisoup broccolinisoup temporarily deployed to github-pages November 10, 2022 01:12 Inactive
@broccolinisoup broccolinisoup enabled auto-merge (squash) November 10, 2022 01:18
@broccolinisoup broccolinisoup temporarily deployed to github-pages November 10, 2022 01:22 Inactive
@broccolinisoup broccolinisoup merged commit 7877f89 into main Nov 10, 2022
@broccolinisoup broccolinisoup deleted the broccolinisoup/UnderlineNav-sign-off-remediations-3 branch November 10, 2022 01:38
@broccolinisoup broccolinisoup temporarily deployed to github-pages November 10, 2022 01:40 Inactive
@primer-css primer-css mentioned this pull request Nov 10, 2022
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.

None yet

3 participants