Template · stable · v1.0.0 · owner: Site system lead · contract 19 of 20 points (open: figma)
Do and don't
Do: Health check
Rendered by task-page.tsOpen example: Task page · Do: Health check Use the full-page example to follow page links.
Do: Privacy page
Rendered by task-page.tsOpen example: Task page · Do: Privacy page Use the full-page example to follow page links.
Don't: The site navigation
Rendered by task-page.tsOpen example: Task page · Don't: The site navigation Use the full-page example to follow page links.
Don't: A woven edge above the footer
Rendered by task-page.tsOpen example: Task page · Don't: A woven edge above the footer Use the full-page example to follow page links.
Rules
| Rule | Why | Check |
|---|---|---|
| Task pages are generated from this template at build time; no hand-written page HTML. | One shell keeps every task page consistent and checkable (closes EX-SITE-004). | Automated: scripts/site/system/check-pages.ts (task pages follow page-apps) |
API
| Prop | Type | Required | Default | What it does |
|---|---|---|---|---|
title | string | Yes | Document title. | |
description | string | No | Meta description. | |
noindex | boolean | No | false | Keep out of search. |
comment | string | No | An internal note kept as an HTML comment. | |
alternates | object | No | English and Japanese paths. | |
styles | list | Yes | The app's stylesheets after /css/brand.css. | |
script | string | No | The app's module script. | |
skipI18n | boolean | No | false | The skip link is translated by the app. |
header | object | Yes | Task header props. | |
langBanner | boolean | No | false | Mount for the app's language banner. |
body | html | Yes | The task body (Task body template). | |
announcer | boolean | No | false | A polite live region for the app. |
footer | object | No | Task footer props. |
Contract details
The full contract: identity, anatomy, variants, states, tokens, layout, motion, accessibility, content, tests
Identity
| Aspect | Value |
|---|---|
| Id | task-page |
| Layer | Templates |
| Category | section |
| Owner | Site system lead |
| Status | stable |
| Version | 1.0.0 |
| Source | apps/showcase/site/system/templates/task-page.ts (private repository; the contract and the render function are this one module) |
| Version | Date | Change |
|---|---|---|
| 1.0.0 | 2026-10-26 | Task page as one module: its markup moved out of the page builder (scripts/site) into the system. |
Use when
- Pages where the reader does one task and the app's own script runs. Why: One shell for every task page: the same head, header, skip link and footer, composed from registered elements.
Do not use when
- Content pages. Why: They use the page shell with the site header and footer.
Anatomy
| Part | What it is |
|---|---|
| head | Meta, title, alternates, the brand stylesheet, the app's stylesheets and script |
| skip | a.skip-link |
| header | Task header |
| banner | p.lang-banner (filled by the app) |
| main | main#main with the task body |
| announcer | div#announcer (aria-live) |
| footer | Task footer |
Made of: task-header, task-footer, task-body.
Used in: page-apps.
Variants
| Variant | When | Why |
|---|---|---|
| default | Wherever the page declaration places it. | One shape per job keeps pages predictable. |
States
| State | Rendered or not applicable |
|---|---|
| default | default |
| hover | Not applicable: The task page is not interactive, so it has no hover state. |
| focus-visible | Not applicable: The task page does not take focus; links and buttons inside it carry their own focus ring. |
| active | Not applicable: The task page cannot be pressed. |
| disabled | Not applicable: The task page has nothing to disable. |
| loading | Not applicable: The task page is rendered at build time and is complete when the page loads. |
| empty | Not applicable: The task page is not rendered without content; the builder skips it. |
| error | Not applicable: The task page shows no data that can fail. |
| current | Not applicable: The task page has no current item. |
| visited | Not applicable: The task page is not a link. |
| expanded | Not applicable: The task page does not open or close. |
Tokens
| Part | Token |
|---|---|
| page.ground | --cotton |
Layout
| Aspect | Value |
|---|---|
| breakpoints | Required review at 390, 768, 1024 and 1440 px; execution is not implied by this declaration; columns stack under 768 px; the wrap keeps a 16 px gutter on phones. |
| wrapping | Text wraps; nothing scrolls sideways. |
| textExpansion | Japanese runs 20 to 40% longer; headings break between phrases (jaBreaks) and blocks grow downwards. |
Spacing and rhythm
| Aspect | Value |
|---|---|
| internal | The task body's own padding. |
| external | Whole document. |
| rhythm | Header, task, footer, all on cotton: no woven edge (D-SITE-003). |
Motion
| Aspect | Value |
|---|---|
| None | No intrinsic element animation. The optional claude-entrance consumer profile may translate below-fold structure once (20px, --dur-weave, --ease-enter, --stagger); reduced motion disables it. This preserved baseline entrance is separate from element playback. |
Runtime and reuse
Render-only element; mount any registered child enhancements separately. Preserve required Site CSS, fonts, responsive and locale rules from nativeElement.
Accessibility passport
| Aspect | Value |
|---|---|
| role | region (section) named by its heading |
| name | Its h2, by aria-labelledby |
| keyboard | Links and buttons inside, in reading order. |
| focus | The --focus ring on every link and button inside. |
| screenReader | Read in source order; decorative weaving is aria-hidden. |
| contrast | Ink on cotton 14:1; text on every dye field 4.5:1 or better (checked by check-brand). |
| target | Links and buttons are 44 px tall. |
Content
| Slot | Length | Voice |
|---|---|---|
| title | 6 words | The task · Loom |
Good: “Contact · Loom”
Bad: “Loom | Contact Us Page”
Japanese: Japanese is filled by each app's script from its i18n/ja.json; /ja/contact/ is filled at build time.
Icons and illustrations
None: this element uses no icon or illustration of its own.
Decisions and exceptions
- D-SITE-001: Loom Site is the site's own design system, governed by Loom
- D-SITE-003: The woven edge sits at every field/cotton join, and nowhere else
Usage
7 uses across the built pages (measured by npm run site:system).
Tests
| Aspect | Value |
|---|---|
| unit | tests/unit/site-system.test.ts: renders every do and don't example through the registry and checks the classes it owns |
| visual | Not yet: there are no screenshot baselines; the Library page is checked for sideways scroll at 1440 px by tests/site/system.spec.ts |
| a11y | tests/site/system.spec.ts: axe (0 serious or critical) on the element's Library page in light and dark |
| parity | scripts/site/system/check.ts: Library examples are rendered by the same render function the site imports |
Figma
not-yet: The Loom Site Figma library is the last stage of the plan; this element is not mapped yet.