Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Twitter image alt tags #183

Closed
jamietanna opened this issue Feb 1, 2020 · 4 comments
Closed

Support Twitter image alt tags #183

jamietanna opened this issue Feb 1, 2020 · 4 comments

Comments

@jamietanna
Copy link
Collaborator

jamietanna commented Feb 1, 2020

As per https://blog.twitter.com/developer/en_us/a/2016/alt-text-support-for-twitter-cards-and-the-rest-api.html Twitter supports alt tags on their images. We should update Granary to return the alt tag for a Twitter image as well as the image itself, for better accessibility.

@snarfed snarfed closed this as completed in b2b1bf7 Feb 2, 2020
@jamietanna
Copy link
Collaborator Author

jamietanna commented Feb 2, 2020

Amazing, thanks snarfed!

@edent
Copy link

edent commented Dec 29, 2020

This doesn't seem to work in the HTML version. Tried it with https://twitter.com/edent/status/1343865082900602880 and got back

<img class="u-photo" src="https://pbs.twimg.com/media/EqZeKUyW4AAAHF9.jpg" alt="" />

There is alt text on the original image.

Also broken are mf2-json, RSS.

It works on JSONfeed, as2, as1, as1-xml, atom,

@jamietanna jamietanna reopened this Dec 29, 2020
@snarfed
Copy link
Owner

snarfed commented Dec 29, 2020

Thanks for the report! One part of Twitter alt text handling was incomplete, so it wasn't making it all the way into mf2 JSON/HTML. That's fixed now, and I've confirmed that the alt text in your example tweet now shows up.

@jamietanna
Copy link
Collaborator Author

jamietanna commented Dec 30, 2020

Thanks Ryan, that's sorted it now and I can see them 🙌🏼 thanks Terence for the assist, too

(Originally published at: https://www.jvt.me/mf2/2020/12/ekwiv/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants