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

FocusTrap: warn instead of throw Error when there is no focusable element #774

Conversation

Krystofee
Copy link
Contributor

Hello there 👋

I've created this pull request to show you possible solution to the issue #407.

As I proposed - instead of throwing Error, when there is no focusable element in the FocusTrap, just use console.warn.

Closes #407

@vercel
Copy link

vercel bot commented Aug 30, 2021

@Krystofee is attempting to deploy a commit to the Tailwind Labs Team on Vercel.

A member of the Team first needs to authorize it.

@RobinMalfait
Copy link
Member

Hey! Thank you for your PR!
Much appreciated! 🙏

I'm going to make a few small changes, but I appreciate the PR. We will console.warn and see the accessibility part as a progressive improvement.
We have some ideas how we can avoid the console.warn in all scenarios, but this is a first good step.
Thank you for this PR, and sorry for the long wait.

@Krystofee Krystofee deleted the focus-trap-no-focusable-elements-warn-instead-of-error branch August 30, 2021 13:52
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]: Dialog: There are no focusable elements inside the <FocusTrap />
2 participants