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

[css-counter-styles] allow use of CSS4 "alt" property with @counter-style/symbols

From: James Craig <jcraig@apple.com>
Date: Wed, 14 May 2014 17:51:44 -0700
Message-id: <69D95AB9-E4B9-4751-9EBA-8F776A7327B5@apple.com>
To: www-style list <www-style@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
The current Counter Styles draft <http://www.w3.org/TR/css-counter-styles-3/> has an accessibility problem. It allows use of meaningful symbol-based list markers, without the ability to declare alternative text for the list markers. List markers are currently spoken by many screen readers, but the spec's example would be meaningless or mispronounced at best.

@counter-style box-corner { 
    system: fixed; 
    symbols: ◰ ◳ ◲ ◱; 
    suffix: ':'; 
} 

I think this could possible be resolved by extending the CSS4 "alt" property [1]. 
Previous discussion only allowed its use on pseudo elements. E.g. 

li::before { 
    content: counter(box-corner); 
    alt: counter(numbered); 
} 

But I think the "alt property could be extended to be part of the counter declaration so that each use of the counter style would get it by default: 

@counter-style box-corner { 
    system: fixed; 
    symbols: ◰ ◳ ◲ ◱; 
    alt: '1' '2' '3' '4';  /* or alt: decimal; ? */
    suffix: ':'; 
} 

Cheers,
James Craig

[1] Alt in CSS4 on generated content pseudo elements: 
http://lists.w3.org/Archives/Public/www-style/2012Nov/0318.html 

PS. I'm aware ◰ ◳ ◲ ◱ means 5, 3, 5, 7 in some number sets, not 1, 2, 3, 4. ;-)
Received on Thursday, 15 May 2014 00:52:19 UTC

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