Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rb>rt>rb>rt example code to Example 1 #17

Open
r12a opened this issue Jun 20, 2024 · 2 comments
Open

Add rb>rt>rb>rt example code to Example 1 #17

r12a opened this issue Jun 20, 2024 · 2 comments
Labels
i18n-clreq i18n-jlreq i18n-mlreq i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on.

Comments

@r12a
Copy link

r12a commented Jun 20, 2024

2.1. The ruby element > Example 1
https://www.w3.org/TR/html-ruby-extensions/#basic-ruby-ex

This example shows Japanese text, with ruby markup used to annotate the ideographs with their pronunciation.

The example code uses

<ruby>霧<rt>きり</rt></ruby>とも<ruby>霞<rt>かすみ</rt></ruby>とも

I suggest that we show 3 markup models, beginning with the maximal markup model, which is

<ruby><rb>霧</rb><rt>きり</rt></ruby>とも<ruby><rb>霞</rb><rt>かすみ</rt></ruby>とも

And then going on to show 2 shorthand approaches, but first showing

<ruby><rb>霧<rt>きり</ruby>とも<ruby><rb>霞<rt>かすみ</ruby>とも

That model is both efficient and particularly useful because it puts the rb element in play without any more markup than the current HTML shorthand. I see it as the optimal approach, and so i think we should make it more visible.

I would only then add the markup in the current example text.

I think this will help nudge readers towards including the rb element in the spec, which is what they always used to do and which is more useful for styling.

Example 9
https://www.w3.org/TR/html-ruby-extensions/#rb-ex

Shows 2 alternative markup patterns for the rb element, including the one i'm suggesting above, but doesn't include the 3rd, which is fully marked up. I think it should, for completeness.

@r12a r12a added the i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. label Jun 20, 2024
@frivoal
Copy link
Collaborator

frivoal commented Jun 26, 2024

This is an introductory example. There's more coming later discussing all the possible markup variants (and why you might chose one over another). I don't want to get too deep into optional elements and optional end tags before the normative prose has a chance to introduce all of them, so I think we should stay away from showing the full thing as well as variants, and should stick with a single simple variant, whose meaning is obvious enough based on context, before we explain the rest.

I think the example as it currently is does that job reasonably, so I'm inclined not to change it, even if I think there are other variants that might work as well for that job too, such as:

<ruby>霧<rt>きり</ruby>とも<ruby>霞<rt>かすみ</ruby>とも

or

<ruby><rb>霧<rt>きり</ruby>とも<ruby><rb>霞<rt>かすみ</ruby>とも

In any case, I don't think we should use more than one in this particular example


As an aside, the maximal markup model isn't:

<ruby><rb>霧</rb><rt>きり</rt></ruby>とも<ruby><rb>霞</rb><rt>かすみ</rt></ruby>とも

but rather:

<ruby><rb>霧</rb><rtc><rt>きり</rt></rtc></ruby>とも<ruby><rb>霞</rb><rtc><rt>かすみ</rt></rtc></ruby>とも

@r12a
Copy link
Author

r12a commented Jun 26, 2024

@frivoal It's because it's the introductory example that i think we need to take a little care with it. Content authors reading the spec are likely to see this as a prime example for creating ruby or copy-paste the example and tweak it. My main desire is to encourage the use of the rb tag (which content authors used to use regularly, but i suspect have since been drifting into the HTML5 syntax.

So if we only have one, that's fine, but i'd recommend using

<ruby><rb><rt>きり</ruby>とも<ruby><rb><rt>かすみ</ruby>とも

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n-clreq i18n-jlreq i18n-mlreq i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on.
Projects
None yet
Development

No branches or pull requests

2 participants