Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(dialog): add closeLabel prop for i18n support in DialogContent and DialogFooter (base-mira)#10599

Open
NianJiuZst wants to merge 1 commit into
shadcn-ui:mainfrom
NianJiuZst:fix/dialog-i18n-close-label
Open

fix(dialog): add closeLabel prop for i18n support in DialogContent and DialogFooter (base-mira)#10599
NianJiuZst wants to merge 1 commit into
shadcn-ui:mainfrom
NianJiuZst:fix/dialog-i18n-close-label

Conversation

@NianJiuZst
Copy link
Copy Markdown

Summary

Add an optional closeLabel prop (default: Close) to DialogContent and DialogFooter in the base-mira registry style. This enables localized applications to pass a translated string without forking the registry file.

Problem

  • DialogContent icon close button: hardcoded <span className="sr-only">Close</span> breaks screen-reader i18n
  • DialogFooter close button: hardcoded visible "Close" text breaks UI i18n

Fix

Both DialogContent and DialogFooter now accept an optional closeLabel prop:

<DialogContent closeLabel={t("dialog.close")}>
<DialogFooter showCloseButton closeLabel={t("dialog.close")}>

Default is "Close" for backwards compatibility.

Files changed

apps/v4/styles/base-mira/ui/dialog.tsx

Related

…d DialogFooter

Add optional closeLabel prop (default: 'Close') to both DialogContent
and DialogFooter in the base-mira style. This allows localized
applications to pass a translated string (e.g. closeLabel={t('dialog.close')})
without forking the registry file.

Fixes the hardcoded English 'Close' strings that leaked into:
- DialogContent: sr-only span for screen-reader accessibility
- DialogFooter: visible outline-button close control

Backwards compatible — existing consumers get the same 'Close' default.
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 10, 2026

@NianJiuZst is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown
Contributor

Can you sign the commits please? See https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits. Thank you.

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