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

On Thu, May 15, 2014 at 9:51 AM, James Craig <jcraig@apple.com> wrote:
> 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. ;-)

So, based on this thread and subsequent CSSWG discussion, we've added
a "words" value to the 'speak-as' descriptor that we think solves all
the use-cases.

If you just want to read out the 'symbols' values, that's all you need
to set.  If you want to provide "alt text" for the 'symbols' values,
instead make a separate counter style with the words you want in
'symbols' and "speak-as: words", then set "speak-as:
your-spoken-style;" in the real counter style.  Xidorn provided
several examples of this.


On Mon, May 19, 2014 at 8:31 AM, Xidorn Quan <quanxunzhen@gmail.com> wrote:
> So I propose that we add a new keyword value "symbol" to speak-as, and
> remove "alphabetic" as it is not clearly defined what is "letter".

We haven't done this, because it *is* well-described, or at least
badly-described to the same extent, in CSS Speech.  We have, however,
renamed the values.  The old "alphabetic" value is now called
"spell-out", matching the CSS Speech value.  The rest are renamed to
plural nouns, because they were all different parts of speech before,
which is super-confusing.

~TJ

Received on Tuesday, 20 May 2014 06:19:45 UTC