Skip to content

fix: allow dialog close labels to be customized#10668

Open
codejupiter wants to merge 1 commit into
shadcn-ui:mainfrom
codejupiter:codex/dialog-close-label
Open

fix: allow dialog close labels to be customized#10668
codejupiter wants to merge 1 commit into
shadcn-ui:mainfrom
codejupiter:codex/dialog-close-label

Conversation

@codejupiter
Copy link
Copy Markdown

Summary

  • Adds a closeLabel prop to Base UI and Radix DialogContent and DialogFooter, defaulting to Close for backwards compatibility.
  • Uses closeLabel for the icon close button screen-reader text and optional footer close button text.
  • Regenerates the v4 style registry outputs and adds a short docs note for Base and Radix dialog pages.

Why

Localized apps using the built-in close controls should not have to reimplement the default close markup just to avoid shipping hardcoded English UI or screen-reader text.

Fixes #10593.

Validation

  • npx -y pnpm@9.0.6 --filter=shadcn build
  • npx -y bun@latest run ./scripts/build-registry.mts from apps/v4
  • npx -y pnpm@9.0.6 --filter=v4 validate:registries
  • npx -y pnpm@9.0.6 --filter=v4 typecheck
  • npx -y pnpm@9.0.6 --filter=v4 lint
  • npx -y pnpm@9.0.6 --filter=v4 format:check
  • git diff --check

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 16, 2026

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

A member of the Team first needs to authorize it.

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.

[bug]: base-mira Dialog hardcodes English "Close" label in DialogContent and DialogFooter

1 participant