Text in comments marked dir="rtl" are left aligned
Activity

Brian Austin February 17, 2024 at 9:53 PM
I poked at TinyMCE (the rich text editor library we use) some more, and it looks like
a) we’re out of date by a bit
b) the latest version handles that situation much better
Upgrading isn’t something we’d like to tack onto this story, so I’ve created the linked ticket to do that.

lydia-theda February 17, 2024 at 4:35 AM(edited)
I figured, but I mentioned it mainly because … Expected (if odd) behavior for HTML following a specific format is one thing, “this unideal HTML is nearly always the output created via using the RTL+List buttons in the Rich Text interface on AO3” is another. Though I recognize that is an entirely different issue from this one.

Brian Austin February 17, 2024 at 3:57 AM
Based on playing around with the sandbox in , I think that second section is “expected” behaviour (although I agree it’s a bit odd).

lydia-theda February 17, 2024 at 2:39 AM(edited)
Added a new chapter to an existing work, then commented on it https://test.archiveofourown.org/works/1071662/chapters/2179621?show_comments=true#comments
The first and third options were correctly aligned but the middle (rtl listed in the li only and not the ul/ol) resulted in right-aligned bullets/numbers but left-aligned, right-flowing text. This happened both for work text and comment text. At least it’s consistent?
Possibly worth noting – The second scenario’s HTML is the output you get in works via Rich Text if you start with some plain left-aligned text and then click the RTL and list buttons (in any order) … well, sometimes, anyway. I’m not quite sure where the line between good and bad results is, but… Starting from “blinking cursor” and moving up successively from “highlighting single words” to “multiple lines” to “Ctrl-A the whole text” before clicking any formatting buttons, the bad result seemed to happen each time with the exception of “highlighting most/all of the text first” and “highlighting some text that was already RTL” … though not always, so I can’t say for sure. Mentioning it here because I found it while trying to create the above text pattern.

Brian Austin February 17, 2024 at 1:11 AM
Posted https://test.archiveofourown.org/chapters/2179603?show_comments=true&view_full_work=false#comment_5210179 and added 2 comments with RTL text. Both show up on the right (after I recached skins).
Create a work with body text of
<p dir="rtl">Where does the text align?</p>
and post itAdd a comment to the work using the same text.
What happens:
The body text is properly aligned to the right edge of the screen
The comment text has proper internal rtl flow, but is aligned to the left edge of the screen
What should happen:
The comment text should be right aligned.
NB: Summaries and Authors' Notes align correctly.
Work tested on originally: https://test.archiveofourown.org/works/1074457/chapters/2149576?show_comments=true&view_full_work=false#comment_5208211
Note: this requires recaching skins