Add keyboard support for overflow menu in media player |
|||||||||
Issue descriptionUsers should be able to access the overflow menu items via a keyboard (on desktop). +dmazzoni for tips on how to make accessible
,
Oct 7 2016
,
Oct 11 2016
,
Oct 11 2016
It should behave similarly to the keyboard support for other built-in controls in Blink with their own internal shadow dom. For example: <input type="date"> Press Alt+Down or Option+Down to pop up the calendar when it has focus, then use the arrow keys to select a date, and enter to select a date, or Esc to close the pop-up. Is there a reason the overflow menu needed to be implemented from scratch? Why couldn't it reuse some the code used for a <select> pop-up, or the right-click context menu pop-up? It seems like any of those would get you the desired behavior for free. But if not, I think the calendar pop-up is probably the best example to follow. For Android, I think it ought to be implemented natively. On Android, when you click on a <select> control or an <input type=date> you get a native Android pop-up dialog to interact with, not the same lightweight window we typically show on desktop.
,
Oct 11 2016
The reason why it was implemented that way is because it followed how the closed captions menu was implemented. Also, I don't think the <select> popup would have been the right solution here: opening a native modal dialog doesn't seem to be what we want to do for the media overflow menu. I have a couple of questions for you: - do we have hotkeys like this for other parts of the media controls? - contrary to <select> or <input type=date>, the <video> only purpose is not to show the overflow menu, it will show relatively minor options (like Cast or Download). Do we really want "open" actions like alt+down on the <video> or <audio> to trigger this?
,
Oct 11 2016
Darn, looks like the caption menu needs to be fixed too. - do we have hotkeys like this for other parts of the media controls? The only thing I can think of now is that the volume control responds to left/right arrow keys. - contrary to <select> or <input type=date>, the <video> only purpose is not to show the overflow menu, it will show relatively minor options (like Cast or Download). Do we really want "open" actions like alt+down on the <video> or <audio> to trigger this? I don't think we need alt+down, I just wanted you to understand how to trigger the calendar popup using only the keyboard. My only expectation is that it should be possible to interact with a video player using only the keyboard, after this change. I'd like to fix the captions menu too but obviously that was broken before so it can wait. But currently you can at least tab to all of the controls in a video player and press enter/space to activate them. With the current overflow menu on canary, it's not actually possible to activate any options in the overflow menu, including options that were keyboard-accessible before, so that's an actual regression in accessibility and we definitely don't want that. What I'd expect is that you tab to each of the controls, and when you reach the overflow button, pressing space or enter (or alt+down probably) opens the menu, then arrow keys navigate the menu, space/enter selects, and Esc closes the menu.
,
Jun 6 2017
> What I'd expect is that you tab to each of the controls, and when you reach the > overflow button, pressing space or enter (or alt+down probably) opens the menu, > then arrow keys navigate the menu, space/enter selects, and Esc closes the menu. lethalantidote@, this could be a nice follow-up from the CL you did recently? At the moment, we handle the first parts of this: space/enter triggers the closed caption/overflow menu when focused but we don't allow navigation using arrow keys or ESC to close the menu. Would you be interested to look into this?
,
Jun 14 2017
I would be happy to look into this. Do we have an example of this menu so I can understand/test? A link would be nice.
,
Jun 15 2017
You can use: https://mounirlamouri.github.io/sandbox/media/dynamic-controls.html The CC menu is available by default. You should have an overflow menu if you resize to 150px for example.
,
Dec 8 2017
,
May 16 2018
This was done as part of the modern media controls project. |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by mlamouri@chromium.org
, Oct 6 2016Owner: ----
Status: Available (was: Assigned)