Open Bug 1566183 Opened Last month Updated 2 days ago

Picture-in-Picture player window can't be accessed with keyboard only

Categories

(Toolkit :: Video/Audio Controls, defect, P2)

68 Branch
defect

Tracking

()

People

(Reporter: mconley, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: access)

Attachments

(1 file)

Steps to reproduce:

  1. Launch Nightly
  2. Go to Youtube https://youtube.com
  3. Select any video to play
  4. Use only the keyboard to enable the Picture-in-Picture window using the context menu or the toggle.

Expected Result:
The PiP should be accessible with keyboard only.

Actual Result:
The PiP can't be enabled using keyboard only.

I have a patch up here that adds a keyboard shortcut, Ctrl-Alt-P / Cmd-Alt-P to enter Picture-in-Picture for the first found video in the focused frame of the selected tab. I'm in the process of reaching out to UX to find out whether or not this keyboard shortcut needs to be run by anyone first - UX, localization, etc. Once I have that information, I'll request review.

Hi Asa, you were suggested as a potential source of feedback for the keyboard shortcut here. Does my selection of Ctrl/Cmd-Alt-P make sense, or should we go for something else?

Flags: needinfo?(asa)

Though this shortcut would overlap with the shortcut for presentation mode for PDFs in Firefox, practically I don't think that would be a significant problem.

I've looked around (macOS and Chrome PiP modes) and don't see any existing shortcuts to emulate for PiP.

I've also checked and this shortcut doesn't seem to be used very often in other apps. It does show up some, for example in Word's switch to print layout view and OneNote for play audio recordings, but I don't think that should cause any significant confusion.

Shorlander had some good questions:

  • Does it conflict with another popular or expected shortcut? No.
    -- Related: Is there already a commonly accepted shortcut for this action? No.
  • Does it work across operating systems? Yes.
  • Is it somewhat easy to activate? (i.e. how much do you have to contort your hand to do it?) Requires two hands so not the most convenient but that's true of many of our current shortcuts.

I think we can go with this.

Flags: needinfo?(asa)
Flags: needinfo?(enndeakin)

Hey Asa,

According to Neil in https://phabricator.services.mozilla.com/D40082#1215968, our original keyboard shortcut proposal (Ctrl+Alt+P) may not be workable because Ctrl+Alt+P maps to AltGr+P on some keyboards, which is a printable character.

Is Ctrl+Shift+V acceptable instead?

Flags: needinfo?(asa)

Ctrl+Shift+V is an existing Firefox shortcut for paste without formatting. Unless I'm missing something obvious, a reasonable assumption :) I can imagine scenarios where a page had a video and a text form that could make re-using this shortcut problematic.

Flags: needinfo?(asa)

(In reply to Asa Dotzler [:asa] from comment #7)

Ctrl+Shift+V is an existing Firefox shortcut for paste without formatting.

Shoot, good point. :( Alright let me see if I can find another...

Ctrl+Shift+} doesn't appear taken. Can I use that? (I'm basically picking characters at random though, unless anybody has a better suggestion.)

Flags: needinfo?(asa)

(In reply to Mike Conley (:mconley) (:⚙️) (Catching up from PTO) from comment #9)

Ctrl+Shift+} doesn't appear taken. Can I use that? (I'm basically picking characters at random though, unless anybody has a better suggestion.)

ctrl+shift+] is "bring to front" for some popular design applications so it's kind of on point. I'm looking into a possible conflict with JAWS, the popular screen reader. Will report back soon.

Flags: needinfo?(asa)
Flags: needinfo?(enndeakin)

Hi Asa, any updates on whether ctrl+shift+] makes sense as the keyboard shortcut?

Flags: needinfo?(asa)

(In reply to Mike Conley (:mconley) (:⚙️) from comment #11)

Hi Asa, any updates on whether ctrl+shift+] makes sense as the keyboard shortcut?

I think this makes sense. Note, for some people using the JAWS screen reader, the keyboard shortcut will be usurped for screen reader functionality.

Flags: needinfo?(asa)
You need to log in before you can comment on or make changes to this bug.