Home

Even Grounds, Accessibility Consulting

Making web sites, documents, software and hardware accessible to people with disabilities. Accessibility, WCAG and Section 508 compliance testing and auditing.

  • Services
  • About Us
  • Customers
  • Contact Us
  • Articles
  • Blog
  • Developers' Corner
  • Press
  • Resources

Are You Receiving the Accessibility Tips and Tricks?

  • Learn to make information accessible to people with disabilities
  • Implement what you learn right away
  • Understand how people with disabilities use technology
  • Receive our monthly newsletter packed with news, articles and updates
  • Bonus workbook: Ten steps to a more accessible web site


Do you need help with accessibility? Hire us!

Alternative Text For Images

  • Developers' Corner
  • Alternative text
  • Images

Images play a crucial role in increasing traffic and helping visitors understand your site's content. Therefore, everyone should understand the meaning of your images, regardless of whether or not they can see the pictures. And the best way to do this is by providing alt texts for the images in your site.

How to Include Alt Text in Images

You simply have to make use of the “alt” attribute when writing the code for your images. Here is an example of a code using the alt text.


<img src=”sky.jpg” alt=”blue sky with white clouds” />

As the example suggests, the value of the “alt” attribute should be the textual description of the image.

Why Use Alt Text

Here are some of the best reasons why it is a good idea to have alt text in images.

For Screen Reader Users

Screen readers are applications that enable users to hear the text contents displayed on the screen. This technology is used primarily by blind people. When an image in a page has an alt text, the screen reader will be able to read it. This lets the blind user understand the image’s content and purpose although he cannot see the image itself.

On the other hand, if an image does not include alt text, the screen reader would simply read the file name of the image. This obviously does not provide sufficient information to the user.

For Users of Text-Only Browsers

A web page containing images with alt text allows users of text-only browsers to read the description of the images in the page. Text-only browsers are applications that display a page’s text content and the text equivalent of non-text content.

When an image has an alt text, a text-only browser would display the text description of the image. The user can in turn read the image’s description. Otherwise, the browser would only display the file name of the image, which, similar to the previous example, does not provide enough information.

For Better Search Engine Ranking

A page containing images with alt text would have a higher chance for better search engine rankings. This is because search engine spiders use the alt text to match pages with keywords. Therefore, providing alt text for your images lets search engine spiders place your site in the correct category. This eventually leads to a higher place in search engine listings.

For Compliance with Web Accessibility Guidelines

You would be able to follow internationally recognized web standards once you include alt text in your images. The WCAG (Web Content Accessibility Guidelines) 2.0 states that non-text content should have text equivalents. Non-text content includes images.

So if you include alt text in your images, you not only adhere to web standards but are also making your site more accessible.

Exceptions to the Rule

Not all images should have text descriptions. If you have spacer images and decorative images in your site, you do not need to provide them with alt text.

You nonetheless have to put a null value to the codes for spacer and decorative images. This is done by placing alt=”” in the codes. Here is an example:


<img src=”spacer.gif” alt=”” />

How to Create Effective Alt Text

Include All Necessary Details

Try to provide all necessary information when creating alt text for your images. Examine the image and think of the appropriate statement to best describe it to someone who cannot see.

Some of the important details you should normally include are colors, shapes, important objects, and text if there are any.

Keep Alt Text Concise

Avoid providing alt text that is too lengthy and wordy. Screen reader users who need to listen to the site’s content would take a longer time to know the image’s description if it has a lengthy alt text.

To make alt text more concise, do not use the phrase “image of” or “picture of” as it is obvious enough. Also, you may want to focus on the important details of the image and skip the unnecessary ones.

Make Alt Text Adhere to the Page's Language

This simply means that the language of your alt text should be the same as the site’s language. Your alt text should be in English if your site is in English. The same goes with sites in other languages

Bookmark/Search this post with:
  • Delicious
  • Digg
  • StumbleUpon
  • Facebook
  • Google
  • Yahoo
  • Technorati

Not quite

Submitted by Jared Smith (not verified) on Mon, 02/01/2010 - 13:38.

Alt text should not be a "description" of the image. It should convey the CONTENT of the image. You might even say that it's a "description of the content", but alt text that describes what the image looks like is typically not useful and often worse than no alt text at all. Colors and shapes are equally useless in most cases.

Rather than describing the image, you should present what the content of that image is. An example I often use is of a photo of me in a web page. Using your advice, the alt text would be "Handsome, strong, white male with brown hair and an egg-shaped head" or something like that (though most likely without the handsome and strong part). A better alt text would be the content of the image - "Jared Smith" or "Photo of Jared Smith".

Rather than asking, "What does it look like?", it's better to ask, "What is it?" or "What does it say or mean?"

Another noteworthy suggestion is that alternative text doesn't have to be in the alt attribute of the img element. It can be placed in true text in the context of (e.g., adjacent to) the image itself. A text caption for my photo would be sufficient and the image could be given empty alt text (alt="").

  • reply

description placed beside image

Submitted by Tom on Mon, 02/01/2010 - 16:40.

Jared,
You have an interesting point here. I agree that you could place the description beside the image. But then, where do you draw the line? How far from the image, in what programmatic context, etc. Of course, within reason, but it means something different to all people.

  • reply

Alt Text or Images for YouTube Objects

Submitted by Norwin (not verified) on Thu, 08/05/2010 - 04:48.

Hi there,

The above is all cool, however, how do you create an alt text or image for an embedded YouTube video. My blog is often read by people behind corporate firewalls that disallow YouTube. When they access my blog there is simply a blank white block where the YouTube object is. How can I place some text there saying that it is blocked or unavailable or something like that?

Please help?

Thanks,
Norwin

  • reply

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

This blog uses CommentLuv plugin which will try and parse your sites feed and display a link to your last post, please be patient while it tries to find it for you
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Accessibility Tips and Tricks


RSS

  • Articles
  • Blog
  • Developers' Corner
  • News
  • Press

Follow us on Twitter, YouTube, or on Facebook

You Might Also Like:

  • Making the iPhone Keyboard Accessible
  • Save a Lot by Choosing the Right Widgets
  • Pages Opening in a New Window
  • Free Screen Readers
  • The Secret of Making PDF Documents Section 508 Compliant Much Faster

Top Commentators

  • y8 (8)
  • kizi (5)
  • y8 (5)
  • ben10 (5)
  • friv (5)
  • miniclip (5)
  • guest (4)
  • nike shox pas cher (4)
  • Kizi (4)
 

Privacy Policy

Copyright 2007-2011 - Even Grounds Inc., Accessibility Consulting