WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: CSS content property and empty image alt values

for

From: steven
Date: Dec 10, 2010 8:33AM


Hi Benjamin,

This is what I was thinking ... keep text in the DOM (except where
presentational text might further assist the content) and focus on placing
presentational images within the CSS. I just wondered if screen readers
would alert the user that an image has been found in the CSS if it was
referenced the content property, in the way they would when finding an image
in the DOM.

Steven




-----Original Message-----
From: <EMAIL REMOVED>
[mailto: <EMAIL REMOVED> ] On Behalf Of Benjamin
Hawkes-Lewis
Sent: 09 December 2010 17:02
To: WebAIM Discussion List
Subject: Re: [WebAIM] CSS content property and empty image alt values

On Thu, Dec 9, 2010 at 11:11 AM, steven < <EMAIL REMOVED> >
wrote:
> Is anybody familiar with screen reader support (or intentional lack of
> support) for the CSS 'content' property?
>
> I ask because I know that images generated by HTML markup are known to be
> read by screen readers, but I am thinking if CSS content itself is not
read,
> then there can often be cases where presentational imagery serves no place
> in the HTML DOM and in such cases, would be better than serving images
with
> empty alt values.
>
> What are peoples thoughts and experience on this.

See thread on www-style:

http://preview.tinyurl.com/www-style-thread-on-content

Summary:

It is not safe to use 'content' for decorative text, and it is not
safe to use 'content' for informative text, so use images for
decorative text and text for informative text.

Hope that helps.

--
Benjamin Hawkes-Lewis