SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Alt text for navigation / main heading background images

    Hi

    I'm new to this forum and I'm here to pick brains for the first time. I'm sure I'll be back again!

    I am learning Dreamweaver, but I wanted to get my head around some basic html first, so that I've got a better awareness of what's going on under the hood.

    I'm using Sitepoint's 'Build Your Own Web Site the Right Way' and I've got a question about the last part of chapter 5.

    The chapter is showing how to insert a background image into a navigation bar and the main heading (or banner). Earlier in the chapter much emphasis was put on the need for alternative text for images, but apparently no alt text is required for these background images.

    Do background images need alt text? What happens when someone using a screenreader scrolls over a background image?


  2. #2
    SitePoint Guru alecrust's Avatar
    Join Date
    Jun 2007
    Location
    London, UK
    Posts
    728
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A well explained question

    And the answer is no, background images do not require the alt attribute. In fact it's impossible to give it to them. Background images are built for just that, being in the background. They are not part of the content of a page and in most cases are used just for better presentation.

    An inline image is one that needs the alt attribute (and should always have it without exception, even if its just alt="" and nothing more). Inline images are the ones that look like <img src="images/logo.png" width="200" height="80" alt="Site Name" /> and background images are ones that you put solely in your stylesheet (normally) and don't use the img tag.

    When it comes to screen readers, they will (rightly) ignore background images entirely.

    Hope that answered your question
    Honda Civic Forum - UK Civic Forum
    Web Host Reviews - Independent, honest host reviews
    My Portfolio - Simplicity is the ultimate sophistication

  3. #3
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Thank you very much. A well-explained answer!


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
  •