Image syntax

A. Pagaltzis pagaltzis at gmx.de
Wed Jul 27 17:14:06 EDT 2005


* John Gruber <gruber at fedora.net> [2005-07-27 22:15]:

> >But what you’re providing as an alt text is not a replacement.

> >It is a title, or caption. alt is not meant for that. It is

> >for a replacement to be read in place of the image within the

> >flow of text. Illustrative images like a screenshot do not get

> >an alt text; they are not an equivalent replacement to

> >anything, and short of a thousand words, they cannot be

> >described adequately. 99% of the images used on the web today

> >should have `alt=""`.

>

> I strongly disagree with that. I use alt attributes to provide

> a description of the image, for those who can't or aren't

> viewing images. That's not the same thing as a caption at all

> -- captions are something that's appropriate even if you can

> see the image.


That is exactly what is `title`, not `alt`, is for. See the gist
of Matthew Thomas’ argument over at Wikipedia over their `alt`
guidelines.

Note `alt` is not excluded from use by user agents when they
cannot provide the image, after all; those should provide the
information from both attributes. OTOH they don’t render `alt` at
all when the image can be shown, though the `title` content
remains available – commonly as a tooltip, but that is just one
possible interpretation.

All this considered, if your use of `alt` was appropriate, then
what purpose would `title` serve at all, semantically? It would
merely be a presentational doodad.


> >If you take that into account, then the syntax already in

> >Markdown is already roughly as you want it:

> >

> > ![](http://example.org/foo.png

> > "A screenshot of whatever")

>

> That's not what I want at all. It's quite gibberishy. Markdown

> shouldn't look as though it uses as many funny punctuation

> characters as Perl.


It was no praise of the syntax – I was just trying to say the
order you want is already provided for the use case you want it
for. I believe that is no accident, even if it was unconscious.
Sorry, I wasn’t clear enough.

The syntax could definitely stand to have some line noise pared
down.

Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>


More information about the Markdown-Discuss mailing list