Skip to content

Add translation support for root player aria-label #1734

@tmjoen

Description

@tmjoen

First of all I wanted to say thanks for a GREAT library! ❤️

Related Problem:

The element's aria-label attribute (e.g., "Video Player - My Title") is hardcoded in English and cannot be translated via the existing i18n/translations system (as far as I can tell). This creates an inconsistent accessibility experience for non-English websites where control labels are translated but the main player label is not.

Describe:

Allow customization of the root player aria-label. The label is currently constructed in #watchTitle() as:

${typeText} Player + (currentTitle ? - ${currentTitle} : '')

I'd like to be able to provide translations for "Video Player", "Audio Player", "Media Player", "Live", etc. through the existing layout translations system (PlyrLayout/DefaultLayout).

Anything Else?

Use case: Norwegian website needing aria-label="Videospiller - Min videotittel" instead of aria-label="Video Player - Min videotittel".

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions