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

On Thu, May 15, 2014 at 7:34 PM, James Craig <jcraig@apple.com> wrote:

> Inline. cc Alex and David for the Firefox Accessibility question.
>
> On May 15, 2014, at 1:47 AM, Xidorn Quan <quanxunzhen@gmail.com> wrote:
>
> > On Thu, May 15, 2014 at 11:36 AM, James Craig <jcraig@apple.com> wrote:
> >> Speak-as may account for some simple cases (like the numeric example
> below), but does not allow authors to designate alternative text for the
> symbol-based markers. If you just want numeric markers, there's no reason
> to use "symbols" at all.
> >>
> >> The following example is admittedly contrived, but is a better
> illustration of what cannot be accomplished with the "speak-as" property.
> >>
> >>     symbols: ◰ ◳ ◲ ◱;
> >>     alt: 'foo' 'bar' 'baz' 'bop';
> >>
> >> "speak-as" provides pretty good coverage of CSS 2's "list-style-type"
> property, but AFAICT it doesn't provide sufficient coverage of CSS3's
> "symbols" property.
> >
> > Actually, it can do what you want it to do. Consider this:
> >
> > @counter-style a {
> >   system: fixed;
> >   symbols: ◰ ◳ ◲ ◱;
> >   speak-as: b;
> > }
> >
> > @counter-style b {
> >   system: fixed;
> >   symbols: foo bar baz bop;
> >   speak-as: alphabetic;
> > }
>
> That's interesting, if somewhat convoluted. Do others in the group think
> this is preferable to extending CSS4 alt? The single block seems much more
> elegant to me.
>
> @counter-style a {
>   system: fixed;
>   symbols: ◰ ◳ ◲ ◱;
>   alt: "foo" "bar" "baz" "bop";
> }
>

Well, it's indeed more elegant for me in this case, but there exist some
questions.
How does "alt" interact with "speak-as"?
What syntax should be used for system other than fixed?
Even for "fixed" system, what should happen if the number of pieces is
different between "alt" and "symbols"?


>  > The spec seems to be ambiguous by saying alphabetic is "spell it out
> letter-by-letter", but in my current implementation for Firefox, this
> should give you exactly what you want.
>
> Does Firefox really expose the right alternative text to the platform APIs
> (e.g. AXListMarker) in this case?


I'm not sure about this as I'm not familiar with the accessibility part,
but inside Firefox, there is a way to provide the alternative text.

- Xidorn

Received on Thursday, 15 May 2014 10:52:49 UTC