ReferenceBehavior
StatusAnnouncer
Announce player state changes through a persistent status live region
Import
Anatomy
Behavior
StatusAnnouncer watches player-store snapshots, so it reports changes made by buttons, sliders, custom controls, or direct player actions. It does not depend on Hotkey or Gesture events.
The first snapshot establishes a baseline without announcing it. Later changes are handled in two groups:
Regular playback-time updates are ignored. A seek announcement is queued only after seeking changes from true to false at a different time. When several immediate states change in one snapshot, their translated labels are combined into one announcement.
The component always renders with role="status". Its [data-status-announcer-content] child is replaced for every announcement, including repeated text, so assistive technology receives a fresh live-region change. After closeDelay, which defaults to 800 milliseconds, the label is cleared while the status region remains rendered.
Announcements use the active Video.js locale and translations.
Use the labels prop to override individual translated labels for one announcer.
Styling
StatusAnnouncer is not visually hidden by the primitive. Apply a visually-hidden class while keeping it in the accessibility tree. Do not use display: none, visibility: hidden, or the hidden attribute.
Add a className to the component:
Accessibility
The status role provides implicit polite live-region behavior, so the component does not add an explicit aria-live attribute.
Keep one announcer inside each player Container whose state changes should be reported.
Debounced volume and completed-seek announcements are suppressed while an element with role="slider" inside the same container has focus. The focused slider provides its own value feedback, and suppressing the separate status message avoids duplicate announcements. A focused slider outside that container does not suppress it.
Use SeekIndicator for temporary visual seek feedback. Keep that visual value out of a live region; StatusAnnouncer owns the accessible announcement.
Examples
Basic Usage
Use the playback button for an immediate announcement and the mute button for a debounced announcement. The sliders provide their own focused value feedback, so StatusAnnouncer suppresses its duplicate volume and completed-seek message.