Skip to content

feat(dialog): support a custom close button accessible name - #8251

Open
MindOfqc wants to merge 1 commit into
tusen-ai:mainfrom
MindOfqc:fix/dialog-close-accessible-name
Open

MindOfqc wants to merge 1 commit into
tusen-ai:mainfrom
MindOfqc:fix/dialog-close-accessible-name

Conversation

@MindOfqc

Copy link
Copy Markdown

Refs #8231.

Add closeAriaLabel to NDialog and useDialog options so applications can provide a localized accessible name for the default close button. It defaults to close and can be updated reactively. The existing custom close slot keeps its behavior.

The main-branch button already has the English label close; this addresses the issue's request for a supported way to customize that label. Both API documentation languages and changelogs are updated.

Validation:

  • The two new regressions fail on the original implementation: both the direct component and useDialog keep aria-label="close" instead of the supplied name.
  • 18 dialog tests passed, including reactive updates and fallback to the default label.
  • TypeScript checking for the dialog test and its imported production graph passed.
  • Changed-file ESLint and the normal Husky/lint-staged commit hook passed (Prettier and ESLint for all seven changed files).

Tests used Node 24.21.0, Vue 3.5.44, and Vitest 4.1.12 in a small isolated dependency environment. The test config retains the repository's classic h JSX transform, jsdom, and src/vitest-setup.ts; it omits the docs plugins and JSX Vapor plugin because the latter fails at startup on Windows with a file:///vue-jsx-vapor/vdom resolution error. The full default pnpm test command and browser/screen-reader acceptance have not been verified. Dependency auto-install was set to warn locally while running the normal commit hook; that local setting is not included in the PR.

Prepared with AI assistance.

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