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
ADD aria attributes for better accessibility... #1198
Conversation
-Labels can be translated via the config -aria-label -aria-hidden (when needed) -role -tabindex
Can one of the admins verify this patch? |
Thanks @francoismassart! I'm reviewing with the team and determining which release this can make it in to. |
No problem if you edit my changes but one thing that matter to us is to be able to translate the |
Yes. We would have liked to figure out internationalization for the player before the labels but hopefully this will get things going in that direction. I'd like to make the setup option multi-purpose and use simpler names that don't match the CSS classes and allow us to use dot syntax. So for config localization: {
play: 'Play',
playback: 'Start playback',
pause: 'Pause',
volume: 'Volume',
prev: 'Previous',
next: 'Next',
cast: 'Chromecast',
fullscreen: 'Fullscreen',
playlist: 'Playlist',
hd: 'Quality',
cc: 'Closed captions',
audioTracks: 'Audio tracks', // need to convert camelCase to hyphens
replay: 'Replay',
buffer: 'Loading'
} This should still allow you to provide localization strings for the aria tags en Français ;) |
Please add also the "live status" translation which is currently harcoded to "Live broadcast" ;-) |
@robwalch do you have any feedback on this PR? |
Yes. I'll inline my comment from above. |
'jw-icon-audio-tracks': 'Audio tracks', | ||
'jw-icon-replay': 'Replay', | ||
'jw-icon-buffer': 'Loading' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use simpler names that don't match the CSS classes and allow for dot syntax. This aria
block should look like:
localization: {
play: 'Play',
playback: 'Start playback',
pause: 'Pause',
volume: 'Volume',
prev: 'Previous',
next: 'Next',
cast: 'Chromecast',
fullscreen: 'Fullscreen',
playlist: 'Playlist',
hd: 'Quality',
cc: 'Closed captions',
audioTracks: 'Audio tracks', // need to convert camelCase to hyphens
replay: 'Replay',
buffer: 'Loading'
}
The main thing is to simplify the names in the aria block. Also please include information in the description regarding browser support and testing. Which operating systems and browsers did you test this on, and what is the best way for our team to validate and test these accessibility features? Thanks for going the extra mile with role and aria-hidden. We'll need to evaluate how these and the especially the tabindex changes impact the player on it's own and within existing sites. |
Import changes from jwplayer/jwplayer:master
…into aria-attributes
+ ADD accessibilty.md with plenty of documentation and notes + `config.aria` to `config.localization` ... + renaming properties of `config.localization` + ADD new translations for `more`, `liveBroadcast` & `loadingAd` + TESTING providing `<meta charset="utf-8">` allowing the usage of accents inside the html file + TESTING using custom `aria-label` values set via `config.localization` in French + FIX for assigning the role attribute valur in `controlbar.js`
Importing latest change fro the `master` of `jwplayer/jwplayer`
…into aria-attributes
Hey @robwalch about the
You can read more about this here: As you will read inside the Can you merge or provide additional feedback ? Cheers |
this.el.setAttribute('role', 'button'); | ||
this.el.setAttribute('aria-label', ariaText); | ||
} | ||
if (ariaShown === true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more succinct to write as if (ariaShown)
Thank you @francoismassart. My team needs to demo the new features to our product manager to get it our roadmap. I'd like us to set the milestone of 7.5 for this, but it might have to wait until later. I'll keep you posted. |
@robwalch, I can make a quick screencast demonstrating the before/after user experience if you want. |
test this please |
…st/vtt-unit * 'master' of https://github.com/jwplayer/jwplayer: (21 commits) Setup 608 Captions in mixin (#1274) Add subtitles tracks to CC menu JW7-2641 Set default line value to -1 instead of 'auto' so captions render in the same line in Safari and Chrome. Revert view changes to captions layer positioning Add sideloaded tracks using video method JW7-2484 Sort levels for Flash in flash.js JW7-2607 Style focused elements using hover colors JW7-2628 Improvements from feedback Split VTT.js into: vttparser, vttcue (polyfill), vttregion (polyfill), vttrenderer. Updated mixin and renderer to load files async only when needed. Remove log messages Cleanup code and improve comments Convert flash 608 cues to VTTCues for rendering with VTT.js Working on consistent loading of tracks across providers Always apply captions styles in renderer Only set track mode when rendering natively. Add polyfill to captions renderer Port all track loading functionality to the tracks mixin Leverage VTT.js for non-native captions rendering JW7-1657 ADD aria attributes for better accessibility... (#1198) JW7-2628 Fixes #1149: Remove bower dependencies Emit meta events for cue changes in Safari JW7-2637 Try to play the next item in adpod on error ...
Changes proposed in this pull request:
Make the JS version of jwplayer compatible with Voice Over via
aria-label
attributesFixes #1183
JW7-2628
-Labels can be translated via the config
-aria-label
-aria-hidden (when needed)
-role
-tabindex