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 Returned to Captions Menu instead of Caption Settings Menu Item when closing Caption Settings #6949

Closed
josephshanak opened this issue Nov 19, 2020 · 6 comments · Fixed by infoseci/video.js#1
Labels
a11y This item might affect the accessibility of the player

Comments

@josephshanak
Copy link

Description

During an accessibility audit of a project I work on that uses VideoJS we received the following feedback about how the focus is handled after closing the Caption Settings menu.

Users will expect to be returned to the item that activated the dialog when they close the dialog.
When a user closes the dialog, focus should be moved back to the menu item for "caption settings".

It seems like the behavior expected should have been implemented as part of #2746

Keyboard focus does not return to the control which opened the dialog when it is closed

Steps to reproduce

  1. Go to https://videojs.com/advanced/?video=elephantsdream
  2. Tab to Captions menu
  3. Enter Caption Settings
  4. Tab to Close button and activate

Results

Focus is returned to Captions Menu on the control bar

Expected

Focus is returned to "Caption Settings" menu item.

Actual

Focus is returned to Captions Menu on the control bar

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

@welcome
Copy link

welcome bot commented Nov 19, 2020

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@gkatsev
Copy link
Member

gkatsev commented Nov 19, 2020

I think we return the captions to the menu because the menu ends up getting closed. It does seem like maybe the menu should get re-opened and focus brought back into the menu.
@OwenEdwards any thoughts on this?

@gkatsev gkatsev added the a11y This item might affect the accessibility of the player label Nov 19, 2020
@kannapples
Copy link
Contributor

I created a PR for this issue. The fix I came up with isn't as modular as I'd like it to be - its specific to the caption settings modal. This means if another modal is added, it wont automatically include this accessibility fix. I couldn't figure out a way to handle this gracefully, but I'm happy to make updates if you have any suggestions.

@OwenEdwards
Copy link
Member

@gkatsev there is some disagreement in accessibility circles about the expected behavior in this situation. I'm getting some clarification, but I don't think that #6971 should be merged until I have a more definite answer (also, #6971 isn't robust for different cases when other menus can open the Captions Settings Dialog)

@kannapples
Copy link
Contributor

@OwenEdwards were you able to dig up any clarification about the expected behavior here?

@OwenEdwards
Copy link
Member

Confirmed that this is acceptable behavior for focus movement when closing the Captions Setting Dialog.

@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
4 participants