Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please type your username.

Please type your E-Mail.

Please choose an appropriate title for the post.

Please choose the appropriate section so your post can be easily searched.

Please choose suitable Keywords Ex: post, video.

Browse

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Navigation

  • Home
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Contact Us
Home/ Questions/Q 8494

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Latest Questions

Author
  • 60k
Author
Asked: November 28, 20242024-11-28T01:38:07+00:00 2024-11-28T01:38:07+00:00

Accesible Carousel – RTL in a web platform (5/6)

  • 60k

This post is the 5th part of a 6 part series, on how to build a RTL compatible web platform, take a look at the previous one here.

External Components

Most of us working in web development (especially while employees), have an extra pressure to ship fast. Meaning we should grasp ourselves to whatever we can, to make our workflow more efficient, thus, delivering a fully featured product way faster.

Surely you can increase the speed in which you are able to deliver a product in many different ways. But the one that we are gonna enter in more detail here, is the usage of already existing solutions, more specifically, external components.

I'm referring to external components as all the components that you might import from someone else's lib.

Some common ones are

  • Carousel
  • Calendar
  • Price Slider
  • …

By putting your “engineer ego” aside and actually using these external components developed by the community, you should be able to gain a lot of speed, and to ship way faster.

External Components in RTL

The big problem of using these components, if that sometimes they don't fulfill those weird use cases you might have in your project. And yeah, RTL is most definitely one of those “weird use cases”.

From my experience, the odds of any external components being RTL compatible is pretty damn low (good opportunity to do some OS contributions 👀). But that doesn't make it any less worth to use most of these components, after all, for we engineers/developers this is obviously not a valid excuse for not showing the interfaces as the users expect them.

Carousel

One of the most used components in most websites these days are Carousels. And unless you have a big team or you are in no rush to ship, you shouldn't be looking to implement one yourself, as there are plenty Open Source alternatives out there.

The open source package I've personally been using most for carousels is react-responsive-carousel. There might be better alternatives out there, but this one as served me well with a nice API and good documentation as well.

Adding RTL support

Although the package is really complete, it doesn't satisfy in terms of RTL compatibility.

image

Taking a look at this image above, which is in LTR mode, there is plenty that needs to be changed, because the carousel has a lot of “hints” on where to move and on what's left to see.

So, what do we need to change? – you might be wondering.

Well, the easiest way to know that, is by putting a carousel that is RTL side by side with one that is in LTR, and try to figure out if all of their actions and hints have the same meaning. If so, you have certainly done a good job!

For the specific Carousel above, here are 3 main points that you would have to look out for:

1- Reversing the images array for one of the versions (probably the RTL one). So that we show the same slides in the first place for both versions;

2- Disabling the NEXT/PREVIOUS arrows for the first slide, depending on the document's direction;

3- Adding specific behaviours for onClick handler to the NEXT/PREVIOUS arrows depending on the document's direction.

image

And… Voilà, that would be the end result ☝️

Conclusion

1- If you have external components in your web platform, take a closer look and check their RTL compatibility;

2- Carousels are extremely heavy on direction hints/actions and should be handled with extra careful in this context.

Next Chapter

On the next and final chapter we will take a closer look on how numbers bring some challenges in the RTL context, and in ways we can handle them.

Make sure to follow me on twitter, to stay tuned with the latest updates on these series!

a11ycssreactwebdev
  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

Stats

  • Questions 4k
  • Answers 0
  • Best Answers 0
  • Users 1k
  • Popular
  • Answers
  • Author

    How to ensure that all the routes on my Symfony ...

    • 0 Answers
  • Author

    Insights into Forms in Flask

    • 0 Answers
  • Author

    Kick Start Your Next Project With Holo Theme

    • 0 Answers

Top Members

Samantha Carter

Samantha Carter

  • 0 Questions
  • 20 Points
Begginer
Ella Lewis

Ella Lewis

  • 0 Questions
  • 20 Points
Begginer
Isaac Anderson

Isaac Anderson

  • 0 Questions
  • 20 Points
Begginer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore, ask, and connect. Join our vibrant Q&A community today!

About Us

  • About Us
  • Contact Us
  • All Users

Legal Stuff

  • Terms of Use
  • Privacy Policy
  • Cookie Policy

Help

  • Knowledge Base
  • Support

Follow

© 2022 Querify Question. All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.