txt
Nov 10th / Tuesday / '09

validation isn’t everything

so, you’re coding up a site. you’ve done this before, you know to append alternate text to images that you include in your markup. but i must ask- are you doing it so that your code will validate/meet some unofficial set of standards or are you considering each and every image as it might be encountered in a screen reader?

sometimes images should not have alt text. i know, i know! this is crazy talk… you know that missing alt text on even one image means your site will fail validation. oh, the horror! the shame! the algorithm knows all, and will not hesitate to tell you just what a crappy job you did.

to demonstrate, i’ll walk you through an example. let’s say you’re working on a video site and there is a section consisting of a list of episodes. they are displayed in list form, with a thumbnail and the title of the video as linked text. (sound familiar?)

by w3c standards, all of those little thumbnails ought to have alternate text. the validator-botgod says so. well, what exactly should the text be?

  • should it contain the title of the video so that it’s descriptive and good for SEO? and also so that anyone who can’t see your images can see each episode title duplicated twice? (it will show up as two separate links with the same text)
  • should it contain a descriptive word like ‘list item’? this is what i found in youtube’s markup, but i don’t think this is really the right way to go either. if someone can’t see the thumbnails but can read or hear the title text, it’s not really relevant whether that person is aware there ever was a thumbnail. and writing out the text “list item” 20 times before each title is just annoying. really now.
  • the only possible alternate text that i can imagine is that which describes what exactly the thumbnail image is, i.e. “young boy with a red ball”. but that’s not feasible with sites like youtube and vimeo.

my personal choice and preference is to omit the alt attribute entirely. w3c insists that you put alt="" in each image tag to pass validation. i think this is ridiculous.

bottom line: validation doesn’t mean shit. it’s useful sometimes for debugging, but that’s as far as it goes. instead of looking for approval from a web service, think through your decisions, test extensively, learn from mistakes and don’t half-ass it. doing those things will validate you more than an archaic web badge ever could.

  1. cyn1cal reblogged this from nikography
  2. guaranteedfreshness reblogged this from nikography
  3. whycurious reblogged this from nikography and added:
    is: “Thumbnail...Video Title”? However, the latest spec suggests
  4. pstinnett reblogged this from nikography
  5. nikography posted this