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

Re-select the caps button after closing modal #6971

Closed

Conversation

kannapples
Copy link
Contributor

@kannapples kannapples commented Dec 2, 2020

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".
Keyboard focus does not return to the control which opened the dialog when it is closed.

Fixes #6949

Specific Changes proposed

When the TextTrackSettings modal is closed, the SubsCapsButton will be re-selected, and the captions menu list will be re-opened.

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chrome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
    • Example created (starter template on JSBin)
  • Reviewed by Two Core Contributors

@welcome
Copy link

welcome bot commented Dec 2, 2020

💖 Thanks for opening this pull request! 💖

Things that will help get your PR across the finish line:

  • Run npm run lint -- --errors locally to catch formatting errors earlier.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

Copy link
Contributor

@brandonocasey brandonocasey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you mean by this and what it fixes. I don't think we want to do it this way though. I think we would be better suited adding a modalclose listener in handleClick in CaptionSettingsMenuItem that calls pressButton on it's parent. We would need to do it this way because there are many types of captions menus.

@gkatsev
Copy link
Member

gkatsev commented Dec 11, 2020

@OwenEdwards is looking into whether this is something we want. We'll keep this PR open until we have more info from him.
#6949 (comment)

@OwenEdwards
Copy link
Member

See #6949 - the current behavior is acceptable, so this fix is not needed.

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

Successfully merging this pull request may close these issues.

Focus Returned to Captions Menu instead of Caption Settings Menu Item when closing Caption Settings
4 participants