Skip to content

Make <rp> available inside <sup> and <sub> #6521

Open
@Crissov

Description

@Crissov

Superscript text is often used for exponents, e<sup>i&InvisibleTimes;&pi;</sup> or 10<sup>9</sup>. This semantic information is lost when copying to plain text: eiπ, 109. When ruby annotation markup was added to HTML, it came with a dedicated element for textual fallback: <rp>. Can we reuse that for superscript and subscript text?

e<sup><rp>^(</rp>i&InvisibleTimes;&pi;<rp>)</rp></sup>
10<sup><rp>**</rp>9</sup>
C<sub><rp>_</rp>6</sub>H <sub><rp>_(</rp>12<rp>)</rp></sup> O<sub><rp>_</rp>6</sup>
<abbr title="madame">M<sup>me<rp>.</rp></sup></abbr>

A quick test in browsers suggests that some (e.g. Chrome, Edge, Firefox) drop the content of the <rp> element inside <sub> or <sup>, which is good, but they don’t copy the hidden text for plain-text pasting, which is very bad. Others (e.g. Safari) display (and, of course, copy) the contents, which means that some CSS would be required for them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    document conformancei18n-trackerGroup bringing to attention of Internationalization, or tracked by i18n but not needing response.interopImplementations are not interoperable with each othertopic: rendering

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions