react-bnb-gallery icon indicating copy to clipboard operation
react-bnb-gallery copied to clipboard

Image is missing alt

Open sebqq opened this issue 5 years ago • 3 comments

Hello.

First of all, thank you for this lib. I keep getting following error message in my console:

Warning: Failed prop type: The prop `alt` is marked as required in `Image`, but its value is `null`.
    in Image (created by Thumbnail)
    in Thumbnail (created by Caption)
    in li (created by Caption)

What can I do with it? Thanks!

sebqq avatar Jul 27 '20 09:07 sebqq

Solved by providing caption param.

But what if there is no caption to display? I don't want to display image name as caption. there should be something like alt and thumbnailAlt props in Photo type.

sebqq avatar Jul 27 '20 09:07 sebqq

Hey @sebqq, thanks your interest in this project.

I like the point you mention, it might be useful to have a different param for the alt attribute of images and use the caption parameter by default.

So, I think I going to reopen this one to work on it.

pedropalau avatar Jul 27 '20 12:07 pedropalau

An alt attribute for photos that is used as the alt attribute on rendered <img> would be really appreciated.

apepper avatar Sep 15 '20 13:09 apepper