• Resolved Trippetchz

    (@trippetchz)


    Hi there,

    Thanks for this great plugin! It’s fantastic!

    I have an issue about captions to report. The plugin is working great scraping captions from the page, except for captions used in Gutenberg blocks. On individual images it works fine, but seemingly not if captions are set for the whole gallery block.

    Here’s a screencast to show you what I mean:
    [video src="https://archive.org/download/out-2kp27Lightboxcp/out-2.mp4" /]

    If this is a bug, is this something that could be easily fixed with a hack in the meantime while waiting on a fix?

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    The problem here is, that the caption has no link to the images. It is just the caption of the gallery itself but not for the images.

    There are two figure elements and one figcaption element but outside the two figure elements – but there is no “aria-describedby” attribute in the figure element which indicates the caption to be used.

    The frontend script already tries to find a caption if neither the backend provided one or there is no “aria-describedby” attribute – but to avoid performance problems it does not walk the whole document tree to find a caption element somewhere else. The best solution would be, if Gutenberg would add an identifier to the figcaption elements and use this for “aria-describedby” in the figure elements.

    I’ll have a look into it, if this can be solved somehow using some hook for the Gutenberg gallery output, but I can’t promise anything yet.

    Edit:

    I created a test case on my demo website at https://wordpress-demo.arnowelzel.de/lightbox-with-single-caption-for-multiple-images/

    If I can get it working here, I’ll include a fix in the next update.

    • This reply was modified 4 years, 9 months ago by Arno Welzel.
    Thread Starter Trippetchz

    (@trippetchz)

    Thank you so much for this!

    Plugin Author Arno Welzel

    (@awelzel)

    Release 2.64 now supports the common caption of Gutenberg gallery blocks as well. See the test case I already mentioned: https://wordpress-demo.arnowelzel.de/lightbox-with-single-caption-for-multiple-images/

    Thread Starter Trippetchz

    (@trippetchz)

    Fantastic. Thanks for your work!!!

    Plugin Author Arno Welzel

    (@awelzel)

    BTW: I noticed, that you removed the “ver” parameter from all URLs added by plugins or the theme on your website. This is not good – since the browser may still have an outdated, cached version of the resrouce even after updating the plugin. This is the reason, why there is a “ver” parameter, to make sure, a browser does load the latest version if needed.

    If you removed the “ver” parameter, because some page testing tool told you, that parameters in URLs are bad for caching – this is wrong. Browsers and proxy servers also cache resources with parameters in the URL. Caching is only depending on the HTTP headers for expiration and cache control.

    More about this see here:

    https://arnowelzel.de/en/versioning-of-static-resources-in-wordpress

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Gutenberg Gallery Block Captions not showing’ is closed to new replies.