video.js icon indicating copy to clipboard operation
video.js copied to clipboard

Focus should remain on CC button when exiting captions menu

Open marguinbc opened this issue 10 years ago • 4 comments

When the user triggers a link in the captions menu using the keyboard, focus should return to the CC button.

Step to reproduce:

  1. Tab to the the captions button - captions button is highlighted indicating focus
  2. Use ctrl-shift-space or space to select an option such as english
  3. Captions menu hides

Expected Result:

  • Captions button still has keyboard focus Actual Result:
  • Keyboard focus is lost

marguinbc avatar Feb 04 '16 20:02 marguinbc

This isn't a problem with V5.7.0 (at least, on Firefox on OS X). In fact, the behavior of hiding the menu when a selection is made has been removed - the user must explicitly hide the menu with the Esc key, or by Tab or Shift-Tab to a different control.

@marguinbc can you give more details about this - which vjs version, what browser & OS?

OwenEdwards avatar Feb 12 '16 00:02 OwenEdwards

This was pre 5.0.7, I believe. When the menu is dismissed with the ESC key, does focus remain on the CC button? It obviously won't if they switch to another control but probably should if they just closed the CC menu. Then again, it might make more sense to put focus on the play/pause button since after they change the captions they aren't likely to change them again.

marguinbc avatar Feb 17 '16 22:02 marguinbc

@marguinbc that's an accessibility versus convenience issue - a screen reader user or sighted keyboard-only user would expect focus to move back to the CC button. It would be confusing to move focus elsewhere, even though it would be a convenience to some users. I've been thinking about the broader impact of keyboard accessibility though (prompted by @gkatsev and @heff) - it would be nice to have some of the common (YouTube-like) keyboard behavior (e.g. arrow keys, 0-9 etc.) if the specific key press isn't recognized by the currently-focused control (e.g. Enter to click a button).

OwenEdwards avatar Mar 07 '16 03:03 OwenEdwards

I think this issue has been fixed.

gkatsev avatar Feb 01 '17 19:02 gkatsev