August 30, 2007

Usage of Alt Text in blog & websites.

Showing an example for Alt text attribute for images
Alt is the Attribute of image <img> tag. Alt is the short form for "Alternate". Provide alt text has become mandatory.

Few advantages of providing alt-text:

  • Alt text helps search engine to bring up the pages
  • Helps Screen reader softwares to understand the page, which helps visually challenged people to understand the content of the page.
  • Improves overall usability
  • Helps users using text based browsers.
There are 4 types of images used in a blog or website.
  1. Decorator Image - Decorator images are generally used to bring up the aesthetics of the website. For example a spacer.gif or a Curve image or a hidden transparent gif. For those types of images we should provide a blank alt. Like alt="" . Its very important to make sure that, there should not be any space between double quotes.
  2. Showcase Image - These are types of images which will be used in ecommerces websites to show products.
  3. Link Image - Which has some action to it. For example a submit button. Its very important to provide what action its going to perform.
  4. Repeated Image - Mostly decorative are repetitive in website. Some time buttons. Its very important to provide the same alt text to follow consistency.
Few Exceptions:
  • Dont' provide the alt text if label is placed next to a icon.
  • For bulleted list, don't use bullet images directly rather provide it in stylesheets.

As per the WCAG - Web content accessibility guidelines, Alt text is the basic fixing to get priority 1 compliances.

1 comment:

mambojays said...

hi, great article but i've tried to user the alt"place my text here"
but still not text when I roll over the image.

www.mambojays.com

thanking you in advance for the help