-
Notifications
You must be signed in to change notification settings - Fork 9
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
Cannot focus on elements inside (some) shadow containers and <iframe>
elements.
#131
Comments
NPM helpfully provides this comparison of similar libraries. I also searched npm, and found |
So, I forked ally and applied the shadow fix in this pull request. It still doesn't work, so there seems to be something else going on. I am explicitly testing with the same FLOE page. Looking at which "tabbables" ally detects, it detects the video itself as tabbable, but not the sub-elements. I need to see what happens in code when I'm either right before or right after the video element. Onscreen, it just seems to wrap around. It may be that there's no focus highlight on the video itself, and that there are no sub-elements found to focus on. I also notice that on that page, I can't reach the UIO controls (other than the "show/hide" button), I need to understand that as well. With keyboard navigation, it all "just works", there may be a few issues to unpack. I suspect I'll end up making my own detection algorithm, but for now I need to start by picking apart the problems on a test page. I'll make a manual test fixture for now, including:
Once I understand what's wrong, I can convert that page to a proper test fixture and use it to test either a library or our own approach. |
I constructed a test fixture as described above. With a keyboard and tab/shift+tab, I can reach:
With tab / shift + tab, I cannot reach:
As a side note, you can right click a video element without controls, show the controls, and then tab to it. This suggests that the display of controls is something the user is allowed to change, so perhaps we can automatically enable controls for any video elements we find (as a configurable preference). Let's now compare tab navigation with ally's detection of "tabbables", which finds the following on the same page:
It does not detect:
The test fixture now clearly demonstrates the two problems observed on the FlOE page. My next step is to see what's visible in the DOM, for:
I should also see if ally's "focusable" detection (or any of their other modes) does any better. |
First, the details of what ally detects. With the "quick" strategy, ally detects:
With the "strict" strategy, ally detects:
With the "all" strategy, ally detects:
Although I suspected as much from previous manual testing, it's good to confirm and document that none of ally's strategy for detecting tabbables does what we need. |
Ally's focusable method detects the following using the "quick" strategy:
Their "strict" strategy detects:
Their "all" strategy detects:
So, their "focusables" method doesn't do what we need either. |
In testing this, I discovered that clicking a video with our |
OK, we'll have to handle This issue should now focus on |
<iframe>
elements.
OK, with the fixes for #132, I'm going to leave this one open and update the summary to make it clearer where the hard limits of our current approach are. |
This should be broken out as we probably have an approach for iframes. |
In recent testing of the gamepad navigator with a page from the FLOE project, I discovered a range of unreachable elements:
I was able to special-case video elements (see #132), but we still don't have an approach for closed shadow roots or
<iframe>
elements.Given the CORS concerns and sandboxing in modern browsers, I'm not sure we're going to be able to address the concerns with
<iframe>
elements.Pretty sure we won't be able to work with a "closed" shadow root either.
The text was updated successfully, but these errors were encountered: