Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mobile] Disable focus on click of Big Play Button #9006

Open
rtritto opened this issue Mar 13, 2025 · 2 comments
Open

[Mobile] Disable focus on click of Big Play Button #9006

rtritto opened this issue Mar 13, 2025 · 2 comments
Labels
needs: triage This issue needs to be reviewed

Comments

@rtritto
Copy link

rtritto commented Mar 13, 2025

Description

As default Video.js displays Big Play Button (vjs-big-play-button CSS class).

When vjs-big-play-button is clicked, the vjs-play-control is focused:

2025-01-07.011304.mp4

Related:

Reproduction

https://stackblitz.com/edit/vercel-next-js-dykavrxx

Errors

No response

What version of Video.js are you using?

8.22.0

Video.js plugins used.

No response

What browser(s) including version(s) does this occur with?

Firefox 135

What OS(es) and version(s) does this occur with?

Windows 11

Solution (Draft)

On /src/js/big-play-button.js, use focus only when 'ontouchstart' in globalThis is false.

@gkatsev
Copy link
Member

gkatsev commented Mar 13, 2025

Looks like the last relevant change (#4497) was specifically to skip changing focus for mouse events. Maybe, it should be updated to instead only change focus on keyboard events instead of skipping mouse events.

@gkatsev
Copy link
Member

gkatsev commented Mar 13, 2025

Doing a stricter check for keyboard events is probably fine, but we'd need to confirm that it continues to function for Screen Readers. So, potentially, the easiest is to exclude touch events, unless VoiceOver on iOS, for example, uses touch events. In which case, it gets a bit trickier.

May be easier to have stricter focus styles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: triage This issue needs to be reviewed
Projects
None yet
Development

No branches or pull requests

2 participants