-
Notifications
You must be signed in to change notification settings - Fork 64
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
SyntaxError: 'slot):not([inert]' is not a valid selector #986
Comments
@josephvu519 Thanks for reaching out about it. This is directly related to focus-trap/tabbable#995 which was published just recently in tabbable v6.1.2. I was hoping I could get a new feature on focus-trap (also a dependency of focus-trap-react) into the code before cascade-publishing focus-trap and focus-trap-react with the new tabbable, but I guess I might have to push it through without that other thing if you're seeing it now as well. The temporary fix was simple for tabbable: https://github.com/focus-trap/tabbable/blob/master/package.json#L95 In the meantime, you can probably get around this by using the same concept, either exactly as-is, or using it to override the upstream version of tabbable you're using to pin it to 6.1.2 until I publish an updated focus-trap-react that use it. See the original tabbable issue for more background if you want: focus-trap/tabbable#982 |
@stefcameron Do you have a timeframe of when the new version of focus-trap-react will be published in order to fix the dependency issue? Absolutely no rush, I know you're probably juggling a million things! Just want to be able to make a decision about the patch we should make internally to get our testing suite green again. Thanks! |
@kylemcd Today was my target day, actually! I will post here once it's published. 🙂 |
@kylemcd Published in v10.1.2 not long ago! |
hi @stefcameron. Thanks for your work! I updated my focus-trap-react to 10.1.2 (cleaned cache, reinstalled node modules etc.) and unfortunately this issue is still reproduced, the tests are failing with the error mentioned above :( |
@OMManko My pleasure! Hmm, that's curious. What version of nwsapi was installed in your local node_modules dir? (Should be 2.2.2), and what version of tabbable was installed (should be 6.1.2)? |
Yes, 2.2.2 and 6.1.2 |
Hey hey, thanks for pushing the update last night! I went ahead and installed the latest version and I'm in the same boat as @OMManko where I'm seeing the same issue when running jest. Seeing it happening with these versions installed:
We're currently on Let me know if there's any more information I can provide that could be helpful! |
@kylemcd @OMManko This really is an issue with When I do this, all tests pass:
That's a clean
The nwsapi author is trying to fix the problem: dperini/nwsapi#83 (comment) Probably the best thing you could do is help him out with his outstanding regex question. I haven't had a chance to really check it out. As for your immediate problem, one thing I thought to ask is whether you're using Also, RTL's latest version is 14.0.0 -- 9.2.0 you're using is very, very old. It could be another source of problems with the downstream dependencies. |
Hey guys, as workaround to this issue (if the latest version doesn't help), you can add the following to your package.json "resolutions": {
"nwsapi": "2.2.2"
} |
Right! ☝️ I've done the most I can do from a tabbable/focus-trap/focus-trap-react perspective to try to mitigate the issue. But it may be that the override still needs to be added to your project's package.json because of other dependencies that are still pulling in a bad version of nwsapi. |
Sounds good, the override works for now. Seems like there is a lot more at play here with other packages (potentially?) also relying on Either way, thanks for the tip on the override! |
@stefcameron @ApacheEx thank you so much, guys! |
@OMManko You're welcome! 😀 |
I'm trying to create a modal component and unit test it. The tests did pass before, but now I'm getting an issue with the tests (Component still works fine) with the error stated in the title.
Component:
Test File:
Where the error is also pointing at
render
.If I remove the div and only include a singular button, the test runs through.
If it helps, I found this syntax here: https://github.com/focus-trap/tabbable/blob/master/src/index.js#L12
The text was updated successfully, but these errors were encountered: