Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

spec(theme): surface-specific status color roles (#8116)

Cindy Zhang4d9de87a1c7b
diff --git a/docs/architecture/theme-compilation.md b/docs/architecture/theme-compilation.md
index a661c889a7..88798ebf18 100644
--- a/docs/architecture/theme-compilation.md
+++ b/docs/architecture/theme-compilation.md
@@ -22,8 +22,12 @@ applies_to:
verified_by:
[
packages/core/src/theme/generateThemeRules.test.ts,
+ packages/core/src/theme/defineTheme.test.ts,
packages/core/src/theme/themeAdaptations.test.ts,
+ packages/core/src/theme/onMediaTokens.test.ts,
+ packages/core/src/theme/Theme.test.tsx,
packages/core/src/theme/derivedVarRegistry.test.ts,
+ packages/cli/clients/cli/commands/build-theme.adaptations.test.mjs,
packages/cli/api/theme/build/build.test.mjs,
packages/cli/api/theme/build/build.public-component-vars.test.mjs,
packages/cli/api/theme/build/build.adaptation-core-compat.test.mjs,
@@ -48,7 +52,16 @@ deciding_specs:
{
"scope": "global",
"triggers": {
- "theming": ["INV2", "INV3", "INV4", "INV6", "INV9", "INV10", "INV15"]
+ "theming": [
+ "INV2",
+ "INV3",
+ "INV4",
+ "INV6",
+ "INV9",
+ "INV10",
+ "INV15",
+ "INV16"
+ ]
}
}
```
@@ -176,6 +189,61 @@ Platform-specific details stay inside that compiler.
variant that entry can receive under `spec:AST-087` FR4; it never enumerates a
variant the entry cannot receive, such as a name only a child theme lists for
an entry it inherits.
+- **INV16 — Generated compatibility roles preserve declaration locality and the
+ CSS cascade.** When the web compiler derives a status role from another public
+ token, the alias is emitted inside the theme scope where its semantic source is
+ effective, including reachable adaptation and media combinations. A media
+ surface's unpaired `--color-accent` collapse is presentation context, not an
+ authored Info pair, so it does not rebind `--color-info-emphasized`; authoring both
+ `--color-accent` and `--color-on-accent` makes that media pair eligible. A nested
+ theme derives from its nearest provider rather than retaining its parent's alias.
+ Authored destination roles, source order, `!important`, `inherit`, concrete
+ values, and cycles retain their normal CSS meaning. Runtime and static output
+ use the same derivation.
+- **INV17 — Theme generation establishes every status role.** For each
+ `architecture:theme-tokens` INV11 status role a theme does not set, the web
+ compiler derives one in the theme's generated CSS, at runtime and in the
+ theme build, so a theme that sets only its base status colours still
+ compiles to a complete status set. The normalized `DefinedTheme` keeps only
+ the tokens the theme sets; non-CSS resolution (`architecture:theme-tokens`
+ INV6) applies the same derivation. A role the theme inherits through
+ `extends` counts as set; a role its parent only derived is derived again from
+ the child's own sources:
+ - `--color-icon-<status>` and `--color-border-<status>` alias
+ `--color-text-<status>`, so a theme's text value, set or derived, reaches
+ them unless the theme sets them too.
+ - `--color-text-<status>` is the status hue at the lightness that reaches
+ 4.5:1 against the theme's default page and card surfaces in each colour
+ mode.
+ - `--color-on-info` takes the theme's `--color-on-accent`. The released
+ `--color-on-success`, `--color-on-warning`, and `--color-on-error` keep
+ their values and are never derived.
+ - `--color-<status>-emphasized` is the status hue, adjusted only as far as
+ needed for the theme's `--color-on-<status>` to reach 4.5:1 on it.
+ - `--color-info-muted` is the Info hue at Core's pale-fill strength, 20%
+ opacity in light mode and 25% in dark mode. The released
+ `--color-success-muted`, `--color-warning-muted`, and `--color-error-muted`
+ keep their values and are never derived.
+ - `--color-on-<status>-muted` is the status hue at the lightness that reaches
+ 4.5:1 on the theme's pale status fill over the default surface.
+
+ The status hue is the theme's base status colour for success, warning, and
+ error. For Info it is the theme's accent when the accent is chromatic, and the
+ theme's blue hue (`--color-icon-blue`) otherwise. When that source is not
+ chromatic, the status hue is Core's own hue for that status, so every derived
+ fill and text colour is chromatic. When a colour these computations measure
+ (the status source, the default page or card surface, the pale fill, or
+ `--color-on-<status>`) is not a concrete colour, such as an unresolved
+ reference, it cannot be measured, so for that status each role aliases its
+ INV16 source instead: the strong fill aliases the base
+ status colour (the accent for Info), `--color-info-muted` aliases
+ `--color-accent-muted`, and the text and pale-fill content roles alias the
+ theme's matching hue text token (`--color-text-blue`, `-green`, `-yellow`,
+ or `-red`). Those aliases carry the theme's own values: they are not derived
+ values, so INV11's floors bind them only in Core and first-party themes,
+ which use concrete sources. A value the theme sets always wins over a derived
+ one. A derived value is emitted in the scope where its status hue is set
+ (INV16), and runtime and static output derive the same values.
This record does not own:
@@ -276,22 +344,28 @@ tiers.
## Verification
-| Invariant | Evidence | Failure signal |
-| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
-| INV1, INV2, INV3 | Compiler imports and runtime/build comparison fixtures | Runtime and build use different theme-to-CSS logic or produce different web rules |
-| INV4 | `generateThemeRules.test.ts` and source/distribution cascade tests | Scope or layer order differs by output path |
-| INV5 | Existing per-property fixtures (partial; gap below) | A guaranteed property compiles but does not produce its promised observable effect |
-| INV6, INV7 | Existing registry and CLI public-variable tests (partial) | Private variables become authorable, or a reviewed public semantic variable fails build/runtime |
-| INV8 | Component target metadata and compatibility review | Successful generic emission is treated as a guaranteed public behavior |
-| INV9, INV10 | Platform compiler tests when another compiler ships | CSS details enter shared authoring, or shared theme intent silently disappears |
-| INV11 | `defineTheme.test.ts` and `build.test.mjs` local-token fixtures | Runtime/static output rewrites a local name, disagrees, or leaves partial output after failure |
-| INV12 | `themeAdaptations.test.ts` and CLI adaptation build fixtures | Rule blocks merge/reorder/drop, surfaces lose precedence, or runtime/static CSS diverges |
-| INV13, INV14 | Declaration scanner, generator, Theme mounting, CLI receipt tests, and the existing theme-family Chromium guard | One unsafe declaration corrupts neighbors, valid CSS changes, legacy token generation crashes, or reporting changes CSS |
-| Built themes | Theme and CLI build tests | Runtime recompiles a built theme, or built output omits canonical rules |
-| INV15 | CLI build fixtures with function entries, slot functions, a variant list, and an inherited entry under a replaced list, compared with runtime resolution | Built and runtime icons differ, a function is dropped silently, or tooling enumerates a variant an entry cannot receive |
+| Invariant | Evidence | Failure signal |
+| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| INV1, INV2, INV3 | Compiler imports and runtime/build comparison fixtures | Runtime and build use different theme-to-CSS logic or produce different web rules |
+| INV4 | `generateThemeRules.test.ts` and source/distribution cascade tests | Scope or layer order differs by output path |
+| INV5 | Existing per-property fixtures (partial; gap below) | A guaranteed property compiles but does not produce its promised observable effect |
+| INV6, INV7 | Existing registry and CLI public-variable tests (partial) | Private variables become authorable, or a reviewed public semantic variable fails build/runtime |
+| INV8 | Component target metadata and compatibility review | Successful generic emission is treated as a guaranteed public behavior |
+| INV9, INV10 | Platform compiler tests when another compiler ships | CSS details enter shared authoring, or shared theme intent silently disappears |
+| INV11 | `defineTheme.test.ts` and `build.test.mjs` local-token fixtures | Runtime/static output rewrites a local name, disagrees, or leaves partial output after failure |
+| INV12 | `themeAdaptations.test.ts` and CLI adaptation build fixtures | Rule blocks merge/reorder/drop, surfaces lose precedence, or runtime/static CSS diverges |
+| INV13, INV14 | Declaration scanner, generator, Theme mounting, CLI receipt tests, and the existing theme-family Chromium guard | One unsafe declaration corrupts neighbors, valid CSS changes, legacy token generation crashes, or reporting changes CSS |
+| Built themes | Theme and CLI build tests | Runtime recompiles a built theme, or built output omits canonical rules |
+| INV15 | CLI build fixtures with function entries, slot functions, a variant list, and an inherited entry under a replaced list, compared with runtime resolution | Built and runtime icons differ, a function is dropped silently, or tooling enumerates a variant an entry cannot receive |
+| INV16 | Root, adaptation, media, nested-theme, and CLI-built status-alias fixtures | A generated role escapes its source scope, overrides an authored role, changes cascade meaning, treats an unpaired media accent collapse as Info, cycles, or differs by output path |
+| INV17 | A minimal custom theme that sets only `--color-success`, `--color-warning`, `--color-error`, and an accent, compiled at runtime and through the CLI build, plus one theme that overrides `--color-text-<status>`, one with a grey accent, one with a grey base status colour, one whose base status colour is an unresolved reference, one whose card surface is an unresolved reference, and one that `extends` a theme setting a status role, each also read through non-CSS resolution | A status role is missing, misses an INV11 floor in light or dark mode, is grey, ignores a value the theme set, or differs between runtime, build, and non-CSS resolution; or an overridden text colour does not reach an unset icon or border role, an inherited role is derived again, or a non-concrete measured colour yields a computed value instead of the aliases |
## Known conformance and verification gaps
+Generated status roles (INV16) and derived status defaults (INV17) are
+accepted but not yet shipped. Their verification rows describe implementation
+acceptance, not existing enforcement.
+
Declaration-boundary enforcement and the warnings-array collector in INV13–INV14
are accepted but not yet shipped. Their verification obligations above describe
implementation acceptance, not existing enforcement.
diff --git a/docs/architecture/theme-tokens.md b/docs/architecture/theme-tokens.md
index 2bda6fcb94..71f61425e2 100644
--- a/docs/architecture/theme-tokens.md
+++ b/docs/architecture/theme-tokens.md
@@ -36,7 +36,7 @@ deciding_specs: [spec:AST-006/DEC-1, spec:AST-006/DEC-5]
{
"scope": "global",
"triggers": {
- "tokens": ["INV1", "INV3", "INV4", "INV6", "INV8", "INV9", "INV10"]
+ "tokens": ["INV1", "INV3", "INV4", "INV6", "INV8", "INV9", "INV10", "INV11"]
}
}
```
@@ -146,6 +146,44 @@ then have contradictory winners.
projection: a key may alias a token under a shorter name, and it never adds a
CSS variable.
+- **INV11 — Semantic status roles are surface-specific.** Each status (`info`,
+ `success`, `warning`, `error`) has these roles on three surfaces, named under INV10:
+ - `--color-text-<status>` is status text on the default page and card
+ surfaces, at 4.5:1 or more against them. `--color-icon-<status>` and
+ `--color-border-<status>` are status icons and status borders on those
+ surfaces. Each defaults to `--color-text-<status>`; an Astryx theme that
+ sets its own keeps it at 3:1 or more against the same surfaces.
+ - `--color-<status>-emphasized` is the strong status fill. Content on it uses
+ `--color-on-<status>`, at 4.5:1 or more.
+ - `--color-<status>-muted` is the pale status fill. Content on it uses
+ `--color-on-<status>-muted`, at 4.5:1 or more where the fill sits on the
+ default surface.
+
+ Every status fill and status text colour is chromatic: no Core default,
+ first-party theme, or value derived under `architecture:theme-compilation`
+ INV17 paints one in a neutral grey, near-black, or near-white. The contrast
+ floors and the chromatic rule bind Core's defaults, Astryx's first-party
+ themes, and derived values in light and dark mode; a value a third-party
+ theme sets is that theme's own. Core's dark strong Info and Error fills are
+ therefore deeper than its accent and base error colours, which fall below
+ 4.5:1 under white content. Components select the role from the surface
+ instead of using one colour for every job. When a theme does not set a role,
+ theme generation derives it (`architecture:theme-compilation` INV17). The
+ generated token
+ documentation describes each status role in one line: the surface it serves
+ and the token it pairs with.
+
+ In forced-colors mode the browser's system colours replace every status role:
+ status text, icons, and content on a fill render in `CanvasText`, and fills
+ render in `Canvas`. Status therefore never depends on colour there. Each
+ status keeps its non-colour cue (a label, an icon, or text), and a strong or
+ pale status fill keeps a visible `CanvasText` border so its shape survives.
+
+ The released `--color-success`, `--color-warning`, and `--color-error` keep
+ their values and meaning in every theme, and so do the Tailwind utilities
+ that resolve to them (`bg-success`, `text-success`, `border-success`, and the
+ warning and error forms); Astryx components use the surface roles instead.
+
This record does not own:
- the `defineTheme` input shape, generated scales, or precedence;
@@ -237,15 +275,30 @@ Rejected: keeping spacing in `px` while type is `rem` (text grows into fixed
boxes); converting author-written `px` in custom themes (a theme's own
decision).
+### DEC-2 — Info status roles reuse retired names
+
+**Decider:** `cixzhang`, `2026-10-24`
+
+The Info roles of INV11 use the grammar's names, including
+`--color-info-muted`, which shipped with a purple meaning until v0.0.8. The
+v0.0.8 upgrade transform still rewrites that name to `--color-background-purple`.
+It runs only when a project upgrades from a version before v0.0.8, whose code
+used the retired meaning, so the reuse does not change a released contract for
+any supported project. Bare `--color-info` stays unused.
+
+Rejected: an off-grammar name such as `--color-information-muted`, which INV10
+cannot name.
+
## Verification
-| Invariant | Evidence | Failure signal |
-| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
-| INV1, INV2, INV7 | `scripts/check-theme-template.test.mjs` and token-doc generation check | A token family exists without a matching author-facing inventory or generated documentation |
-| INV5 | Domain-token exports and theme-generation tests | Domain names disappear from validation or require importing unused domain implementation |
-| INV6 | `packages/core/src/theme/tokens.test.ts` | JavaScript resolution disagrees with defaults, mode selection, references, or supported color expressions |
-| INV8 | `defineTheme.test.ts`, template checks, and token-doc generation | A local name enters portable helpers/docs or can conflict with a portable declaration |
-| INV9 | `tokens.test.ts` (core defaults), `SpacingRootFontSize.a11y.chromium.spec.ts` (real-Chromium root font size), each overriding theme's `*Theme.spacing.test.ts`, `check-cli-theme-bundle.test.mjs` (bundled copies byte-equal to the packages), `theme-concentricity.test.ts` (playground ramp read in rem) | A spacing step in `px` that no theme documents as its exception: a core default, a theme override, a bundled copy, or a generated ramp step |
-| INV10 | `tokens.test.ts` name check over Astryx's own `colorDefaults` and `domainTokenDefaults` only | A colour token Astryx defines fits none of the five shapes |
-| Released token compatibility | Type checking plus representative package/source builds | A released CSS variable or typed token name disappears without an explicit migration decision |
-| Visual defaults | Real Chromium examples in light, dark, status, and high-contrast contexts | A changed default produces unreadable or semantically inconsistent output |
+| Invariant | Evidence | Failure signal |
+| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| INV1, INV2, INV7 | `scripts/check-theme-template.test.mjs` and token-doc generation check | A token family exists without a matching author-facing inventory or generated documentation |
+| INV5 | Domain-token exports and theme-generation tests | Domain names disappear from validation or require importing unused domain implementation |
+| INV6 | `packages/core/src/theme/tokens.test.ts` | JavaScript resolution disagrees with defaults, mode selection, references, or supported color expressions |
+| INV8 | `defineTheme.test.ts`, template checks, and token-doc generation | A local name enters portable helpers/docs or can conflict with a portable declaration |
+| INV9 | `tokens.test.ts` (core defaults), `SpacingRootFontSize.a11y.chromium.spec.ts` (real-Chromium root font size), each overriding theme's `*Theme.spacing.test.ts`, `check-cli-theme-bundle.test.mjs` (bundled copies byte-equal to the packages), `theme-concentricity.test.ts` (playground ramp read in rem) | A spacing step in `px` that no theme documents as its exception: a core default, a theme override, a bundled copy, or a generated ramp step |
+| INV10 | `tokens.test.ts` name check over Astryx's own `colorDefaults` and `domainTokenDefaults` only | A colour token Astryx defines fits none of the five shapes |
+| INV11 | Implementation acceptance, not yet shipped: `scripts/check-muted-status-contrast.test.mjs` (resolves global and Banner pale-surface role pairs), `scripts/check-badge-contrast.test.mjs` (resolves Core Badge defaults plus theme overrides), `scripts/check-status-text-contrast.test.mjs` (resolves `--color-text-<status>`, `--color-icon-<status>`, and `--color-border-<status>` against the surface and card tokens and checks that each status fill and text colour is chromatic in every first-party theme), `neutralTheme.test.ts` (pins reviewed role values and pairings), `tailwind-theme.test.ts` (pins the status utilities, including the released base ones), forced-colors assertions in the Badge, StatusDot, and Banner tests, and theme alias-generation tests | A status role is missing, mispaired, grey, routed to the wrong public utility, or falls below its contrast threshold in light or dark mode, a status fill loses its border in forced-colors mode, or a released base status token or utility changes value |
+| Released token compatibility | Type checking plus representative package/source builds | A released CSS variable or typed token name disappears without an explicit migration decision |
+| Visual defaults | Real Chromium examples in light, dark, status, and high-contrast contexts | A changed default produces unreadable or semantically inconsistent output |
diff --git a/packages/core/src/Banner/Banner.spec.md b/packages/core/src/Banner/Banner.spec.md
index f007291bb8..8b7a398ab3 100644
--- a/packages/core/src/Banner/Banner.spec.md
+++ b/packages/core/src/Banner/Banner.spec.md
@@ -40,7 +40,7 @@ separately targetable surface. The status and content targets remain unchanged.
## Compatibility and migration
- Released default preserved: `no` — Banner no longer derives a live-region role from visual status
-- Compatibility class: breaking accessibility-semantic correction; visual output, DOM structure, props, theming targets, and interaction behavior are unchanged
+- Compatibility class: breaking accessibility-semantic correction for the live-region change (DEP-0007), whose visual output, DOM structure, props, theming targets, and interaction behavior are unchanged. FR9's accepted target is a visual change: the Info status surface fills with `--color-info-muted` and built-in content takes the on-muted roles; props, DOM structure, and theming targets stay the same
- Controlled/uncontrolled behavior: unchanged
- Migration decision: announce async outcomes in their transition handler with `useAnnounce`; add an explicit `role="status"` only for a persistent semantic mirror, and reserve `role="alert"` for genuinely urgent interruption. Inside a mounted live container, `spec:AST-086` FR4 applies instead.
@@ -84,10 +84,15 @@ Consumer migration instructions belong in consumer docs and release notes.
- The optional content surface below it.
- The Banner frame that groups both surfaces and carries the current whole-banner
elevation and elevated-card silhouette.
+- The semantic foreground context for Banner-authored title, description, icon,
+ collapse, and dismiss content on the status surface, as FR9's accepted target.
+ Built-in controls receive that context on their Button element only, so their
+ tooltip remains an ordinary Button surface.
**Does not own / non-goals**
-- Painting for action and dismiss controls — delegated to `component:Button`.
+- Button geometry, interaction layers, tooltip painting, or consumer-supplied
+ `endContent` — delegated to `component:Button`.
- A new theme property, prop, variant, or DOM element.
## Public concepts
@@ -102,19 +107,20 @@ prop vocabulary or extensibility rule changes.
## Behavioral and layout contract
-The requirements below describe the current implementation and its additive
-frame target contract.
-
-| ID | Invariant | Basis | Contract state |
-| --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ------------------------ |
-| FR1 | The current render places `banner` on the colored status surface, which is Banner's primary painted surface and reflects `container` and `status`. | Current source, public docs, and tests | Current behavior |
-| FR2 | The Banner frame receives the public ref, role, supported DOM props, `xstyle`, `className`, and `style`; it also paints the selected `boxShadow`. | Current source and tests | Current behavior |
-| FR3 | An elevated `card` frame also paints the whole-banner radius. A `section` frame remains square. A non-elevated frame does not receive the frame-radius style. | Current source and elevation tests | Current behavior |
-| FR4 | Card shape is split across surface owners: the status surface owns all corners without visible content or the top corners with visible content; the content surface owns the bottom corners. | Current source | Current behavior |
-| FR5 | Theme-authored `borderRadius` on `banner` currently writes the private `--_banner-radius` variable on the Status surface only. CSS inheritance does not carry that value upward to the frame or sideways to the Content surface, so both keep their fallback radius. | Current compiler output and CSS inheritance | Current reachability gap |
-| FR6 | The Banner frame exposes `banner-frame` and reflects `container` and `elevation`. The existing `banner` target remains on the Status surface rather than moving to the outermost DOM element. | Owner decision; current source and tests | Current behavior |
-| FR7 | `banner-frame` is additive. The existing `banner`, `banner-icon`, `banner-description`, and `banner-content` targets and their current axes remain unchanged. | Current target inventory; compatibility policy | Current behavior |
-| FR8 | `status` controls visual meaning only and MUST NOT derive `role`, `aria-live`, or an announcement. Standard DOM props MAY provide an explicit persistent role, except on a Banner added inside a mounted live container (`spec:AST-086` FR4). Async outcomes MUST announce from the transition handler through `useAnnounce`, except inside a mounted live container, where `spec:AST-086` FR4 applies; `role="alert"` is reserved for genuinely urgent interruptive content. | Accessibility Checklist §Announcements; owner decision | Current behavior |
+The requirements below describe the current implementation, its additive
+frame target contract, and FR9's accepted status-colour target.
+
+| ID | Invariant | Basis | Contract state |
+| --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | ------------------------ |
+| FR1 | The current render places `banner` on the colored status surface, which is Banner's primary painted surface and reflects `container` and `status`. | Current source, public docs, and tests | Current behavior |
+| FR2 | The Banner frame receives the public ref, role, supported DOM props, `xstyle`, `className`, and `style`; it also paints the selected `boxShadow`. | Current source and tests | Current behavior |
+| FR3 | An elevated `card` frame also paints the whole-banner radius. A `section` frame remains square. A non-elevated frame does not receive the frame-radius style. | Current source and elevation tests | Current behavior |
+| FR4 | Card shape is split across surface owners: the status surface owns all corners without visible content or the top corners with visible content; the content surface owns the bottom corners. | Current source | Current behavior |
+| FR5 | Theme-authored `borderRadius` on `banner` currently writes the private `--_banner-radius` variable on the Status surface only. CSS inheritance does not carry that value upward to the frame or sideways to the Content surface, so both keep their fallback radius. | Current compiler output and CSS inheritance | Current reachability gap |
+| FR6 | The Banner frame exposes `banner-frame` and reflects `container` and `elevation`. The existing `banner` target remains on the Status surface rather than moving to the outermost DOM element. | Owner decision; current source and tests | Current behavior |
+| FR7 | `banner-frame` is additive. The existing `banner`, `banner-icon`, `banner-description`, and `banner-content` targets and their current axes remain unchanged. | Current target inventory; compatibility policy | Current behavior |
+| FR8 | `status` controls visual meaning only and MUST NOT derive `role`, `aria-live`, or an announcement. Standard DOM props MAY provide an explicit persistent role, except on a Banner added inside a mounted live container (`spec:AST-086` FR4). Async outcomes MUST announce from the transition handler through `useAnnounce`, except inside a mounted live container, where `spec:AST-086` FR4 applies; `role="alert"` is reserved for genuinely urgent interruptive content. | Accessibility Checklist §Announcements; owner decision | Current behavior |
+| FR9 | The status surface fills with the matching `--color-<status>-muted` role (`--color-info-muted` for Info) and paints its built-in title, description, icon, collapse, and dismiss content with the matching `--color-on-<status>-muted` role. Banner supplies that semantic foreground context to each built-in Button element without changing Button-owned geometry or interaction layers; a sibling tooltip keeps Button's ordinary theme color. Consumer-provided `endContent` remains untouched. | Status-role architecture; Banner and Button source/tests | Accepted target |
### Allowed variation
@@ -169,12 +175,12 @@ unchanged.
## Design relationships
-| Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |
-| ----------------------- | -------------------------------------------------------------------------------------------------- | ------------------------------ | -------------- | ------------------ |
-| Banner frame | Groups the status and optional content surfaces and carries their shared silhouette and elevation. | Current source and public docs | Supporting | FR2, FR3, FR4 |
-| Status surface | Acts as Banner's primary painted surface, carrying the status fill, message, and controls. | Current source and public docs | Prominent | FR1 |
-| Content surface | Carries optional supporting detail below the status surface. | Current source and public docs | Supporting | FR4, FR7 |
-| Action/dismiss controls | Keep their own Button painting and target ownership. | Current composition | Supporting | FR7 |
+| Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |
+| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | -------------- | ------------------ |
+| Banner frame | Groups the status and optional content surfaces and carries their shared silhouette and elevation. | Current source and public docs | Supporting | FR2, FR3, FR4 |
+| Status surface | Acts as Banner's primary painted surface, carrying the status fill, message, and controls. | Current source and public docs | Prominent | FR1 |
+| Content surface | Carries optional supporting detail below the status surface. | Current source and public docs | Supporting | FR4, FR7 |
+| Action/dismiss controls | FR9's accepted target: built-in control content receives the Status surface's on-muted foreground on the Button element; interaction layers and tooltips remain Button-owned. Consumer-supplied `endContent` is unchanged. | Banner status context plus `component:Button` | Supporting | FR7, FR9 |
The Banner frame is stable anatomy and owns the additive `banner-frame` target.
The Status surface remains Banner's primary painted surface and keeps the
@@ -203,7 +209,11 @@ unqualified `banner` target.
This map records runtime reachability. `banner` belongs to the primary Status
surface rather than the outermost DOM element, while `banner-frame` belongs to
-the visible frame that owns whole-banner elevation and silhouette.
+the visible frame that owns whole-banner elevation and silhouette. Delegation to
+Button preserves each built-in control's anatomy and interaction ownership.
+Under FR9's accepted target, Banner supplies only the status-surface foreground
+context on the Button element, and it does not restyle a consumer-provided
+`endContent` child.
## Family and system relationships
@@ -216,14 +226,15 @@ the visible frame that owns whole-banner elevation and silhouette.
## Verification map
-| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
-| ------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
-| FR1, FR7 | `Banner.test.tsx` and `themingTargets.test.ts` | Status surface, content surface, current target axes | Moving, removing, or changing an existing target breaks current assertions. | `audit:Banner/theming` |
-| FR2, FR3, FR4 | `Banner.test.tsx` plus current source inspection | Flat/elevated card and elevated section | Frame, status surface, content surface, shadow, or radius ownership changes from the recorded state. | `audit:Banner/surfaces` |
-| FR5 | Compiler output plus browser/computed-style evidence | Card with and without content; elevated card | `banner.borderRadius` unexpectedly reaches the frame/content, or docs claim that the current route already does. | `audit:Banner/radius` |
-| FR6, FR7 | Implementation PR target, compiler, probe, and component tests | Card/section across none, low, med, and high elevation | `banner-frame` is absent, uses another name, misses an axis, or moves the existing `banner` target. | `audit:Banner/theming` |
-| FR8 | `Banner.test.tsx`, consumer docs, Accessibility Checklist A6 | Default info/success/warning/error; explicit status and alert roles | A visual status creates a live region, an explicit role is dropped, or docs tell builders to announce by conditionally mounting Banner. | `audit:Banner/a11y` |
-| Theming anatomy map | `scripts/check-knowledge.mjs` | Eight anatomy entries and five current targets | Missing, extra, prefixed, stale, or unclaimed current mappings fail validation. | `audit:Banner/theming` |
+| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
+| ------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------- |
+| FR1, FR7 | `Banner.test.tsx` and `themingTargets.test.ts` | Status surface, content surface, current target axes | Moving, removing, or changing an existing target breaks current assertions. | `audit:Banner/theming` |
+| FR2, FR3, FR4 | `Banner.test.tsx` plus current source inspection | Flat/elevated card and elevated section | Frame, status surface, content surface, shadow, or radius ownership changes from the recorded state. | `audit:Banner/surfaces` |
+| FR5 | Compiler output plus browser/computed-style evidence | Card with and without content; elevated card | `banner.borderRadius` unexpectedly reaches the frame/content, or docs claim that the current route already does. | `audit:Banner/radius` |
+| FR6, FR7 | Implementation PR target, compiler, probe, and component tests | Card/section across none, low, med, and high elevation | `banner-frame` is absent, uses another name, misses an axis, or moves the existing `banner` target. | `audit:Banner/theming` |
+| FR8 | `Banner.test.tsx`, consumer docs, Accessibility Checklist A6 | Default info/success/warning/error; explicit status and alert roles | A visual status creates a live region, an explicit role is dropped, or docs tell builders to announce by conditionally mounting Banner. | `audit:Banner/a11y` |
+| FR9 | `Banner.test.tsx` plus Button tooltip and custom-end-content assertions | Four statuses; built-in collapse/dismiss; tooltip; consumer action | Built-in content loses the matching on-muted role, a tooltip is repainted, Button interaction ownership changes, or consumer content is mutated. | `audit:Banner/theming` |
+| Theming anatomy map | `scripts/check-knowledge.mjs` | Eight anatomy entries and five current targets | Missing, extra, prefixed, stale, or unclaimed current mappings fail validation. | `audit:Banner/theming` |
## Decision log