-
Notifications
You must be signed in to change notification settings - Fork 12
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
Keyboard navigation gets "stuck" in some platforms when using an iframe in full screen mode #883
Comments
Google searching doesn't show any other reports of this, often browser focus bugs have StackOverflow or related threads. So this may be a scenery problem. Ill try to reproduce in a simple HTML page in full screen mode, and see if that gives us more info. IF it doesn't Ill start looking into workarounds. |
I made this: https://jsfiddle.net/wx9Louhr/2/ and the problem EDIT: I was accidentally still testing in Chrome. It is also a problem in Edge. |
When navigating in FF in full screen mode, I can see that I am focusing links outside of the test document I created, and then when I reach the last one, focus doesn't go anywhere else. |
Nothing about tab navigation in https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API. |
I haven't been able to find documentation about this or bug reports. Tab navigation doesn't loop on these platforms when basic HTML is the target of full screen, or will include things outside of the iframe. |
This is also probably blocking phetsims/qa#210. |
@jessegreenberg could I add the blocks-publication label? Also, would you like to pair on this tomorrow or Monday? |
Absolutely to both! |
We talked about this in a11y dev meeting today. I think we are ready to proceed with a workaround. We explored this a bit and tried to reproduce the problem in a JSFiddle in FF. We are thinking that a workaround is the best way to go. We are hoping that we can use event.relatedTarget in AccessiblePeer.blur to detect where focus is going in this case and prevent this behavior. |
We also verified that the problem is only when launching the sim from an iframe. |
From #883 (comment), adding the blocking label, this is a blocking issue for sims that have keyboard navigation and description enabled. |
Adding this to globalKeyListener of AccessibleInstance fixes the problem in FF and IE11: if ( FullScreen.isFullScreen() && event.keyCode === KeyboardUtil.KEY_TAB && !event.shiftKey ) {
var elementIsLast = AccessibilityUtil.getNextFocusable( self.display.accessibleDOMElement ) === event.target;
if ( elementIsLast ) {
event.preventDefault();
}
} This fixes tab navigation, though readable things outside of the iframe are still discoverable by the AT. But focus recovers gracefully in this case, and it should be up to the parent of the frame to hide content from AT in full screen mode. |
Focus gets lost in Edge when navigating backwwards, so we should add a similar check navigating backwards. |
This should be fixed with the above commit. |
@KatieWoe verified that this issue has been fixed in the above issue. Closing this one. |
@KatieWoe pointed out an extension of this bug in Edge. When launching full screen mode in Edge from an iframe, if you click outside of the simulation frame, then click with mouse to activate full screen mode, you can't focus anything in the sim, even if you click inside the sim with a mouse.
This is critical for the bug. Also @KatieWoe said that if the browser alert dialog that says "Page has entered full screen mode", focus can get stuck in there. There is probably less we can do about this. |
@jessegreenberg I think I can make the call here. This is definitely quite an "edge" case especially since edge such low usage of our sims. You need to be in an iframe, in fullscreen, a rare use case. Lets defer for the moment, and continue working on getting this sim out. |
@ariel-phet Thanks for weighing in. Sounds good to me. |
@jessegreenberg and I will try to start the batch release process for this next week. |
Maintenance releases deployed to a11y sims for the original issue in this thread. We are not fixing the edge bug in #883 (comment), so this issue is complete and we can close. |
So far found in Mac Mojave 10.14, Windows FF and Edge. When using an accessible display in an iframe in full screen mode, tab navigation can get stuck. Copying some comments from the original issue in phetsims/coulombs-law#74 and moving to Scenery because this is a general issue.
SCRIPT5: SCRIPT5: Access is denied.
The text was updated successfully, but these errors were encountered: