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

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”);
}

Peter

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