Folks who run their own site/blog, did you know that you can add alt text to the images that show up on social media when your articles are shared?
og:image:alt
twitter:image:alt
[#]AltText #accessibility #webdev
=> More informations about this toot | More toots from stefan@stefanbohacek.online
Here's a full example of the necessary code on my blog.
https://stefanbohacek.com/blog/adding-alt-text-to-article-thumbnails-on-social-media/
=> More informations about this toot | More toots from stefan@stefanbohacek.online
@stefan I didn't not know this, thanks for sharing!
=> More informations about this toot | More toots from anze3db@fosstodon.org
@stefan
Why don't they use the AltText that's already on the image?
=> More informations about this toot | More toots from gdinwiddie@mastodon.social
@gdinwiddie You typically set the image that's used on social media using the og:image or twitter:image meta tag, with an URL of the image.
It might be too much work to search for the same URL on the page and see if it has an alt text, but it can also be an image that does not appear on the page itself.
This might work if you check for alt text embedded in the image metadata, but this is not widely used.
=> More informations about this toot | More toots from stefan@stefanbohacek.online
@stefan I didn't know actually, so thank you for sharing!
=> More informations about this toot | More toots from literalgrill@sakurajima.moe
@literalgrill My pleasure!
=> More informations about this toot | More toots from stefan@stefanbohacek.online
@stefan Some food for thought...
https://yoast.com/developer-blog/why-we-dont-set-the-og-image-alt-tag/
W3C Alt Decision Tree: https://www.w3.org/WAI/tutorials/images/decision-tree/
=> More informations about this toot | More toots from cybeardjm@masto.ai
@cybeardjm Yes, saw this, and I am not too sure I fully understand.
"managing the og:image:alt tag is more of a job for Facebook (and other platforms that uses it)"
Why would Facebook describe the contents of the image you are posting online? How would this even work?
Maybe it would make sense if there was an extra field for image description when you're posting a link to an article, but if you don't control the site, you won't know when the image changes.
Maybe I'm missing something?
=> More informations about this toot | More toots from stefan@stefanbohacek.online
@cybeardjm And I get that some images may be "decorative", but does that automatically apply to all article image thumbnails?
=> More informations about this toot | More toots from stefan@stefanbohacek.online
@stefan Thanks! Will surely add this to my blog. :)
=> More informations about this toot | More toots from nicd@masto.ahlcode.fi
@nicd Nice! No problem!
=> More informations about this toot | More toots from stefan@stefanbohacek.online
@stefan https://git.ahlcode.fi/nicd/scriptorium/commit/2239bbf5f0dbf1ae3b9560aebf9398ea40eea69d π Just need to release a new version and deploy it when I have a moment.
=> More informations about this toot | More toots from nicd@masto.ahlcode.fi
@nicd Very cool!
=> More informations about this toot | More toots from stefan@stefanbohacek.online
@stefan I did not know this. Thanks!
=> More informations about this toot | More toots from gustav@jkpg.rocks
@gustav No problem!
=> More informations about this toot | More toots from stefan@stefanbohacek.online
@stefan I did not! But now I do. Thank you πββοΈ
=> More informations about this toot | More toots from masukomi@connectified.com
@stefan Where do you add those? How does the tag actually look like?
=> More informations about this toot | More toots from onreact@mas.to
@onreact See a link I posted in the reply here: https://stefanbohacek.online/@stefan/113646350643795547
Hope this helps, let me know if you have any questions!
=> More informations about this toot | More toots from stefan@stefanbohacek.online This content has been proxied by September (3851b).Proxy Information
text/gemini