<!DOCTYPE html>
<meta charset="UTF-8">
<title>Position of ruby annotation in RTL text</title>
<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
<style>
  body { color: transparent; }
  rb { background: green; }
  rtc { background: red; }
  rt { background: cyan; }
</style>
<body style="text-align: right">
  <ruby><rb>base<rtc><rt>text</ruby>
</body>
