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

fix(accessibility): By default, show track selection buttons at all responsive breakpoints #7603

Merged
merged 1 commit into from
Feb 23, 2022

Conversation

misteroneill
Copy link
Member

@misteroneill misteroneill commented Jan 10, 2022

Description

This addresses a possible accessibility issue. It was noticed that the subtitles/captions button was hidden by default at responsive breakpoints x-small and tiny. This meant, by default, on players 320px or narrower, that the subtitles/captions button was inaccessible.

Also, the PiP control button was added since the responsive breakpoints implementation was added, which reduces the available control bar space even further.

To test, see the netlify build: https://deploy-preview-7603--videojs-preview.netlify.app/sandbox/responsive.html

Specific Changes proposed

  • Display all track selection buttons, by default, at all sizes.
  • Hide the progress control at x-small and tiny (instead of only when using the new Live UI at x-small)

Requirements Checklist

  • Feature implemented / Bug fixed
  • Reviewed by Two Core Contributors

@codecov
Copy link

codecov bot commented Jan 10, 2022

Codecov Report

Merging #7603 (f534def) into main (eeda26f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #7603   +/-   ##
=======================================
  Coverage   80.24%   80.24%           
=======================================
  Files         116      116           
  Lines        7325     7325           
  Branches     1771     1771           
=======================================
  Hits         5878     5878           
  Misses       1447     1447           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eeda26f...f534def. Read the comment docs.

.vjs-descriptions-button,
.vjs-captions-button,
.vjs-subtitles-button,
.vjs-audio-button,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of simply showing the subtitles/captions button, show all track selection buttons, by default. This seemed more prudent in the light of accessibility concerns.

Comment on lines +53 to +57
// At x-small and tiny, the progress control is too narrow to be useful.
&.vjs-layout-x-small,
&.vjs-layout-tiny {
.vjs-subs-caps-button {

.vjs-progress-control {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Progress control is now hidden in all cases of x-small.

Comment on lines +62 to +64
// At x-small, the buttons alone leave a large gap on the right. Fill it with
// the spacer element.
&.vjs-layout-x-small {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even with the progress control hidden, there is still some real estate left in some cases at x-small, so instead of a large gap on the right, use the spacer element in the middle to fill the real estate.

Copy link
Contributor

@alex-barstow alex-barstow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested with the netlify page.

@misteroneill misteroneill added the patch This PR can be added to a patch release. label Feb 22, 2022
@misteroneill misteroneill merged commit c44057d into main Feb 23, 2022
@misteroneill misteroneill deleted the fix/subs-caps-x-small branch February 23, 2022 17:17
edirub pushed a commit to edirub/video.js that referenced this pull request Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed patch This PR can be added to a patch release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants