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
ByLabelText does not work with IE 11 #723
Comments
Dang it. 😅 |
Though that fix also targets Edge 17. If you just target Edge 18 and IE 11 you can leverage |
That actually doesn't look all that bad. Thanks for sharing! We could just put that code at the bottom of the label query module or in a helpers file and if we can't access things by Anyone wanna work on this? It's possible this could also be useful as another module and both our libraries could consume I guess. |
I'd like to work on this one, but unfortunately, I'm not totally clear about how this one should be fixed. Some help is appreciated! |
@BatuhanW Apologies, I didn't mean to step on your toes with my PR! I'd started this a few days ago, so just thought I'd go for it. Happy to discuss if you'd find it helpful 🙂 |
@BatuhanW, I'm sure there will be another opportunity to contribute in the future :) Watch the repo and you can be notified when there's an opportunity :) We'd love to have your contribution! |
* fix(ByLabelText): support IE Polyfill HTMLInputElement.labels to support IE and other legacy browsers. Closes #723. * fix: ensure mocks are restored * test: remove unnecessary test cases Co-authored-by: Maxwell Newlands <maxwelln@spotify.com>
🎉 This issue has been resolved in version 7.21.8 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
@testing-library/dom
version: 7.21.6Relevant code or config:
What you did:
getByLabelText('2 Stars')
What happened:
Reproduction:
55e72b2
(#21944)Problem description:
HTMLInputElement.labels
is not supported in IE 11 or prior to Firefox 56Suggested solution:
Use CSS selector. It's even used later in the code and it's not clear why we use two different approaches.
The text was updated successfully, but these errors were encountered: