-
Notifications
You must be signed in to change notification settings - Fork 39
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
':focus-visible' is not supported, yet claims to be in the wiki #54
Comments
I'm having the same issue with The relevant lines of the stack trace are:
|
I've run into problems with |
I have also tested a different approach to solve this issue. I used the following regular expression, slightly modified:
which enforces checking for the :focus pseudo-class not being followed by a dash and it seems it works well. Please test in your environment and report results here. |
I'm still getting the Edit: Maybe this should be reopened since the fix for focus-within was reverted in 23f9e23 |
@dospunk |
@sambehrens @samschurter @dospunk |
@dperini apparently this just got reintroduced in 2.2.16, likely with a react-testing-library minor version update on our project:
Just checked again and 2.2.13 is the latest working version, the ones between throw a "document not found" error. |
I ran into an issue where I was using jsdom which uses nwsapi for matching selectors and it was giving me the error
SyntaxError: ':focus-visible' is not a valid selector
. It doesn't seem like I should be getting this error because in the wiki for nwsapi, it says that the:focus-visible
is supported.Then I looked through the nwsapi repo and didn't see
focus-visible
where I thought it should exist. Here with the other user actions: https://github.com/dperini/nwsapi/blob/master/src/nwsapi.js#L83It would be great if this could be supported. Alternatively, the documentation could be updated explaining that it is actually not supported and why.
Reproduce:
Results in
Uncaught DOMException: ':focus-visible' is not a valid selector
.On another note, it looks like
focus-within
throws the same error, even though it looks like it is available in the source code. Not sure why that would be though.The text was updated successfully, but these errors were encountered: