Support Twitter image alt tags
jamietanna opened this issue · comments
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.
Amazing, thanks snarfed!
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,
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.
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/)