airbnb / lottie-web

Render After Effects animations natively on Web, Android and iOS, and React Native. http://airbnb.io/lottie/
MIT License
30.42k stars 2.86k forks source link

Accessibility thoughts #2936

Open stubar opened 1 year ago

stubar commented 1 year ago

I see title and description were added in this issue https://github.com/airbnb/lottie-web/issues/1469 which is great. I don't see this in the readme though, shall I add it.

Secondly would it be an idea to also derive these from the lottie json? (with the props as an override maybe?). I notice there is a metadata/description key in the lottie json schema. I think this would make it easier to share accessibility info between web/ios/android.

bodymovin commented 1 year ago

Hey, that's a good idea. I'll add it to the backlog. If you want to add the info in the Readme file, I'd really appreciate it

wegnertm commented 1 year ago

Is there a way to add aria-hidden="true" on the along with the role="img"? Ours is purely decorative so I don't want it to announce anything to AT users.

woutthielemans commented 1 year ago

Request above could be part if a larger update on ARIA-attributes, like removing the invalid ones? (as mentioned in #2944)

wegnertm commented 1 year ago

Sounds good! I was able add the attributes via JS since rendererSettings can add a className, but would be a nice feature to have those attribute options in the loadAnimation object.

woutthielemans commented 1 year ago

@bodymovin is removing invalid aria-attributes also part of the backlog?

danwulff commented 1 year ago

Request above could be part if a larger update on ARIA-attributes, like removing the invalid ones? (as mentioned in https://github.com/airbnb/lottie-web/issues/2944#issuecomment-1465728022)

It looks like there was a Pull Request opened that removed the invalid aria labels https://github.com/airbnb/lottie-web/pull/3000 but it was never merged. Do we know why that PR stalled?

Is there a way to add aria-hidden="true" on the along with the role="img"? Ours is purely decorative so I don't want it to announce anything to AT users.

Any news on this? Not having the ability to set aria-hidden="true" and role="img" is something that has been flagged as an accessibility issue on our team.

As far as solutions go, I would guess this would be a property addition to rendererSettings. If that's the case then I could attempt a Pull Request, but I don't see any contributions guidelines for this repo. Is this Repo accepting Pull Requests?

sangrepura commented 5 months ago

This issue has been in the backlog for over a year. Any updates on this?