-
Notifications
You must be signed in to change notification settings - Fork 469
fix: shouldExcludeFromA11yTree runs in IE11 #365
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
fix: shouldExcludeFromA11yTree runs in IE11 #365
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find any documentation for that. Only that parentElement
isn't implemented for Node
which would explain the undefined
value. But this leads to the question why there is a Node
passed to this function in the first place.
It might make more sense to throw if this is getting passed a Node
since there is no specification for what kind of nodes should be part of the a11y tree. It's only defined for Element
.
Could you include a reproduction that fails with IE 11? This would help a lot 🙏 |
Yes it seems like it's not implemented on But the element that failed for us was an SVG and I found this: https://stackoverflow.com/a/36270354/1927079
Do your tests run in IE11? |
Interesting. I'll verify that and add it to the MDN docs since
We don't run any tests in browsers and so far browser support hasn't been a priority from what I can tell. I use this library in browser tests though so anytime I do find one I'll try to fix it (#362, #363). |
I'll try and add a test that covers the failure I see here. |
d8c1af1
to
22407fb
Compare
Added a test but this would only ever fail in IE11. |
Could you write the test so that you only use public methods? Then I could verify this with a test suite running in IE 11 (via browserstack) as I'm still not convinced this is the source of the issue. |
22407fb
to
ab3f7c7
Compare
IE11 returns `undefined` for missing `parentElement`.
Updated the tests, is this what you were thinking? |
Is this OK? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM :) Thanks!
🎉 This PR is included in version 6.5.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
IE11 returns
undefined
for missingparentElement
.fix: In IE11 when an element lacks
parentElement
it returnsundefined
instead ofnull
.Why: Because otherwise you get these errors
Checklist:
docs site N/A