ReferenceMenus
media-volume-popover
A volume-aware popover that keeps mute available when volume level controls are unavailable
Import
Anatomy
Behavior
<media-volume-popover> combines popover behavior with volume availability. When volume level controls are unavailable, it closes and omits the popup while keeping the mute trigger rendered. This lets media with fixed volume keep mute control without exposing a nonfunctional slider.
The trigger can target the popup with commandfor. An immediately adjacent trigger is linked automatically when neither element has an authored ID.
Styling
The popup reflects data-availability="available" while it can render volume controls.
When it cannot, the element also receives native hidden and data-hidden.
Accessibility
The trigger receives aria-haspopup, aria-expanded, and aria-controls while the volume popup is available. When only mute is available, the trigger keeps the mute button’s own accessible name and behavior without popup ARIA.