Skip to content

feat(Tag): name the add and dismiss buttons after the action - #3114

Open
SamuelAlev wants to merge 1 commit into
mainfrom
feat/tag-action-button-labels
Open

SamuelAlev wants to merge 1 commit into
mainfrom
feat/tag-action-button-labels

Conversation

@SamuelAlev

Copy link
Copy Markdown
Member

What

Translated defaults: Tag's add (+) and dismiss (×) buttons were named with hardcoded English: Add ${aria-label} and Dismiss ${aria-label}. They now use the translation keys Tag_add and Tag_dismiss, which have entries in all 11 locales (the dismiss wording matches Badge_dismiss). When the tag has no aria-label or title, the name is trimmed, so it is "Dismiss" instead of "Dismiss ".

New optional props:

  • dismissLabel names the dismiss button after the action.
  • addLabel does the same for the add button.

Why

A screen reader announces the dismiss button as "Dismiss ". That doesn't say what dismissing does. In web-app's Catalogs table, the × on a linked-item chip removes the link, and an accessibility audit flagged it as "Dismiss View details for MAT-0012" (BF-894). With dismissLabel, consumers can pass "Remove link to MAT-0012".

Testing

  • Tag.spec.tsx: 15 tests pass. The new ones cover the translated default names, the trimmed name when the tag has no label, and dismissLabel / addLabel (including that the dismiss callback still fires).
  • tsgo --noEmit, oxlint and oxfmt are clean for packages/components.

The changeset is a minor bump of @frontify/fondue-components.

Opened by a Control Center agent at the request of @SamuelAlev.

Co-Authored-By: Control Center <hi@usectrl.dev>
@changeset-bot

changeset-bot Bot commented Nov 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3284644

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

This PR includes changesets to release 3 packages
Name Type
@frontify/fondue-components Minor
@frontify/fondue-sdk Patch
@frontify/fondue 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

@netlify

netlify Bot commented Nov 23, 2026

Copy link
Copy Markdown

✅ Deploy Preview for fondue-docs ready!

Name Link
🔨 Latest commit 3284644
🔍 Latest deploy log https://app.netlify.com/projects/fondue-docs/deploys/6b04cc5f5751d5c4b14d825e
😎 Deploy Preview https://deploy-preview-3114.fondue-components.frontify.com
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@SamuelAlev
SamuelAlev marked this pull request as ready for review November 23, 2026 23:31
@SamuelAlev
SamuelAlev requested a review from a team as a code owner November 23, 2026 23:31
Comment on lines +46 to +53
/**
* Accessible name of the dismiss button. Falls back to the translated "Dismiss" followed by `aria-label` or `title`.
*/
dismissLabel?: string;
/**
* Accessible name of the add button. Falls back to the translated "Add" followed by `aria-label` or `title`.
*/
addLabel?: string;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not a fan but the component doesn't use composition so it is what it is, lmk if you got a better idea

@SamuelAlev
SamuelAlev requested review from jcosta33 and removed request for noahwaldner November 23, 2026 23:31
@SamuelAlev SamuelAlev self-assigned this Nov 23, 2026

This branch has not been deployed

No deployments
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.

1 participant