SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict artemis's Avatar
    Join Date
    Sep 2003
    Location
    London
    Posts
    295
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Accessible alternative

    I need to add an image to an xhtml/css page by putting it into the background of a layer.

    How should I add a label to make the text within the image accessible since I have no way of using an alt tag?

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    Well if I understand correctly a background image does not need an alt tag. An alt tag is for an image that is part of the content. Then the alt tag is there for people who for whatever reason cannot see the image.

    If this image is important to the content then I guess you should place it within the (X)HTML file with an <img src="" /> and so on.

    Someone else might be able to explain it better

  3. #3
    SitePoint Addict hurricane.uk's Avatar
    Join Date
    May 2003
    Location
    Liverpool
    Posts
    361
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The only way is to add a title attribute to the element that the image is the background to - though using an embedded image is semantically better if it's important content, as mentioned above.

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    If the image is content, use the <img /> element and provide alt text. If it's for decoration only, then use it as a CSS background.

  5. #5
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vgarcia
    If the image is content, use the <img /> element and provide alt text. If it's for decoration only, then use it as a CSS background.
    Thats what I meant

  6. #6
    SitePoint Addict artemis's Avatar
    Join Date
    Sep 2003
    Location
    London
    Posts
    295
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Cool I can use it as an <img /> then.

    Thanks


Bookmarks

Posting Permissions

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