Problem/Motivation

Inline images don't have captioning when entering the photoswipe.

Steps to reproduce

Click on a photoswipe and see there is no caption

Proposed resolution

In PhotoswipeInilne.php add a setAtttribute to the 'data-overlay-title' to pass the caption to the photoswipe module. This could be customized to in settings so the content creator could indicate taking the caption from alt, title, or a figcaption tag within the figure container.

Remaining tasks

Changes to the code

User interface changes

Add something in settings to allow the user to indicate which attribute to pass as the caption (i.e. alt, title, figcaption)

API changes

None that I can see

Data model changes

None

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lukejgwesley created an issue. See original summary.

nickolaj made their first commit to this issue’s fork.

nickolaj’s picture

Status: Active » Needs review

Adds captioning support by setting the `data-overlay-title` attribute on PhotoSwipe anchor elements. Includes a configurable filter setting (alt, title, or figcaption) and config schema.

ivnish made their first commit to this issue’s fork.

  • ivnish committed afd794f2 on 1.0.x authored by nickolaj
    feat: #3573219 Add Captioning
    
    By: lukejgwesley
    By: nickolaj
    By: ivnish
    
ivnish’s picture

Assigned: lukejgwesley » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.