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

On Fri, 30 Oct 2009 15:00:10 +0100
Nikita Popov <privat at ni-po.com> wrote:

> 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.

The text without a ruby annotation should not be in <ruby>.
It should be marked up like this:

<ruby>
char <rt>pron 1</rt>
another char <rt>pron 2 pron 3</rt>
</ruby>
and some other text without a ruby annotation.

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

If all browsers support <ruby> like IE, I think so.
Then, the CSS that you mentioned blow would be not necessary.
Now, we are talking about non-IE borwsers which don't support <ruby>,
For such browses, we have to show "(" and ")" in a phrase for a ruby annotations.
If "(" and ")" appear in a phrase, these are part of the phrase semantically.
So, I think that "(" and ")" should be marked up in HTML.

> 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.

It is a solution presentationally, but it is not a solution semantically, I think.
Your solution is useless for UAs which don't support CSS, because parentheses would not be displayed.
Parentheses for a ruby is not for decoration.
It is a part of phrase.
Please consider this phrase:

<p>This interest was borne from the realization that XML's deployment as a Web technology was limited to entirely new technologies (like RSS and later Atom), rather than as a replacement for existing deployed technologies (like HTML).</p>

Do you use CSS for "(like RSS and later Atom)" or "(like HTML)" ?
I hope that you say no.
I think that parentheses for a ruby is same as this case.

--
Futomi Hatano
www.html5.jp

Received on Friday, 30 October 2009 09:53:38 UTC