WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: A larger discussion (was RE: Inline Images and ALTtext)

for

From: Jared Smith
Date: Jan 16, 2009 11:55AM


On Fri, Jan 16, 2009 at 11:10 AM, Randall Pope < <EMAIL REMOVED> > wrote:
> To be honest, I'm at lost why many
> webmasters do not place the images, that don't required alt text, in the
> CSS. Could someone explain why this approach is not being use often?

A lot (most?) of these images are floated beside the content with
which they are associated. It's impossible in CSS to float content
around a background image without inserting an extra element (maybe an
empty span or div) into the content. And if you're going to add a
worthless element into your content, why not just add the image
itself? The truth is, there just isn't nearly enough flexibility in
CSS for positioning background images and content in a way that works.

Take the page in question (http://webaim.org/contact/) - there is no
way to put the photos in CSS without inserting at least one
additional, empty element (with it's own CSS definitions) to take up
their space.

And as far as functional accessibility goes, there really isn't a heap
of difference between an image with alt="" and a CSS background image.
I'm not arguing that the CSS isn't better - it is, but the argument
that it is necessary or even better for accessibility isn't a very
strong one.

Jared Smith
WebAIM