Change ActionBar overflow menu anchor label to "More items"#8064
Change ActionBar overflow menu anchor label to "More items"#8064Copilot wants to merge 1 commit into
Conversation
Co-authored-by: iansan5653 <2294248+iansan5653@users.noreply.github.com>
🦋 Changeset detectedLatest commit: 7d48bf3 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 |
|
There was a problem hiding this comment.
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-labelinActionBarto"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
The current label (and tooltip) for the overflow menu anchor in an
ActionBaris defined asMore ${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.ActionBaroverflow menu label, or default to "More items" #7437Note
This may break some test selectors upstream; we will probably need to update
getByRoleand similar selectors to use the new name.Changelog
Changed
ActionBar.tsx: overflow menu anchoraria-labelis nowMore items.Removed
Rollout strategy
Testing & Reviewing
Existing ActionBar unit tests pass. Verify the overflow kebab button is still discoverable by its accessible name (
More items).Merge checklist