w3c / jlreq

Text Layout Requirements for Japanese
https://w3c.github.io/jlreq/
Other
101 stars 17 forks source link

Tabular markup not supported for ruby #175

Open r12a opened 4 years ago

r12a commented 4 years ago

This issue is applicable to all languages using ruby annotations. (See: jlreq)

The basic pattern of 'tabular' markup is ruby-base ruby-base ... ruby-text ruby-text .... An advantage to this approach is that it enables you to style the ruby text to appear inline in such a way that all the ruby text for a word follows that word together. Inline styling can be useful in space-constrained situations, where it would be too difficult to read small ruby characters. Read more.

This also makes certain applications of double-sided ruby impossible when the ruby on each side of the base spans a different set of base characters.

When text is marked up in mono-ruby way, searching will not work well. If you have the following markup

<p><ruby>漢<rt>かん</rt>字<rt>じ</rt></ruby></p>

and search for the base text "漢字" in a browser, you will not get a result. Tabular markup could solve this problem. (See https://github.com/w3c/i18n-issues/issues/2 for a similar report raised by Japanese & Chinese users.)

Specs: issue 1771 rb and rtc element should be removed from the list of obsolete features Open.
html has actually removed markup for rb and rtc elements, which would be needed to make this work. The parser, however, supports the use of the markup still.
css-ruby-1 Describes how the tabular approach will work for CSS.

Tests & results: i18n test suite, HTML5, the ruby element and its children
Gecko supports display of ruby using the tabular model. Blink, and Webkit do not correctly support display. However, all browsers recognise the rb and rtc elements, and allow them to be styled or manipulated using scripting.

Kindle's ePub implementation also implements the tabular model, although not rtc.

Browser bug reports: GeckoBlinkWebkit

Priority: The limitations created by the lack of the tabular model are all basic in nature. None more so that the impairment for searching, since browsers have not been incentivised to fix that in any other way. The obsoletion of the rb and rtc elements by the HTML spec runs the risk that browser engines are not implementing the tabular model.

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: _Japanese_