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

ActionBar: Make aria-label mandatory #4501

Merged
merged 6 commits into from
Apr 18, 2024
Merged

ActionBar: Make aria-label mandatory #4501

merged 6 commits into from
Apr 18, 2024

Conversation

pksjce
Copy link
Collaborator

@pksjce pksjce commented Apr 15, 2024

Closes # (Didn't create an issue)

Voiceover announcement was wonky without a mandatory aria-label on the ActionBar component.

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

@pksjce pksjce requested a review from a team as a code owner April 15, 2024 05:11
@pksjce pksjce requested a review from TylerJDev April 15, 2024 05:11
Copy link

changeset-bot bot commented Apr 15, 2024

🦋 Changeset detected

Latest commit: c3ea83a

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

Copy link
Contributor

github-actions bot commented Apr 15, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 88 KB (0%)
packages/react/dist/browser.umd.js 88.25 KB (0%)

@github-actions github-actions bot temporarily deployed to storybook-preview-4501 April 15, 2024 05:15 Inactive
Copy link
Member

@broccolinisoup broccolinisoup 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!

One thing we did for UnderlineNav is to add a runtime check for aria-label as well along with TS required notation. We might consider a similar practise here.

@TylerJDev
Copy link
Contributor

I'm wondering if we might want to also add aria-labelledby as an option, being that you'd be required to use one of the two, but not both, nor none.

@pksjce
Copy link
Collaborator Author

pksjce commented Apr 16, 2024

@TylerJDev - Like this?

type ButtonA11yProps =
?

I like it! Is it common that aria-labelledby will be required for a component like this?

@TylerJDev
Copy link
Contributor

@TylerJDev - Like this?

Yup, exactly!

Is it common that aria-labelledby will be required for a component like this?

It may not be as common, but could be the better option if the context for the ActionBar already exists on the page. I think the most common use case of this will be when there's a heading above the ActionBar that references the content underneath (similarly to how the CommentBox has the "Add a comment" heading above its toolbar).

@pksjce pksjce enabled auto-merge April 18, 2024 01:46
@pksjce pksjce added this pull request to the merge queue Apr 18, 2024
Merged via the queue into main with commit 8bfab0a Apr 18, 2024
28 checks passed
@pksjce pksjce deleted the fix-aria-label branch April 18, 2024 02:02
@primer primer bot mentioned this pull request Apr 18, 2024
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