Element-web: Mixing RTL and LTR characters messes up the display order of text

Created on 11 Jan 2017  ·  11Comments  ·  Source: vector-im/element-web

Riot currently doesn't have good support for RTL languages. Complete lines of RTL characters are somewhat manageable but when there's a sequence of LTR characters in the middle, it messes up the sequence to display the words in.
Perhaps Riot should detect whether a line starts with RTL characters and then treat it all as RTL.

accessibility bug p2 minor roomview

Most helpful comment

All 11 comments

Related to #1712. Needs more <span dir="auto">.

Take this text, for example:
یہ ایک مثال ہے۔ درمیان میں left-to-right متن آنے پر متن کی ترتیب بدل جاتی ہے۔
(Not displaying correctly even on github)
The way it should show up is
selection_054
But it shows up in Riot as
selection_053
(Slight variation in the font. Hopefully it's clear enough.)

The web & Desktop version of Riot does not support RTL languages such as Arabic, Persian, Hebrew, etc. While the Android app can detect the language automatically and things are shown properly.

For example, if you put an exclamation mark at the end of the Persian phrase خوش آمدید, it will be shown at the first of it:

خوش آمدید!

Look, we read/write from right side to left, so the end of a sentence is at the left side. so, in case of خوش آمدید!, the ! mark should be at the left of the phrase.

This looks like it's been fixed, Riot now displays
2017-08-09-132954_493x29_scrot

Yes, it is working in Firefox. Let me check in Chrome and the electron app.

Also fixed in the mobile app.

Fixed in Chrome. So I guess it will be fixed in the electron app too. Both are webkit, right?

@saad440: yes.

Shame we don't right-justify the text: opened #4771 to track it

Fixed in the electron app too.

Was this page helpful?
0 / 5 - 0 ratings