RE: <ruby>, etc. in HTML5

Masataka Yakura wrote:
> Brian Smith wrote:
> > Also, the example in the HTML 5 draft is bad. In 
> particular, it is misleading because it suggests that <rt> 
> elements should be interleaved within the characters of the 
> words they are annotating. The proper markup is either:
> > 
> > <ruby>?<rt><rp>(</rp>??</rt><rp>)</rp></ruby>
> > <ruby>?<rt><rp>(</rp>??</rt><rp>)</rp></ruby>
> > <ruby>?<rt><rp>(</rp>??</rt><rp>)</rp></ruby>
> > <ruby>?<rt><rp>(</rp>?</rt><rp>)</rp></ruby>
> 
> This shouldn't be. Those letters form a name "????" ("??" is a 
> family name and "??" is a given name). Marking it up with such 
> multiple <ruby>s breaks the name into meaningless letters.
> It will look awfully in browsers which does not support 
> <ruby> or when 
> copying and pasting. I'm also afraid that screen readers or voice 
> browsers cannot read it out properly.

Right. I wasn't sure if the example was trying to just list a few unrelated characters or if it was trying to annotate a single word/name (my Japanese is not good enough to be able to tell that the example is a name). The markup above is for the "list a few unrelated characters case."

> > <ruby><rb>????</rb><rp>(</rp><rt>???????</rt><rp>)</rp></ruby>
> 
> This is exactly what I recommend for this case :)

I agree that this makes sense if the the example is a single name.

> <ruby>
> <rbc><rb> ?? ?? </rb></rbc>
> <rtc><rt> ??? ???? </rt></rtc>
> <rtc><rt> Masataka Yakura </rt></rtc>
> </ruby>

If you want to preserve the character-by-character, you need something like this:

<ruby><rbc><rb>矢</rb><rb>倉</rb><rb>眞</rb><rb>隆</rb></rbc>
      <rtc><rt>や</rt><rt>くら</rt><rt>まさ</rt><rt>たか</rt></rtc>
      <rtc><rt>Ya</rt><rt>kura</rt> <rt>Masa</rt><rt>taka</rt></rtc></ruby>

But then you cannot do the transposition of your first and last names. Is name transposition a common use of Ruby? Personally, I find it confusing.

I also don't understand why the Ruby Annotation recommendation forbids <rp> in complex ruby. I think it is just as applicable to complex ruby as it is to simple ruby. In particular, I would think that the following would be the best way of marking up your name in ruby:

<ruby><rbc><rb>矢</rb><rb>倉</rb><rb>眞</rb><rb>隆</rb></rbc><rp>(</rp><rtc><rt>や</rt><rt>くら</rt><rt>まさ</rt><rt>たか</rt></rtc><rp>/</rp><rtc><rt>Ya</rt><rt>kura</rt> <rt>Masa</rt><rt>taka</rt></rtc><rp>)</rp></ruby>

(All in one Ruby block), or:

<ruby><rbc><rb>矢</rb><rb>倉</rb></rbc><rp>(</rp><rtc><rt>や</rt><rt>くら</rt></rtc><rp>/</rp><rtc><rt>Ya</rt><rt>kura</rt></rtc><rp>)</rp></ruby><ruby><rbc><rb>眞</rb><rb>隆</rb></rbc><rp>(</rp><rtc><rt>まさ</rt><rt>たか</rt></rtc><rp>/</rp><rtc><rt>Masa</rt><rt>taka</rt></rtc><rp>)</rp></ruby>

(separate ruby blocks for each name).

Notice the lack of whitespace, so that browsers that don't understand Ruby markup will not display any whitespace inappropriately.

- Brian

Received on Tuesday, 27 May 2008 14:35:31 UTC