W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2009

[whatwg] rp is a styling tag and has no semantic function

From: Nikita Popov <privat@ni-po.com>
Date: Fri, 30 Oct 2009 15:00:10 +0100
Message-ID: <4AEAF16A.3020704@ni-po.com>
Futomi Hatano schrieb:
> On Fri, 30 Oct 2009 11:10:59 +0100
> Nikita Popov <privat at ni-po.com> wrote:
>   
>> Talking about screen-readers: How should a screen-reader actually handle
>> ruby annotations? In this case
>> <ruby>
>> ? <rt> ?? </rt>
>> ? <rt> ?? </rt>
>> </ruby>
>> it would be quite strange if a screen-reader read the annotations,
>> because they have the same content as the ruby base text. (I hope this
>> is correct. I don't know the Japanese language, but I understood it as
>> ? beeing same as ?? only in a different "way" of writing.) So the
>> reader must not read the annotation.
>>     
>
> More correctly, screen-readers should read only the contents of <rt> rather than the base text.
> That is, screen-readers are expected to read it as "ka-n-ji" from <rt>s.
> Of course, screen-readers which don't support <ruby> repeat 2 times such like "ka-n-ka-n-ji-ji" as you know.
>   
I am not sure whether it is as easy. Please consider this one:
<ruby>
char <rt>pron 1</rt>
another char <rt>pron 2 pron 3</rt>
and some other text without a ruby annotation.
</ruby>
If a screen-reader now only would read the ruby-annotations, it would
sound like this: "pron 1 pron 2 pron 3" and the rest of the text
wouldn't be read.
> We also have to get <ruby> easy to read for visual browser users.
> But, the markup above is rendered by non-IE browsers as below.
>
> ?????
>
> We feel it is odd.
> So, I want to mark it up like this.
>
> <ruby>??<rp>(</rp><rt>???</rt><rp>)</rp></ruby>
>  
> This markup is rendered by non-IE browsers as below.
>
> ??(???)
>
> It's natural and easy to understand.
>   
I fully agree that

?????

is odd and not really understandable and that

??(???)

is much better. But I still think that

<ruby>??<rp>(</rp><rt>???</rt><rp>)</rp></ruby>

is not the right way to mark this up. Much better would be:

<ruby>??<rt>???</rt></ruby>

An these two CSS-definitions:
rt:after {
content: ')';
}
rt:before {
content: '(';
}
This would add '(' before and ')' after all ruby-annotations. The only
problem is: Browsers being able to render ruby, will render the
parentheses too. So there must be another CSS-property, something like:
rt:after {
content: ')';
display: ruby-parenthese;
}
rt:before {
content: '(';
display: ruby-parenthese;
}
Browsers not knowing this value for ruby will fall back to display:
inline; and so display the parenthese. Browsers knowing ruby and this
property would not show the parentheses.
I think this is a much cleaner solution for the parentheses and the code
gets more readable.

Nikita Popov
Received on Friday, 30 October 2009 07:00:10 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:18 UTC