Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DialogContent requires DialogTitle for accessibility compliance warning #10031

Closed
modamaan opened this issue Jan 17, 2025 · 1 comment · Fixed by #10106
Closed

DialogContent requires DialogTitle for accessibility compliance warning #10031

modamaan opened this issue Jan 17, 2025 · 1 comment · Fixed by #10106
Assignees

Comments

@modamaan
Copy link
Contributor

Describe the bug
When using the DialogContent component from Radix UI, an accessibility warning is displayed in the console. The warning states that DialogContent requires a DialogTitle component to ensure accessibility for screen reader users. This warning occurs even if a title is not intended to be displayed in the dialog.

Additionally, it suggests wrapping the DialogTitle with a VisuallyHidden component if the title is not meant to be visible. However, this creates unnecessary complexity for cases where a title is intentionally omitted.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'mobile or ipad size'
  2. Click on 'toggle button to open sidebar'
  3. See error

Expected behavior
The DialogContent component should function without requiring a DialogTitle if no visible or hidden title is necessary. It should not display a warning in the console unless there is a clear accessibility issue caused by omitting the title.

Screenshots

Image

Desktop (please complete the following information):

  • OS: [windows]
  • Browser [chrome]
  • Version [131.0.6778.109]

Additional context
Add any other context about the problem here.

@modamaan
Copy link
Contributor Author

@rithviknishad @Jacobjeevan i would like to work on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
1 participant