-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Fix: changes 'mousedown' to the 'mouseup' event in the player #5992
Conversation
sync with origin branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, switching to mouseup is probably best unless it ends up breaking something, though, I can't imagine it will.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for helping improve the accessibility of Video.js @gjanblaszczyk! |
Thanks @gkatsev |
Description
All buttons in the player use 'mouseup' instead of 'mousedown' event.
This player behavior is very useful for accessibility because the user can cancel the action by clicking outside the button area.
However, in the player, there is one place that the player uses a 'mousedown' instead of 'mouseup' event. I think that is just a mistake.
You can check it by clicking on the video area during the playback. You will see that the playback pauses/resumes after 'mousedown' event but if you click on the play/pause button over the controlbar it uses 'mouseup' event.
The WCAG 2.1 "2.5.2 Pointer Cancellation" spec. also suggests using "mouseup" instead of "mousedown" event.
Specific Changes proposed
I changed "mousedown' to 'mouseup" event inside the player.
Requirements Checklist