lottie-player
lottie-player copied to clipboard
Lang attribute on lottie-player and accessibility
The default template for the "animation-container" has the "lang" attribute hardcoded to "en".
In cases where the "description" attribute of the lottie player contains text that is not english, e.g. Norwegian (or another language), this will potentially cause problems for screen readers.
It should be possible to set the lang attribute in the same way one can set the "description" (aria-label) attribute.
The lang attribute could default to "en" if nothing is spesified.
Hi @dingsoyr thanks for suggesting this, we will look in to implementing it.
@dingsoyr You still need to have this lang="en" on the aria-label on lottie control elements. I try to fix this in this pull request https://github.com/LottieFiles/lottie-player/pull/157 If you move the lang attribut to the child element, you can use the same language as the website for the description.