Empty, error, and offline
What a product shows when there is nothing to show, when a page is missing or fails, when the device has no network, when a device is not set up, or when a link no longer works: the in-content empty state and the full-page states, with their exact copy, titles, and HTTP statuses.
| Template | 9 of 11, "Status pages and empty states" (canonical §11, D-BCP-24) |
| Used by | Every product: 404, error, offline, not set up, expired link, empty results |
| Reference template | reference/templates/not-found.html |
| Decisions | D-CSN-30, D-CSN-06, D-CSN-29, D-BCP-20, D-BCP-23, D-BCP-24, D-ARC-21, D-ARC-23 |
Purpose
- Never leave a person at a dead end: every state says what happened and offers one way on, inside the product's own header and footer (D-CSN-30, D-BCP-20).
- Tell machines the truth too: the right HTTP status and a document title that names the state (canonical §10.24).
- Keep working offline where the product can, without keeping anything personal on the device (canonical §11 row 9).
When to use
| Situation | Placement |
|---|---|
| A list, table, search, or section has nothing in it yet, or nothing that matches | In-content empty state, inside the container it replaces |
| A web address leads nowhere | Full page: 404 |
| The server failed to build the page | Full page: error |
| A page cannot be fetched because the device is offline | Full page: offline, served from the cached shell |
| A device is not enrolled for its job (a station, a kiosk) | Full page: not set up |
| A one-time link has expired or was used | Full page: expired link, or the problem inside the authentication card for setup and recovery links |
Use something else when:
| Situation | Use instead |
|---|---|
| A form failed, or one field is wrong | Field errors and an error banner (forms and settings) |
| The page works but something on it needs attention | A banner (feedback and status) |
| Content is on its way | Skeleton blocks or a spinner with words |
| A feature is not built yet | A dashed placeholder card with "Coming soon" (warning dot and chip), one sentence, no date unless committed, no action, and no link (canonical §12.5) |
| The framework's default 404 or error page | Never: no framework-default error page ships (canonical §10.24, §11) |
Structure
Desktop (from 1024px)
Always inside the product's shell, so the lock-up still leads home and the footer still offers help (canonical §10.24).
- Skip link, then the product's header: the site header on web pages, the top app bar and the navigation in app shells (the navigation stays; only
mainchanges). <main id="main" tabindex="-1">holding, inside the page frame and its gutters, one centered column (.oa-state-page), up tomax-w-form(460px), 40px block padding, 16px between parts, centered vertically when the page is short:- A bare 64px icon (
icon-4xl) inprimary-ink; or, for problem states (not set up, expired link), an 80px tonal disc (tile-2xl,warning-container) holding a 40px icon (icon-3xl). - h1 in
text-headline-md: the state, in words. - One or two sentences in
text-body-lg text-on-surface-variant. - One
filled lgbutton, then an optional quieter action (a text link or a tonal button). - An error code, if there is one, last and small: "Error code: invalid_request" with the code in
font-mono text-code-xs.
- A bare 64px icon (
- Footer, with the endorsement line and the language switcher; in app shells, its legal links row.
Canonical §10.24 gives the column as "up to 448px", Global ID's old max-w-md; the system token for status columns is --container-form (460px), which the reference CSS uses (R-16, ID-2.26).
Phone (below 640px)
- The same order. The button spans the column (full width below 640px); the quieter action sits under it.
- The S lock-up, the menu button, or the navigation bar stay; nothing in the header changes for an error.
- Text stays centered; the h1 wraps with
text-wrap: balance.
In between (640–1023px)
- Nothing changes but the header: the site header shows its links from 1024px, the app shell its rail or drawer from 768px.
In-content empty state
Inside the container it replaces (a table region, a list card) or in a dashed placeholder card where cards would be (D-CSN-06):
- A 64px
secondary-containerdisc (tile-xl) with a 32pxon-secondary-containericon (icon-2xl); or a product illustration of 160px or less. - The title in
text-title-lg(an h2 when it heads the region, otherwise a paragraph). - The body in
text-body-md text-on-surface-variant, 40 characters wide at most. - One action:
outlinedmd, orfilled lgwhen it is the screen's main action; then an optional text link.
Centered column, 12px between parts, padding 48px 24px (canonical §10.24).
Skeleton
<main id="main" tabindex="-1">
<div class="oa-container">
<div class="oa-state-page">
<span class="oa-icon oa-icon--4xl oa-state-page__icon" aria-hidden="true" translate="no">unknown_document</span>
<h1 class="oa-state-page__title">We couldn’t find that page</h1>
<p class="oa-state-page__body">The link may be broken, or the page may have been removed.</p>
<div class="oa-state-page__actions">
<a class="oa-btn oa-btn--filled oa-btn--lg" href="/">Go to the home page</a>
</div>
</div>
</div>
</main>The state column has no side gutters of its own, so it sits in the page frame (.oa-container: 16px gutters, 24px from 640px), and the button that spans the column on phones stops 16px from the screen edges. To center the column vertically on a short page, <main> and the frame are flex columns that fill the height (page layout). The header before main and the footer after it are the product's own. Every full-page state and the in-content variants are on the empty state page and in the feedback snippet.
Components used
Empty state (.oa-state-page, .oa-empty) · Button (filled lg, tonal, outlined) · Link ("Contact us") · Card (dashed placeholder) · Table (the region an empty state replaces) · Site header, top app bar and footer (the shell around a full-page state) · Banner (link problems in the authentication card) · Progress ("Try again" while it works).
Offline
- The offline page is part of the cached shell (canonical §11 row 9). The service worker keeps it from install, so it needs nothing from the network, and shows it in place of any page that cannot be fetched.
- It holds nothing about the person: it is the same file for everyone, so it never draws a name, a photo, or an account control. Global ID's worker never stores pages, API answers, or photos, and keeps sensitive routes (sign-in, setup, security, the admin console) on the network only.
- The address stays the one that was asked for, so "Try again" reloads that page.
- It is
noindex: nobody should land on it from a search. - What still works offline is offered, never promised: Global ID adds "Show my pass" only when the phone holds a pass, because the pass is made on the phone from its own key.
- A page that is already open and loses the network mid-action uses the snackbar or a banner, not the offline page: "Connection interrupted. Nothing new has been confirmed." (feedback and status).
Content
The copy, titles, and statuses
The binding copy (canonical §11). Write apostrophes as ’ (canonical §12.2).
| Page | Icon | Title (h1) | Sentence | Primary | Second action | <title> |
HTTP |
|---|---|---|---|---|---|---|---|
| 404 | unknown_document |
We couldn’t find that page | The link may be broken, or the page may have been removed. | Go to the home page | — | Page not found · {Product} | 404 |
| Error | error (filled) |
Something went wrong | Try again in a moment. If it keeps happening, contact us. | Try again | "Contact us" link | Something went wrong · {Product} | 500 |
| Offline | cloud_off |
You’re offline | Check your connection, then try again. | Try again, with refresh |
Global ID: tonal "Show my pass" when the phone holds a pass | You’re offline · {Product} | — |
| Not set up | devices, in the tonal disc |
This device is not a station yet | An admin gives you a one-time code to set it up. | Set up this station | — | — | — |
| Expired link | link_off, in the tonal disc |
This link has expired | Ask the ID office for a new one. | "Request a new link" when the product can send one (an expired reset link: heading "Request a new reset link", button "Send a new reset link"); otherwise "Go to the home page" | — | This link has expired · {Product} | — |
- The expired-link row comes from R-17 and R-51, which add it to canonical §11; it uses Global ID's shipped message ("This link has expired. Ask the ID office for a new one."), the problem disc of the tokens (
--size-tile-2xl), the generic "Request a new link", and for reset links the strings of Global ID's expired-reset page (heading "Request a new reset link", button "Send a new reset link"). Each product names who issues its links. - "—" for HTTP: the offline page comes from the service worker and the address stays the one that was asked for; the station and link pages answer on their own routes.
- The HTTP status is the truth. A missing page answers 404 and a failure 500, so search engines, monitors, and screen readers agree with the page. A missing record (a job that was removed) also answers 404 (canonical §10.24).
- The document title names the state, in the "{Page} · {Product}" form: "Page not found · Global Jobs" (canonical §12.2). Arabic and French translate the page part; the product name stays Latin.
| English | Arabic | French |
|---|---|---|
| You’re offline | أنت غير متصل بالإنترنت | Vous êtes hors ligne |
| Check your connection, then try again. | تحقق من اتصالك ثم حاول مرة أخرى. | Vérifiez votre connexion, puis réessayez. |
| Try again | إعادة المحاولة (native review) | Réessayer |
| Show my pass | عرض تصريحي | Afficher mon pass |
| This device is not a station yet | هذا الجهاز ليس محطة بعد | Cet appareil n’est pas encore une station |
| An admin gives you a one-time code to set it up. | يعطيك المسؤول رمزًا لمرة واحدة لضبطه. | Un administrateur vous donne un code à usage unique pour le configurer. |
| This link has expired. Ask the ID office for a new one. | انتهت صلاحية هذا الرابط. اطلب رابطًا جديدًا من مكتب الهوية والوصول. | Ce lien a expiré. Demandez-en un nouveau au Bureau de l’identité et des accès. |
These ship in Global ID, except the glossary's Arabic "Try again", a verbal noun that replaces today's imperative "حاول مرة أخرى" after native review (canonical §12.3, D-BCP-22). The tanween sits on the letter before the alif ("رمزًا", "رابطًا جديدًا", canonical §12.6), where Global ID writes it on the alif today ("رمزاً", "رابطاً جديداً"), a migration item for native review. The 404 and error pages have no shipped Arabic or French yet: each product writes them in its catalog and sends them to native review before release, because every product ships English and Arabic complete (canonical §14.1).
Empty states in content
| Kind | Title | Body | Action | Example |
|---|---|---|---|---|
| Nothing matches a search or filters | The empty result | What to try | Clear or widen the search | "No people match these filters" · "Try another type, unit, or status, or check the spelling of the name." · "Clear filters" (Global ID) |
| Nothing matches a search, on a public listing | The empty result, often in the h1 | What to try, with examples | "See all jobs"; optional "Save this search" | "No jobs for “sales manager”" · "Try another word" · "Check the spelling, or use a shorter or more general word, like “sales” or “nurse”." (Global Jobs) |
| Nothing here yet (first use) | What will be here | What it is for, one sentence | The screen's main action, filled lg |
"There are no stations yet" · "The devices that scan passes at each place. Set each one up with a one-time code, and revoke a lost one at once." · "Add a station" (Global ID) |
| Nothing for this person | What is missing, and why | Who can help | A way out | "Your pass isn’t on on this phone. Connect to the internet and turn it on from Home." · "Go to Home" (Global ID, offline pass) |
- When the h1 already states the empty result ("No jobs for “sales manager”"), the empty card leads with what to do ("Try another word") instead of repeating it (Global Jobs).
- Say what happened and what to do; never blame, never humor, never "Oops" (canonical §12.4).
- A filter that cannot apply is not disabled: "Clear filters" is always a working link while any filter is on.
States
| State | What the page shows |
|---|---|
| 404 | The 404 page with HTTP 404 |
| Error, the shell renders | The error page inside the shell, HTTP 500, "Try again", and "Contact us" |
| Error, the shell itself failed | A root error page in the product's own fonts and tokens (never system fonts), with the same copy |
| Offline | The cached offline page; "Try again" reloads the same address |
| Not set up | The station's problem page, with no navigation chrome; leave by its labeled button (canonical §10.15) |
| Expired or used link | The expired-link page, or the authentication card with a warning banner ("This link was already used. Ask the ID office for a new one.") and the help contacts |
| Empty results | The in-content empty state; the page itself answers 200 |
| Retrying | "Try again" shows its loading state with words; on success the page replaces the state |
Accessibility
- One h1 per state page, first in
main; the document title names the state, so the first thing a screen reader announces is what happened (WCAG 2.4.2). - The icon and disc are decorative (
aria-hidden); the h1 and the sentence carry the meaning. - The skip link and the header stay, so the person can leave by the usual ways; the main button is 56px (canonical §13).
- An in-content empty state that replaces search results is announced through the status line that carries the result count, like any other count (feedback and status).
- Retry buttons keep focus and colors while busy (
[aria-busy="true"]), and say what they do ("Try again", not "Retry") (D-CAI-06, canonical §12.3). - Text stays 4.5:1 or more:
primary-inkicons onsurfaceare 5.45:1 or more, body text inon-surface-variant7.2:1 or more in light and 5.4:1 or more in dark (tokens.md).
RTL and languages
- The column is centered, so only the text direction changes; buttons and links follow the inline direction (canonical §14.2).
unknown_document,error,cloud_off,devices,link_off, andrefreshnever mirror (canonical §8.3).- Error codes stay left to right:
<code dir="ltr" translate="no">invalid_request</code>. - French titles run longer: "Cet appareil n’est pas encore une station" wraps under 360px; let it wrap, never shrink it.
Do and don't
| Do | Don't |
|---|---|
| The 404 inside the product's header and footer, HTTP 404 | The framework's unstyled "404 · This page could not be found." |
| "Page not found · Global Jobs" as the document title | The home page's title on a 404 |
| The state in words: "We couldn’t find that page" | A 144px "404" numeral, or "Lost Signal" |
One filled lg "Go to the home page" |
Two equal buttons fighting for the main action |
| The offline page from the cache, holding nothing personal | A cached copy of a page with the person's details |
| An error code last and small | An error code as the title |
Best current example
Global ID's offline page (/offline, 390px screenshot) is the family's model for the full-page anatomy: the 64px cloud_off in primary-ink, "You're offline", "Check your connection, then try again.", and one 56px "Try again" with refresh, served by the service worker. Its station page (1440px screenshot) is the model problem state: the 80px disc with devices (in Global ID's strong sand fill with a white 44px icon, which becomes the tonal warning-container disc with a 40px icon), "This device is not a station yet", "An admin gives you a one-time code to set it up.", and the full-width "Set up this station". Both still lack the product shell around them, which this pattern adds. Global Jobs' 404 (1440px screenshot) is the model of the shell and the copy: the full header and footer around "We couldn't find that page" and "The link may be broken, or the page may have been removed."; its two equal buttons ("Find jobs" and "Go to the home page") and its document title change. Global Jobs' empty search (1440px screenshot) is the in-content model: "No jobs for “zzqqxxnomatch”" as the h1, then a dashed card with "Try another word", "See all jobs", and "Save this search".
What this pattern replaces: oait.app's and Global ID's unstyled framework 404, Global ID's system-font /app-error, and Tamakkan's "404 · Lost Signal · This page isn’t on the map." with a 144px violet numeral (screenshots in each product's evidence).
Reference template
reference/templates/not-found.html builds the 404 inside a product shell with the exact copy. It passes the audit gate in light, dark, RTL, and dark RTL at 390px and 1440px.
Related
- Feedback and status: banners and snackbars for problems on a working page.
- Listing with search and filters: empty results.
- Admin console: empty tables.
- Authentication: link problems in setup and recovery.