Skip to content

Allow translations for time slider aria-valuetext #1736

@joao-almancio

Description

@joao-almancio

Related Problem:

I'm not able to provide translations for the words out of, hours, min and sec for time slider in default layout's aria-valuetext property.

  • timer-slider.ts on the line 241
  • time.ts on the line 94

Describe:

For a multilanguage website I need to provide accessible and translated content for user.

Alternatives:

I would consider the usage of a function to compute the property aria-valuetext

const getARIAValueText = getUserCustomARIAValueText 
  ? getUserCustomARIAValueText({currentTime: time, duration: duration() }) 
  : `${formatSpokenTime(time)} out of ${formatSpokenTime(duration())}`

This way, dev will have greater flexibility to deal with other languages. Of course people could mess putting some computation heavy function but it's just an idea.

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