[html] Issue: How to handle legacy Ruby content that may use <rbc> marked as i18n

chaals has just labeled an issue for https://github.com/w3c/html as 
"i18n":

== How to handle legacy Ruby content that may use <rbc> ==
Copied from Bugzilla: 
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26426

@kojiishi, @darobin, @fantasi, @r12a 

>Tree construction, The ["in body" insertion 
mode](http://w3c.github.io/html/syntax.html#the-in-body-insertion-mode)
 states that:
>
>A start tag whose tag name is one of: "rb", "rp", "rtc"
>If the stack of open elements has a ruby element in scope, then 
generate implied end tags. If the current node is not then a ruby 
element, this is a parse error.
>
>This rule could break existing HTML + XHTML Ruby annotation content 
because they could use rbc tags:
>```html
<ruby><rbc><rb>base</rb></rbc>...
```
>Such content will be a parse error because rb is not a direct child 
of ruby.
>
>Should we loosen the rule to require rb being the direct child of 
ruby?
>-----
>[tag] [reply] [−]  Comment 1  fantasai     2014-07-24 11:02:41 UTC  
>
>I think
> ```
>  * <rb> should only generate implied end tags for 
<rb>,<rt>,<rtc>,<rp>
>  * <rt> should only generate implied end tags for 
<rb>,<rt>,<rtc>,<rp>
>  * <rtc> should only generate implied end tags for 
<rb>,<rt>,<rtc>,<rp>
>  * <rp> should not generate implied end tags for anything (bug 
26424).
>```
>-----
>[tag] [reply] [−]  Comment 2  Koji Ishii     2014-07-26 12:40:45 UTC
  
>
>Changing auto-closing rules doesn't help this. Because rbc is not 
defined in HTML5, we can't define its auto-closing rules.
>
>In other words, I could say following fragments exist in the wild:
>
>```html
<ruby><any><rb>base</rb></any>...</ruby>
>```
>and the `<any>` is an undefined element. If this fragment is defined 
as a parser error, we're likely to break a lot of existing documents 
that follow XHTML Ruby Annotation spec.
>
>-----
>[tag] [reply] [−]  Comment 3  Koji Ishii     2014-07-28 18:42:33 UTC
  
>
>After some more tests, I confirmed that having `<rbc>` doesn't render
 as proper ruby even before the spec change, so I'd put lower 
priority.
>
>Gecko, after the spec change was implemented, starts showing this as 
a parser error in Source view because `<rb>` is now defined, as 
discussed in https://bugzilla.mozilla.org/show_bug.cgi?id=1042885
>

See https://github.com/w3c/html/issues/291

Received on Tuesday, 3 May 2016 19:10:44 UTC