Skip to content
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

Trap keyboard focus when in full-screen mode #11

Open
jvine opened this issue Jul 17, 2017 · 2 comments
Open

Trap keyboard focus when in full-screen mode #11

jvine opened this issue Jul 17, 2017 · 2 comments

Comments

@jvine
Copy link

jvine commented Jul 17, 2017

When the user is viewing an image in full-screen mode, the keyboard focus should be constrained to the visible controls. Currently, when the viewer is embedded in a page, it's possible to tab to, and activate, non-visible links on the page behind the full-screen viewer.

@edsilv
Copy link
Collaborator

edsilv commented Aug 3, 2017

This might work: https://stackoverflow.com/questions/24056593/whats-the-best-way-to-limit-focusable-controls-to-current-dialog

The UV already has an <a href="/" id="top"></a>, which is focused on full screen. Perhaps we could also add an <a href="#" id="bottom"></a>?

Here's where the top anchor is added: https://github.com/UniversalViewer/universalviewer/blob/v3/src/modules/uv-shared-module/BaseExtension.ts#L174

Perhaps add the bottom anchor here: https://github.com/UniversalViewer/universalviewer/blob/v3/src/modules/uv-shared-module/BaseExtension.ts#L512

Then use these instead of focusKeeper in the SO example.

The code would go in BaseExtension.ts

@hackartisan
Copy link

sul-dlss#11

Estimate: .5 days
Added by snydman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants