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

Issue 827565 link

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

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

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

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.
 
Is there a repro link or video for this? I can play/pause just fine (when the video is correctly focused)
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
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
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?
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.
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.
Description: Show this description
Summary: Media Controls: Clicking on the video element does not focus it. (was: Media Controls: SPACE not pausing video)
Labels: -Pri-2 Pri-3
Owner: lethalantidote@chromium.org
Status: Started (was: Available)
Cc: kochi@chromium.org
 Issue 594518  has been merged into this issue.
Project Member

Comment 13 by bugdroid1@chromium.org, Dec 7

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

Status: Fixed (was: Started)

Sign in to add a comment