Wikipedia talk:Manual of Style/Accessibility/Alternative text for images/Archive 1

Archive 1Archive 2Archive 3Archive 5

I was dinged by Wapcaplet for stating on How to edit a page that the most appropriate ALT text for most images is "". It seems that Wapcaplet, and many Wikipedia contributors, are unfortunately mistaken on this issue; they apparently think that any ALT text is better than none, but this is usually not the case.

Take, for example, the article on Karl Marx. As I write this, the ALT text for Marx's picture is "Kmarx.jpg". That is horribly wrong, as you'll discover if you run the article through a speech browser: "Karl Marx. From Wikipedia, the free encyclopedia. Kmarx dot jay pee jee Karl Marx (May 5, 1818 - March 14, 1883) was an influential political philosopher ..." Huh? Who on earth is Kmarx dot jay pee jee Karl Marx?

ALT text is an accessibility aid, which should express the meaning of an image for someone who can't see it -- it should not make them feel guilty or disadvantaged about not seeing it. Appropriate ALT text for the Karl Marx picture might be "Marx was an imposing figure, with a full moustache and a large beard." However, is that kind of information really important for someone listening to an encyclopedia article? If it is, then use it as the ALT text. If it isn't important -- and it isn't important in most cases, because the image is merely illustrative rather than meaningful -- then the most appropriate ALT text is "".

-- Mpt 00:20 8 Jun 2003 (UTC)

You may note, from the third link you give:

Provide a text equivalent for every non-text element

I would strongly disagree that an empty ALT text tag is appropriate in any case, save those where the image is absolutely meaningless (such as a design element, spacer, or the like - elements which are quickly becoming obsolete as browsers begin to support a wider range of CSS and other web standards). And I agree with you, "Kmarx dot jay pee gee" is highly inappropriate as well. The reason the one on the Karl Marx article is "Kmarx.jpg" is because whoever placed the image there did not bother to give it meaningful ALT text. Appropriate ALT text in this case might be "Photograph of Karl Marx." It's just enough information to let speech readers know what an appropriate thing to say would be. If the ALT text were empty, the text-only reader or the person with the screen reader would wonder "So, does that image contain anything of interest?"

To answer your point - no, I do not think that just any old ALT text is better than none. But I do think that if someone is going to bother putting something in the ALT text, it should be something other than an empty space.

-- Wapcaplet 00:45 8 Jun 2003 (UTC)

The WCAGs (as paraphrased by the checkpoints for them, which you linked to) say "Provide equivalent alternatives to auditory and visual content", not "Provide descriptions of auditory and visual content". "Photograph of Karl Marx" is a description, not an equivalent; it would be an excellent TITLE, but as ALT text it would be just as annoying as "kmarx.jpg" is. Listen to the speech browser again: "Karl Marx. From Wikipedia, the free encyclopedia. Photograph of Karl Marx Karl Marx (May 5, 1818 - March 14, 1883) was an influential political philosopher ..." Huh? Who on earth is Photograph of Karl Marx Karl Marx?

W3C still recommends that every image have an ALT text -- we just need to write a good one! In this example, a period is a big accessibility help to begin with; that done, "Karl Marx. From Wikipedia, the free encyclopedia. Photograph of Karl Marx. Karl Marx (May 5, 1818 dash March 14, 1883) was an influential political philosopher ..." works just fine, and lets people know what's on the page if they want to check things out more carefully (with more technology, say). It sure beats "image" (which some browsers will still say). A longer description would be even better, to be sure. (Also, this example highlights why we should prefer words like "to" over symbols like "-"!) -- Toby Bartels 05:02 12 Jun 2003 (UTC)

If I'm blind, why do I care that there's a photo there at all? If the photo's providing meaning, then tell me the meaning. And if it's not providing meaning, then don't fill my ears with garbage; make the image completely silent, using ALT="", as described in Ian Hickson's FAQ ...

-- Mpt 02:13 8 Jun 2003 (UTC)

In my humble opinion, Matthew is exactly correct. On a biography about Karl Marx, it may be appropriate, if the photograph comes after the header, for the alternate text to be something along the lines of "In his later age, Karl Marx's appearance was of an elderly distinguised gentleman, known for his bushy beard, moustache, and receeding hairline." if that is what the photograph is trying to convey; if it is purely decorative then "" is the most appropriate alternate text since the image is not conveying anything.
-- Hixie 10:14 8 Jun 2003 (UTC)

Mpt - You have made some excellent points. I must admit I hadn't thoroughly considered the speech presentation matter, nor the fact that there are alternative, and more appropriate, ways of specifying the description of an image. As a proponent of web accessibility yourself, you are probably aware of the difficulty often encountered in even getting people to realize that it's an important issue! I've spent so long just trying to convince people not to leave off the ALT tag entirely (resulting in lots of "IMAGE" placeholders everywhere), and not enough about what is appropriate text.

I think we can at least agree that the short explanation given on Wikipedia:How to edit a page for appropriate usage of ALT text is insufficient. No guidelines are given for what is appropriate ALT text; perhaps an additional page should be created discussing the matter. Meanwhile, perhaps we should petition some of the Wikipedia developers to change the "default" ALT text (for cases such as the Karl Marx one) from the string containing the filename to an empty string as you suggest - since it is probably safe to assume that many people insert images without considering an ALT text equivalent.

It may also be good to change Wikipedia:Image use policy (particularly the section on appropriate markup) to reflect some appropriate ALT text. There is a comment on that page regarding ALT text - if it can be expounded within that page, then the matter of appropriate text should probably be discussed there; if you think (as I am beginning to) that it warrants its own article, then perhaps Wikipedia:Alternate text for images should be created ...

-- Wapcaplet 15:53 8 Jun 2003 (UTC)


Some questions:

  • Generally on Wikipedia we put images in div tags so that text flows around them a little better (see eg Rachel Corrie). What's the best way to deal with this?
div and span are the tofu of HTML, and you should avoid them whenever there is real markup you can use instead. Ideally, Wikipedia would have a class="illustration" you could apply to images which would put them to the side, flow text around them with an appropriate margin, etc. Then: If an image’s alternate text is empty, it doesn’t matter where you code it. If non-empty alternate text makes most sense as a paragraph by itself, the image should be coded on a paragraph by itself. And if the alternate text belongs best inside a particular paragraph, that’s where the image should be coded (as in my moon-galileo-color-thumb.jpg example). -- Mpt
Ok, and in the non-ideal world that we currently live in, where there is no real markup we can use instead of div, what do you suggest? Obviously if you add nice extra features to the wikipedia software (it's open source, btw) then we'll use them - but we need a solution in the interim. -- Martin
div. In the case of images inside a paragraph, the img element should be styled directly, but … (see below) -- Mpt

...

Are you trying to suggest that we should not have captions at all, because we have image description pages? Martin
No, I was trying to suggest what I spelled out below: for accessibility, captions should either be in the image’s title attribute, or the image description page, or both. -- Mpt

...

Putting caption-like info only on the image description page means that they're not rendered for people who can see the image in the first place, and since such information is relevant to them, this is not acceptable. Martin
So alter the Wikipedia code (please!) to allow captions in the image’s title attribute instead (maybe [[Image:source-of-image|alternate text|caption]]). Putting captions in-line with the rest of the text makes the page nonsensical for those listening to it, which IMHO is similarly unacceptable. -- Mpt
Currently, it appears that image alt text is placed into the title of the anchor which links the image to its associated description page, along with being placed in the alt attribute of the image itself. So while having a description in the alt part of our images may not be appropriate for the images, it looks like it probably is being used appropriately for the anchor. But yeah, I agree, we should see about getting title implemented explicitly. -- Wapcaplet 20:25 14 Jun 2003 (UTC)

I think that your ideas are great, but please keep in mind that Martin doesn't work on the code (nor I). Programming here is only done by volunteers, but if you could join in to make Wikipedia more accessible, then that would be fantastic! Otherwise, things are liable to be "under advisement" ... '_`. -- Toby Bartels 09:05 12 Jun 2003 (UTC)


One big improvement to the picture on the left is to add a period after the ALT text. Then nobody gets confused inside the sentence. That done, the left-hand ALT text is now better than no ALT text at all. There's a good reason why the W3C still recommends always including a text element with an image, which is (or at least one is) that readers can be frustrated if they know that an image is there but not what it is. There is no doubt that the right-hand side is better still, but until the brilliant prose is written, I'd much rather see "Image:Photograph of the Moon." than just "Image". Or IOW, blank ALT text doesn't always render an image invisible, but it still renders an image incomprehensible. Thus it's a Bad Thing. -- Toby Bartels 05:11 12 Jun 2003 (UTC)

I would be extremely surprised if you could find anywhere the W3C recommend "always including a text element with an image". They say "The alt attribute must be specified" [emphasis added], but the attribute is allowed to be empty (they even give an empty example). And they say "Provide a text equivalent", but the best text equivalent will often be nothing at all, as I've explained.
Didn't somebody cite something earlier saying «Provide a text element.»? No matter. The opinion that I'm most familiar with is http://www.w3.org/2001/06tips/altAttribute, since it shows up often when I validate. Now, this does have an example of a suggested "" for alt, but -- like the one on the page that you cited! -- it's not the sort of thing that we're talking about here; they suggest it for bullets and horizontal rules. To say that the W3C agrees that the best text equivalent for a contentful picture is sometimes empty is, IMO, reading more into any of these references than is there.
You're mistaken about the "Image" thing - Lynx only says "[INLINE]" if the alt attribute isn't present at all, not if it's present but empty. Despite that, I'm at a loss to understand why you think "Photograph of the Moon. The Moon has no atmosphere." would be acceptable for an encyclopedia article. It doesn't even make sense, let alone qualify as brilliant prose. :-)
-- Mpt 08:17 12 Jun 2003 (UTC)
Not that the W3C knows everything, so now let me argue on merits. ^_^ In my situation, as a sighted person that often surfs without images, I like to see "Photograph of the Moon", because it tells me what's on the page -- giving me the option of going in for more detail (in this case, looking at the image) if I wish. Having checked lynx's behaviour again (and what you said was quite right), I now think that what I'd most like to see is "Image: Photograph of the Moon." With the period, it's quite clear what's going on there when reading (or being read to) -- no confusion or nonsense.
As for brilliant prose, I definitely agree that the right-hand version (barring <div> business) is superior to anything like "Image: Photograph of the Moon.". I agree with all that you've said about how an alt tag should say what the image says, not say what the image is. The only thing that I disagree with is the claim that "" is better than "Photograph of the Moon."; I don't claim that either is ideal!
-- Toby Bartels 09:29 12 Jun 2003 (UTC)
Toby makes a good point here; I often surf without images, and the alt text is the only thing that tells me what was in those images. Lots of webpages use dozens of itty-bitty images for formatting, borders, and other fluff (which of course I am not crazy about) - and obviously those should have an empty alt text. But for an image that is of importance in the context of whatever I'm reading, I would hope to see some sort of descriptive phrase. Even "From space, the moon appears..." would be fine; anything other than a null string would be enough to make me consider doing a right-click-show-image so I can see what's there. Obviously, in working towards accessibility, we should not alienate and confuse the non-disabled population :) -- Wapcaplet 12:17 12 Jun 2003 (UTC)
I’m very sorry, but helping you to decide whether to load an image is not, and never has been (since HTML 2.0), the primary purpose of the alt attribute. (Occasionally it may be useful for that, but only as an accident.) alt is a replacement for an image; descriptions, on the other hand, belong in title. -- Mpt 14:27 12 Jun 2003 (UTC)
That's not of much use, since users can't see the title. Especially in a place like Wikipedia, where everything starts out rough and is later improved, putting title material like "Photograph of Karl Marx." in the alt tag will serve to begin with -- and is more informative than "" -- and can be replaced by a later editor that thinks of something useful to say. -- Toby Bartels 15:19 13 Jun 2003 (UTC)
No it won't serve to begin with, because it doesn't make any sense. "", on the other hand, makes perfect sense. I am really curious why you seem so determined that all images must have non-empty alternate text. It Just Ain't So. -- Mpt
Perhaps I phrased that poorly. I simply meant that having some alt text (preferably well-chosen as a replacement for the image) is better than nothing at all, in that context.

...


As shown in the second example, Wikipedia currently does not allow images to be inserted within a paragraph while visually being floated to the side

So why give it as an example? Don't bother editors with criticism of the current state of Wikipedia code - just tell them the best way to proceed, given the current state. Save criticism for meta:image pages. Martin

Agreed. If this isn't possible on Wikipedia, then it shouldn't be given as an example. It seems odd for the alt text to begin and end with a comma, also. I'll see if I can fix it up a bit... -- Wapcaplet 11:23 13 Jun 2003 (UTC)
But as you can see, there are Wikipedia bugs affecting nearly every detail of writing decent alternate text, so I think it's important for authors to know how to work around them. It's also important to know that they are workarounds rather than permanent practices, so that when the bugs are fixed, people don't feel as though they were misled. (I've already listed the fixes needed on meta:image pages.)
As for the Eiffel Tower example, it's there precisely to demonstrate how it may be appropriate for alternate text to begin and end with a comma -- as I said, "If the image's meaning fits best in the middle of a sentence, use commas at the beginning and/or end of the alternate text where appropriate". Wapcaplet, please reconsider your alteration. Thanks. -- Mpt 12:12 13 Jun 2003 (UTC)
Yes, Wikipedia has bugs. We have a ways to go before we have great accessibility. Wikipedia is not perfect. But a policy/howto-style page such as this one is not the appropriate place to point out these flaws.
I'd be willing to put the example back in as it was, but I don't think it should be listed as a "Do this" example, at least not until Wikipedia does correctly handle images in the middle of a paragraph.
What I'd prefer to do, though, is give examples of ways to avoid putting alt text that consists of parenthetical remarks. Here is another case where, to me, having this type of accessibility will confuse sighted readers with images turned off (parf of the reason I included those in the previous examples, and why I would like them to be re-instated). Say we do get the "bug" fixed, and images within paragraphs end up being floated to the side of the containing paragraph. Sighted users with images turned off might see:

, such as the Eiffel Tower,

A large number of tourist attractions help attract some 20 million visitors to Paris each year. The city is the hub of France's motorway network, and is surrounded by a large orbital road, the Peripherique.


I think it'd be best if we could find some good examples that work well for all of these cases. -- Wapcaplet 12:38 13 Jun 2003 (UTC)
I think currently we want:
  • an example of doing it right (chess example is good)
    • wiki-code
    • what people see
    • what people see (no images)
    • what people hear (or see in search results, etc)
  • an example of people using the filename as alternate text (ie, cabbage example)
    • wiki-code
    • what people hear
  • an example of how to do the cabbage example right
    • wiki-code
    • what people hear
Those will suffice to give people a rough idea. From there, they can go and learn by doing, or learn by watching what others do. If we keep this page nice and concise, then people are more likely to actually read it. Martin
Sounds good to me. I'll see if I can't whip that chess example into shape... -- Wapcaplet 13:58 13 Jun 2003 (UTC)



In terms of the links you provide above. Ian Hickson's mini-FAQ is talking almost entirely about what user agents should do, not about what authors should do. So, ignore that.

Flavell recommends including ALT text for images that are merely "Supplemental or Interesting" - they do not have to be "important and unique". Flavell also makes this point: "If you want to also offer them a link to the picture, then do so, in one of the ways mentioned above. (Even a blind reader might want to download the picture, to show it to a friend later.)" - in both of these points he is contradicting your position. He also suggests "If your audience is accustomed to reading mathematical equations in LATEX notation, you could use that as alt text for the image of the equation" - I think we already do this.

I've yet to see you provide any reference to a source that suggests having ", such as Prince Charles, " or the like as alt text. I'd like to see you provide such a source, if this is indeed recommended practice. Martin 14:10 13 Jun 2003 (UTC)

Important and unique are both subsets of "interesting". If you were an engineer asking the Computer on the USS Enterprise to read you the Wikipedia entry for dilithium-3, you'd probably get pretty annoyed if (important) it started talking about how the crystals reflect a lovely mixture of colors when viewed in the Cardassian twilight (because that's how they happened to be shown in a photograph in the article's graphical rendering), or if (unique) it told you the crystal structure twice, once from the main text and once from the alternate text to a diagram of the structure.
As for the Charles example, I don't know of any references on writing alternate text about Prince Charles in particular, but ... You can see it with your own eyes/ears, if you like. Try the following in Lynx or a speech browser: <html><body><p>Fishing -- like golf -- is a relaxing pastime often taken up by celebrities<img style="float:right; clear: right; margin-width: 0 1em 1em 0;" src="prince-charles-fishing.jpg" alt=", such as the Prince of Wales" title="The Prince of Wales, fishing on the Scottish coast in 1993">. Unlike golf, however, it is rarely obvious to the casual observer whether you are doing it in an ineffectual way; to some, this adds to its appeal.</p></body></html>
-- Mpt 16:27 13 Jun 2003 (UTC)