We used to have the Instagram caption text available to use for alt text in another module (Instagram Block). I'd like to have that feature in Instagram Without API also. Alt text is important for accessibility for people with disabilities.

Comments

degoethe created an issue. See original summary.

anthonyf’s picture

Adding a patch, instagram_without_api-add-caption-text-3042479-2.patch
In my local testing this worked for exposing the Instagram caption text for images.

anthonyf’s picture

I'm going to add logic to sanitize the caption text from instagram. Will post another patch after.

anthonyf’s picture

anthonyf’s picture

Status: Active » Needs review
gge’s picture

The patch works great, thank you!
For all those who are gonna use this patch, don't forget to add {{ item.caption }} to instagram-without-api-image.html.twig, otherwise the captions wont be displayed.

strozx’s picture

Status: Needs review » Reviewed & tested by the community

This patch works as described. Thank you

malcomio’s picture

The patch works as expected, but I'd suggest adding the caption to the template, perhaps wrapped in a condition that checks a configuration setting.

ipwa’s picture

Status: Reviewed & tested by the community » Needs work

We need the change to the template to commit this.

  • ipwa committed c05b6ab0 on 3.0.x
    feat: #3042479 Expose Instagram Caption Text for Images
    
    By: anthonyf
    By...
ipwa’s picture

Version: 8.x-1.0 » 3.0.x-dev
Assigned: anthonyf » ipwa
Status: Needs work » Fixed

Could not use any patches because the way the data is fetched was refactored. Thanks everyone!

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.