-
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
Seek bar's aria-valuetext attribute should have times written out in words rather than numerical timestamp format #6335
Comments
👋 Thanks for opening your first issue here! 👋 If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@claudiah12 unfortunately, implementing a change like this is going to be very complicated to do correctly, because of the complexity of internationalizing/localizing plurals (see, for example, https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals). So "1 minute", "2 minutes", etc. You can look at https://github.com/OwenEdwards/video.js/tree/fix/improve-aria-text-of-progress-bar-for-screen-reader-users for a basic implementation in English, but even that doesn't handle plurals correctly. |
I hadn't even considered how difficult it could be to do. |
With Video.js 8, we're going to be dropping support for IE11, this means that Intl.PluralRules will be available in all the browsers we support, which should hopefully allow us to do a better job and do it more easily. |
Description
The current time & duration in the aria-valuetext property of the seek bar is written as a timestamp, which in most cases screen readers will read as just numbers and punctuation, rather than something understandable as time. The time should written out in plain text like "x minutes, y seconds" for the aria value.
Steps to reproduce
Explain in detail the exact steps necessary to reproduce the issue.
Results
Expected
If seek bar is at 00:20/14:05, then screen reader announces 'twenty seconds of 14 minutes, 5 seconds
Actual
If seek bar is at 00:20/14:05, then screen reader announces 'Zero colon zero colon twenty of fourteen colon one'.
The text was updated successfully, but these errors were encountered: