KEMBAR78
Should ATs convey the CSS counter or `<li>`'s ordinal value · Issue #6599 · whatwg/html · GitHub
Skip to content

Should ATs convey the CSS counter or <li>'s ordinal value #6599

@zcorpan

Description

@zcorpan

For <ol> and the list item's number, there can be a difference between the ordinal value (also see #6473) and the rendered number given by CSS counters. For example, you can use ol > li { counter-increment: list-item 2 } to increment by 2 instead of 1.

Which number should assistive technologies use (for UAs that support CSS)?

From #4816 (comment)

@domenic wrote:

It gives a sense of what the semantics of the list are, but is it really OK for those semantics to drift visibly from the rendering? Which would we expect accessibility technology to use?

@zcorpan wrote:

ATs generally take CSS into account (e.g. don't expose display: none, do expose generated content), but there are tricky cases (like <td style="display: block"> should still be exposed cells in a data table, while <div style="display: table"> should not be exposed as a data table). For counters, I think users would expect the numbers to match visual rendering.

@fantasai wrote:

See https://www.w3.org/TR/css-counter-styles-3/#counter-style-speak-as

@zcorpan wrote:

Even with speak-as, though, the question is which number an AT should use -- the semantic number based on the HTML alone (or some combination of HTML+CSS), or the number the list item has per CSS counters?

@annevk wrote:

Maybe we can make it similar to the various bidi features, that have this language:

The following elements and attributes have requirements defined by the rendering section that, due to the requirements in this section, are requirements on all user agents (not just those that support the suggested default rendering)

Originally posted by @zcorpan in #4816 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions