Skip to content

A11y: Inconsistent aria-label implementation for control buttons #2885

@StudioVDS

Description

@StudioVDS

Description

There's an accessibility inconsistency in how Plyr handles aria-label attributes across its control buttons. The play/pause button correctly updates its aria-label based on state (switching between "Play" and "Pause"), but the mute button and settings button lack aria-label attributes entirely. No problem for OSX VoiceOver. But this is a problem for NVDA on Windows. NVDA for some reason has problems fetching the accessible names from these buttons span elements.

Current Behavior

  • Play button: ✅ Has dynamic aria-label that changes based on state, NVDA announces the accessible name.
  • Mute button: ❌ No aria-label attribute, NVDA can't find the accessible name.
  • Settings button: ❌ No aria-label attribute, NVDA can't find the accessible name.

Expected Behavior

All interactive control buttons should have appropriate aria-label attribute so the names are read out loud by alle screenreaders:

  1. Describe the button's function
  2. Update dynamically based on the button's state (where applicable)

For example:

  • Mute button should toggle between "Mute" and "Unmute"
  • Settings button should have "Settings" (or "Open settings"/"Close settings" if it has a state)

Proposed Solution

Implement the same dynamic aria-label logic that's currently used for the play/pause button to the mute and settings buttons. This would ensure consistent accessibility across all controls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions