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

Focus Not Trapped in Caption Settings Dialog #6950

Closed
josephshanak opened this issue Nov 19, 2020 · 4 comments · Fixed by #6983
Closed

Focus Not Trapped in Caption Settings Dialog #6950

josephshanak opened this issue Nov 19, 2020 · 4 comments · Fixed by #6983
Labels
a11y This item might affect the accessibility of the player

Comments

@josephshanak
Copy link

Description

The dialog used for Closed Captioning settings does not trap focus within the dialog contents.

It seems like this was meant to be fixed as part of #2746 / #4025.

Keyboard focus is not trapped inside the dialog while it is open

Steps to reproduce

  1. Go to https://videojs.com/advanced/?video=elephantsdream
  2. Tab to the Captions Menu
  3. Enter the Caption Settings Dialog
  4. Tab to the Close button.
  5. Tab again.

Results

Expected

The focus is moved to the first element in the Caption Settings Menu

Actual

The focus is moved outside of the video player.

Error output

N/A

Additional Information

Please include any additional information necessary here. Including the following:

versions

videojs

Happens on 7.7.5 and 7.10.2 at least

browsers

Firefox, Chrome. Possibly others but untested.

OSes

Verified on MacBook Pro running MacOS Catalina 10.15.7

plugins

Unsure

@gkatsev gkatsev added the a11y This item might affect the accessibility of the player label Nov 30, 2020
@gkatsev
Copy link
Member

gkatsev commented Nov 30, 2020

Interesting, looks like this is a regression. It worked previously.

@gkatsev
Copy link
Member

gkatsev commented Nov 30, 2020

Interestingly, it's still working with tabbing back but not forward.

@gkatsev
Copy link
Member

gkatsev commented Nov 30, 2020

Trying it out in various versions, it looks like this broke between v7.5.4 and v7.5.5. My guess is that it was this change #5969

@kannapples
Copy link
Contributor

I created a PR for this issue: #6983

My fix prevents Tab keydown events from firing the parent handleKeyDown function in close-button.js. I couldn't think of a reason why you'd want to allow a Tab keydown to escape the context of the container, but I thought I'd call it out jic.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a11y This item might affect the accessibility of the player
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants