Before you put an Arabic chat widget live, test 12 things: the direction of each message bubble, punctuation at the end of Arabic sentences, phone numbers and order codes inside Arabic text, the input box and pre-chat form, the digits customers type, timestamps, message previews, mirrored icons, fonts, and every label the widget shows. Each test below comes with a string to paste and the result to expect.
Most RTL checklists that rank today cover whole websites. A chat widget breaks in other places, because its text arrives at run time from customers and agents, often in two directions in one message. We ran the tests in headless Chromium 158 on 4 December 2026 and describe what we saw when the direction was wrong. If you are still deciding which language to answer in, or when to use Gulf dialect, start with our guide to Arabic customer support; this page is the technical test run before launch.
How to run the 12 tests
Open your site on a laptop and a phone, start a chat, paste each test string as the customer, then answer from the agent side with the Arabic strings. Mark each item pass or fail, with an Arabic-speaking colleague reading the screen: a direction bug leaves every word spelled correctly and only changes the order.
| # | What to test | Paste this | Pass when |
|---|---|---|---|
| 1 | Page and widget direction | (open the Arabic page) | The widget's html or root element has dir="rtl" and lang="ar" |
| 2 | Arabic sentence with a code | هل طلبي A-10482 جاهز؟ | Reads right to left in order, ؟ at the left end |
| 3 | Message that starts in English | iPhone 15 متوفر؟ | ؟ sits at the left end of the Arabic word |
| 4 | Phone number in Arabic | رقمي +971 50 123 4567 شكرا | The number reads +971 50 123 4567, plus sign first |
| 5 | Typing in the input box | اكتب سؤالك هنا | Cursor starts at the right; English text typed later starts at the left |
| 6 | Pre-chat form | name@example.com | Email and phone fields stay left to right |
| 7 | Arabic-Indic digits | ٠٥٠١٢٣٤٥٦٧ | Lookup treats it as 0501234567 |
| 8 | Timestamps and prices | (send at 6:05 PM) | Digits match the style you chose, on every screen |
| 9 | Previews and notifications | مرحبا، أريد أن أسأل عن الشقة في الطابق الثالث | The preview shows the start of the message |
| 10 | Mirrored layout and icons | (look) | Send and back arrows point the Arabic way; numbers and clocks are not flipped |
| 11 | Arabic font | مرحبا بكم | An Arabic typeface loads; letters stay joined; no fake italics |
| 12 | Labels and system messages | (end the chat, rate it, go offline) | Every button, placeholder and system line is in Arabic |
Type the mixed strings into your widget, or copy them from the Arabic version of this page: here they carry invisible direction marks so they display correctly, and those marks would hide the very bug you're testing for. Below, each test with its usual fix, ready to hand to whoever maintains the widget.
1. Set the direction and language on the widget itself
The W3C's guidance on structural markup says that if the overall direction is right-to-left, you put dir="rtl" on the html element, and never set base direction with CSS alone. Add lang="ar" too. The W3C's article on language declarations points out that language and direction are separate: lang="ar" does not make anything right-to-left. Widgets often load in an iframe, so check the widget's own root element too.
2. Give every message bubble its own direction
A chat thread mixes directions by nature, so the direction should be set per message, not per page. With a left-to-right bubble, our test sentence هل طلبي A-10482 جاهز؟ was laid out with the phrase order reversed for a right-to-left reader and the question mark on the right, where an Arabic reader sees it first. With dir="auto" on the bubble, the same sentence displayed correctly.
dir="auto" tells the browser to pick the direction from the first strong character. The HTML specification even uses a chat transcript as its example, quoted in the W3C article.
3. Catch messages that start with an English word
dir="auto" has one known blind spot, and customers who mix Arabic and English hit it whenever a message opens with a brand or product name. A message like iPhone 15 متوفر؟ starts with a Latin letter, so the browser treats the whole bubble as left-to-right. In our test it left-aligned the message and put ؟ on the right. The W3C article shows the mirror case in its own chat example: an English message that opens with an Arabic word is treated as right-to-left.
The fix depends on who wrote the message. For the agent's or the AI's replies, set the direction from the reply's language (Arabic reply, dir="rtl") instead of guessing from the first word. For customer messages you can't control, dir="auto" is still the safest default; you can add a check that counts the Arabic letters in a message and switches it to right-to-left when they are the majority.
4. Isolate phone numbers, order codes and emails
Numbers inside Arabic sentences break in a way that's easy to miss. In a right-to-left bubble, رقمي +971 50 123 4567 شكرا displayed the digit groups in reverse order with the plus sign on the far side: read left to right, it showed 4567 123 50 971+. A customer copying that number by eye would dial the wrong one.
Wrapping the number in a left-to-right isolate fixed it in our test. In HTML that's <bdi> or <span dir="ltr">, as the W3C's inline bidi article explains. For plain-text places where you can't use markup, such as notification text or a saved reply, the W3C's guide to Unicode bidi controls gives the invisible characters to use instead: U+2066 before the number and U+2069 after it. A left-to-right mark (U+200E) on each side worked too. Messaging apps render text their own way, so test saved replies on your customers' phones.
5. Make the input box follow what the customer types
Customers switch languages mid-conversation. The W3C recommends dir="auto" on form fields and text areas; on a textarea it sets the direction for each paragraph separately, so an Arabic line and an English line in one message both align properly. Without it, the W3C notes, the cursor and punctuation jump around while people type opposite-direction text. The dirname attribute sends the detected direction to the server with the text, so the agent inbox can show the message the same way.
6. Keep email and phone fields left to right in the pre-chat form
Pre-chat and offline forms are easy to forget because nobody sees them during a normal test chat. Labels and error messages should be in Arabic and right-aligned, while the values in email, phone and order-number fields stay left to right, because their content is Latin letters and digits. Test with name@example.com and a number with a plus sign, then check the field doesn't reject an Arabic name such as محمد.
7. Accept the digits customers really type
The W3C's Arabic Layout Requirements list three families of digits used with Arabic script: European digits (0 to 9, used in Algeria and Morocco), Arabic-Indic digits (٠ to ٩, used in Egypt, Saudi Arabia and Iraq) and Eastern Arabic-Indic digits (۰ to ۹, used in Iran and Afghanistan). A Saudi customer may type a phone or order number with an Arabic keyboard, and the digits arrive as different characters. Test ٠٥٠١٢٣٤٥٦٧ in every place that looks something up: order status, phone matching, search. Normalising both Arabic digit ranges to 0 to 9 before the lookup is usually a few lines of code.
8. Pick one digit style for timestamps and prices
Your widget probably formats times and numbers with the browser's locale, and Arabic locales disagree. In our Chromium test, ar-AE formatted 1250.5 as 1,250.5 and a time as 6:05 م, while ar-SA and ar-EG gave ١٬٢٥٠٫٥ and ٦:٠٥ م. Neither is wrong, but a thread that shows Western digits in the timestamp and Arabic-Indic digits in a price looks broken. Choose one style for your audience and force it with the -u-nu- extension, for example ar-SA-u-nu-latn for Western digits, which MDN documents as the locale's numbering system.
9. Check previews and notifications show the start of the message
Conversation lists, unread badges and browser notifications cut long messages with an ellipsis. In a left-to-right preview, our Arabic test message مرحبا، أريد أن أسأل عن الشقة في الطابق الثالث kept only its last four words and cut the greeting and the question. With dir="auto" on the preview line, it kept the first five words. Check the agent inbox too.
10. Mirror the layout and the arrows, not the numbers
Use logical CSS properties (margin-inline-start, padding-inline-end, text-align: start) so the layout flips with the direction; the W3C article above lists the ones every major browser supports. Then check icons. Google's Material Design guidance on bidirectionality says icons that show forward or back movement are mirrored, while numbers, clocks and phone numbers are not. In a chat widget that means the send arrow and the back chevron point left, the minimise and close buttons swap sides, and the timestamp stays as it is.
11. Load a real Arabic font and leave the letters joined
Latin web fonts have no Arabic glyphs, so the browser falls back to whatever the device has; Noqta's list of RTL mistakes traces most "our Arabic looks bad" complaints to this. Put an Arabic typeface first in the widget's font stack. Set letter-spacing to 0 for Arabic: the CSS Text specification treats Arabic as a cursive script and tells authors to avoid letter-spacing on it unless they accept results that differ between browsers. Don't use italics for emphasis in Arabic either; in our test Chromium drew an artificial slant. Use a heavier weight instead. For size, one RTL website checklist from a Doha studio suggests at least 16px on desktop, 17px on mobile and a line height of 1.6; treat those as a starting point and check them on a phone.
12. Translate every label, and test the answers too
English leftovers in a widget show up mid-conversation, in the lines the widget writes by itself: "Agent joined", "Chat ended", the rating prompt, the offline message, the transcript email. End a chat, rate it and go offline to see them all. Then test the content: if an AI agent answers, ask it the ten questions your customers ask most, in Arabic, and check the replies with a native speaker. Our guide to writing an Arabic chatbot that doesn't sound translated lists the patterns to look for.
Emplorium's own widget is part of this test too. Arabic and right-to-left support come on every plan, and Aura, the AI agent, answers in Arabic and English on the Free plan (other languages from Starter). The widget's own buttons and labels are in English today, so item 12 is one to check against what your customers expect. If you want to run the other 11 tests on a live Arabic chat this afternoon, you can start on the Free plan with no card.
FAQ
What does dir="auto" do in a chat widget?
It tells the browser to set each element's direction from its first strong character, so an Arabic message displays right to left and an English one left to right. It misreads messages that start with an English word, so set the direction yourself for replies you write.
Why does the question mark appear on the wrong side in Arabic?
The bubble or page around the message is left-to-right. Punctuation has no direction of its own, so at the end of a sentence it follows the surrounding direction. Setting dir="rtl" or dir="auto" on the message fixes it.
Should an Arabic chat widget use Arabic-Indic or Western digits?
Either, as long as it's consistent. The W3C lists Arabic-Indic digits as used in Egypt, Saudi Arabia and Iraq and Western digits in Algeria and Morocco, and Chromium's default Arabic formatting for the UAE uses Western digits. Pick one, force it in your date and number formatting, and accept both when customers type.
How do I stop phone numbers from scrambling inside Arabic text?
Wrap the number in a left-to-right isolate: <bdi> or <span dir="ltr"> in HTML, or the invisible characters U+2066 and U+2069 in plain text. Then test it on the devices your customers use.
Do I need a native Arabic speaker to test an RTL widget?
For the final pass, yes. Many direction bugs leave every word spelled correctly and only change the order, which someone who doesn't read Arabic won't notice.