Patterns
Page templates and cross-component patterns of the OAIT Design System 2.1.0: one template for each job a page does, built only from the family's components, so a new product starts from a template and an AI tool gets one recipe per job (D-BCP-24).
Every pattern page follows canonical §11 and the family rules for accessibility, languages, and content. Read a component page for the parts; read a pattern page for how the parts go together on a screen.
Which pattern for which job
| Job of the page | Pattern | Template (canonical §11) | Used by today | Reference template |
|---|---|---|---|---|
| Tell people what a product is and send them to its one next step | Landing page | 1 | oait /, Global ID /, Jobs /en, Games /, Tamakkan / |
landing.html |
| Sign in, create an account, recover access, set up, confirm it is you, allow an app | Authentication | 2 | every product's sign-in, create-account, reset, setup, step-up, and consent screens | sign-in.html |
| Give a signed-in person their one main object and their next tasks | App home | 3 | Global ID Home, the Games event passport, the Tamakkan dashboard | app-home.html |
| Find one item in a long collection | Listing with search and filters | 4 | Jobs /jobs, /employers |
listing.html |
| Read about one item and act on it | Detail page | 5 | job, company, and booth detail | detail.html |
| Change one setting at a time, fill a short form | Forms and settings | 6 | Global ID Me and Security, Tamakkan account | settings.html |
| Manage people and records as staff | Admin console | 7 | Global ID /admin, Tamakkan crew, the Games organizer console |
admin-directory.html |
| Explain rules, privacy, and help in plain words | Legal and help | 8 | privacy, terms, accessibility, safety, help, and contact pages | none; built on the page frame |
| Say that something is missing, broken, offline, or empty | Empty, error, and offline | 9 | 404, error, offline, not set up, expired link, empty results | not-found.html |
| Let people practice without touching live data | Demo and training | 10 | Games /demo and /training, any practice mode |
none |
| Show one scene to a room on a projector or wall screen | Large-display stage | 11 | the Games projector stage; Events and Security wall screens | none |
| Choose the navigation, the page titles, and the way back | Navigation and information architecture | all | every product | shown in landing, app-home, admin-directory, and detail |
| Choose the right message for an event: snackbar, banner, inline status, or dialog | Feedback and status | all | every product | shown in settings and listing |
Eleven templates cover the eleven jobs; two cross-cutting pages (navigation, and feedback and status) hold the rules every template shares. The kitchen sink (kitchen-sink.html) shows every component a pattern names.
Rules for every page
These hold for every template, whatever the product (canonical §11, D-BCP-24, D-BCP-25):
| Rule | What to build | Decisions |
|---|---|---|
| Skip link first | "Skip to content" / "الانتقال إلى المحتوى" / "Aller au contenu" is the first focusable element, an oa-skip-link, and targets <main id="main" tabindex="-1"> |
D-CSN-49, D-CAI-08, C-2 |
| One h1 | One h1 per page, the first heading inside <main> (a back link or notices may come before it); headings never skip a level; headings of an aside come after the h1 in the DOM |
D-BCP-25 |
| Landmarks | <header>, a labeled <nav> for each navigation, one <main>, <footer>; asides are labeled |
D-BCP-25 |
| One main action | One filled 56px button (filled lg, bg-primary text-on-primary) in the content of a screen; everything else is outlined, text, or tonal. No header carries a call to action: its one button is Sign in with Global ID (D-CSN-53) |
D-CAI-04, D-CSN-53 |
| Text before art | On phones the h1 and the main action come before any illustration, in the DOM and on screen | D-LAY-08 |
| The name stays | The lock-up's product name is visible at every width; header actions collapse first | D-BCP-09, D-ARC-28 |
| Navigation never disappears | A header with page or section links gets the 48px menu button below 1024px, which opens the same links in a side sheet | D-CSN-12 |
| Headers | Web pages: the sticky glass header (sticky top-0 z-30 short:static bg-surface/80 backdrop-blur-xl) and html { scroll-padding-top: calc(var(--size-scroll-offset) + env(safe-area-inset-top)) } (96px plus the top inset). App shells: the header is a grid row that never scrolls away |
D-LAY-15, D-CSN-09, D-LAY-09 |
| Footer | The endorsement line ("Powered by OAIT at Global University") and the language switcher at the end of the legal bar; app shells end <main> with one in-flow footer row |
D-BCP-42, D-CSN-15, D-CSN-52 |
| Language | lang and dir on <html>, rendered by the server; dir="rtl" for Arabic only; lang on every part in another language |
D-BCP-30, D-BCP-28 |
| Status region | One polite role="status" region per page, present (empty) from load, for snackbars, counts, and confirmations |
D-CSN-25, D-BCP-25 |
| Errors | No framework-default error page ships; 404, 500, and offline pages use the family status page inside the product's shell, with the right HTTP status | D-CSN-30, D-BCP-24 |
| Viewport | <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">; heights in dvh, never vh |
D-LAY-17 |
| Theme | Tokens switch light and dark by themselves; a product sets data-theme="light" on <html> until its dark review passes (oait follows the system already; the Games stage sets data-theme="dark") |
D-COL-14 |
| Titles and meta | <title> "{Page} · {Product}"; a description of up to 160 characters, Open Graph and Twitter tags on indexable pages; signed-in and utility pages are noindex |
D-BCP-12, D-BCP-17 |
Two page frames
Every template sits in one of two frames, plus the stage (D-LAY-09, D-LAY-15, layout):
| Frame | Scrolls | Header | Navigation | Templates |
|---|---|---|---|---|
| Document page | the whole document | the 72px sticky glass site header, inside the page frame (full width above a full-bleed frame such as the auth panel) | header links from 1024px, the menu side sheet below | landing, authentication, listing, detail, legal and help, public status pages, and demo and training |
| App shell | only <main>, inside a h-dvh grid |
the top app bar, a grid row (64px below 768px in shells with a bottom bar, 72px otherwise) | navigation bar below 768px and rail from 768px (member apps); "Menu" row and drawer (consoles) | app home, forms and settings, admin console, and status pages of signed-in areas |
| Stage | nothing; a fixed 1920×1080 artboard | the stage header row | none on the public screen | large-display stage |
The frames, gutters, and grids are drawn in Layout: page layouts.
How to read a pattern page
Every pattern page has these sections, in this order. A page may add sections on its own topics between them (for example "Which navigation", "Density", or "Offline"), and every page ends with "Related".
- Purpose. The job of the page in one or two sentences, and the template number.
- When to use, and when to use another pattern instead.
- Structure. Top to bottom, as an annotated outline for desktop (from 1024px) and for phones (below 640px), then what changes in between; a skeleton in HTML with the reference classes, and the Tailwind recipe of each region.
- Components used. Each one linked to its component page.
- Content. The copy rules of the page, with real lines from the products in English, and Arabic and French where the products ship them.
- States. Loading, empty, error, and success, and what each looks and sounds like.
- Accessibility. Landmarks, headings, focus order, live regions, targets, and the tests the page must pass.
- RTL and languages. What mirrors, what never mirrors, Arabic line heights, and French length at 360px.
- Do and don't.
- Best current example. The product page that comes closest today, described in words from the audit screenshots, and what it still has to change.
- Reference template. The page in
reference/templates/that implements the pattern withoait-ui.css. 12.** What each product changes, with the item IDs of the drift report.
Rules end with the decisions they implement, such as (D-CSN-12). The IDs are in the decision log.
Tests every template passes
Run them on every page built from a pattern, in English, Arabic, and French (canonical §13, D-BCP-25):
- Tab once: the skip link appears, 48px tall, at the top inline start.
- Target bounding boxes: every control 48×48px or more; inline links in running text are exempt.
- A heading outline: one h1, no skipped levels, aside headings after the h1.
- A forced-colors screenshot: every card, filled button, and field keeps its edge; focus is an outline.
- A 320px screenshot with no sideways scroll, and a 360px French screenshot where labels wrap and never truncate.
- An accessibility-tree check per language, and axe.
- The token build check,
node tokens/build.mjs --check.
With the package tools (from the package root):
node tools/twcheck.mjs . patterns/
node tools/linkcheck.cjs . patterns/
node tools/audit-page.cjs reference/kitchen-sink.html audit-out --tokens tokens/oait.css --variants light,dark,rtl,dark-rtl,tamakkan,dark-tamakkan --widths 390,1440 --full --root . --gateRelated
- Components: the parts every pattern is built from.
- Layout: frames, gutters, grids, rhythm, and shells.
- Accessibility, Languages and RTL, Content and voice.
- Reference templates: the ten example pages, for eight of the eleven page patterns, each passing the audit gate.