Submit Your Article Forum Rules

Results 1 to 5 of 5

Thread: Use Alt Attributes with Care

  1. #1
    WebProWorld MVP Webnauts's Avatar
    Join Date
    Aug 2003
    Location
    European Community
    Posts
    9,028

    Use Alt Attributes with Care

    An alt attribute is not a label or description for the image. This is not an immediately obvious distinction. In fact, it might seem natural to assume that alternate text is a label or a description.

    It is not.

    The words used should be a text equivalent and convey the same information/serve the same purpose as the image.

    The aim is to provide the same functional information that the visual user sees. The alt text should be a "stand in" if you will if the image is missing. The test is, when you replace the image with the text would everyone do the same thing/receive the same information as best as possible?

    Some examples:

    - If a search button is a magnifying glass or binoculars its alt text should be 'search' or 'find' not 'magnifying glass' or 'binoculars'.

    - If an image is meant to convey an image - then a description is appropriate.

    - If it is meant to convey data - then that is what is appropriate.

    - If it is meant to convey a function then that is what should be there.

    Some Alt Attribute Guidelines:

    - Always add alt attributes to images. Alt is andatory for accessibility and for valid (X)HTML.

    - For images that play only a decorative role in the page use an empty alt (i.e. alt="") or a CSS background image so that reading browsers do not bother users by uttering things like "spacer image".

    - Remember it is the function of the image we are trying to convey. For instance any button images should not include the word "button" in the alt text. They should emphasize the action performed by the button.

    - Alt text should be determined by context. The same image in a different context may need drastically different alt text.

    - Try to flow alt text with the rest of the text because that is how it will be read with adaptive technologies like screen readers.Someone listening to your page should hardly be aware that there is a graphic there.

    It is useful to categorize non-text content into three levels:

    1. Eye-Candy:

    Eye-Candy are things that serve no purpose other than to make a site visually appealing/attractive and (in many cases) satisfy the marketing departments. There is no content value (though there may be value to a sighted user). Never alt-ify eye-candy unless there is something there which will enhance the usability of the site for someone using a non-visual user agent. Use a null alt attribute or background images in CSS for eye-candy.

    2. Mood-Setting:

    This is the middle layer of graphics which may serve to set the mood or set the stage as it were. These graphics are not direct content and may not be considered essential, but they are important in that they help frame what is going on. Try to alt-ify the second group as makes sense and is relevant. There may be times when doing so may be annoying or detrimental to other users. Then try to avoid it.

    For instance ALT text that is identical to an adjacent text is unnecessary, and an irritant to screen reader users. I recommend alt="" or background CSS images in such cases. But sometimes, it's important to get this content in there for all users. Most times it depends on context. The same image in a different context may need drastically different alt text. Obviously, content should always be fully available. The way you go in this case is a judgment call.

    3. Content/Function:

    This is where the image is the actual content. Always alt-ify content and functional images. Title and long description attributes may also be in order.

    The reason many authors can't figure out why their alt text isn't working is that they don't know why the images are there. You need to figured out exactly what function an image serves. Think about what it is about the image that's important to the page's intended audience.

    Every graphic has a reason for being on that page: because it either enhances the theme/ mood/ atmosphere or it is critical to what the page is trying to explain. Knowing what the image is for makes alt text easier to write. And practice writing them definitely helps.

    A way to check the usefulness of alternative text is to imagine reading the page over the telephone to someone. What would you say when encountering a particular image to make the page understandable to the listener?

    Besides the alt attribute you have a couple more tools at your disposal for images.

    First, in degree of descriptiveness title is in between alt and longdesc. It adds useful information and can add flavor. The title attribute is optionally rendered by the user agent. Remember they are invisible and not shown as a "tooltip" when focus is received via the keyboard. (So much for device independence). So use the title attribute only for advisory information.

    Second, the longdesc attribute points to the URL of a full description of an image. If the information contained in an image is important to the meaning of the page (i.e. some important content would be lost if the image was removed), a longer description than the "alt" attribute can reasonably display should be used. It can provide for rich, expressive documentation of a visual image.

    It should be used when alt and title are insufficient to embody the visual qualities of an image. As Clark [1] states, "A longdesc is a long description of an image...The aim is to use any length of description necessary to impart the details of the graphic.

    It would not be remiss to hope that a long description conjures an image - the image - in the mind's eye, an analogy that holds true even for the totally blind."

    Although the alt attribute is mandatory for accessibility and for valid (X)HTML, not all images need alternative text, long descriptions, or titles.

    In many cases, you are better off just going with our gut instinct -- if it's not necessary to include it, and if you don't have a strong urge to do it, don't add that longdesc.

    However, if it's necessary for the whole page to work, then you have to add the alt text (or title or longdesc).

    What's necessary and what's not depends a lot on the function of your image and its context on the page.

    The same image may require alt text (or title or longdesc) in one spot, but not in another. If an image provides absolutely no content or functional information alt="" or background CSS images may be appropriate to use. But if the image provides content or adds functional information an alt would be required and maybe even a long description would be in order. In many cases this type of thing is a judgement call.

    ---------------
    [1] http://joeclark.org/book/sashay/seri...Chapter06.html

    Related References:
    http://www.d.umn.edu/goto/accessibility#alt

  2. #2
    Junior Member
    Join Date
    Nov 2006
    Posts
    24
    Hey
    I don't really have anything to add to this post but I just felt like saying that this post changed my vision about alt attributes. It's a really good article and I recommend everyone to read it. Thanks for the nice post, Webnauts.

  3. #3
    Member
    Join Date
    Dec 2006
    Posts
    33
    Great list. I usually make an alt the same as the page title so people know what page they are on.

  4. #4

    Re: Use Alt Attributes with Care

    Hello, Webnauts,

    The information you posted is thorough, detailed and provides links to even more information. An excellent resource for websites to know how to make sites accessible for all.

    I posted what I hope is the correct code for one of my images in this thread.

    Thank you!

    Steph
    PS: I'm unsure how to handle cross-posts. (cross-threads?)

  5. #5

    Re: Use Alt Attributes with Care

    Quote Originally Posted by Webnauts View Post
    An alt attribute is not a label or description for the image. This is not an immediately obvious distinction. In fact, it might seem natural to assume that alternate text is a label or a description.

    It is not.

    The words used should be a text equivalent and convey the same information/serve the same purpose as the image.

    The aim is to provide the same functional information that the visual user sees. The alt text should be a "stand in" if you will if the image is missing. The test is, when you replace the image with the text would everyone do the same thing/receive the same information as best as possible?
    John, please can you see my post about proper code for accessibility of eCommerce websites? I believe weegillis have come up with the best, so far as we know, but now I'd like to further investigate into the topic located here:

    http://www.webproworld.com/accessibi...imization.html

    Thank you,
    Steph

  6. The following user agrees with mannequin-lady:

Similar Threads

  1. Repetition in Alt Attributes
    By dmwcons in forum Graphics & Design Discussion Forum
    Replies: 8
    Last Post: 01-08-2009, 01:40 AM
  2. How strong are Alt attributes
    By Webnauts in forum Google Discussion Forum
    Replies: 14
    Last Post: 06-08-2007, 12:26 AM
  3. health care and home care related
    By m.arici in forum Marketing Strategies Discussion Forum
    Replies: 1
    Last Post: 09-06-2004, 05:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •