Skip to content

Commit 008220c

Browse files
authored
fix: remove aria-live from volumeBar (#1002)
1 parent 541db75 commit 008220c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/video-player.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ class VideoPlayer {
183183

184184
this.videojs.ready(() => {
185185
this._onReady();
186+
this._applyVolumeBarAriaLiveFix();
186187

187188
if (ready) {
188189
ready(this);
@@ -581,6 +582,17 @@ class VideoPlayer {
581582
}
582583
}
583584

585+
/**
586+
* Temporary fix: remove aria-live from VolumeBar to avoid NVDA repeated announcements.
587+
* TODO: Remove when Video.js includes the upstream fix (nvaccess/nvda#7996).
588+
*/
589+
_applyVolumeBarAriaLiveFix() {
590+
const volumeBar = this.videojs.$('.vjs-volume-bar');
591+
if (volumeBar) {
592+
volumeBar.removeAttribute('aria-live');
593+
}
594+
}
595+
584596
_onSourceChange(e, { source, sourceOptions }) {
585597
this._sendInternalAnalytics({ ...(sourceOptions && { sourceOptions }) });
586598
this.isLiveStream = source?.resourceConfig()?.type === 'live';

0 commit comments

Comments
 (0)