Skip to content

ActionBar: Make aria-label mandatory - #4501

Merged
pksjce merged 6 commits into
mainfrom
fix-aria-label
Apr 18, 2024
Merged

ActionBar: Make aria-label mandatory#4501
pksjce merged 6 commits into
mainfrom
fix-aria-label

Conversation

@pksjce

Copy link
Copy Markdown
Contributor

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 ownerApril 15, 2024 05:11
@pksjce
pksjce requested a review from TylerJDevApril 15, 2024 05:11
@changeset-bot

changeset-botBot commented Apr 15, 2024

Copy link
Copy Markdown

🦋 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
NameType
@primer/reactPatch

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

@github-actions

github-actionsBot commented Apr 15, 2024

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js88 KB (0%)
packages/react/dist/browser.umd.js88.25 KB (0%)

@github-actions
github-actionsBottemporarily deployed to storybook-preview-4501 April 15, 2024 05:15 Inactive

@broccolinisoupbroccolinisoup left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

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
Copy Markdown
ContributorAuthor

@TylerJDev - Like this?

typeButtonA11yProps=
?

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

@github-actions
github-actionsBottemporarily deployed to storybook-preview-4501 April 16, 2024 01:44 Inactive
@TylerJDev

Copy link
Copy Markdown
Member

@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).

@github-actions
github-actionsBottemporarily deployed to storybook-preview-4501 April 18, 2024 01:46 Inactive
@pksjce
pksjce enabled auto-merge April 18, 2024 01:46
@pksjce
pksjce added this pull request to the merge queueApr 18, 2024
Merged via the queue into main with commit 8bfab0aApr 18, 2024
@pksjce
pksjce deleted the fix-aria-label branch April 18, 2024 02:02
@primerprimerBot mentioned this pull request Apr 18, 2024
Sign up for freeto 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.

3 participants

@pksjce@TylerJDev@broccolinisoup