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: improved accessibility for time display #8182

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

brayden-wood
Copy link
Contributor

This change is to remove the aria-live attribute from time display elements. The aria-live attribute is no longer needed since the presentation role was added. Both attributes being present can lead to unexpected screen reader behavior. Fixes issue #8143

Description

This PR fixes the accessibility bug described in #8143

Specific Changes proposed

Remove aira-live attribute from time display elements in the player. This attribute was originally added to prevent screen readers from announcing every time change, but later, role="presentation" was added. The presentation role will hide the element from the screen reader all together, so aria-live is no longer needed.

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chrome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
    • Example created (starter template on JSBin)
  • Reviewed by Two Core Contributors

This change is to remove the aria-live attribute from time display elements. The aria-live attribute is no longer needed since the presentation role was added. Both attributes being present can lead to unexpected screen reader behavior.
Fixes issue videojs#8143
@welcome
Copy link

welcome bot commented Mar 8, 2023

💖 Thanks for opening this pull request! 💖

Things that will help get your PR across the finish line:

  • Run npm run lint -- --errors locally to catch formatting errors earlier.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@codecov
Copy link

codecov bot commented Mar 9, 2023

Codecov Report

Merging #8182 (e1e2a73) into main (35c539d) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #8182   +/-   ##
=======================================
  Coverage   82.11%   82.11%           
=======================================
  Files         112      112           
  Lines        7402     7402           
  Branches     1785     1785           
=======================================
  Hits         6078     6078           
  Misses       1324     1324           
Impacted Files Coverage Δ
src/js/control-bar/time-controls/time-display.js 86.84% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

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

Makes sense to me. @OwenEdwards did you have anything to add on this?

Copy link
Member

@misteroneill misteroneill left a comment

Choose a reason for hiding this comment

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

This checks out, thanks for submitting a PR!

@misteroneill misteroneill merged commit c35c45b into videojs:main Mar 21, 2023
@welcome
Copy link

welcome bot commented Mar 21, 2023

Congrats on merging your first pull request! 🎉🎉🎉

@jcurtis jcurtis deleted the issue-8143 branch March 29, 2023 15:02
edirub pushed a commit to edirub/video.js that referenced this pull request Jun 8, 2023
This change is to remove the aria-live attribute from time display elements. The aria-live attribute is no longer needed since the presentation role was added. Both attributes being present can lead to unexpected screen reader behavior.
Fixes issue videojs#8143
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants