airbnb / lottie-web

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

Remove Invalid Aria-Label From SVG Text Elements #3000

Closed itsmattsoria closed 5 months ago

itsmattsoria commented 1 year ago

As @woutthielemans mentioned in #2944, the group element doesn't have a valid role compatible with aria-label, which actually potentially adds more confusion, and as was in their case, most cases I've run into where there are text elements in the SVG, they only add confusion, not clarity, when read without a description, and in at least VoiceOver, the title and desc are ignored if elements in the SVG contain aria-label. So instead of a screen reader reading a helpful title and description, it'll read random words without context. As was mentioned, you could make this label optional, but given that its presence isn't valid in the first place, the best and simplest solution is to remove it altogether. This commit removes the line that adds that attribute.

(edit: rename branch)