Utilities

The few utility classes the system allows: visually-hidden (text for screen readers), sprite, and the once-only reveal used by selected below-fold section content. The generated Site shell initializes navigation, reveal and lazy discovery once per document; navigation loads a new document. It has no supported SPA teardown/remount API. Separately managed native runtime roots use the shared host for preparation, synchronous initialization, cleanup and fallback restoration.

Foundation · stable · v1.0.0 · owner: Site system lead · contract 19 of 20 points (open: figma)

Reference

Source reference; not an executed check.

visually-hidden
screen readers only
reveal
section-content entrance (motion-ok)

Do and don't

2 positive / 2 negative authored documentation examples (2 each required); 1 reference (1 required); 0 failed. References and failures do not count; this is not behavior acceptance.

Do: The source link keeps its hidden new-tab suffix

Authored by utilities.ts

Rendered consumer example; not an executed correctness check. caption Isolated document follows the browser's colour and contrast preferences. The outer theme toolbar does not control this document.

Open example: Utilities · Do: The source link keeps its hidden new-tab suffix Use the full-page example to follow page links.

The actual native caption carries trusted source-authored link markup using the existing utility. Its hidden suffix supplements visible destination words; it does not invent live-region semantics.

Do: A table has a native hidden caption

Authored by utilities.ts

Rendered consumer example; not an executed correctness check. figure-frame Isolated document follows the browser's colour and contrast preferences. The outer theme toolbar does not control this document.

Open example: Utilities · Do: A table has a native hidden caption Use the full-page example to follow page links.

The real figure contains an actual table caption kept in the accessibility tree. The visible explanation makes the illustrative source clear; manual assistive-technology verification remains separate.

Don't: The only control name is removed from the tree

Authored by utilities.ts

Rule illustration; not an executed check. accessibility / a11y.colour-alone

<button><span style="display:none">Review changes</span><span style="background:var(--teal)"></span></button>
The coloured mark is the only exposed cue.
display:none cannot substitute for the readable hidden-name utility; the reader receives no action name or written equivalent to the colour.

Don't: The only error is hidden and absent from the summary

Authored by utilities.ts

Rule illustration; not an executed check. form-field / field.error-fix

<p class="visually-hidden">The source could not be loaded. Choose another file.</p>
On failed submission there is no visible field error or top summary linking the reader to a fix.
An assistive-text utility cannot replace the actual form's findable error and recovery path. The illustrated missing summary violates the consuming field rule; no form submission is executed here.

Rules

RuleWhyCheck
No new utility without a decision record.Utilities grow into a second system if unchecked.Review: Owner

API

No props.

Contract details

The full contract: identity, anatomy, variants, states, tokens, layout, motion, accessibility, content, tests

Identity

AspectValue
Idutilities
LayerFoundations
Categoryfoundation
OwnerSite system lead
Statusstable
Version1.0.0
Sourceapps/showcase/site/system/foundations/utilities.ts (private repository; the contract and the render function are this one module)
VersionDateChange
1.0.02026-10-26Utilities as one module: its markup moved out of the page builder (scripts/site) into the system.

Use when

  • Hidden headings and labels for assistive technology. Why: Some names must be read but not seen.

Do not use when

  • To restyle an element. Why: Utilities are not a styling system; elements own their styles.

Anatomy

PartWhat it is
visually-hiddenReadable, not visible
spriteThe SVG sprite holder
revealOnce-only below-fold section-content entrance, motion-ok only

Made of: nothing (a base element).

Used in: pages directly.

Variants

VariantWhenWhy
light and darkEvery page, following the reader's setting.The same roles resolve to light or dark values, so no element chooses its own.

States

StateRendered or not applicable
defaultThe specimen.
hoverNot applicable: A foundation is not interactive.
focus-visibleNot applicable: Not focusable.
activeNot applicable: Not interactive.
disabledNot applicable: Nothing to disable.
loadingNot applicable: Values are built into the stylesheet.
emptyNot applicable: The build fails if a value is missing.
errorNot applicable: Unresolved values fail the brand gate, not the reader.
currentNot applicable: No current item.
visitedNot applicable: Not a link.
expandedNot applicable: Does not open.

Tokens

PartToken
reveal.duration--dur-weave
reveal.easing--ease-enter

Layout

AspectValue
breakpointsRequired 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.
wrappingText wraps; nothing scrolls sideways.
textExpansionJapanese runs 20 to 40% longer; headings break between phrases (jaBreaks) and blocks grow downwards.

Spacing and rhythm

AspectValue
internalNot applicable: a foundation has no box of its own.
externalNot applicable.
rhythmApplies to every element that reads it.

Motion

AspectValue
movesSelected below-fold section headings, text, figures and the other registered REVEAL targets rise 20 px into place.
triggerEntering view, only with .motion-ok.
duration--dur-weave, at most six --stagger intervals
easing--ease-enter
interruptibleIt completes; nothing waits on it.
reducedNo movement: the shell removes .motion-ok while reduced motion is active, including live preference changes. Content remains readable without JavaScript.
whyA small once-only entrance groups each section's content in reading order.

Runtime and reuse

  1. Render-only element; mount any registered child enhancements separately. Preserve required Site CSS, fonts, responsive and locale rules from nativeElement.

Accessibility passport

AspectValue
roleNot rendered on the site; its specimen in the Library is a list
nameThe foundation's name
keyboardNot interactive.
focusNot focusable.
screenReaderThe specimen is a plain list of names and values.
contrastEvery text and ground pair in the palette is checked (check-brand).
targetNot a target.

Content

SlotLengthVoice
visually-hidden names, table captions and status text (consumer-owned)The owning control, table or task contract's budgetSupply meaningful text that remains in the accessibility tree. Keep essential instructions and errors visible; the utility hides presentation and does not create live-region semantics or a status lifecycle.
revealed section wording (consumer-owned)The existing heading, body or figure budgetPreserve the complete text without JavaScript and with reduced motion. The reveal utility adds an entrance, never new copy or a loading state.

Good: “(opens in a new tab) (ContactForm's hidden suffix on its privacy link)” · “Health of a sample system by component family (rows) and product (columns) (visuals.ts hidden table caption)”

Bad: “display:none used for a control's only name” · “A form error available only in visually-hidden text”

Japanese: Translate hidden text as carefully as visible text through the owning source; ContactForm's new-tab suffix already uses its i18n catalogue. Keep reveal content present in the Japanese document with motion disabled. The utility supplies no translation or announcement API, and manual assistive-technology/native review remains open.

Icons and illustrations

None: this element uses no icon or illustration of its own.

Decisions and exceptions

  • None.

Usage

652 owned-class occurrences in built pages plus metadata-token references in built CSS (measured by npm run site:system).

No application mechanism is declared.

Current check result: not assessed by this report. Declarations and source-file presence do not establish executed enforcement or accepted coverage.

Tests

AspectValue
unittests/unit/site-system.test.ts: renders every do and don't example through the registry and checks the classes it owns
visualNot yet: there are no screenshot baselines; the Library page is checked for sideways scroll at 1440 px by tests/site/system.spec.ts
a11ytests/site/system.spec.ts: axe (0 serious or critical) on the element's Library page in light and dark
parityscripts/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.

Open in Storybook

Start with a conversation about your system.

We read your system, show you what we found, and agree with your team what to fix first.