Skip to content

Conversation

jannikbertram
Copy link

@jannikbertram jannikbertram commented Aug 21, 2025

Description

Currently, the Dialog and AlertDialog components log a warning if neither a DialogDescription / AlertDialogDescription component nor a custom component with aria-describedby attribute is used.

It shouldn't be necessary to provide a visible description to a dialog, as some of them can be
self-explanatory.

With this PR, the aria-description is also accepted to provide a description to screen readers.

@jannikbertram jannikbertram force-pushed the dialogs-allow-aria-description branch from 1f1941e to 77f6922 Compare August 21, 2025 12:02
The aria-description attribute can now be used instead of
passing a DialogDescription component as a child or
using aria-describedby. A warning is only logged if all
of those options are missing.
@jannikbertram jannikbertram force-pushed the dialogs-allow-aria-description branch from 77f6922 to 945983c Compare August 21, 2025 12:03
Copy link

changeset-bot bot commented Aug 21, 2025

🦋 Changeset detected

Latest commit: b98b854

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

This PR includes changesets to release 3 packages
Name Type
@radix-ui/react-alert-dialog Patch
@radix-ui/react-dialog Patch
radix-ui 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

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