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

Progress bar text for screen reader should include the duration, if available #4024

Closed
OwenEdwards opened this issue Feb 2, 2017 · 4 comments
Assignees
Labels
a11y This item might affect the accessibility of the player enhancement

Comments

@OwenEdwards
Copy link
Member

Description

The progress bar uses aria-valuetext to convey the current time to screen reader users. Visually, the current time is displayed as a point on the progress bar line where the length of the bar represents the duration of the video. Screen reader users should also be presented with this information from the progress bar, for example as "01:23 of 12:34", rather than just "01:23" (and then needing to navigate through the control bar for the duration separately).

@OwenEdwards OwenEdwards added a11y This item might affect the accessibility of the player enhancement labels Feb 2, 2017
@gkatsev
Copy link
Member

gkatsev commented Feb 2, 2017

Would that mean we would need to localize of?

@OwenEdwards
Copy link
Member Author

I guess so! Probably more localize the "%1 of %2", in case some languages reverse the order ("%2 de %1")??

@gkatsev
Copy link
Member

gkatsev commented Feb 3, 2017

Interesting. I guess we'd want some kind of tokenization system for the localizations.

@OwenEdwards
Copy link
Member Author

Yeah, that's how more advanced i18n systems work. Might be a little too advanced to do at this point, so just being able to localize the "of" would be enough, I guess. It'd be nice to get this into v6, though - some other video players have it ;-)

@gkatsev gkatsev self-assigned this Feb 10, 2017
gkatsev added a commit that referenced this issue Feb 21, 2017
It allows you to use string as an key for the language files but have a default value that's different. In this case, we have a key of progress bar timing: currentTime={1} duration={2} which is used so that we have a descriptive key to what is happening. The default value matches that default value in en.json: {1} of {2}. The reason for the default value is so that the translation uses {1} of {2} for the actual localization without requiring en.json to be included in videojs by default.

Fix #4024.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a11y This item might affect the accessibility of the player enhancement
Projects
None yet
Development

No branches or pull requests

2 participants