Commit 9a1bae04 by Waheed Ahmed

Merge pull request #5612 from…

Merge pull request #5612 from edx/waheed/tnl89-add-missing-required-states-for-video--progress-slider

Added three missing required states for video progress slider.
parents 16771e69 204b52e9
...@@ -122,6 +122,11 @@ ...@@ -122,6 +122,11 @@
'option', 'value', 20 'option', 'value', 20
); );
}); });
it('required aria values updated', function () {
expect(state.videoProgressSlider.handle.attr('aria-valuenow')).toBe('20');
expect(state.videoProgressSlider.handle.attr('aria-valuemax')).toBe('120');
});
}); });
}); });
......
...@@ -76,7 +76,10 @@ function () { ...@@ -76,7 +76,10 @@ function () {
'title': gettext('Video position'), 'title': gettext('Video position'),
'aria-disabled': false, 'aria-disabled': false,
'aria-valuetext': getTimeDescription(state.videoProgressSlider 'aria-valuetext': getTimeDescription(state.videoProgressSlider
.slider.slider('option', 'value')) .slider.slider('option', 'value')),
'aria-valuemax': state.videoPlayer.duration(),
'aria-valuemin': '0',
'aria-valuenow': state.videoPlayer.currentTime
}); });
} }
...@@ -243,6 +246,12 @@ function () { ...@@ -243,6 +246,12 @@ function () {
.slider('option', 'max', duration) .slider('option', 'max', duration)
.slider('option', 'value', time); .slider('option', 'value', time);
} }
// Update aria values.
this.videoProgressSlider.handle.attr({
'aria-valuemax': duration,
'aria-valuenow': time
});
} }
// When the video stops playing (either because the end was reached, or // When the video stops playing (either because the end was reached, or
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment