> > > > The difference in expression ability becomes more important when
> there
> > > > are words mixed with kanji and kana, such as "振り仮名". For this word,
> > > > you won't even have the second option above, because I don't think
> people
> > > > want to write something like
> > > >
> > > > <ruby>振り仮名<rt>ふりがな</rt></ruby>
> > >
> > > What would be the right way to mark that up with <rb>? In particular,
> what
> > > would be the right way if the authors wants to switch between the
> inline
> > > form and ruby?
> >
> > It would be
> >
> > <ruby><rb>振<rb>り<rb>仮<rb>名<rt>ふ<rt>り<rt>が<rt>な</ruby>
> >
> > The <rt> for "り" here could be individually hidden in ruby form by
> > stylesheets. In fact, in CSS Ruby, we currently have autohide rule which
> > automatically hide the the annotation when it is equal to the base.
>
> Thanks, from looking at the current CSS Ruby draft, I see you must mean
> this:
>
>
http://drafts.csswg.org/css-ruby/#autohide
>
> And maybe I'm missing something but from that I see this autohide thing
> seems
> to be magic the UA does without exposing any means for Web content to
> cleanly
> override it -- neither through CSS nor script. ("Future levels of CSS Ruby
> may add controls for auto-hiding, but in this level it is always forced.")
>
> If so, I think that kind of thing is something that a lot of web devs has
> said they'd rather browsers quit doing -- and that most new specs these
> days seem to try to avoid doing. But again, maybe I'm missing something.
>
> But anyway it makes me wonder why it's specced this way to begin with.
> Other than the case where a base is kana I don't know what other real-world
> case there might be where an annotation might be equal to its base.
>
> Further, I don't know of any typical case where if a base character is
> kana, why you'd ever want to display furigana/yomigana for it.
>
> So as long as the spec is going to require UAs to resort to magic behavior,
> I think the magic could instead just be "autohide any ruby annotations for
> kana characters". And then you could just have simpler markup like this:
>
> <ruby>振り仮名<rt>ふりがな</rt></ruby>
>
> ...and UAs would display as expected -- with no annotation for the り.
>
> It doesn't seem like that magic would be any more difficult for UAs to
> implement and wouldn't be any worse than the "hide the annotation when it
> is equal to the base" magic the CSS Ruby spec currently requires UAs to do.
>
There are two problems if the UA wants to remove an individual kana in the
annotation. The first is, how do you display this ruby after removing that
character? There are three options for you:
(1) <ruby>振り仮名<rt>ふがな</rt></ruby>
(2) <ruby>振<rt>ふ</rt>り<rt></rt>仮名<rt>がな</rt></ruby>
(3) <ruby>振<rt>ふ</rt>り<rt></rt>仮<rt>が</rt>名<rt>な</rt></ruby>
(1) is completely wrong. In the three options, (3) is the preferable way,
but it is hard, if not impossible, for UAs to decide between (2) and (3).
They can do so only if they have Japanese dictionary integrated.
The second is, how do you know the "り" in the annotation matches the "り" in
the base? In this case, it might seems to be obvious, but Japanese also has
words like "言い訳 (いいわけ)", "聞き手 (ききて)". There is also more complex use case
which uses inline form to mark a novel title, such as "電波女と青春男
(でんぱおんなとせいしゅんおとこ)".
In addition, IIRC, CSS operates more on box level, not character level,
right? It would make UAs much harder to implement if a style affects
individual characters.
In conclusion, yes, I would admit that everything is also possible under
the current WHATWG rules, with UAs knowing every magic in Japanese. But in
this way, the advantage of the WHATWG rules, that they are simpler, is no
longer true. The W3C rules are much simpler in handling these use cases.
So anyway, to get back to the "Could you elaborate on why we are using the
> more complicated W3C rules here instead of the simpler WHATWG rules, given
> that the WHATWG rules also address the same use cases?" question that Hixie
> had originally asked at that you responded to in your earlier message at
>
https://lists.mozilla.org/pipermail/dev-platform/2014-December/008123.html
>
> ...from the above it seems the base-consisting-of-kanji-mixed-with-kana
> case may not be such a compelling case for illustrating the need for <rb>
> to be included in HTML. At least it's not as long as UAs are just doing
> magic autohiding without exposing any way for Web content to override it.
>
Although I don't think authors want in most cases, it is still possible for
them to suppress this behavior by, for example, inserting a zero-width
space in that annotation. I know it is a bit awkward, but it is possible,
if one really wants to. But it would be impossible to do so in your model
with WHATWG rules.
Anyway, the other case still makes the W3C rule preferable.
- Xidorn