lottie-web icon indicating copy to clipboard operation
lottie-web copied to clipboard

Accessibility Best Practices for Lottie Animations (SVG Renderer)

Open bakztfuture opened this issue 5 years ago • 5 comments

Are there any accessibility best practices for lottie animations? I'm using the SVG renderer, ideally, I'd like to assign an alt tag to the images or SVG elements which Lottie ends up using for the animation on the webpage (instead of an alt tag on its parent div).

I can think of a couple ways - maybe the alt tag could by dynamically bound - just curious how others have met accessibility requirements while using lottie animations in the past, couldn't really find any examples online.

bakztfuture avatar Jan 10 '20 21:01 bakztfuture

I don't speak for the authors, but my personal inclination would be to use a role="presentation" on the parent div if the animation doesn't convey anything meaningful to a screen reader, or aria-label if it does.

terenceodonoghue avatar Mar 02 '20 04:03 terenceodonoghue

Disclaimer: don't use aria-label on the parent div if it has no explicit role attribute on it. divs have no implicit role of themselves, making an aria-label invalid on them.

Source: W3C Aria in HTML

woutthielemans avatar Mar 10 '23 13:03 woutthielemans

So how should i label my animations for blind users then, @woutthielemans? 😄

grafst avatar Nov 22 '23 07:11 grafst