fix: use aria-live="polite" for descriptions text track display#9178
Open
manichandra wants to merge 1 commit into
Open
fix: use aria-live="polite" for descriptions text track display#9178manichandra wants to merge 1 commit into
manichandra wants to merge 1 commit into
Conversation
Using aria-live="assertive" on the text track display container caused screen readers to interrupt all other announcements every time a descriptions cue updated. This made audio descriptions inaccessible in practice — users lost context from other page announcements. Change to aria-live="polite" so descriptions are queued and announced without interrupting ongoing screen reader output, per WCAG 4.1.3. Captions and subtitles tracks correctly remain at aria-live="off" since sighted-hearing users relying on those tracks do not need screen reader announcement of caption text. Fixes videojs#7843
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7843
Using
aria-live="assertive"on the text track display container causedscreen readers to interrupt all other announcements every time a descriptions
cue updated. This made audio descriptions inaccessible in practice — users
lost context from other page announcements.
Changed to
aria-live="polite"so descriptions are queued and announcedwithout interrupting ongoing screen reader output, per WCAG 4.1.3.
Captions and subtitles tracks correctly remain at
aria-live="off"sinceusers relying on those tracks do not need screen reader announcement of
caption text.
Specific Changes proposed:
src/js/tracks/text-track-display.js: Changedaria-live="assertive"to
aria-live="polite"inupdateDisplay()for descriptions trackstest/unit/tracks/text-track-display.test.js: Added QUnit test verifyingaria-live is "off" for captions tracks and "polite" for descriptions tracks
Requirements Checklist:
npm run docs:apito error