Forum Moderators: open

Message Too Old, No Replies

Ideal Image ALT texts

what are the Ideal Image ALT texts

         

ganeshgrowth

10:48 am on Aug 10, 2009 (gmt 0)

10+ Year Member



what are the Ideal Image ALT texts

I need to know the following
1. Allowed Length
2. Ideal Length
3. Points to remember

mattur

1:18 pm on Aug 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



1. Allowed Length

- don't know, but a common sense limit should kick in before you reach any technical limit.

2. Ideal Length

- short and to the point.

3. Points to remember

- If the image is the only content in a link, the alt text should describe the link, not the image.

D_Blackwell

2:42 am on Aug 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Remember that the title="" can be a useful by bringing up the tool tips which will display the text for a few seconds. Some designers find tool tips popping up to be an interference, but they can provide the user extra information. For example, captions popping up in thumbnail gallery could/should provide more context to the image link.

ganeshgrowth

10:55 am on Aug 13, 2009 (gmt 0)

10+ Year Member



If the image is the only content in a link, the alt text should describe the link, not the image.

That's a great piece of information to keep in mind.

ganeshgrowth

8:46 am on Aug 17, 2009 (gmt 0)

10+ Year Member




3. Points to remember

- If the image is the only content in a link, the alt text should describe the link, not the image.

I currently have a section that has a link to "Why Buy From XYZ". In this section there's a "non-linked" picture of a Toy that is being sold with-in the online store. But the landing page has details about "Why Buy From XYZ" and nothing about the Toy that's shown in the picture (But is sold in the store). What should be the Alt and Title of the picture represented?

Also, it will be great if someone also explains with "Why the picture should have the recommended Alt and title"

ganeshgrowth

10:44 am on Aug 17, 2009 (gmt 0)

10+ Year Member




3. Points to remember

- If the image is the only content in a link, the alt text should describe the link, not the image.


I found this article [en.wikipedia.org...] which totally has a different explanation

mattur

11:23 am on Aug 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Think of it like this: If you have a USA Flag image that links to your USA Widgets page, you do not want alt text to be "USA Flag" (i.e describing the image) you want it say "USA Widgets" (i.e. describing the link).

Otherwise screen reader users would hear "Link: USA Flag" which is misleading, but with the second example "Link: USA Widgets" which is accurate.

You could then add supplementary information with the title tag eg

<a href="/usa-widgets/"><img src=usa-flag.gif" alt="USA Widgets" title="See our range of bestselling USA Widgets"></a>

Wikipedia is not a good example to use, because most of its image links are links to larger versions of the same image. i.e. the alt is describing the image *and* the link (since it just links to the same image anyway).

So if you were using images like Wikipedia, i.e. a linked image to a larger image page, you could use:

<a href="large-usa-flag-page"><img src=usa-flag.gif" alt="USA Flag"></a>

Or perhaps better:

<a href="large-usa-flag-page"><img src=usa-flag.gif" alt="View larger image of USA Flag"></a>

Or move supplementary info to title:

<a href="large-usa-flag-page"><img src=usa-flag.gif" alt="USA Flag" title="View Larger Image"></a>

If you click through to a Wikipedia larger image page you'll see the alt text on the larger image describes the link on that image, by putting alt="File: usa-flag.gif" i.e. describing the link, not the image. But like I say, Wikipedia is not a good example to use for obvious reasons.

More info in WCAG2 Techniques:
H30: Providing link text that describes the purpose of a link for anchor elements [w3.org]

When an image is the only content of a link, the text alternative for the image describes the unique function of the link.

ganeshgrowth

11:38 am on Aug 17, 2009 (gmt 0)

10+ Year Member



I fully agree with W3C's explanation but there's still ambiguity in my mind. I will give you the actual e.g.

<div><h3>Why Buy From ABC</h3>
<img src="toy-car.jpg" alt="?">
* Huge selection of products
* Expert customer service
* Thousands of satisfied customers
* Exquisite craftmanship and quality
* <a href="Why-Buy-From-ABC.html">More</a>
</div>

in the above case what should be the ALT text?

mattur

11:51 am on Aug 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the image is purely decorative, as in this case, you can either put a brief description of the image like alt="Toy Car", or mark it as not essential to understanding the page content by putting alt="".

Since the image is not relevant to that chunk of information, I would just use alt="".

webboy1

12:11 pm on Aug 17, 2009 (gmt 0)

10+ Year Member



Perhaps I'm wrong but I was under the impression that you SHOULD include content within an alt tag. Is alt="" OK to use? Wouldn't it be better to put in some sort of description even if the image isn't really that relevant to anything on the page?

The reason I say I'm perhaps wrong is because this would cause issues with people who still use spacer images in their table layouts. Clearly CSS is the fix for this, but not everyone has the resource to rebuild in CSS.

ganeshgrowth

12:26 pm on Aug 17, 2009 (gmt 0)

10+ Year Member



Perhaps I'm wrong but I was under the impression that you SHOULD include content within an alt tag. Is alt="" OK to use?
I see sites <url removed> recommending to use alt="" so there should be nothing wrong about it.

[edited by: incrediBILL at 1:49 pm (utc) on Aug. 17, 2009]
[edit reason] removed URL, see TOS #13 [webmasterworld.com...] [/edit]

mattur

1:24 pm on Aug 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is alt="" OK to use?

Yes, if the image is not essential to understanding the page content.

Wouldn't it be better to put in some sort of description even if the image isn't really that relevant to anything on the page?

No, not necessarily.

In ganesh's example, with alt="Toy Car" screen reader users may hear something like:

"Heading Level 3: Why Buy From ABC. Image: Toy Car. List with 5 items: Huge selection of products..." etc

Clearly the alt text doesn't add anything in terms of comprehension, it may even be confusing, so alt="" is arguably better:

"Heading Level 3: Why Buy From ABC. List with 5 items: Huge selection of products..." etc

webboy1

3:36 pm on Aug 17, 2009 (gmt 0)

10+ Year Member



Fair comment. It makes sense when you explain it like that. Accessibility is an areas I'm beginning to look at more and more, so that's a nice little nugget of information to now know.

ganeshgrowth

3:00 pm on Aug 25, 2009 (gmt 0)

10+ Year Member



As per W3C WCAG 2.0, if an image is a pure decorative, it has to be presented in a way that the image gets ignored. So, the guideline is suggesting that the ALT text is to be actually left blank.

“If non-text content is pure decoration, is used only for visual formatting, or is not presented to users, then it is implemented in a way that it can be ignored by assistive technology.”

[w3.org...]