New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 11
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug


Participants' hotlists:
Modern-Media-Controls
media-controls-a11y

Show other hotlists

Other hotlists containing this issue:
media-controls-a11y


Sign in to add a comment
link

Issue 827565: Media Controls: Clicking on the video element does not focus it.

Reported by beccahughes@chromium.org, Mar 30 2018 Project Member

Issue description

Clicking on the video element does not focus it.

STR (copied from #2):
1) Load https://mounirlamouri.github.io/sandbox/media/dynamic-controls.html
2) Click play
3) Press spacebar
4) Video does not pause

Note:
`window.setInterval(() => console.log(document.activeElement), 1000);` can be used to find the current focused element.
 

Comment 1 by steimel@chromium.org, Apr 2 2018

Is there a repro link or video for this? I can play/pause just fine (when the video is correctly focused)

Comment 2 by beccahughes@chromium.org, Apr 2 2018

This was on Chrome OS at the bug bash, but the following is not working for me on gLinux:

1) Load https://mounirlamouri.github.io/sandbox/media/dynamic-controls.html
2) Click play
3) Press spacebar
4) Video does not pause

Comment 3 by steimel@chromium.org, Apr 2 2018

Yeah that's just because that doesn't focus the video. If you do the same on the legacy controls the video also doesn't pause. You need to tab focus onto the video

Comment 4 by chcunningham@chromium.org, Apr 3 2018

ACK that old controls had same behavior. 

> You need to tab focus onto the video

Are you open to forcing focus() when the user interacts with controls?

Comment 5 by steimel@chromium.org, Apr 3 2018

Yeah I'm open to that and it would definitely make the video keyboard controls more user friendly. Though I'm not familiar enough with focus to know what sort of issues may arise from that.

Comment 6 by mlamouri@chromium.org, Apr 3 2018

You can see the focused element by inserting this in the inspector:
`window.setInterval(() => console.log(document.activeElement), 1000);`

When clicking the play/pause button on Chrome, it doesn't change the focused element. Firefox does, for example. It would be interesting to see what other browsers do. I would expect that we are the exception here. Then, we would need to make sure we don't break accessibility tools that rely heavily on focus.

It's a good thing to fix but I would be tempted to leave this for after the launch because the chances of regressions are not trivial. Happy to leave it as a P2 so we can quickly fix it if we end up getting trough the P1s quickly.

Comment 7 by mlamouri@chromium.org, Apr 3 2018

Description: Show this description

Comment 8 by mlamouri@chromium.org, Apr 3 2018

Summary: Media Controls: Clicking on the video element does not focus it. (was: Media Controls: SPACE not pausing video)

Comment 9 by mlamouri@chromium.org, Apr 7 2018

Labels: -Pri-2 Pri-3

Comment 10 by lethalantidote@chromium.org, Oct 15

Owner: lethalantidote@chromium.org

Comment 11 by lethalantidote@chromium.org, Oct 20

Status: Started (was: Available)

Comment 12 by steimel@chromium.org, Dec 3

Cc: kochi@chromium.org
 Issue 594518  has been merged into this issue.

Comment 13 by bugdroid1@chromium.org, Dec 7

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4c0284d5fa813c6b993da4ac57a54db665c2b523

commit 4c0284d5fa813c6b993da4ac57a54db665c2b523
Author: CJ DiMeglio <lethalantidote@chromium.org>
Date: Fri Dec 07 01:01:34 2018

Gives Media Element focus upon mouse iteration.

This change makes it such that when a user interacts with the media element
or its controls,the media element will be given focus. This allows one to use
the keyboard controls to control the video.

Bug:  827565 
Change-Id: I21a6d5ab2b75aeb3bf646c694eeac62f787c89aa
Reviewed-on: https://chromium-review.googlesource.com/c/1292814
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: CJ DiMeglio <lethalantidote@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614513}
[modify] https://crrev.com/4c0284d5fa813c6b993da4ac57a54db665c2b523/third_party/blink/renderer/core/html/media/html_media_element.cc
[modify] https://crrev.com/4c0284d5fa813c6b993da4ac57a54db665c2b523/third_party/blink/renderer/modules/media_controls/media_controls_impl.cc
[modify] https://crrev.com/4c0284d5fa813c6b993da4ac57a54db665c2b523/third_party/blink/web_tests/fullscreen/full-screen-test.js
[modify] https://crrev.com/4c0284d5fa813c6b993da4ac57a54db665c2b523/third_party/blink/web_tests/fullscreen/video-controls-timeline.html
[modify] https://crrev.com/4c0284d5fa813c6b993da4ac57a54db665c2b523/third_party/blink/web_tests/media/controls/video-enter-exit-fullscreen-without-hovering-doesnt-show-controls.html
[modify] https://crrev.com/4c0284d5fa813c6b993da4ac57a54db665c2b523/third_party/blink/web_tests/media/video-controls-mouse-events-captured.html
[modify] https://crrev.com/4c0284d5fa813c6b993da4ac57a54db665c2b523/third_party/blink/web_tests/media/video-mouse-focus.html

Comment 14 by lethalantidote@chromium.org, Dec 11

Status: Fixed (was: Started)

Sign in to add a comment