Commit 204b52e9 by Waheed Ahmed

Added three missing required states for video progress slider.

TNL-89
parent 16771e69
......@@ -122,6 +122,11 @@
'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 () {
'title': gettext('Video position'),
'aria-disabled': false,
'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 () {
.slider('option', 'max', duration)
.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
......
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