khanglu / react-crossfade-image

react-crossfade-image - Simple React component for crossfading images - No CSS needed
MIT License
33 stars 13 forks source link

set missing alt attribute #6

Closed layflags closed 5 years ago

layflags commented 6 years ago

Why not set the alt attribute on the bottomSrc image as well?

khanglu commented 6 years ago

Thanks for your contribution but I don't think alt attribute for bottom image is necessary as they are meant to be hidden after the animation

layflags commented 6 years ago

I use your lib in an app that uses SSR, so the resulting static HTML has accessibility issues when conducting an audit through e.g. lighthouse. However, it's your lib, you decide. For everyone in need, just use npm package @layflags/react-crossfade-image