-
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
fix: accessibility bugs with the VolumeBar #4023
Conversation
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.
Also, when merging, I think github won't autoclose the issues if they're listen that way. I think it looks specifically for fixes #x
. However, I do like the listing, so, maybe something like:
Fixes #123, #234
* #123: foo bar
* #234 bar baz
@@ -27,7 +27,7 @@ class VolumeBar extends Slider { | |||
super(player, options); | |||
this.on('slideractive', this.updateLastVolume_); | |||
this.on(player, 'volumechange', this.updateARIAAttributes); | |||
player.ready(() => this.updateARIAAttributes); | |||
player.ready(() => this.updateARIAAttributes()); |
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.
heh
@@ -106,7 +106,7 @@ class VolumeBar extends Slider { | |||
*/ | |||
updateARIAAttributes(event) { | |||
// Current value of volume bar as a percentage | |||
const volume = (this.player_.volume() * 100).toFixed(2); | |||
const volume = Math.round((this.player_.volume() * 100).toFixed(2)); |
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.
no need to the .toFixed()
, that's what adds the two decimal places. Maybe just a .toString()
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.
changed to toString()
656701e
to
98863b8
Compare
98863b8
to
cb9bff7
Compare
I wasn't even aware that GitHub could auto-close issues. I will have to use the suggested format more often. |
@@ -106,7 +106,7 @@ class VolumeBar extends Slider { | |||
*/ | |||
updateARIAAttributes(event) { | |||
// Current value of volume bar as a percentage | |||
const volume = (this.player_.volume() * 100).toFixed(2); | |||
const volume = (this.player_.volume() * 100).toString(); |
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.
I think we'd still want Math.round or Math.floor to make sure we are getting an integer.
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.
Done
cb9bff7
to
e7d62e6
Compare
e7d62e6
to
3a317fa
Compare
Description
aria-valuenow
andaria-valuetext
not set initiallyaria-valuenow
andaria-valuetext
Requirements Checklist