Page MenuHomePhabricator

Render Phonos progress RTL when a RTL language is used
Open, Needs TriagePublic

Description

Phonos has a kind of "position marker" when playing an audio, that marks, more or less, what is reading. When a RTL language text is added in a LTR Wikipedia, the marker goes from left to right, instead of going from right to left.

You can see the effects of this here: https://en.wikipedia.org/wiki/Israeli_West_Bank_barrier#Names

irudia.png (134×336 px, 13 KB)

If the Phonos button is clicked, the slider goes from left to right, even if the texts are in Hebrew and Arabic.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Media players in rtl in general progress left to right I've been told. I even reached out to the rtl community for the video player a few years ago to confirm this with them and was told that flipping that around would be confusing to them.

However this is a little bit different i guess because it's actually the background of the text. I think it would be interesting to source more opinions on this with the RTL communities.

First of all, the example doesn't have dir="rtl" so it can't possibly tell if it should be RTL. That said, it is already the case that when <phonos> is inside an element with dir="rtl", the positions of the speaker and attribution icons are flipped, so probably the progress indication should likewise be RTL.

Let's have the direction of the button follow the content language (and not the interface language), i.e. uselang will have no effect on which side the icon appears.

Your points are interesting, and I don't know which is the best solution. I see the progress indicator as a "karaoke", so it should follow the text. The text in the example is not marked RTL but if you try to select it you most do from right to left, so, somehow, this text is know to be RTL.

That's a faulty assumption. The label is often a generic description like "listen", and the audio need not even be one of pronunciation (e.g. List of chords).

My initial instinct was to repeat what @TheDJ said: that media players usually go from left to right even in RTL environments.

However, thinking of it a bit more, there is something to think about here... The progress bar of this player is quite different from the one in other media players: it's in the background of the text and doesn't have a line and a slider, like many other players do. Maybe it could be cool to explore having the slider moving in correspondence to the letters of the text. That would also potentially include mixed-direction text, where the progress bar would run according to the direction of the current word (I couldn't find a real example, though, and I don't want to make one up).

In any case, that would probably be a design exploration for a future version. For now, just letting it run from left to right everywhere looks good enough to me.

For now, just letting it run from left to right everywhere looks good enough to me.

But that is not the status quo. It just follows the interface language. I raised the issue at T326828#8646733 but they just merged my WIP patch anyway and it remains unaddressed.

JWheeler-WMF subscribed.

Moving to CommTech backlog as this is potentially a language team ticket as well