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

Re: [css-pseudo] please make sure pseudo-element "alt" property makes it into next ED

From: Peter Linss <peter.linss@hp.com>
Date: Wed, 5 Nov 2014 23:46:46 -0800
Cc: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, www-style list <www-style@w3.org>
Message-Id: <DA9CA802-51FC-409A-8C58-13D4D38DFAC2@hp.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

On Nov 5, 2014, at 5:29 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Wed, Nov 5, 2014 at 5:22 PM, Daniel Glazman
> <daniel.glazman@disruptive-innovations.com> wrote:
>> On 06/11/2014 01:31, Tab Atkins Jr. wrote:
>>> I don't understand.  What do you think is different between
>>> alt-per-url and alt-for-whole thing?
>> Inject "new warning" or "new. warning." into a content reader
>> then try "new" followed by "warning". You'll understand the
>> difference.
> In HTML, the alt attribute works literally by subbing the text in for
> the image.  There's no difference, to a screen reader, between "<img
> alt=new> <img alt=warning>" and "new warning".
> Why do you think this should be different in CSS?  If this mechanism
> is *insufficient*, that's one thing.  But as it stands, it's equally
> powerful to HTML to say:
> .new.warning {
>  content: url("new.jpg") url("warning.jpg");
>  alt: "new warning";
> }
> ~TJ

The problem with this is what if only one of the images loads? What is the proper alternative representation?

It would be better to include the alt text in an ‘image()’ function (or equivalent), binding the alt text to the image it’s for:
.new.warning {
	content: image(“new.jpg”, “new") image(“warning.jpg”, “warning”);


Received on Thursday, 6 November 2014 07:47:12 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:26 UTC