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

[Dialog] Log error instead of throwing for missing titles #2948

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

vladmoroz
Copy link
Contributor

@vladmoroz vladmoroz commented Jun 11, 2024

  • Dialog primitive was supposed to throw errors when there was a missing title because that’s an A11Y violation; also it was supposed to show a console warning for missing descriptions
  • However, that didn’t actually work in practice—I confirmed that in CodeSandbox for different primitive versions (tested 0.1.7, 1.0.0, and a bunch of versions leading up to 1.1.0-rc.3) and different React versions
  • The above code started working after the changes to the build process
  • The build changes “fixed” errors not being thrown, but that now breaks your app when upgrading if you missed the title
  • For forward compatibility, I'm changing the thrown errors to console.error to avoid new runtime failures after upgrades

@vladmoroz vladmoroz merged commit ed65bf9 into main Jun 11, 2024
5 checks passed
@vladmoroz vladmoroz deleted the vlad/dont-throw-in-dialog branch June 11, 2024 11:51
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.

2 participants