WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Re: SPAM-LOW: Re: CSS content property and empty image alt values

for

Number of posts in this thread: 9 (In chronological order)

From: Dawn Budge
Date: Fri, Dec 10 2010 8:21AM
Subject: Re: SPAM-LOW: Re: CSS content property and empty image alt values
No previous message | Next message →

Generally yes, anything which is presentational belongs in the CSS. The
only time that becomes a problem is when you need to rely on the image
dimensions for anything and they are not predictable (e.g. CMS-generated
content), or you want content to flow around an image.
Are you trying to achieve a specific thing with using the content
property?

----------------------------------------
From: "steven" < = EMAIL ADDRESS REMOVED = >
Sent: 10 December 2010 13:11
To: "WebAIM Discussion List" < = EMAIL ADDRESS REMOVED = >
Subject: SPAM-LOW: Re: [WebAIM] CSS content property and empty image alt
values

Hi Chris,

Imagery to a visual person would generally not need explanation, if it is
purely presentational. Hence why I see the advantage of using CSS for
images
rather than images within the DOM, therefore voiding the need for such
images (and blank alt attributes) to be part of the actual content (in
cases
where images would not be content).

Diagrams would generally be regarded as content and should have alt text,
but I still think icons and banners etc generally are not content, so
wondered if screen readers would extend and honour the presentational
nature
of CSS to make presentational images feasible (after all, XML and HTML5
have
been unable to do this alone, despite being created to divide content from
form and function). I would also remove menus and hyperlinks from content
too if I had my way and introduce a separate browser/app method of
connecting and navigating content, but this continues to be overlooked
whilst browser developers and standards developers work separately.

Regards,

Steven

From: steven
Date: Fri, Dec 10 2010 8:27AM
Subject: Re: CSS content property and empty image alt values
← Previous message | Next message →

Hi Chris,

Imagery to a visual person would generally not need explanation, if it is
purely presentational. Hence why I see the advantage of using CSS for images
rather than images within the DOM, therefore voiding the need for such
images (and blank alt attributes) to be part of the actual content (in cases
where images would not be content).

Diagrams would generally be regarded as content and should have alt text,
but I still think icons and banners etc generally are not content, so
wondered if screen readers would extend and honour the presentational nature
of CSS to make presentational images feasible (after all, XML and HTML5 have
been unable to do this alone, despite being created to divide content from
form and function). I would also remove menus and hyperlinks from content
too if I had my way and introduce a separate browser/app method of
connecting and navigating content, but this continues to be overlooked
whilst browser developers and standards developers work separately.

Regards,

Steven



From: steven
Date: Fri, Dec 10 2010 8:33AM
Subject: Re: CSS content property and empty image alt values
← Previous message | Next message →

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




From: steven
Date: Fri, Dec 10 2010 8:39AM
Subject: Re: SPAM-LOW: Re: CSS content property and empty image alt values
← Previous message | Next message →

Hi Dawn,

I was specifically wanting to place images into pages using the CSS content
property without actually placing them in the flow of the DOM (which to my
knowledge, is what screen readers read). That way, I could avoid using empty
alt images in the DOM, but was wondering if placing images into the design
using CSS content property would trigger similar behaviour in screen readers
as they would if using images in the DOM (such as alerting the user that
there is an image and reading out the alt text).

I know CSS background images are not read by screen readers, but wondered if
images placed using CSS content property would act differently to CSS
background images!? Being that they are placed into the page in a similar
way as DOM images as you can wrap text around them etc!? Hence my
attraction.

Steven


From: Chris Hoffman
Date: Mon, Dec 13 2010 7:09AM
Subject: Re: SPAM-LOW: Re: CSS content property and empty image alt values
← Previous message | Next message →

Is it even possible to insert an image using CSS content properties? As far as I understand it, CSS transformations happen _after_ the HTML has been rendered, so CSS content is limited to pure unmarked text. Though, I admit to not being fully up to speed on CSS3, so maybe this has changed.

Chris



On Dec 10, 2010, at 10:35 AM, "steven" < = EMAIL ADDRESS REMOVED = > wrote:

> Hi Dawn,
>
> I was specifically wanting to place images into pages using the CSS content
> property without actually placing them in the flow of the DOM (which to my
> knowledge, is what screen readers read). That way, I could avoid using empty
> alt images in the DOM, but was wondering if placing images into the design
> using CSS content property would trigger similar behaviour in screen readers
> as they would if using images in the DOM (such as alerting the user that
> there is an image and reading out the alt text).
>
> I know CSS background images are not read by screen readers, but wondered if
> images placed using CSS content property would act differently to CSS
> background images!? Being that they are placed into the page in a similar
> way as DOM images as you can wrap text around them etc!? Hence my
> attraction.
>
> Steven
>
>
>

From: steven
Date: Mon, Dec 13 2010 7:51AM
Subject: Re: SPAM-LOW: Re: CSS content property and empty image alt values
← Previous message | Next message →

Hi Chris,

CSS is indeed applied once the HTML document has been rendered to the page,
but so is alot of JavaScript which can still be read by screen readers.
Hence my query about inserting images into the design using CSS content
property ... do screen readers consider such content to be read out? Or
simply ignored as presentational content?

Steven


From: Michael.Moore
Date: Mon, Dec 13 2010 8:36AM
Subject: Re: SPAM-LOW: Re: CSS content property and empty image alt values
← Previous message | Next message →

I have yet to encounter a screen reader announcing anything about an image that is located in the CSS, regardless of what method was used to get it there.

Mike Moore

From: Benjamin Hawkes-Lewis
Date: Mon, Dec 13 2010 11:42AM
Subject: Re: SPAM-LOW: Re: CSS content property and empty image alt values
← Previous message | Next message →

On Mon, Dec 13, 2010 at 3:35 PM, < = EMAIL ADDRESS REMOVED = > wrote:
> I have yet to encounter a screen reader announcing anything about an image that is located in the CSS, regardless of what method was used to get it there.

The thread I linked to includes an example with Safari and VoiceOver:

http://lists.w3.org/Archives/Public/www-style/2010Nov/0437.html

--
Benjamin Hawkes-Lewis

From: steven
Date: Tue, Dec 14 2010 2:21AM
Subject: Re: SPAM-LOW: Re: CSS content property and empty image alt values
← Previous message | No next message

Thanks Benjamin.

As much as I wanted a real presentational solution, my caution is now
heightened by that article. I totally see the benefit of people being able
to insert their own content via CSS, but it does then beg some questions.
For example:

1. Should authors such as myself should ever use CSS content for
presentational purposes? if it is also to be encouraged for no-authors for
screen reader users?

2. How can we discourage (or prevent) visual content being mixed with
non-visual content?

Maybe the simple inclusion of a type attribute for the content property?
Such as with the CSS media attribute, of 'presentation' or 'text'.

I wish these kind of things could be agreed before being implemented. At
least then, we could adopt best methods prior to their implementation.
Instead, we have to deal with limited HTML5 and CCS3 for the next 5 years,
and probably beyond that too.


Steven