ResourcesDesign system

Accessibility & content

The checklist every screen passes before it ships, the ARIA patterns we reuse, and how CargoHub writes: labels, errors, Pakistani numbers and dates.

Checklist

Tick as you review a screen. Your ticks are saved with the demo.

0 of 18 checked
Keyboard
Focus
Contrast
Targets
Semantics

Targets & focus

Dashed box = the real hit area.

30 px + .u-hit = 44
36 px · pad row to 44
44 px
.u-focus-ring

ARIA patterns in use

PatternMarkup
TreeSidebar groups, menu editornav › button[aria-expanded] + sub list; links carry aria-current="page"Enter / Space toggles a group; Tab moves
TabsRecord tabs, filter chips, sliding pillrole="tablist" › role="tab" + aria-selected← / → between tabs (planned), Enter activates
DialogconfirmBox, drawers, request accessrole="dialog" aria-modal="true" aria-labelFocus trapped; Esc closes; focus returns
Alert / statusToasts, form errors, service bannerrole="status" (polite) · role="alert" for failures · aria-liveNothing to press; announced once
CurrentSidebar, kit nav, steppersaria-current="page" · aria-current="step"—
SortRegister headersth[aria-sort="ascending|descending|none"] › buttonEnter sorts; press again to reverse
BusySkeletons, refresharia-busy="true" on the region + visually hidden “Loading”—
PressedPin, hide, density togglesbutton[aria-pressed]Space / Enter toggles

Contrast checker

WCAG 2.2 ratio. AA needs 4.5:1 for text and 3:1 for large text and UI parts. Pairs below are read from the live tokens.

4.58:1
AA text passAA large passAAA text failUI · 3:1 pass
Rs 12,45,000 outstandingBilty KHI/2026/01284 · delivered 29 Sep 2026, 10:42Small print 12 px: POD pending for 26 h
Token pairUseRatio
--ink on --surfaceBody text17.68 AAA
--ink-2 on --surfaceSecondary text10.12 AAA
--muted on --surfaceHints, meta5.44 AA
--muted on --groundMeta on page ground5.06 AA
--faint on --surfaceDecoration only4.58 AA
--b-700 on --surfaceLinks5.90 AA
white on --b-600Primary button4.40 Large
--b-800 on --b-50Doc chips7.16 AAA
--ok on --ok-bgOK pill5.12 AA
--warn on --warn-bgWarn pill5.42 AA
--bad on --bad-bgBad pill5.07 AA
--info on --info-bgInfo pill4.87 AA

Content style guide

How CargoHub writes. Use this when naming buttons, writing errors and formatting data.

Voice

Plain, specific and calm. Write for a dispatcher on a busy shift: short sentences, the facts first, no exclamation marks.

Say what happens

A button names its result: “Post invoice to FBR”, “Assign LES-4821”, “Archive draft”. Never “Submit”, “OK” or “Proceed”.

Errors help

Say what went wrong, where, and how to fix it. Keep what the user typed, and never blame them.

Labels
DoPost invoice to FBR
Don’tSubmit
DoArchive draft
Don’tOK
Errors
DoBuyer NTN needs 7 digits and a check digit, like 4271938-6. Fix it on the party, then post again.
Don’tError 400: invalid request payload.
NTN needs 7 digits and a check digit, like 4271938-6
Numbers & currency
Rs
WhereFormatExample
Tables, invoicesrs(n): lakh groupingrs(n)Rs 12,45,000
KPIs, cardsrsc(n): L / Crrsc(n)Rs 12.4 L
Spoken, chequeswordswords12 lakh 45 thousand
Exports (Excel)plain numberplain number1245000
Examples: Rs 12,45,000 · Rs 1,84,25,000 · Rs 4,86,000 · Rs 42,600. Weights use 12,400 kg, distance 1,230 km, tax 18%.
Dates, times & IDs
KindDoDon’t
Date29 Sep 20269/29/26
Short date29 Sep29-09
Time10:42 (24 h)10:42:07 AM
Relative4 min ago · Yesterday0.07 hours ago
Range01–29 Sep 20261/9 - 29/9
NTN4271938-64271938 6
CNIC35202-1234567-13520212345671
Mobile+92 300 123456703001234567
DocumentsKHI/2026/01284 · INV-2026-00318#1284
Urdu subtitles

In the ops portals, English stays the label and Urdu is an optional subtitle underneath (lang="ur" dir="rtl"). The driver app can switch fully to Urdu with right-to-left layout. Numbers, document numbers and plates stay in Latin digits.

Bilties (Bilty register)
بلٹی رجسٹر
Proof of delivery
ترسیل کا ثبوت
Start trip
سفر شروع کریں
Documents
کاغذات