-
Notifications
You must be signed in to change notification settings - Fork 2
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
Make visibleBySize optional #16
Comments
Hi @nick-keller, the browser skips elements that are not visible (e.g. a parent element has Can you show more from your real world example where the browser doesn't skip the element? I have to think about how to pass options like that - I think they should be passed per project once and not per call. Unfortunately I do not have much time right now but I'm open for suggestions. |
I have my component, and I place an empty |
Hello, great work on this package!
My issue
The browser (at least Chrome, haven't tested other browsers) does not skip 0 pixels high tabbable elements.
But
emulate-tab
has a checkisVisibleBySize
which checks the height of candidates elements.This results in skipping elements, not mimicking the browser's behavior.
Why do I care about 0 height elements?
I use them to "catch" focus at given places on my page, having two of them (one before, one after my component) allows me to know if the focus comes from the top or the bottom.
Proposed solution
Make it an option
checkVisibilityBySize: boolean = true
. (default value would be true for backward compatibility)Ideally we could pass the option when calling
emulateTab
, but a global option would work as well I guess.The text was updated successfully, but these errors were encountered: