Skip to content

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.

@codecov
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

❌ 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).
⚠️ Report is 17 commits behind head on main.

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@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