Right-to-Left in a web platform (1/6)

Introducing Right-to-Left

If you are trying to build an international web platform and you want it to be accessible anywhere in the world, then, RTL (right-to-left) compatibility is not a just a “luxury”, it is a real necessity.

This series…


This content originally appeared on DEV Community and was authored by pffigueiredo

Introducing Right-to-Left

If you are trying to build an international web platform and you want it to be accessible anywhere in the world, then, RTL (right-to-left) compatibility is not a just a "luxury", it is a real necessity.

This series are obviously being written by someone who is used to see and read things from a LTR (Left-to-Right) perspective his whole life, or else, this wouldn't even make sense, because RTL would just be the standard.

First Step

So let's say, you wanna introduce RTL in your web platform, and you have no idea where to start. And so, you start to look around the internet or even ask your colleagues, and you come up to read or hear something like this:

It's just needed to change the direction in the html tag and it will be ready…

Well kinda, but not really.

Yes, it will solve more than 50% of your problems and it is a really good starting point, and in my opinion, the right start, but obviously, it isn't enough if you really wanna build something accessible and deliver a good UX to your users.

Problems solved by adding dir="rtl" to the html tag:

  1. Every block element and table columns will now start on the right and flow from the right to left;
  2. The text will also flow from right to left;

Why changing document's direction is not enough

Image after changing document's direction

After changing the document's direction, this section already looks quite different in both versions, but if you take a closer look, you will see that there are some differences in the visual effect of certain elements.

What I mean is, you should be able to know, that the text is related with the image, without really thinking about it. But in the RTL version, that was not achieved.

And why was that not achieved? - you may be wondering.

Well, that's just because that image was positioned using some sort of physical CSS properties. Which are pretty much all the css properties that include the keyword left or right.

margin-left, margin-right, padding-left, padding-right, left, right...

And these properties, don't really care about the document's direction, as right still means "right", doesn't matter from which to which place you are reading.

Conclusion

1- Adding dir="rtl" in the html tag is the correct first step;
2- There will be still a lot of problems to solve after that;
3- Physical properties might be evil.

Next Chapter

On the next chapter, we will be talking more in depth about physical properties and how we can leverage logical properties to make a RTL compatible web platform.


This content originally appeared on DEV Community and was authored by pffigueiredo


Print Share Comment Cite Upload Translate Updates
APA

pffigueiredo | Sciencx (2021-07-16T22:33:13+00:00) Right-to-Left in a web platform (1/6). Retrieved from https://www.scien.cx/2021/07/16/right-to-left-in-a-web-platform-1-6/

MLA
" » Right-to-Left in a web platform (1/6)." pffigueiredo | Sciencx - Friday July 16, 2021, https://www.scien.cx/2021/07/16/right-to-left-in-a-web-platform-1-6/
HARVARD
pffigueiredo | Sciencx Friday July 16, 2021 » Right-to-Left in a web platform (1/6)., viewed ,<https://www.scien.cx/2021/07/16/right-to-left-in-a-web-platform-1-6/>
VANCOUVER
pffigueiredo | Sciencx - » Right-to-Left in a web platform (1/6). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/07/16/right-to-left-in-a-web-platform-1-6/
CHICAGO
" » Right-to-Left in a web platform (1/6)." pffigueiredo | Sciencx - Accessed . https://www.scien.cx/2021/07/16/right-to-left-in-a-web-platform-1-6/
IEEE
" » Right-to-Left in a web platform (1/6)." pffigueiredo | Sciencx [Online]. Available: https://www.scien.cx/2021/07/16/right-to-left-in-a-web-platform-1-6/. [Accessed: ]
rf:citation
» Right-to-Left in a web platform (1/6) | pffigueiredo | Sciencx | https://www.scien.cx/2021/07/16/right-to-left-in-a-web-platform-1-6/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.