fix: add aria-current attributes to video captions (#35371)
This PR fixes the accessibility issues associated with only visually treating the current transcript line. The current implementation for the transcript panel bolds the text that is actively being spoken or skipped to. However, there is no aria attribute present to convey this change to assistive technology. This change impacts learners and course authors.
This commit is contained in:
@@ -63,8 +63,8 @@
|
||||
if ($.isFunction(onSwitchFunction)) {
|
||||
onSwitchFunction();
|
||||
}
|
||||
this.$tabs.removeClass('current');
|
||||
$currentTarget.addClass('current');
|
||||
this.$tabs.attr('aria-current', 'false').removeClass('current');
|
||||
$currentTarget.attr('aria-current', 'true').addClass('current');
|
||||
|
||||
/*
|
||||
Tabs are implemeted like anchors. Therefore we can use hash to find
|
||||
|
||||
@@ -1096,12 +1096,13 @@
|
||||
if (typeof this.currentIndex !== 'undefined') {
|
||||
this.subtitlesEl
|
||||
.find('li.current')
|
||||
.attr('aria-current', 'false')
|
||||
.removeClass('current');
|
||||
}
|
||||
|
||||
}
|
||||
this.subtitlesEl
|
||||
.find("span[data-index='" + newIndex + "']")
|
||||
.parent()
|
||||
.attr('aria-current', 'true')
|
||||
.addClass('current');
|
||||
|
||||
this.currentIndex = newIndex;
|
||||
|
||||
Reference in New Issue
Block a user