Two bridges to two buildings.

(Mostly just checking image descriptions.)

@tedu fwiw mastodon uses "alt" instead of "title", so the image description that arrived here is just 2w8WwVzx7LX226wQ9N.jpg

nonetheless thank you for providing an example i can use to go agitate for change on the mastodon github issue tracker

@trwnh ah, I am perpetually confused as to which to use, so I changed it to both. alt is perhaps better, but my browser only shows title on hover.
@tedu @trwnh Browsers generally only show title on hover (including on hovering over stuff that isn't images). You'll see alt text if the image fails to load, or if you're using something assistive that reads them instead of the image.

People call it "alt text", but it's often not actually the "alt" attribute.

@tedu alt is supposed to be used for when images don't load, title is supposed to be used for descriptiveness (a la SEO)

but i guess in general, alt is ideally always used and title shouldn't be used unless necessary

alt is also used for text rendering by search engines, whereas title is used by browsers for hover

mastodon's federated copy of your image has the filename set as alt AND as title. which is bad.


- The text should describe the image if the image contains information
- The text should explain where the link goes if the image is inside an <a> element
-Use alt="" if the image is only for decoration

The title attribute specifies extra information about an element [...] most often shown as a tooltip text when the mouse moves over the element. The title attribute is part of the Global Attributes, and can be used on any HTML element.

@tedu turns out this is a bit of red herring

but you should probably set alt anyway. use both alt and title, if you have to.

@trwnh thanks. using name for alt and summary for title now.

@tedu like, functionally the img "alt" property is supposed to be able to replace the image entirely with no loss in comprehension

after a thonk about it, i think mastodon using the description as both "alt" and "title" is fine -- "alt" is for loading and search engines, "title" is for browser tooltips

@trwnh yeah, I think I have it backwards. Its actually kinda unclear what title is good for, all the interesting uses use alt. I confuse myself every time I look at this.

@tedu title can be applied to any element. it's used for tooltips

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!