-
Notifications
You must be signed in to change notification settings - Fork 249
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(tab): exclude hidden descendants #579
Conversation
Hidden elements should be excluded from tab order. Hidden attribute can be overwritten by stylesheets. There is a bug in jsdom that has to be resolved first. See jsdom/jsdom#3111
Codecov Report
@@ Coverage Diff @@
## master #579 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 13 13
Lines 719 728 +9
Branches 228 232 +4
=========================================
+ Hits 719 728 +9
Continue to review full report at Codecov.
|
@all-contributors add @benadamstyles code |
@benadamstyles already contributed before to code |
🎉 This PR is included in version 12.8.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
What:
Exclude descendants of hidden elements.
Replaces #556
Why:
Browser does not include hidden parts of the DOM tree in tab order.
How:
Run
window.getComputedStyle()
for every ancestor element.If one is hidden, exclude the element from tab order.
Checklist: