Guides
Accessibility & Contrast
A storefront that a shopper cannot read does not sell. This page covers the accessibility requirements a theme must meet to pass review, and the colour rules specifically.
Contrast
Every text and background pair must meet WCAG AA: 4.5:1 for body text, 3:1 for large text (18.66px bold or 24px regular) and for meaningful non-text elements like icons and input borders.
The lime trap
Tjjar's brand accent is a bright lime. It is a surface colour, never a text colour.
| Pair | Ratio | Verdict |
|---|---|---|
brand-300 text on white | 1.22:1 | Unreadable. Never. |
Ink text on brand-300 | 15.74:1 | Correct — put ink on lime |
brand-600 on canvas | 3.45:1 | Icons and borders only, not text |
brand-700 on canvas | 5.67:1 | Text, links and focus rings |
The rule in one line: lime is something you put text on, not something you write in.
Green text, icons and focus rings use brand-700 or darker.
The same applies to merchant brand colours. A merchant picks their own accent, and it will arrive with a pre-computed readable foreground beside it. Use the pair you are given rather than assuming their colour is safe to write on:
<span style="background: {{ store.accent.background }}; color: {{ store.accent.foreground }}">
{{ t.product.sale }}
</span>
store.accent arrives with brand settings. It is documented now because the rule it enforces —
never choose a foreground for a colour you did not choose — is one to design for from the start.
Never place merchant-chosen colour as text on an unknown background. You do not know what they picked.
Focus must be visible
Keyboard users navigate your theme. Never remove the focus ring without replacing it:
/* Wrong */
:focus {
outline: none;
}
/* Correct */
:focus-visible {
outline: 2px solid var(--focus-ring);
outline-offset: 2px;
}
Every interactive element needs a visible focus state that itself meets 3:1 against its surroundings.
Semantic markup
- One
<h1>per page, and heading levels that descend without skipping. - A real
<button>for actions and a real<a href>for navigation. A clickable<div>is not reachable by keyboard and is not announced. <nav>,<main>,<header>,<footer>— a screen-reader user navigates by landmark.- A skip link as the first focusable element.
<a href="#main" class="skip-link">{{ t.a11y.skip }}</a>
Images
Product images carry merchant-authored alt text. Pass it through; do not invent one, and do not fall back to the product name — that produces "Classic Abaya" announced three times on a gallery.
<img src="{{ image.url }}" alt="{{ image.alt }}" width="{{ image.width }}" height="{{ image.height }}">
Decorative images take alt="", which is different from omitting the attribute. Always set
width and height so the page does not shift as images load.
Forms
Every input needs a real <label>, not a placeholder standing in for one — a placeholder
disappears the moment someone types, and is not announced reliably.
<label for="qty">{{ t.cart.quantity }}</label>
<input id="qty" name="quantity" type="number" inputmode="numeric" min="1">
Error messages must be associated with their field via aria-describedby, and must say what
to do, not just that something is wrong.
Motion
Respect the system preference. An animation that cannot be turned off can cause real physical symptoms:
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}
Touch targets
Minimum 44×44 CSS pixels for anything tappable, with spacing between adjacent targets. Most Gulf storefront traffic is mobile.
What review checks
- Contrast on every text pair, including merchant accent surfaces.
- Keyboard reachability of the full purchase path: browse, open a product, add to cart.
- Visible focus throughout.
- Heading order and landmarks.
- Alt text plumbed through rather than invented.
- Reduced-motion support.