Why it matters
- Arabic has its own comma, semicolon and question mark:
،,؛and؟. Each has its own Unicode character and a shape that fits Arabic letters and their direction. - The Latin marks were designed for Latin text: the comma
,sits low and looks out of place between Arabic letters, and the question mark?faces the opposite way from the؟Arabic readers expect. - Mixing both kinds on one page makes the text look unedited, and it is one of the easiest mistakes to fix.
Example
<p>هل تريد المساعدة? تواصل معنا, نحن هنا طوال أيام الأسبوع.</p> <p>نرد على الرسائل خلال ساعات العمل; وفي العطل نرد في اليوم التالي.</p>
<p>هل تريد المساعدة؟ تواصل معنا، نحن هنا طوال أيام الأسبوع.</p> <p>نرد على الرسائل خلال ساعات العمل؛ وفي العطل نرد في اليوم التالي.</p>
How to fix
Replace the Latin mark with the Arabic one when it follows an Arabic word:
| Instead of | Use |
|---|---|
, | ، |
; | ؛ |
? | ؟ |
- Do not replace them blindly everywhere: the comma inside numbers such as
1,500, between English words such asReact, Vue, and in code and links stays as it is. - Most Arabic keyboard layouts include the Arabic marks, so it is easiest to type them from the start rather than fix them later.
How we detect
- The rule applies to pages where more than half of the letters of the visible text are Arabic-script.
- We look in the visible text for an Arabic letter, optionally followed by diacritics or tatweel, immediately followed by
,,;or?. We follow the text across inline tags, so<b>كلمة</b>,counts too. - We skip code (
code,pre,kbd,samp) and words that contain/, which are links or paths. Digits and Latin letters before the mark do not count. - Each mark is its own finding, with its line and the text around it.