An open source design system that's fully customizable and agent ready
TypeScript
docs(Layout): LayoutHeader and LayoutFooter verification maps name the regular edge and xstyle tests (#10751)
Cindy Zhang669270b3f2ff
diff --git a/docs/specs/components/Layout/LayoutFooter.spec.md b/docs/specs/components/Layout/LayoutFooter.spec.mdindex 768797a93f..64c72c6ffc 100644--- a/docs/specs/components/Layout/LayoutFooter.spec.md+++ b/docs/specs/components/Layout/LayoutFooter.spec.md@@ -17,6 +17,8 @@ verified_by:packages/core/src/Layout/__tests__/contentWidth.test.tsx,packages/core/src/Layout/__tests__/Layout.a11y.test.tsx,packages/core/src/Layout/__tests__/Layout.a11y.chromium.spec.ts,+ packages/core/src/Layout/__tests__/LayoutHeaderFooterEdges.a11y.browser.spec.ts,+ packages/core/src/Layout/__tests__/headerFooterXstyle.test.tsx,scripts/check-knowledge.mjs,]modules: []@@ -157,14 +159,14 @@ of its own, so no anatomy-theming block is declared here.## Verification map-| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |-| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |-| FR1 | `LayoutSlots.test.tsx` class and `applies a numeric height as pixels on the root` tests; `contentWidth.test.tsx` LayoutFooter inner-wrapper and divider tests | Default; numeric height; content width | A lost `layout-footer` class, a missing pixel height, children placed on the root instead of the inner wrapper, or a divider off the outer element fails. Gap: the non-shrinking root, the content-width maximum, and centering have no check. | `audit:LayoutFooter/layout` |-| FR2, ORD2 | Source review | Automatic, explicit, and zero padding | Gap: no test covers the automatic inset, the `padding` replacement, full bleed, or the published values. | `audit:LayoutFooter/layout` |-| FR3, ORD1 | `LayoutSlots.test.tsx` and `Layout.test.tsx` divider tests, including `an explicit hasDivider={false} on a footer overrides the context default` and `stops the footer default at a layer boundary` | Default; `hasDivider`; Layout default; explicit `false`; Layout default across a layer boundary | A missing or unexpected `data-divider`, an ignored Layout default, an explicit `false` that loses, or a Layout default that crosses a layer boundary fails. Gap: the line's paint and the collapsed spacing above a footer without a divider have no check. The collapse stopping at a nested Layout has audit receipts only (`LayoutFooterAudit.a11y.chromium.spec.ts` `nested` case), not an always-run check. | `audit:LayoutFooter/layout` |-| FR4, AR1 | `LayoutSlots.test.tsx` landmark and `exposes no role or name without a caller role` tests; `Layout.a11y.test.tsx` and `Layout.a11y.chromium.spec.ts` `footer-contentinfo` state | Caller `contentinfo` role and label; no caller role | A lost role or name fails, including at the accessibility tree. A footer without a caller `role` that exposes a role or name fails. | `audit:LayoutFooter/accessibility` |-| FR5 | `LayoutSlots.test.tsx` ref, `passes className, style, DOM, data, and event props to the root`, and `keeps data-divider when a caller passes its own value` tests | Ref; caller class, style, DOM, data, and event props; caller `data-divider` | A ref on another element, a dropped caller prop, or a caller `data-divider` that replaces or removes the reflected value fails. Gap: no test covers the `xstyle` merge order. The spacing above a footer with a caller `data-divider` has audit receipts only (`LayoutFooterAudit.a11y.chromium.spec.ts` `caller-attribute` case), not an always-run check. | `audit:LayoutFooter/api` |-| PR1 | Source review | Every state | Gap: no automated check fails if LayoutFooter adds a listener, timer, or measurement. | `audit:LayoutFooter/behavior` |+| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |+| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |+| FR1 | `LayoutSlots.test.tsx` class and `applies a numeric height as pixels on the root` tests; `contentWidth.test.tsx` LayoutFooter inner-wrapper and divider tests; `headerFooterXstyle.test.tsx` `keeps the own styles that xstyle does not set` (non-shrinking root) | Default; numeric height; content width | A lost `layout-footer` class, a missing pixel height, children placed on the root instead of the inner wrapper, or a divider off the outer element fails. A footer root that shrinks fails. Gap: the content-width maximum and centering have no check. | `audit:LayoutFooter/layout` |+| FR2, ORD2 | `LayoutHeaderFooterEdges.a11y.browser.spec.ts` per-case insets and published values | Automatic, explicit, and zero padding | An inset that differs from the expected step on any edge (automatic, `padding`, full bleed, or a nested Layout), or a published value that differs from the applied padding, fails. Gap: the automatic inset taken from a surrounding Card, Section, Dialog, Drawer or BottomSheet has no named check; the edge spec renders each case in a plain frame. | `audit:LayoutFooter/layout` |+| FR3, ORD1 | `LayoutSlots.test.tsx` and `Layout.test.tsx` divider tests, including `an explicit hasDivider={false} on a footer overrides the context default` and `stops the footer default at a layer boundary`; `LayoutHeaderFooterEdges.a11y.browser.spec.ts` line paint and the collapse of the content above the footer, including where it stops at a nested Layout | Default; `hasDivider`; Layout default; explicit `false`; Layout default across a layer boundary | A missing or unexpected `data-divider`, an ignored Layout default, an explicit `false` that loses, or a Layout default that crosses a layer boundary fails. A line that is not 1px solid `--color-border`, a line without `data-divider="true"`, or content above the footer that does not collapse without a divider, or collapses past a nested Layout, fails. | `audit:LayoutFooter/layout` |+| FR4, AR1 | `LayoutSlots.test.tsx` landmark and `exposes no role or name without a caller role` tests; `Layout.a11y.test.tsx` and `Layout.a11y.chromium.spec.ts` `footer-contentinfo` state | Caller `contentinfo` role and label; no caller role | A lost role or name fails, including at the accessibility tree. A footer without a caller `role` that exposes a role or name fails. | `audit:LayoutFooter/accessibility` |+| FR5 | `LayoutSlots.test.tsx` ref, `passes className, style, DOM, data, and event props to the root`, and `keeps data-divider when a caller passes its own value` tests; `headerFooterXstyle.test.tsx` `xstyle` merge-order tests; `LayoutHeaderFooterEdges.a11y.browser.spec.ts` `caller-attribute` case | Ref; caller class, style, DOM, data, and event props; caller `data-divider` | A ref on another element, a dropped caller prop, or a caller `data-divider` that replaces or removes the reflected value fails. An `xstyle` that loses to the footer's own styles, or a caller `data-divider` that changes the spacing above the footer, fails. | `audit:LayoutFooter/api` |+| PR1 | Source review | Every state | Gap: no automated check fails if LayoutFooter adds a listener, timer, or measurement. | `audit:LayoutFooter/behavior` |## Decision logdiff --git a/docs/specs/components/Layout/LayoutHeader.spec.md b/docs/specs/components/Layout/LayoutHeader.spec.mdindex bad9b582b0..5716d7a860 100644--- a/docs/specs/components/Layout/LayoutHeader.spec.md+++ b/docs/specs/components/Layout/LayoutHeader.spec.md@@ -17,6 +17,8 @@ verified_by:packages/core/src/Layout/__tests__/contentWidth.test.tsx,packages/core/src/Layout/__tests__/Layout.a11y.test.tsx,packages/core/src/Layout/__tests__/Layout.a11y.chromium.spec.ts,+ packages/core/src/Layout/__tests__/LayoutHeaderFooterEdges.a11y.browser.spec.ts,+ packages/core/src/Layout/__tests__/headerFooterXstyle.test.tsx,scripts/check-knowledge.mjs,]modules: []@@ -160,14 +162,14 @@ of its own, so no anatomy-theming block is declared here.## Verification map-| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |-| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |-| FR1 | `LayoutSlots.test.tsx` class, height, and inner-wrapper tests; `contentWidth.test.tsx` LayoutHeader inner-wrapper and divider tests | Default; numeric height | A lost `layout-header` class, a missing pixel height, children placed directly on the root, or a divider off the outer element fails. Gap: the non-shrinking root, the content-width maximum, and centering have no check. | `audit:LayoutHeader/layout` |-| FR2, ORD2 | `Layout.test.tsx` `paddingBlockEnd` tests | `paddingBlockEnd` alone and with `padding` | A `paddingBlockEnd` that adds no class, changes more than the block-end edge, or leaves the shared per-edge family fails. Gap: the automatic inset, the `padding` replacement, full bleed, and the published values have no check. | `audit:LayoutHeader/layout` |-| FR3, ORD1 | `LayoutSlots.test.tsx` and `Layout.test.tsx` divider tests, including `stops the default at a layer boundary` | Default; `hasDivider`; Layout default; explicit `false` | A missing or unexpected `data-divider`, an ignored Layout default, or an explicit `false` that loses fails. Gap: the line's paint and the collapsed spacing below a header without a divider have no check. The collapse stopping at a nested Layout has audit receipts only (`LayoutContentAudit.a11y.chromium.spec.ts` `content-insets`), not an always-run check. | `audit:LayoutHeader/layout` |-| FR4, AR1 | `LayoutSlots.test.tsx` landmark and `exposes no role or name without a caller role` tests; `Layout.a11y.test.tsx` and `Layout.a11y.chromium.spec.ts` `header-banner` state | Caller `banner` role and label; no caller role | A lost role or name fails, including at the accessibility tree. A header without a caller `role` that exposes a role or name fails. | `audit:LayoutHeader/accessibility` |-| FR5 | `LayoutSlots.test.tsx` ref, className, `passes style, DOM, data, and event props to the root`, and `keeps data-divider when a caller passes its own value` tests | Ref; caller class, style, DOM, data, and event props; caller `data-divider` | A ref on another element, a dropped class or caller prop, or a caller `data-divider` that replaces or removes the reflected value fails. Gap: no test covers the `xstyle` merge order. The spacing below a header with a caller `data-divider` has audit receipts only (`LayoutHeaderAudit.a11y.chromium.spec.ts` `caller-attribute` case), not an always-run check. | `audit:LayoutHeader/api` |-| PR1 | Source review | Every state | Gap: no automated check fails if LayoutHeader adds a listener, timer, or measurement. | `audit:LayoutHeader/behavior` |+| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |+| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |+| FR1 | `LayoutSlots.test.tsx` class, height, and inner-wrapper tests; `contentWidth.test.tsx` LayoutHeader inner-wrapper and divider tests; `headerFooterXstyle.test.tsx` `keeps the own styles that xstyle does not set` (non-shrinking root) | Default; numeric height | A lost `layout-header` class, a missing pixel height, children placed directly on the root, or a divider off the outer element fails. A header root that shrinks fails. Gap: the content-width maximum and centering have no check. | `audit:LayoutHeader/layout` |+| FR2, ORD2 | `Layout.test.tsx` `paddingBlockEnd` tests; `LayoutHeaderFooterEdges.a11y.browser.spec.ts` per-case insets and published values | `paddingBlockEnd` alone and with `padding` | A `paddingBlockEnd` that adds no class, changes more than the block-end edge, or leaves the shared per-edge family fails. An inset that differs from the expected step on any edge (automatic, `padding`, full bleed, or a nested Layout), or a published value that differs from the applied padding, fails. Gap: the automatic inset taken from a surrounding Card, Section, Dialog, Drawer or BottomSheet has no named check; the edge spec renders each case in a plain frame. | `audit:LayoutHeader/layout` |+| FR3, ORD1 | `LayoutSlots.test.tsx` and `Layout.test.tsx` divider tests, including `stops the default at a layer boundary`; `LayoutHeaderFooterEdges.a11y.browser.spec.ts` line paint and the collapse of the content below the header, including where it stops at a nested Layout | Default; `hasDivider`; Layout default; explicit `false` | A missing or unexpected `data-divider`, an ignored Layout default, or an explicit `false` that loses fails. A line that is not 1px solid `--color-border`, a line without `data-divider="true"`, or content below the header that does not collapse without a divider, or collapses past a nested Layout, fails. | `audit:LayoutHeader/layout` |+| FR4, AR1 | `LayoutSlots.test.tsx` landmark and `exposes no role or name without a caller role` tests; `Layout.a11y.test.tsx` and `Layout.a11y.chromium.spec.ts` `header-banner` state | Caller `banner` role and label; no caller role | A lost role or name fails, including at the accessibility tree. A header without a caller `role` that exposes a role or name fails. | `audit:LayoutHeader/accessibility` |+| FR5 | `LayoutSlots.test.tsx` ref, className, `passes style, DOM, data, and event props to the root`, and `keeps data-divider when a caller passes its own value` tests; `headerFooterXstyle.test.tsx` `xstyle` merge-order tests; `LayoutHeaderFooterEdges.a11y.browser.spec.ts` `caller-attribute` case | Ref; caller class, style, DOM, data, and event props; caller `data-divider` | A ref on another element, a dropped class or caller prop, or a caller `data-divider` that replaces or removes the reflected value fails. An `xstyle` that loses to the header's own styles, or a caller `data-divider` that changes the spacing below the header, fails. | `audit:LayoutHeader/api` |+| PR1 | Source review | Every state | Gap: no automated check fails if LayoutHeader adds a listener, timer, or measurement. | `audit:LayoutHeader/behavior` |## Decision log