w3c / iip

Documenting gaps and requirements for support of Indic languages on the Web and in eBooks.
https://w3c.github.io/iip/
8 stars 15 forks source link

Customised counter styles are unavailable — FIXED ! #93

Open r12a opened 4 years ago

r12a commented 4 years ago

Customisable counters are needed for many languages.

Many orthographies use native digits or letters for counters, such as those used for list numbering or numbering chapter headings, etc. It needs to be possible to use these local conventions for counters.

Users also need to be able to adapt counter styles for a given context or create new ones where the browser doesn't have baked-in support. Often customisation needs are driven by the need to change the counter suffix for particular contexts, but in some cases the algorithms used for numbering can vary from author to author as well.

More:

These are just a few examples out of many.

The GAP

The major browser engines support a number of hard-coded counter styles. But when this gap was first reported only Gecko supported user defined counter styling. This meant that native counters were not available for a large number of languages, and the styles could not be tweaked by the author for special uses.

predefined-counter-styles contains templates for counter styles that can be applied by users if the custom counter styles spec is supported.

css-counter-styles-3 explicitly defines a number of local styles, and the other counter styles can be defined by users if the Counter Styles spec's generic mechanism for defining counter styles was implemented.

Priority:

The impact of the lack of support cited here is mitigated by the tendency to use western counters, so the impact could be marked as advanced. However native styles (at least the numeric) are widely used in non-Web content, and these features are likely to be widely used when implemented across all major browsers. Therefore the priority is set to basic.

Tests & results:

I18n test suite, Predefined styles.
Contains tests for the styles that are explicitly defined in the Counter Styles spec. Gecko and Blink provide good coverage. Webkit covers most styles with some gaps, but fails for CJK and Ethiopic styles.

I18n test suite, Basic custom counter styles.
The spec is essentially done, and Gecko and Blink have implemented it. No support from Webkit.

Action taken

Blink (Fixed) • WebKit

Outcomes

Fixed ! Blink, WebKit, and Gecko latest browser versions now all support custom counter styles.

r12a commented 4 years ago

The first comment in this issue contains text that will automatically appear in one or more gap-analysis documents as a subsection with the same title as this issue. Any edits made to that comment will be immediately available in the document. Proposals for changes or discussion of the content can be made in comments below this point.

Relevant gap analysis documents include: _AdlamArabic/PersianBengaliChineseDevanagariEthiopicGreekGujaratiJapaneseKashmiriMongolianN'KoTamilUighur_

r12a commented 3 years ago

Updated to be more generic, since stubs point into this for tracking from most gap-analysis docs.

r12a commented 3 years ago

Also updated to reflect the fact that Chrome v91 (released yesterday) now supports the Counter Styles spec.

jensimmons commented 1 year ago

Safari Technology Preview now supports Counter Styles. (And has since March 23, 2023 in Safari Technology Preview 166.)

r12a commented 1 year ago

That's great news @jensimmons. Thanks for the heads up. Once it's available for the general release i'll fix our test results and such, and close this issue. Will it also be supported in iOS ?

r12a commented 9 months ago

With the general release of Safari 170 i have marked this gap as fixed. (Hurrah!)

The test results at https://www.w3.org/International/i18n-tests/results/counter-styles now all show passes for Safari.