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

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

From: Xidorn Quan <quanxunzhen@gmail.com>
Date: Mon, 19 May 2014 09:31:39 +1000
Message-ID: <CAMdq699zTV0tVoC7_YjNUYhN=3=kL4JW0Mu=SW0ZmYCPrjqzvg@mail.gmail.com>
To: James Craig <jcraig@apple.com>
Cc: Sebastian Zartner <sebastianzartner@gmail.com>, www-style list <www-style@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
On Sun, May 18, 2014 at 5:35 PM, James Craig <jcraig@apple.com> wrote:

> On May 16, 2014, at 5:00 AM, Sebastian Zartner <sebastianzartner@gmail.com>
> wrote:
> >> What's the actual use case to allow the symbols to have an arbitrary
> name when they are spoken?
> > It depends on the reason the the author chose to use this list style.
> For example, an author might be using icon fonts to convey some meaning in
> the list marker. The alternative text should reflect that meaning.
> >
> >> I imagine that could be rather confusing for visually impaired people.
> >
> > What's the actual use case for to allow arbitrary symbols to be
> displayed as ordered list markers? I imagine that could be rather confusing
> for sighted people. ;-)
> >
> > I guess the question is rather why to *use* arbitrary symbols for
> ordered lists. The only use case for that I can come up with is visual
> design. The "box-corners" counter style you mentioned before seems to be a
> good example for that. So what special meaning could be put into the list
> markers, which needs to be reflected by screen readers?
> I'm mainly worried about the cases I can't predict, but here are a few.

Considering all the usecases you mentioned, I think it is very necessary to
define the keyword value "symbol" to speak-as. With that, all this case
here could be achieved without defining the additional complex "alt"

1. Ordered: An fantasy author (think JRR Tolkien or GRR Martin) creates a
> language with it's own number system. The numbers aren't pronounced "one",
> "two", "three", but "elöhé", "fúto", and "thrüa". The author of the EPUB
> wants the visually impaired reader to have and enjoy the same reading
> experience as his sighted readers. The author understands not everyone
> likes audiobooks.

This one is the easiest, with an additional style with "fixed" system:

@counter-stype a { /* whatever */ speak-as: fantasy-speak; }
@counter-style fantasy-speak { system: fixed; symbols: "elöhé" "fúto"
"thrüa"; speak-as: symbol; }

If the language supports more complex expression, say, it use quaternary
numeral system, with zero pronounced "zig". It can be easily reached by
modifying the fantasy-speak to

@counter-style fatasy-speak { system: numeral; symbols: "zig" "elöhé"
"fúto" "thrüa"; speak-as: symbol; }

That says, if the rule of your pronouncing numeral system can be expressed
via @counter-style, you can use "speak-as" to generate that pronunciation.

Note: Coincidentally, as I alluded to in my original email the the list,
> the box corner symbols are actually number characters for the alien
> language from the video game Fez <http://www.ign.com/wikis/fez/Fez_Numbers>.
> You don't know this immediately in the game, but you find out through
> pattern recognition over the course of play, and so speaking them literally
> as English "one, two, three" would equate to a spoiler.
> 2. Ordered or Unordered: A web debugging tool uses the symbols generated
> content symbols ⋗ and ⋖ to indicate console list input and output.
>   ⋗ var foo = ['bar', 'baz'];
>   ⋖ undefined
>   ⋗ foo[1];
>   ⋖ "baz"
> The authors of this web debugging tool receive a complaint that the
> console output is being spoken by screen readers as:
>   LESS-THAN WITH DOT var foo = ['bar', 'baz'];
>   LESS-THAN WITH DOT foo[1];
> It'd be much more logical to be able to define these list marker symbols
> as meaningful "alt" strings:
>   Input: var foo = ['bar', 'baz'];
>   Output: undefined
>   Input: foo[1];
>   Output: "bar"


@counter-style a { system: cyclic; symbols: '⋗' '⋖'; speak-as: io-speak; }
@counter-style io-speak { system: cyclic; symbols: 'Input' 'Output';
speak-as: symbol; }

> Note: Example #2 was a real bug report from Victor Tsaran. Some of the
> details have been changed since the Web Inspector is using background
> images for these at the moment. https://webkit.org/b/133045.

If you want to use "alt" to have the same power, you have to define a set
of new syntax which, in fact, has already been included in the
@counter-style itself.

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".

- Xidorn
Received on Sunday, 18 May 2014 23:32:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:27 UTC