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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user