Skip to content

Change ActionBar overflow menu anchor label to "More items"#8064

Open
Copilot wants to merge 1 commit into
mainfrom
copilot/change-overflow-menu-label
Open

Change ActionBar overflow menu anchor label to "More items"#8064
Copilot wants to merge 1 commit into
mainfrom
copilot/change-overflow-menu-label

Conversation

Copilot AI commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

The current label (and tooltip) for the overflow menu anchor in an ActionBar is defined as More ${ariaLabel} items ${overflowItems?.length}. This is a bug: it sticks a random number at the end of the label for no apparent reason. Additionally, the use of the toolbar's aria-label here doesn't work well in practice; toolbar labels just aren't designed to fit here so you end up with labels like "More Markdown tools items" or "More File actions items" which don't make sense.

This PR changes the label to just be "More items". Since the button is already contained inside a labelled toolbar, this isn't ambiguous; it's clear that this is referring to more items inside the parent toolbar.

An alternative choice could be to change it to More ${ariaLabel.toLowerCase()}, to get labels like "More formatting tools" or "More file actions". But even this is a bit fragile as it depends on an arbitrary toolbar label, and will still break capitalization if a word in the label is intended to be uppercased (like "Markdown"). So I think a simple "More items" is preferable.

Note

This may break some test selectors upstream; we will probably need to update getByRole and similar selectors to use the new name.

Changelog

Changed

  • ActionBar.tsx: overflow menu anchor aria-label is now More items.
  • Updated the e2e selector that targeted the previous label.

Removed

  • Removed the bar label and overflow count interpolation from the anchor label.

Rollout strategy

  • Patch release

Testing & Reviewing

Existing ActionBar unit tests pass. Verify the overflow kebab button is still discoverable by its accessible name (More items).

Merge checklist

Co-authored-by: iansan5653 <2294248+iansan5653@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7d48bf3

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

@iansan5653 iansan5653 changed the title Set ActionBar overflow menu anchor label to "More items" Change ActionBar overflow menu anchor label to "More items" Jun 25, 2026
@iansan5653 iansan5653 marked this pull request as ready for review June 25, 2026 18:21
@iansan5653 iansan5653 requested a review from a team as a code owner June 25, 2026 18:21
@iansan5653 iansan5653 requested review from Copilot and joshblack June 25, 2026 18:21
@github-actions github-actions Bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jun 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. If this doesn't work, you can also use the original workflow here. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

To publish a canary release for integration testing, apply the Canary Release label to this PR.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the ActionBar overflow menu trigger’s accessible name to a stable, context-appropriate label ("More items"), addressing the current buggy/awkward interpolation behavior and aligning with the linked issue’s recommendation.

Changes:

  • Simplified the overflow menu anchor aria-label in ActionBar to "More items".
  • Updated the ActionBar e2e test selector to target the new accessible name.
  • Added a patch changeset documenting the consumer-facing accessibility label change.
Show a summary per file
File Description
packages/react/src/ActionBar/ActionBar.tsx Sets the overflow trigger button’s aria-label to a stable "More items" string.
e2e/components/drafts/ActionBar.test.ts Updates the Playwright locator to match the new overflow trigger accessible name.
.changeset/actionbar-more-items-label.md Adds a patch changeset describing the updated overflow trigger label.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow customizing ActionBar overflow menu label, or default to "More items"

4 participants