@reqvire-org/ads 0.5.6 → 0.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -200,7 +200,10 @@ a recipe never creates a state machine.
200
200
  drawn on the box while the input has keyboard focus. The input's part,
201
201
  declared right before the box, takes `drawnBy: "<the box's part>"`: it takes
202
202
  no room and lies, invisible, over the box at the box's frame size, so pointer
203
- and keyboard still reach the real input. A part rendered once per list item
203
+ and keyboard still reach the real input. A field inside a box that looks like
204
+ the field (a composer's rounded box around its textarea) shows its focus on
205
+ the box: the box's root takes `focus: { within: ".the-field" }` and the field
206
+ part `focus: { shownBy: "container" }`; never a square ring inside the box. A part rendered once per list item
204
207
  (`tabs.map(…)`) is declared `repeat: true`: every instance takes the part's
205
208
  construction, and `extent: "fill"` shares the row among them. A visual part may sit
206
209
  inside such a part: the owner reads it by its name (`recipe.parts.<name>`,
@@ -282,9 +285,10 @@ fragment or a native frame-only element.
282
285
  - **Distribution and gaps.** `justify: "space-between"` (or `"space-around"`, `"space-evenly"`) puts a row's or
283
286
  stack's free space between its items: a logo at the start of a header and its actions at the end. On a wrapping
284
287
  `inline` row, `gap` spaces the items and `rowGap` the lines.
285
- - **Loose flow.** `carry: true` on a list and on its item: an item that ends in a paragraph, code block or figure is
286
- followed at the larger of the list's gap and that block's space after; after the last item the list's own space
287
- after applies.
288
+ - **Loose flow.** Write loose content in block flow (no `layout`) with `spaceBefore`/`spaceAfter` on its blocks: each
289
+ is the block's own margin and the browser collapses them, so an item that ends in a paragraph is followed at the
290
+ larger of the list's and the paragraph's space, also when the item's content is another component. `carry: true`
291
+ does the same within one stack-based list and item, but not through a nested component.
288
292
  - **Filling parts.** `extent: "fill"` in a stack starts at the part's content and grows into free space, so a
289
293
  scrolling body never collapses in a stack sized by its content.
290
294
  - **End alignment.** Blocks a stack holds end on one line (`source/end-misaligned`): a painted block by its outer
@@ -200,7 +200,10 @@ a recipe never creates a state machine.
200
200
  drawn on the box while the input has keyboard focus. The input's part,
201
201
  declared right before the box, takes `drawnBy: "<the box's part>"`: it takes
202
202
  no room and lies, invisible, over the box at the box's frame size, so pointer
203
- and keyboard still reach the real input. A part rendered once per list item
203
+ and keyboard still reach the real input. A field inside a box that looks like
204
+ the field (a composer's rounded box around its textarea) shows its focus on
205
+ the box: the box's root takes `focus: { within: ".the-field" }` and the field
206
+ part `focus: { shownBy: "container" }`; never a square ring inside the box. A part rendered once per list item
204
207
  (`tabs.map(…)`) is declared `repeat: true`: every instance takes the part's
205
208
  construction, and `extent: "fill"` shares the row among them. A visual part may sit
206
209
  inside such a part: the owner reads it by its name (`recipe.parts.<name>`,
@@ -282,9 +285,10 @@ fragment or a native frame-only element.
282
285
  - **Distribution and gaps.** `justify: "space-between"` (or `"space-around"`, `"space-evenly"`) puts a row's or
283
286
  stack's free space between its items: a logo at the start of a header and its actions at the end. On a wrapping
284
287
  `inline` row, `gap` spaces the items and `rowGap` the lines.
285
- - **Loose flow.** `carry: true` on a list and on its item: an item that ends in a paragraph, code block or figure is
286
- followed at the larger of the list's gap and that block's space after; after the last item the list's own space
287
- after applies.
288
+ - **Loose flow.** Write loose content in block flow (no `layout`) with `spaceBefore`/`spaceAfter` on its blocks: each
289
+ is the block's own margin and the browser collapses them, so an item that ends in a paragraph is followed at the
290
+ larger of the list's and the paragraph's space, also when the item's content is another component. `carry: true`
291
+ does the same within one stack-based list and item, but not through a nested component.
288
292
  - **Filling parts.** `extent: "fill"` in a stack starts at the part's content and grows into free space, so a
289
293
  scrolling body never collapses in a stack sized by its content.
290
294
  - **End alignment.** Blocks a stack holds end on one line (`source/end-misaligned`): a painted block by its outer
@@ -200,7 +200,10 @@ a recipe never creates a state machine.
200
200
  drawn on the box while the input has keyboard focus. The input's part,
201
201
  declared right before the box, takes `drawnBy: "<the box's part>"`: it takes
202
202
  no room and lies, invisible, over the box at the box's frame size, so pointer
203
- and keyboard still reach the real input. A part rendered once per list item
203
+ and keyboard still reach the real input. A field inside a box that looks like
204
+ the field (a composer's rounded box around its textarea) shows its focus on
205
+ the box: the box's root takes `focus: { within: ".the-field" }` and the field
206
+ part `focus: { shownBy: "container" }`; never a square ring inside the box. A part rendered once per list item
204
207
  (`tabs.map(…)`) is declared `repeat: true`: every instance takes the part's
205
208
  construction, and `extent: "fill"` shares the row among them. A visual part may sit
206
209
  inside such a part: the owner reads it by its name (`recipe.parts.<name>`,
@@ -282,9 +285,10 @@ fragment or a native frame-only element.
282
285
  - **Distribution and gaps.** `justify: "space-between"` (or `"space-around"`, `"space-evenly"`) puts a row's or
283
286
  stack's free space between its items: a logo at the start of a header and its actions at the end. On a wrapping
284
287
  `inline` row, `gap` spaces the items and `rowGap` the lines.
285
- - **Loose flow.** `carry: true` on a list and on its item: an item that ends in a paragraph, code block or figure is
286
- followed at the larger of the list's gap and that block's space after; after the last item the list's own space
287
- after applies.
288
+ - **Loose flow.** Write loose content in block flow (no `layout`) with `spaceBefore`/`spaceAfter` on its blocks: each
289
+ is the block's own margin and the browser collapses them, so an item that ends in a paragraph is followed at the
290
+ larger of the list's and the paragraph's space, also when the item's content is another component. `carry: true`
291
+ does the same within one stack-based list and item, but not through a nested component.
288
292
  - **Filling parts.** `extent: "fill"` in a stack starts at the part's content and grows into free space, so a
289
293
  scrolling body never collapses in a stack sized by its content.
290
294
  - **End alignment.** Blocks a stack holds end on one line (`source/end-misaligned`): a painted block by its outer
@@ -44,8 +44,9 @@ function quantityReading(grammar, read) {
44
44
  return VALID;
45
45
  }
46
46
  case "exact": {
47
- const zeroLength = read.type === "number" && read.value === 0 && grammar.types.includes("length");
48
- if (!grammar.types.includes(read.type) && !zeroLength)
47
+ if (read.type === "number" && read.value === 0 && grammar.types.includes("length") && !grammar.types.includes("number"))
48
+ return { kind: "invalid", reason: "a unitless 0 is invalid inside calc(), where ADS composes lengths: write 0px" };
49
+ if (!grammar.types.includes(read.type))
49
50
  return { kind: "invalid", reason: `it is a ${read.type}, not a ${typeList(grammar.types)}` };
50
51
  if (grammar.integer && !Number.isInteger(read.value))
51
52
  return { kind: "invalid", reason: `${read.value} is not an integer` };
package/docs/CHANGELOG.md CHANGED
@@ -1,53 +1,91 @@
1
1
  # Changelog
2
2
 
3
- ## 0.5.6
3
+ ## 0.5.8
4
4
 
5
5
  <!-- ads-local-tests:start -->
6
6
  Hot patch: the unit and integration groups; the browser group was not run.
7
- Local verification: **1831/1831 passed** with `bun run test:hotpatch`.
8
- Tested commit: `bc9dc911af53f90f5e0eac726006ee5bcd4dca53`; Bun 1.4.4.
9
- Completed 2026-11-23T21:54:11.296Z (1231 seconds).
7
+ Local verification: **1839/1839 passed** with `bun run test:hotpatch`.
8
+ Tested commit: `32f9efc5144ed8588ae938804d32103c5ad3bc1b`; Bun 1.4.4.
9
+ Completed 2026-11-24T08:44:09.098Z (1249 seconds).
10
10
 
11
11
  <!-- ads-local-test-proof
12
12
  {
13
13
  "schema": 3,
14
- "version": "0.5.6",
15
- "commit": "bc9dc911af53f90f5e0eac726006ee5bcd4dca53",
16
- "sourceSha256": "44b66d09cf6958427d01a55600efb0f6815ddd0beecf27c3beaec601988a85d3",
14
+ "version": "0.5.8",
15
+ "commit": "32f9efc5144ed8588ae938804d32103c5ad3bc1b",
16
+ "sourceSha256": "4502593953123bbbc49e556059e9523171f2bbcced9f4d3079abbac5d5556ee5",
17
17
  "command": "bun run test:hotpatch",
18
18
  "scope": "hotpatch",
19
19
  "result": "pass",
20
- "tests": 1831,
21
- "pass": 1831,
20
+ "tests": 1839,
21
+ "pass": 1839,
22
22
  "fail": 0,
23
23
  "skipped": 0,
24
24
  "groups": [
25
25
  {
26
26
  "name": "unit",
27
- "tests": 841,
28
- "pass": 841,
27
+ "tests": 842,
28
+ "pass": 842,
29
29
  "fail": 0,
30
30
  "skipped": 0,
31
- "reportSha256": "f2a350271d37187ee2b6e22ad0103ceddbdba87f585d947a3907fe8a2bd02c77"
31
+ "reportSha256": "1067d5b51b6957b8cdf915514f476aebdd713260b61bc94d69c69472d164a52c"
32
32
  },
33
33
  {
34
34
  "name": "integration",
35
- "tests": 990,
36
- "pass": 990,
35
+ "tests": 997,
36
+ "pass": 997,
37
37
  "fail": 0,
38
38
  "skipped": 0,
39
- "reportSha256": "b6396e700a9d9b6ab6bf11bdeb64ef94b0e91ef5210906d798c12ca0c747696b"
39
+ "reportSha256": "b204499c4ee42a68c362b2dbd68d28ea86f126b885e8cbd7b10539ba136b35ac"
40
40
  }
41
41
  ],
42
42
  "testOverrides": {},
43
43
  "bun": "1.4.4",
44
- "completedAt": "2026-11-23T21:54:11.296Z",
45
- "durationMs": 1230915,
46
- "logSha256": "3abdd1b475f8fc10d9a443c70b10c67f6599a819ade39435aa4d7e29e5894840"
44
+ "completedAt": "2026-11-24T08:44:09.098Z",
45
+ "durationMs": 1248601,
46
+ "logSha256": "3538c9a4327461dbd56c5d672af04f75aef547a3fa710bb9166f84706bfb1389"
47
47
  }
48
48
  -->
49
49
  <!-- ads-local-tests:end -->
50
50
 
51
+ - **Block flow spaces with collapsing margins.** In a parent without an arrangement, a part's `spaceBefore` and
52
+ `spaceAfter` are its own margins, which the browser collapses: the larger applies where two meet, and a last block's
53
+ space passes out through a list item and a component's root to the next item, as in v2. Loose list items whose
54
+ content is another component keep their 20–24 px (reported as #35); write loose content in block flow. A
55
+ container with padding or a border keeps the space inside it.
56
+ - **Showcase:** a scenario container as tall as its content no longer clips: a selected card's ring or a focus outline
57
+ outside the subject stays whole.
58
+ - **Opening a dialog no longer shifts a page without a scrollbar.** 0.5.6 reserved the scrollbar's room only while
59
+ a modal card was open, which moved a page that had no scrollbar 15 px. A card now reserves nothing; the
60
+ foundation's new `scrollbarGutter: "stable"` keeps the page's scrollbar room at all times, so neither a modal's
61
+ scroll lock nor a page growing a scrollbar shifts anything.
62
+
63
+ ## 0.5.7
64
+
65
+ - **A value beside its action no longer breaks words.** In a wrapping row an `extent: "fill"` part keeps its longest
66
+ word: it shrinks beside the other items down to that, and below it the row wraps (the action drops under the text
67
+ on a phone or with enlarged text, and stays beside it on a desktop). Truncating text and parts with their own frame
68
+ keep the zero minimum.
69
+ - **Focus around a field.** A box shows its field's keyboard focus: `focus: { within: ".field" }` on its root draws the
70
+ focus profile's outline around the whole box while that field has keyboard focus, and the field, `focus: { shownBy:
71
+ "container" }`, draws none of its own (a composer's rounded box instead of a square ring inside it). A field that
72
+ gives up its outline with no box showing it fails (`source/focus-unshown`).
73
+ - **A native button that is its own recipe's root keeps its look.** Its parent no longer resets it (the parent's
74
+ `.parent > .part` reset outranked the button's own fill, ring and colour); its own construction resets it.
75
+ - **End alignment:** a row whose content stops short of its end (a window's bar of dots and a title) is not
76
+ compared: its content ends ragged, as text does.
77
+ - **A length token written as a bare `0` fails.** Inside `calc()`, where ADS composes spacing and sizes, a unitless 0
78
+ made the whole value invalid without notice; a length role states its unit (`0px`).
79
+ - **Settings that do nothing are reviewed:** `textAlign` or block wrapping on a text part rendered as an inline
80
+ element with no box of its own (`review/text-layout-inline`), and a composite's text profile on a root with no text
81
+ parts (`review/text-profile-unreached`).
82
+ - **A measured popover fades out where it was.** Its measured position is the element's own, not only its open
83
+ state's: a closing tooltip no longer jumps to the viewport's corner while it fades.
84
+ - **Showcase:** scenario containers at a fixed width or height keep their 1 px rule (they showed a thick black
85
+ border in projects' previews); measured specimen sections keep their item spacing.
86
+
87
+ ## 0.5.6
88
+
51
89
  - **Gap gutters work.** A spatial profile with a gap gutter (`gutters: { cards: { gap } }`) failed as "Undefined or
52
90
  cyclic spatial token 0": the grid facts read its absent cell insets as a token.
53
91
  - **A block-start modal card** keeps the layer profile's `edgeGap` from the top and its `viewportMargin` at the
package/docs/GUIDE.md CHANGED
@@ -1014,6 +1014,11 @@ declared order. The first theme and brand are the defaults: the `:root` values
1014
1014
  of the token sheets. The render audit, capture, the showcase and `ads_status`
1015
1015
  read the same declaration. Two optional fields are `true` or omitted:
1016
1016
 
1017
+ - `scrollbarGutter: "stable"` (a value, not `true`): the page keeps its
1018
+ scrollbar's room at all times (`scrollbar-gutter: stable` on the document),
1019
+ so opening a modal, whose scroll lock hides the scrollbar, shifts nothing,
1020
+ and neither does a page that grows a scrollbar. Without it the browser
1021
+ decides.
1017
1022
  - `followSystemTheme: true`: a root without `data-theme` follows the OS colour
1018
1023
  scheme. It takes the first light-scheme theme for a light preference and the
1019
1024
  first dark-scheme theme for a dark one, so the design system needs one of
package/docs/LANGUAGE.md CHANGED
@@ -241,10 +241,12 @@ them all.
241
241
  | `at: { <condition>: { frame: { rules?, corners? } } }` | region root with a `frame` | under the named condition of the root's spatial profile (`@media (width < bound)`), only the border and corner writes that differ: a divider that is the block-end edge when wide and the inline-start edge when narrow | a condition the spatial profile does not name (`construction/condition-unknown`); `rules` under the condition without `rules` on the frame; more than one condition |
242
242
  | `accessibility: { boundary: "visible-label" \| "boundary-on-interaction", reason }` | control part (`frame: "control"`, a text-like input, textarea or select) | nothing: its border contrast error becomes the review item `boundary-identified-otherwise`; acceptance enforces human approval | another kind, a reason outside 20–300 characters (`accessibility-declaration-invalid`); another part (`accessibility-declaration-unsupported`); an approver, date or other field (`field-unsupported`) |
243
243
  | `focus: { of: "<sibling part>" }` | region part | the nearest focus profile's outline on this part while the named part of the same parent has keyboard focus (`<parent>:has(> <control>:focus-visible) > <part>`): the drawn box of a checkbox, radio or switch whose native `<input>` is visually hidden. The owner keeps the native control focusable and in the same parent | `of` names the part itself or no part of the same parent (`spec/value-invalid`) |
244
+ | `focus: { within: ".field" }` | root | the nearest focus profile's outline on the root while the named field inside it has keyboard focus (`&:has(.field:focus-visible)`): a composer's box around its textarea. Only that field's focus: a button inside the box shows its own | anything but one class selector (`spec/value-invalid`) |
245
+ | `focus: { shownBy: "container" }` | region part (a text field) | no focus outline of its own: the root around it names it with `focus: { within }` and draws the indicator around the whole field | no root of the same component shows it (`source/focus-unshown`: its keyboard focus would be invisible) |
244
246
  | `drawnBy: "<sibling part>"` | region part holding a native control | the native control (a checkbox's `<input>`) is drawn by the named part: `position: absolute`, the drawing part's frame `inlineSize` and `blockSize`, no margin, `opacity: 0`, laid over that part, so it takes no room in the row and pointer and keyboard still reach the real control. Its states still reach the drawing part (`:has(> .input:checked)`) | the named part is not declared right after it, does not show its focus (`focus: { of }`) (`spec/value-invalid`), or its frame states no `inlineSize` or `blockSize` (`profile-field-missing`) |
245
247
  | `repeat: true` | region part (not a vector) | nothing of its own: the part's element renders once per item of a list (`tabs.map(…)`), any number of times (at least once when `required`), each instance taking the part's construction (`extent: "fill"` shares the row among them); a repeated `frame: "control"` part neighbours its own next instance, so their hit areas and spacing are checked across the gap | with `drawnBy` or `focus`, or named by another part's (`spec/value-invalid`); without it, a mapped part (`part-missing-or-repeated`) |
246
248
  | `kind: "component"` | region part | a public component placed with the part's marker (`<Heading className="ds-content-heading" …/>`), as a grid cell is: its interior is its owner's, so the part states placement only (`required`, `repeat`, `extent`, `at`, `spaceBefore`, `spaceAfter`) | any other field (`spec/field-unsupported`); a forwarded `className` that carries a recipe (`source/foreign-interior`) |
247
- | `spaceBefore` / `spaceAfter: { slot: "spacing", field }` | part of a `stack`, or of a parent without an arrangement (block flow: a list item that keeps its marker) | the part's own space before it and after it, in place of the gap (`margin-block-start: calc(space - gap)` on the part, or on what follows it); where one part's space after meets the next part's space before, the larger applies; the first part starts flush | another parent layout (`space-parent-unsupported`) |
249
+ | `spaceBefore` / `spaceAfter: { slot: "spacing", field }` | part of a `stack`, or of a parent without an arrangement (block flow: a list item that keeps its marker) | the part's own space before it and after it. In a stack, in place of the gap (`margin-block-start: calc(space - gap)` on the part, or on what follows it), the larger where two meet, the first part flush. In block flow, the part's own `margin-block-start` and `margin-block-end`, which the browser collapses: the larger where two meet, and a last block's space passes out through containers without padding or border (a list item, a component's root) to what follows them, so loose list items whose content is another component keep their space | another parent layout (`space-parent-unsupported`) |
248
250
  | `spacing: "<spacing profile>"` | part of a `stack` or block flow | the part's space before and after it from that profile's `spaceBefore` and `spaceAfter` fields, where a flow needs more distances than one spacing profile holds (a heading 44 px above and 14 px below, 24 px after a quote); the same "larger of the two" rule | a profile that states neither field (`profile-field-missing`) |
249
251
  | (a `stack` of blocks) | root, part recipe | the blocks a stack holds end on one line: a painted block by its outer edge, an unpainted one where its content ends (frame end padding, a grid's gutter end); one off by more than 1px and at most 64px fails (`source/end-misaligned`); text is not compared | n/a |
250
252
  | `carry: true` | `stack` root | loose flow (a list whose items hold paragraphs, code, figures): the stack gives its gap to its children (`--ads-flow-gap`), and its last part's own space after carries out of it between items (`margin-block-end: max(0px, space - gap)`), so on a list and its item the next item starts at the larger of the list's gap and the item's last block's space after; after the last item the list's own space after applies | a root that is not a stack (`space-parent-unsupported`) |
@@ -715,9 +717,9 @@ recipe({
715
717
  viewport edge; a block-start card keeps its `edge-gap` from the top and the
716
718
  bottom (the margin when it declares none) and the margin at the sides
717
719
  (`max-inline-size`, `max-block-size: calc(100dvh - 2 × gap)`), with its
718
- frame's size within it. While a card is open the page keeps its scrollbar's
719
- room (`scrollbar-gutter: stable`), so it does not shift under the scroll lock;
720
- an edge sheet does not, as it reaches the viewport's edge. `motion: "fade"`
720
+ frame's size within it. The scroll lock hides the page's scrollbar; a page
721
+ that should not shift then keeps the scrollbar's room at all times with the
722
+ foundation's `scrollbarGutter: "stable"`. `motion: "fade"`
721
723
  fades the card and its backdrop in. A close control in its corner is a layer of a layered part.
722
724
  A zoom view that grows an image from its place sets a measured `translate`
723
725
  and a measured `scale` (`{ type: "scale", property: "scale" }`, unitless
package/docs/RULES.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <!-- Generated by scripts/sync-rule-reference.mjs from src/ads-errors.mts and src/finding-rules.mts. Do not edit: run `bun run sync:rule-reference`. -->
4
4
 
5
- Every rule ADS reports, under its rule group: 447 rules in 18 groups. A finding names its rule as a code,
5
+ Every rule ADS reports, under its rule group: 450 rules in 18 groups. A finding names its rule as a code,
6
6
  `<domain>/<kind>`; the `check/<rule>` codes are the rules `ads check`, `ads validate`, the render audit and acceptance
7
7
  report by their plain name (`check/a11y-reflow` is the finding `a11y-reflow`).
8
8
 
@@ -20,10 +20,10 @@ Fix findings in group order: earlier groups are often the cause of later ones. T
20
20
  | 3 | [boundary](#boundary) | 30 | violated | Code reaches across an ownership or production/development boundary. | Move the code to its owner or pass the value through public props. Do not add an exception or widen the boundary. |
21
21
  | 4 | [design-bypass](#design-bypass) | 20 | violated | Styling or design values are supplied outside the design language. | Take the value from a profile, token or recipe instead of writing it in place. |
22
22
  | 5 | [structure-mismatch](#structure-mismatch) | 47 | violated | Rendered markup does not match what its declaration promises. | Make the markup match the declaration: each declared part, cell and binding exactly once, in the declared order. Change the declaration only if it is wrong. |
23
- | 6 | [accessibility-semantics](#accessibility-semantics) | 43 | violated | Owned markup or motion lacks required accessible semantics: a text alternative, an accessible name, keyboard access or reduced motion. | Add the missing semantics in the owning component (alt, aria-label, a native control, a reduced-motion value); do not suppress the check. |
23
+ | 6 | [accessibility-semantics](#accessibility-semantics) | 44 | violated | Owned markup or motion lacks required accessible semantics: a text alternative, an accessible name, keyboard access or reduced motion. | Add the missing semantics in the owning component (alt, aria-label, a native control, a reduced-motion value); do not suppress the check. |
24
24
  | 7 | [project-files](#project-files) | 6 | violated | A required project file or declaration is missing, empty, undocumented or unused. | Add or complete the file the rule names (README, license, theme or brand values), or remove what nothing uses. |
25
25
  | 8 | [wrong-value](#wrong-value) | 74 | violated | A value has the wrong kind, role or range for where it is used. | Choose one of the allowed values the error lists. |
26
- | 9 | [conflict](#conflict) | 45 | violated | Two definitions claim the same thing, or a definition depends on itself. | Keep exactly one source of truth and remove or derive the other. |
26
+ | 9 | [conflict](#conflict) | 47 | violated | Two definitions claim the same thing, or a definition depends on itself. | Keep exactly one source of truth and remove or derive the other. |
27
27
  | 10 | [unanalyzable](#unanalyzable) | 45 | unprovable | ADS cannot prove the rule holds; the design itself may be fine. | Rewrite into a form ADS can follow (literal unions, const records, typed props, JSX) without changing rendered behavior. |
28
28
  | 11 | [unsupported](#unsupported) | 17 | unprovable | The construct is valid design that ADS does not support yet. | Use a supported alternative. If none fits, report the gap rather than working around the checks. |
29
29
  | 12 | [rendered-check](#rendered-check) | 13 | violated | The rendered result breaks an accessibility, layout, contrast or performance requirement. | Inspect the failing scenario in its audit result or capture, then fix the owning style or markup; do not change the scenario to hide it. |
@@ -263,6 +263,7 @@ Owned markup or motion lacks required accessible semantics: a text alternative,
263
263
  | `source/clamp-on-control` | error | A clamp (`lines`) cuts text off for sighted readers: never on a control or a form label (a button, label, legend, summary, select, option or text field) or on text inside one, whose text says what the control does. | Let the control's text wrap (remove `lines` and `wrap: "truncate"`), shorten the text, or clamp a description outside the control. | `ads://guides/recipes`, `ads://guides/accessibility` |
264
264
  | `source/control-name-missing` | error | A control without a text part in some reachable choice is named on its root by a non-empty `aria-label`, `aria-labelledby` or `title` in that choice (WCAG 2.2 4.1.2). Application text counts as a name, as it counts as content in a text part. | Set `aria-label` (or `aria-labelledby`) on the control's root to its name in every choice that renders only artwork, for example from the label prop the visible text would show. | `ads://guides/recipes`, `ads://guides/accessibility` |
265
265
  | `source/document-lang-missing` | error | The document pattern (`element: "document"`) renders `<html>` with its language (`lang`, WCAG 3.1.1), from a required prop. | Give the pattern a required `language` prop and render `<html lang={language}>`. | `ads://guides/recipes`, `ads://guides/accessibility` |
266
+ | `source/focus-unshown` | error | Focus stays visible (WCAG 2.2 2.4.7). A field that shows no outline of its own (`focus: { shownBy: "container" }`) is shown by a container in the same component whose root names it: `focus: { within: ".field" }` draws the focus profile's outline around the whole field while it has keyboard focus. | Give the box around the field `focus: { within: "<the field's class>" }`, or remove `shownBy` so the field draws its own outline. | `ads://guides/recipes`, `ads://guides/accessibility` |
266
267
  | `source/form-state-colour-only` | error | A field's error state (`[data-user-invalid]`, `[data-invalid]`, `[aria-invalid="true"]`) and its autofill state (`[data-autofill]`) are not shown by colour alone (WCAG 1.4.1): some element's treatment under the state adds a cue that is not a hue: an edge or ring (`boxShadow`), a pattern (`backgroundImage`) or a border that appears (`borderStyle: "solid"`). | Give the state's surface a ring or edge (`boxShadow` with an inset ring token, such as `--shadow-invalid`) on the control, or another non-hue cue; colour changes may stay beside it. | `ads://guides/forms`, `ads://guides/recipes`, `ads://guides/accessibility` |
267
268
  | `source/image-alt-missing` | error | Every `<img>` an owner renders states its text alternative (WCAG 2.2 1.1.1): content media and any other image, as artwork images do; decorative images state it as empty. | Set `alt` to the text alternative (for content media, a prop the caller fills), or `alt=""` when the image is decorative. | `ads://guides/accessibility` |
268
269
  | `source/layer-name-missing` | error | A dialog, and a popover with `role="dialog"`, has an accessible name from `aria-label` or `aria-labelledby`. | Label the layer root with `aria-labelledby` (its visible title's id) or `aria-label`. | `ads://guides/recipes`, `ads://guides/accessibility` |
@@ -408,6 +409,8 @@ Two definitions claim the same thing, or a definition depends on itself. Keep ex
408
409
  | `review/counter-unreset` | review | A CSS counter a construction shows (`content: { counter \| counters }`) or counts (`counter: { increment }`) is reset by some recipe of the design system (`counter: { reset }`), or is the browser's own `list-item`. Without a reset the browser starts an implicit counter at each element that counts, so every item shows 1. Listed for review, since a page may reset it outside the design system. | Reset it on the element that contains the counted ones (`counter: { reset: "<name>" }` on the list or the flow), or count with `list-item`. | `ads://guides/recipes` |
409
410
  | `review/hover-geometry-shift` | review | Geometry an element in flow takes under `:hover` (another frame or spacing profile, a part that opens) moves what follows it whenever the pointer passes over it. ADS accepts it as the designer's choice and lists it for review; a layer of a layered parent draws over its neighbours instead and is not listed. | Keep it when the movement is wanted (a pile that spreads and pushes what follows). Otherwise draw the change over its neighbours: a layer of a layered parent, an outset backdrop, or a translate or scale effect, which move nothing else. | `ads://guides/recipes`, `ads://guides/layout` |
410
411
  | `review/optional-cell-row` | review | A grid cell that may be absent (`required: false`) and is pinned to a row (`row`) leaves that row empty whenever it is absent: the row's track and the gaps around it stay. ADS accepts it as the designer's choice and lists it for review. | Keep it when the empty row is wanted. Otherwise place the cell in auto rows (omit `row`), so the cells after it move up when it is absent. | `ads://guides/recipes` |
412
+ | `review/text-layout-inline` | review | Text alignment and block wrapping (`textAlign`, `wrap: "truncate" \| "balance" \| "pretty"`) apply to a block of text: on a part rendered as an inline element (a <span>, <a>, <code>) that has no arrangement or box of its own, they change nothing. | Render the part as a block element (a <p> or <div>), give it an arrangement or a box, or set the alignment on the block that holds it. | `ads://guides/recipes` |
413
+ | `review/text-profile-unreached` | review | A composite's text profile styles its text parts (and a root that binds its own `text`): on a root with neither, it reaches no element. | Declare the text as a `kind: "text"` part, bind `text` on the root, or remove the text profile from the composite. | `ads://guides/recipes` |
411
414
  | `source/document-duplicate` | error | A design system has at most one document pattern (`element: "document"`): it is the page's `<html>`. | Keep one document pattern and give the other owner a root of its own. | `ads://guides/recipes` |
412
415
  | `source/end-misaligned` | error | Blocks stacked in one column end their content on one line: a block's content ends where its frame's inline end padding (and, for a grid, its gutter's end inset) puts it, and a block that ends a few pixels to a gutter away from its siblings is not on their grid or gutter (a header whose actions end past the sections below). Text ends ragged and is not compared; a block further than 64px off is taken as deliberately narrower. | Put the block on the same tracks and gutter as its siblings, or give its frame the inline end padding that ends its content on their line. | `ads://guides/recipes`, `ads://guides/layout` |
413
416
  | `source/glyph-grid-mixed` | error | Every asset a reference binding can receive shares one grid (viewBox, optical center and minimum drawn height), so one construction draws them all. | Draw the glyphs on one viewBox with one optical center, or accept them through separate props or owners. | `ads://guides/pictograms` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reqvire-org/ads",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "type": "module",
5
5
  "description": "A design system your agent can see and shape. Your components. Your look. Your code.",
6
6
  "repository": {