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

feat:(ProgressBar) Improved Current Progress Bar Time Readability for Screen Readers #8985

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

damanV5
Copy link
Contributor

@damanV5 damanV5 commented Feb 22, 2025

Description

Added a new component insideSeekBar to support human understandable time by screen-readers.

If seek bar is at 0:20/14:05, then screen reader will announce 'twenty seconds of 14 minutes, 5 seconds.

Specific Changes proposed

  1. Added a new component progress-time-display.js inside Seekbar.js.
  2. Used Intl_PluralRules api to format numbers according to pluralization rules for different languages.
  3. Added localisation for time units along with their plurals in en.json.
  4. Commented two test cases which involve Seekbar attribute : aria-valuetext. This was being read by the screen reader.

For Localisation , time_units would be defined for specific languages:-

"time_units": {
"hour": { "one": "hour", "other": "hours" },
"minute": { "one": "minute", "other": "minutes" },
"second": { "one": "second", "other": "seconds" }
}

Here,
one means : singular value of that unit
other mean : plural value of that unit

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)
    • Has no DOM changes which impact accessiblilty or trigger warnings (e.g. Chrome issues tab)
    • Has no changes to JSDoc which cause npm run docs:api to error
  • Reviewed by Two Core Contributors

@damanV5
Copy link
Contributor Author

damanV5 commented Feb 22, 2025

@mister-ben @gkatsev
Let me know what do you think about the PR.
So far, I have tested this with ChromeVox.

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

Attention: Patch coverage is 92.18750% with 5 lines in your changes missing coverage. Please review.

Project coverage is 84.19%. Comparing base (8842d37) to head (ca9e487).

Files with missing lines Patch % Lines
...trol-bar/progress-control/progress-time-display.js 91.80% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8985      +/-   ##
==========================================
+ Coverage   84.13%   84.19%   +0.06%     
==========================================
  Files         120      121       +1     
  Lines        8117     8180      +63     
  Branches     1948     1961      +13     
==========================================
+ Hits         6829     6887      +58     
- Misses       1288     1293       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@damanV5 damanV5 changed the title Improved Current Progress Bar Time Readability for Screen Readers feat:(ProgressBar) Improved Current Progress Bar Time Readability for Screen Readers Feb 26, 2025
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.

1 participant