Closed Bug 1868566 Opened 2 years ago Closed 1 year ago

Add dedicated key to play/pause PiP which is not impacted by button focus

Categories

(Toolkit :: Picture-in-Picture, enhancement, P3)

Firefox 119
enhancement

Tracking

()

RESOLVED WONTFIX

People

(Reporter: DS, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0

Steps to reproduce:

Open PiP
Click on of any of it's controls, Mute for example.
Press Space.

Actual results:

Activates last clicked control, ie. it toggles between mute/unmute.

Expected results:

Toggle between play/pause, as indicated in the tooltip when you hover over the play/pause button.

Enter and Space seem to fill the same role, except that enter only applies when you've clicked an of the button.

Component: Untriaged → Picture-in-Picture
Product: Firefox → Toolkit

Thanks for filing, DS.

This is fairly consistent with how other video players work. For example, if one goes to https://vimeo.com/415176232, and after launching the video, clicks on the volume control button to mute it, subsequent presses on the spacebar will also toggle mute / unmute. This is the same for each control of the video player.

I'll double-check that this makes sense from a keyboard accessibility perspective with ayeddi, but I suspect this is intended behaviour.

Hey ayeddi, any thoughts from an a11y perspective here?

Flags: needinfo?(ayeddi)

Ah i see, perhaps it would make sense to use a different/additional hotkey that only works for play/pause regardless of which control has focus?
My main use-case is remote control of the PiP player for accessibility reasons, by sending it the key events which works consistently for everything but the spacebar.

Thank you for filing the bug, DS, and for the tag, mconley!

In general, the focus should stay on the activated control, so then the keyboard-only and assistive technology users won't need to cumbersomely navigate back to it - this also follows the WCAG On Input success criterion. The position of the control is expected to change when a button is pressed to open a dialog or when the page reloads.

That's being said, I think providing a shortcut would be beneficial for all users.

Jamie, what do you think, what could be a delightful approach here?

Flags: needinfo?(ayeddi) → needinfo?(jteh)

For some additional context, vimeo and youtube both use the "K" hotkey for play/pause

I was going to point this out as well, though I never did understand how "k" stands for play/pause. "p" seems far more intuitive.

(In reply to R. S.[:DS] from comment #3)

Ah i see, perhaps it would make sense to use a different/additional hotkey that only works for play/pause regardless of which control has focus?

I think that's reasonable. I think we'd want to keep the current behaviour of the space bar for backwards compatibility and familiarity, but also add a shortcut key - p perhaps - which is explicitly for play/pause.

My main use-case is remote control of the PiP player for accessibility reasons, by sending it the key events which works consistently for everything but the spacebar.

Note that this should work consistently as long as you haven't clicked a button. I'm curious as to why a user who depends on remote control of the player for accessibility reasons would first click a button, but that doesn't invalidate the request.

Given that this is accessible to keyboard, screen reader and mouse users as is, and given that there are multiple workarounds (avoiding clicking the Mute button or using the multimedia play/pause key instead of the space key), I'm morphing this into an enhancement request.

Type: defect → enhancement
Flags: needinfo?(jteh)
Summary: PiP hotkey SPACE acts on last clicked control, instead of playing/pausing → Add dedicated key to play/pause PiP which is not impacted by button focus

(In reply to James Teh [:Jamie] from comment #7)

(In reply to R. S.[:DS] from comment #3)

My main use-case is remote control of the PiP player for accessibility reasons, by sending it the key events which works consistently for everything but the spacebar.

Note that this should work consistently as long as you haven't clicked a button. I'm curious as to why a user who depends on remote control of the player for accessibility reasons would first click a button, but that doesn't invalidate the request.

The problem was that this seems to work initially but for as of yet unknown reasons might stop working randomly.

From some more testing it seems like anything regarding control focus can break the PiP window from receiving the spacebar events.
Pressing TAB which brings up the focus cues, or clicking pause with the mouse - both of these keep focus on play/pause but it breaks the space keyboard event from being received when the PiP window does not have focus.

Steps to reproduce the above:

  • open PiP
  • press TAB - (to highlight Play)
  • press ALT+TAB - (to give focus to a different window)
  • send the window the space event through programmatic means.
    ie, a autohotkey script:
ControlSend, , {Space}, Picture-in-Picture
Severity: -- → N/A
Priority: -- → P3

This is still an issue but clearly is not a priority

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.