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.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | instagram_without_api-add-caption-text-3042479-4.patch | 3.13 KB | anthonyf |
| #2 | instagram_without_api-add-caption-text-3042479-2.patch | 3.12 KB | anthonyf |
Comments
Comment #2
anthonyf commentedAdding 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.
Comment #3
anthonyf commentedI'm going to add logic to sanitize the caption text from instagram. Will post another patch after.
Comment #4
anthonyf commentedComment #5
anthonyf commentedComment #6
gge commentedThe 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.Comment #7
strozx commentedThis patch works as described. Thank you
Comment #8
malcomio commentedThe patch works as expected, but I'd suggest adding the caption to the template, perhaps wrapped in a condition that checks a configuration setting.
Comment #9
ipwa commentedWe need the change to the template to commit this.
Comment #11
ipwa commentedCould not use any patches because the way the data is fetched was refactored. Thanks everyone!