This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28265 - [webvtt] incomplete ruby implementation [I18N-ISSUE-431]
Summary: [webvtt] incomplete ruby implementation [I18N-ISSUE-431]
Status: RESOLVED MOVED
Alias: None
Product: TextTracks CG
Classification: Unclassified
Component: WebVTT (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: Web Media Text Tracks CG
URL:
Whiteboard: widereview, v2
Keywords:
: 23874 (view as bug list)
Depends on: 23874
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-22 00:17 UTC by Silvia Pfeiffer
Modified: 2016-11-17 18:36 UTC (History)
11 users (show)

See Also:


Attachments

Description Silvia Pfeiffer 2015-03-22 00:17:26 UTC
Feedback by Addison Phillips from W3C I18N group:
http://lists.w3.org/Archives/Public/public-tt/2015Mar/0064.html

I18N comment: https://www.w3.org/International/track/issues/431

http://www.w3.org/TR/webvtt1/#dfn-webvtt-ruby-object

The spec defines a 'ruby' span and an 'rt' span. This is only part of the general ruby model in HTML5. Did you intend to be so specific or were you just looking at old version of html?
Comment 1 Philip Jägenstedt 2015-03-23 03:54:09 UTC
What is missing? The only other element I can see in HTML is <rp>, which is for "user agents that don't support ruby annotations."

It looks like <rp> was added to HTML in 2008:
https://html5.org/r/1704

The beginning of WebVTT was in 2010:
https://html5.org/r/5079

I think the idea is simply to not cater to UAs that don't support ruby; if you support WebVTT you must support ruby. This seems reasonable to me at least.
Comment 2 Simon Pieters 2015-03-23 08:17:13 UTC
W3C HTML5 also has rb, rtc

That said, I think it is a non-goal to match the expressiveness of HTML in WebVTT. WebVTT only has elements to cater for specific use cases that apply to it.
Comment 3 Silvia Pfeiffer 2015-03-23 08:40:34 UTC
See bug 23874 for a discussion on a broader support of ruby.
Comment 4 Philip Jägenstedt 2015-03-23 10:08:25 UTC
Hmm, OK. Some real-world examples of Japanese subtitles that need something beyond what we currently we have would be useful, if they exist.
Comment 5 Silvia Pfeiffer 2015-06-08 11:20:51 UTC
It seems Firefox have now implemented support for <ruby>, <rb>, <rt>, <rtc> and <rp>, see https://hacks.mozilla.org/2015/03/ruby-support-in-firefox-developer-edition-38/ , so this seems to fully follow http://darobin.github.io/html-ruby/ .

We can probably do without <rp>, but should probably include the others.

Also see http://www.w3.org/International/tests/repository/html5/the-ruby-element/results-ruby .

Do we want to follow the resolution of bug 23874 to move to v2 or include now?
Comment 6 Richard Ishida 2015-06-08 12:06:50 UTC
(In reply to Silvia Pfeiffer from comment #5)
> Also see
> http://www.w3.org/International/tests/repository/html5/the-ruby-element/
> results-ruby .


Note that, a few days ago, i updated that page in a new location (i'll put a redirect in soon), which shows the latest support in Firefox (and also some improvements in Blink). See

http://www.w3.org/International/tests/repo/results/ruby-html
Comment 7 Dae Kim 2015-07-01 18:22:57 UTC
There are two very specific use cases that limit the conversion of Japanese subtitles to VTT:

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28183
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28184
Comment 8 Silvia Pfeiffer 2015-08-09 10:23:50 UTC
(In reply to Dae Kim from comment #7)
> There are two very specific use cases that limit the conversion of Japanese
> subtitles to VTT:
> 
> https://www.w3.org/Bugs/Public/show_bug.cgi?id=28183
> https://www.w3.org/Bugs/Public/show_bug.cgi?id=28184

Those two seem a bit premature, but would be easy to add to the allowed CSS markup.

What do we do about elements? Add <rb> and <rtc> ?
Comment 9 Dae Kim 2015-08-10 22:57:33 UTC
(In reply to Silvia Pfeiffer from comment #8)
> (In reply to Dae Kim from comment #7)
> > There are two very specific use cases that limit the conversion of Japanese
> > subtitles to VTT:
> > 
> > https://www.w3.org/Bugs/Public/show_bug.cgi?id=28183
> > https://www.w3.org/Bugs/Public/show_bug.cgi?id=28184
> 
> Those two seem a bit premature, but would be easy to add to the allowed CSS
> markup.
> 
> What do we do about elements? Add <rb> and <rtc> ?

I assumed the <ruby> element was (In reply to Silvia Pfeiffer from comment #8)
> (In reply to Dae Kim from comment #7)
> > There are two very specific use cases that limit the conversion of Japanese
> > subtitles to VTT:
> > 
> > https://www.w3.org/Bugs/Public/show_bug.cgi?id=28183
> > https://www.w3.org/Bugs/Public/show_bug.cgi?id=28184
> 
> Those two seem a bit premature, but would be easy to add to the allowed CSS
> markup.
> 
> What do we do about elements? Add <rb> and <rtc> ?

I assumed <ruby> implied <rb> functionality:

00:00:10.000 --> 00:00:15.000
<ruby>Line 1<rt.over>ruby</rt></ruby>
<ruby>Line 2<rt.under>ruby2</rt></ruby>

But makes sense to add it and would be simple to account for it:

00:00:10.000 --> 00:00:15.000
<ruby><rb>Line 1</rb><rt.over>ruby</rt></ruby>
<ruby><rb>Line 2</rb><rt.under>ruby2</rt></ruby>

I'm not sure <rbc> or <rtc> is needed at the moment. In terms of practical use, Japanese formats do not use this sort of complex style. Simple ruby support via <rb> and <rt> is sufficient to translate into CSS/VTT.
Comment 10 David Singer 2015-08-13 22:13:01 UTC
I think support for rbc and rtc are not important.

My understanding is that rbc and rtc are required either 1) If you want to specify a base character for each segment of ruby, or 2) if you want to have two rubys, one on the right and the other on the left.  I believe the use of these complex rubys are rare (if they exist at all) in captions.
Comment 11 Silvia Pfeiffer 2015-08-14 00:04:20 UTC
OK, so all we need to add at this point is <rb> (note: there's no automation in <ruby> implying support of any other element).
Comment 12 Courtney 2015-08-14 00:16:52 UTC
I think that full Ruby support is very important for WebVTT.  I think that not having full support is impeding adoption of WebVTT for Japanese subtitles.  I think we should adopt HTML Ruby support wholesale into WebVTT.  That approach seems simplest.
Comment 13 Silvia Pfeiffer 2015-08-14 05:27:50 UTC
Courtney, do you have any data that supports your statement? What features do subtitles in Japan need? Do you have any examples that would need <rbc> and <rtc> ?
Comment 14 Courtney 2015-08-14 19:13:34 UTC
Silvia,  

In terms of data, I have requests for support for additional Ruby features from multiple content creators.  As I understand it, Japanese subtitles have been delivered most commonly as images , which allows for a great degree of styling and formatting control.  And, the expectation is that the same set of functionality will be available with a text-based subtitles delivery format like WebVTT.  And until that is the case, there is reluctance to move to WebVTT.

Here are some of the features I am being asked for:
1.  Ruby alignment, specifically the ability to specify spacing of multi-character Ruby over main text.  There are two cases- Ruby that annotates a span of multiple characters in the main text, and Ruby that contains multiple characters.  Sometimes Ruby can be applied to individual characters in the main text and sometimes it needs to be applied to a span of them.  Support for <rtc> is required to apply Ruby to a span of characters in the main text, and to group Ruby characters together.  I think that <rbc> doesn't need to be explicit in most cases.  While XHMTL defines <rbc>, it is generated as an anonymous box in HTML; WebVTT could do the same.  ( Disclaimer:  I'm not an HTML expert, but my reference for that information is the ruby-base-container definition in  https://drafts.csswg.org/css-ruby/, and the lack of <rbc> in the HTML spec.  I actually can't find where <rbc> is defined, so if someone can send a reference to it, it would be appreciated. )

2.  Ruby placement - under/over ( for horizontal ) and left/right ( for vertical ) of main text.  In my understanding, placing Ruby under main text is rare ( though there are examples of it in the HTML spec ).  But, with vertical subtitles, being able to specify left or right of the text is valuable.  Looks like this can be accomplished with the CSS ruby-position property (https://drafts.csswg.org/css-ruby/) though the spec seems to be a draft.

3.  Bōten emphasis dots - these can be delivered as Ruby annotations if the character for them is available.

I have not had requests for support for <rp> or for double Ruby annotations-i.e: above and below main text.  But, my feeling is that we should probably just adopt the HTML Ruby support wholesale in WebVTT, as the CSS Ruby support proposal is designed to work with it.
Comment 15 fantasai 2015-08-14 20:36:36 UTC
(In reply to Courtney from comment #14)
> Silvia,  
> 
> Here are some of the features I am being asked for:
> 1.  Ruby alignment, specifically the ability to specify spacing of
> multi-character Ruby over main text.  There are two cases- Ruby that
> annotates a span of multiple characters in the main text, and Ruby that
> contains multiple characters.  Sometimes Ruby can be applied to individual
> characters in the main text and sometimes it needs to be applied to a span
> of them.  Support for <rtc> is required to apply Ruby to a span of
> characters in the main text, and to group Ruby characters together.  I think
> that <rbc> doesn't need to be explicit in most cases.  While XHMTL defines
> <rbc>, it is generated as an anonymous box in HTML; WebVTT could do the
> same.  ( Disclaimer:  I'm not an HTML expert, but my reference for that
> information is the ruby-base-container definition in 
> https://drafts.csswg.org/css-ruby/, and the lack of <rbc> in the HTML spec. 
> I actually can't find where <rbc> is defined, so if someone can send a
> reference to it, it would be appreciated. )

Spanning multiple characters is accomplished by placing more than one character in the <rb>, not by using <rbc> or <rtc>. You are confusing what a "base" is with what a "character" is: in CJK languages each base is frequently one character, but this is not necessary.

<rtc> support would be needed only if you have multiple levels of ruby.

> 2.  Ruby placement - under/over ( for horizontal ) and left/right ( for
> vertical ) of main text.  In my understanding, placing Ruby under main text
> is rare ( though there are examples of it in the HTML spec ).  But, with
> vertical subtitles, being able to specify left or right of the text is
> valuable.  Looks like this can be accomplished with the CSS ruby-position
> property (https://drafts.csswg.org/css-ruby/) though the spec seems to be a
> draft.

Yes, ruby-position will do this. There is no HTML support for this since it is a presentational consideration, not a semantic one.

> 3.  Bōten emphasis dots - these can be delivered as Ruby annotations if the
> character for them is available.
> 
> I have not had requests for support for <rp> or for double Ruby
> annotations-i.e: above and below main text.  But, my feeling is that we
> should probably just adopt the HTML Ruby support wholesale in WebVTT, as the
> CSS Ruby support proposal is designed to work with it.

This should be accomplished by supporting the text-emphasis property:
  http://www.w3.org/TR/css-text-decor-3/#emphasis-marks
Comment 16 Dae Kim 2015-08-15 00:02:25 UTC
Based on Courtney's comment re:

"Japanese subtitles allows for a great degree of styling and formatting control.  And, the expectation is that the same set of functionality will be available with a text-based subtitles delivery format like WebVTT."

We can infer that this issue should be changed from "incomplete ruby implementation" to "incomplete Japanese features support".

In which case, we also need to support:
https://drafts.csswg.org/css-writing-modes/#text-combine-upright

via:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28184
Comment 17 Courtney 2015-09-30 19:26:57 UTC
Here is the link to the portion of HTML5 that defines Ruby tags:
http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
Comment 18 Courtney 2015-09-30 19:27:55 UTC
Here is the link to the portion of HTML5 that defines Ruby tags:
http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
Comment 19 Silvia Pfeiffer 2015-09-30 19:37:52 UTC
(In reply to fantasai from comment #15)
> (In reply to Courtney from comment #14)
> > Silvia,  
> > 
> > Here are some of the features I am being asked for:
> > 1.  Ruby alignment, specifically the ability to specify spacing of
> > multi-character Ruby over main text.  There are two cases- Ruby that
> > annotates a span of multiple characters in the main text, and Ruby that
> > contains multiple characters.  Sometimes Ruby can be applied to individual
> > characters in the main text and sometimes it needs to be applied to a span
> > of them.  Support for <rtc> is required to apply Ruby to a span of
> > characters in the main text, and to group Ruby characters together.  I think
> > that <rbc> doesn't need to be explicit in most cases.  While XHMTL defines
> > <rbc>, it is generated as an anonymous box in HTML; WebVTT could do the
> > same.  ( Disclaimer:  I'm not an HTML expert, but my reference for that
> > information is the ruby-base-container definition in 
> > https://drafts.csswg.org/css-ruby/, and the lack of <rbc> in the HTML spec. 
> > I actually can't find where <rbc> is defined, so if someone can send a
> > reference to it, it would be appreciated. )
> 
> Spanning multiple characters is accomplished by placing more than one
> character in the <rb>, not by using <rbc> or <rtc>. You are confusing what a
> "base" is with what a "character" is: in CJK languages each base is
> frequently one character, but this is not necessary.
> 
> <rtc> support would be needed only if you have multiple levels of ruby.


Based on this, I am not convinced we need to add any more elements for the WebVTT specific use case. Particularly since Mozilla reported in bug 23874 : "We looked and didn't find any wild examples of <rp> in subtitles."


> > 2.  Ruby placement - under/over ( for horizontal ) and left/right ( for
> > vertical ) of main text.  In my understanding, placing Ruby under main text
> > is rare ( though there are examples of it in the HTML spec ).  But, with
> > vertical subtitles, being able to specify left or right of the text is
> > valuable.  Looks like this can be accomplished with the CSS ruby-position
> > property (https://drafts.csswg.org/css-ruby/) though the spec seems to be a
> > draft.
> 
> Yes, ruby-position will do this. There is no HTML support for this since it
> is a presentational consideration, not a semantic one.


It seems the main requirement for ruby extensions on top of what is currently in WebVTT is this ruby-position CSS feature.


> > 3.  Bōten emphasis dots - these can be delivered as Ruby annotations if the
> > character for them is available.
> > 
> > I have not had requests for support for <rp> or for double Ruby
> > annotations-i.e: above and below main text.  But, my feeling is that we
> > should probably just adopt the HTML Ruby support wholesale in WebVTT, as the
> > CSS Ruby support proposal is designed to work with it.
> 
> This should be accomplished by supporting the text-emphasis property:
>   http://www.w3.org/TR/css-text-decor-3/#emphasis-marks

OK, we can leave emphasis-marks for the next version of WebVTT.
Comment 20 Silvia Pfeiffer 2015-09-30 19:40:16 UTC
*** Bug 23874 has been marked as a duplicate of this bug. ***
Comment 21 Silvia Pfeiffer 2015-09-30 22:27:33 UTC
After discussion with some internationalisation users from diverse video players at FOMS, we have come to the conclusion that this, together with bug 23874 (rb support), bug 28183 (ruby-position CSS support), bug 28184 (text-combine-upright), and support for CSS ruby-align should be done for the next version of WebVTT, so we can get a interoperable v1 version of WebVTT finalised asap.
Comment 22 Simon Pieters 2015-10-30 04:12:46 UTC
Discussion with ishida at TPAC we concluded that the current subset is OK in webvtt for now, but we should reconsider adopting all of ruby if it gets implemented by all browsers for HTML (including styling, not just HTML parsing).
Comment 23 Richard Ishida 2015-11-16 12:32:31 UTC
continued at https://github.com/w3c/webvtt/issues/264
Comment 24 David Singer 2016-10-11 17:29:00 UTC
We should re-assess the status of Ruby implementations in all browsers and consider whether we need to adapt VTT in the light of current practice.  Re-opening.
Comment 25 Richard Ishida 2016-10-12 12:44:36 UTC
David, please continue the discussion in the (open) github issue, not by reopening this.
Comment 26 David Singer 2016-11-16 23:10:08 UTC
comment copied from GitHub:

After asking experts, I believe we have the following state:
<ruby> and <rt>:  
   are in the specification now
<rb>: 
    is in by implication (it's a normal part of <ruby> if I understand it correctly), but we should be explicit
<rtc>:
    might be needed for some cases; should we include it? I am not aware of need, myself.
<rp>:
    is only in HTML for backwards compatibility and is not needed.

Can we mention <rt> as being part of <ruby> and leave <rtc> for implementer discretion and the future?
Comment 27 David Singer 2016-11-17 18:36:57 UTC
OK, I meant this:

mention rB explicitly as being included

leave rtc and rbc to future and implementation choice

leave out rp

(sorry about the typos)