Skip to content

R061: Arabic-Indic and Western digits mixed in the same context

Mixing ٣ and 3 within one table, list or fieldset makes figures hard to compare at a glance; numbers in running prose outside those containers are not checked.

The check

Id
R061
Default severity
medium

When it fires

  1. mediummedium confidence

    Inside one table, list, definition list or fieldset, the text holds at least two Western digits and at least two Arabic-Indic digits, so figures a reader compares are written two ways. A table counts as one surface across its rows, since a reader compares down a column.

    Fix: Standardize on one numbering system for this surface via Intl.NumberFormat's numberingSystem.

What it leaves alone

Numbers in running text outside a table, list or fieldset, since two numbers far apart on a page are not compared, and code blocks. Up to three per page.

Broken, then fixed

before.html
<ul>
  <li>المجموع: 250</li>
  <li>الضريبة: ٣٧٫٥</li>
</ul>
after.html
<ul>
  <li>المجموع: 250</li>
  <li>الضريبة: 37.5</li>
</ul>

Check it by hand

Select the table or list and run [($0.innerText.match(/[0-9]/g) ?? []).length, ($0.innerText.match(/[٠-٩]/g) ?? []).length] in the DevTools console. Two counts above zero are the finding.

What the report shows you

Each R061 finding carries the fields below that apply to it, so you can see why it fired without rerunning the scan.

westernDigitCount
How many Western digits (0 to 9) the container holds.
arabicIndicDigitCount
How many Arabic-Indic digits (٠ to ٩) it holds.
westernExample
Text from the container written with Western digits.
arabicIndicExample
Text from the container written with Arabic-Indic digits.

Components that pass it by construction

These Ritla UI components satisfy R061 by how they are built. Used as documented, they do not bring this defect onto your page.

Does your page trip R061?

Paste a URL. Ritla renders the page on desktop, tablet and mobile, runs every check, and shows the top issues with screenshot evidence.

Scan a page freeBrowse the checks