cajames / kirby-editor-gallery-block

A gallery block for the Kirby Editor
MIT License
61 stars 5 forks source link

Support for captions #17

Open ian-cox opened 4 years ago

ian-cox commented 4 years ago

Would be awesome to be able to include a caption for each gallery image. image

Would also be super useful to be able to add a caption for a group of images in the gallery block settings. image

cajames commented 4 years ago

@ian-cox another great feature request. 😊

Doing a caption per image should be quite possible, though would it be different to the alt text?

Regarding a caption for the whole gallery, I've actually been working on something for this haha. Just a few tricky bits as a "gallery" is a grouping of adjacent blocks. So the caption technically is just on the "last" block of galleries for it to get displayed. Though at the moment I don't know if there's an easy way to analyse the entire structure of blocks on the client-side in Vue. I'll some more time in a few weeks where I'll spend more time looking into this. 😊

ian-cox commented 4 years ago

Awesome! thanks for looking into this

Jasper2-0 commented 4 years ago

@cajames from a user perspective having a caption seems to make more sense than an alt-text; that is, setting a caption should also set the alt-text attribute of the image. Conceptually a caption is part of the content of an image, while an alt-tag is primarily an attribute to enhance web-accessibility... In my experience that technical distinction doesn't matter that much to users...