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

Re: [css-pseudo] How do you solve a problem like alt?

From: Alan Stearns <stearns@adobe.com>
Date: Tue, 11 Nov 2014 04:05:30 +0000
To: James Craig <jcraig@apple.com>
CC: www-style list <www-style@w3.org>, Tab Atkins <jackalmage@gmail.com>
Message-ID: <D086C89B.21335%stearns@adobe.com>
On 11/10/14, 7:48 PM, "James Craig" <jcraig@apple.com> wrote:

>> On Nov 10, 2014, at 1:31 PM, Alan Stearns <stearns@adobe.com> wrote:
>> how would this be best expressed?
>content: "\foo";
>alt: attr(data-bar);
>content: "\foo", alt(attr(data-bar));
>content: "\foo", alt attr(data-bar);

In both of these, there would be no comma. The ‘alt’ keyword (or function
name) is sufficient to separate it from the rest of the value. And I
believe we’re considering the comma for content fallbacks.

>I think the syntax complexities of the alternates are more problematic
>than the possibility that alt might not cascade perfectly in some edge
>cases. Authors understand alt pretty well already; a new CSS property
>seems the most logical to me.

It’s definitely the simplest syntax, and I agree that the cascade issue is
not huge. If an author starts adding alt text to their generated content,
being consistent isn’t that difficult. And if there ends up being any
other reason to allow CSS to set an alt value, extending what the property
applies to is simpler than adding a keyword/value to some other value

>I’m curious if Tab will weigh in since alt was his suggestion originally.

He’s been on vacation and successfully avoiding email. I expect he’ll
catch up with this by the end of the week.



Received on Tuesday, 11 November 2014 04:06:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:48 UTC