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

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

From: Alan Stearns <stearns@adobe.com>
Date: Mon, 10 Nov 2014 21:31:14 +0000
To: www-style list <www-style@w3.org>
CC: James Craig <jcraig@apple.com>
Message-ID: <14B21E93-B3FF-4B07-90A5-F2411A9630B2@adobe.com>
How do you hold a moonbeam in your hand?

Leaving aside *whether* we should supply alternative text in CSS, and 
which module it would appear in (both good questions - I’d just like to 
focus the thread), how would this be best expressed? I’m leaning slightly 
toward B at the moment. Any other opinions?

A. An alt property. I added this to the draft because that’s where the 
thread from two years ago ended up. It’s a nice mapping to the attribute, 
but does have issues with maintainability. It’s possible to change the 
content property without updating the alt property, and have the two get 
out of sync.

content: "\25BA";
alt: "";

B. An additional value to the content property. I’m assuming this would be 
separated by an ‘alt’ keyword. This solves the maintainability issue at 
the cost of a slightly more complex content value. This provides a single 
alt text for the entire content value - multiple images and/or strings 
would have to concatenate their alt text representations. 

content: "\25BA" alt "";

C. An additional value to the image() function. This was proposed but I 
don’t think it works well. It does allow for separate alt text for each 
individual image. But it does not solve the case where the content 
property is text or an icon, and it’s a bit confusing that you can supply 
an ignored alt text in image() functions that aren’t used in a content 


Received on Monday, 10 November 2014 21:31:44 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:45 UTC