W3C home > Mailing lists > Public > www-style@w3.org > November 2010

[css3-content] [css21-content] Syntax for adding alternative text for inserted image

From: Belov, Charles <Charles.Belov@sfmta.com>
Date: Fri, 19 Nov 2010 00:41:55 -0800
Message-ID: <E17F75B6E86AE842A57B4534F82D037660F700@MTAMAIL.muni.sfgov.org>
To: "www-style list" <www-style@w3.org>
Given the CSS

..new:before {
	content: url("/images/new.gif") " ";
}

where new.gif is the word "New!" appearing as an image on a gif.  The class is being applied to a p tag:  <p class="new">paragraph goes here</p> 

http://www.w3.org/TR/css3-content/#inserting3
and
http://www.w3.org/TR/CSS2/generate.html#content
would be improved by an example as to how to add an alt attribute with a text value, for example "New!" onto the image brought in by the uri.

In the meantime, would someone be kind enough to tell me how this would be accomplished in the style sheet in CSS2.1?  I'm concerned that adding a title attribute to the p tag would cause some screen readers to read that attribute instead of the paragraph.

Hope this helps, and thanks.
Charles Belov
Received on Friday, 19 November 2010 08:45:01 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:34 GMT