@reqvire-org/ads 0.3.46 → 0.3.48
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.
- package/README.md +21 -11
- package/dist/a11y.mjs +4 -2
- package/dist/assets.mjs +20 -15
- package/dist/atomic-composition.mjs +3 -2
- package/dist/brand-assets.mjs +48 -11
- package/dist/brands.mjs +82 -0
- package/dist/browser-audit/worker.mjs +51 -0
- package/dist/browser-audit.mjs +147 -0
- package/dist/capture/worker.mjs +1 -0
- package/dist/capture-store.mjs +2 -0
- package/dist/capture.mjs +7 -4
- package/dist/check.mjs +38 -8
- package/dist/cli.mjs +45 -10
- package/dist/color-values.mjs +325 -0
- package/dist/config.mjs +16 -2
- package/dist/control-padding.mjs +93 -0
- package/dist/design-values.mjs +3 -2
- package/dist/finding-rules.mjs +61 -0
- package/dist/foundation.mjs +17 -4
- package/dist/icons.mjs +107 -0
- package/dist/init.mjs +3 -0
- package/dist/mcp/apps.mjs +9 -6
- package/dist/mcp/context.mjs +1 -1
- package/dist/mcp/drafts.mjs +3 -0
- package/dist/mcp/mutations.mjs +40 -1
- package/dist/mcp/preview-widget.bundle.js +36 -36
- package/dist/mcp/project-widget.bundle.js +12 -12
- package/dist/mcp/server.mjs +23 -11
- package/dist/mcp/widget.bundle.js +17 -17
- package/dist/palette-generated.mjs +180 -0
- package/dist/preview-resources.mjs +12 -3
- package/dist/render-color-probe.mjs +148 -0
- package/dist/runtime-contracts.mjs +14 -4
- package/dist/scenarios.mjs +1 -1
- package/dist/showcase/client.bundle.js +28 -28
- package/dist/showcase/icons.js +146 -0
- package/dist/showcase/index.html +2 -1
- package/dist/showcase/style.css +19 -2
- package/dist/skills/README.md +2 -1
- package/dist/skills/ads-break-ui/SKILL.md +6 -5
- package/dist/skills/ads-break-ui/references/atomic-styles.md +12 -12
- package/dist/skills/ads-break-ui/references/contracts.md +13 -10
- package/dist/skills/ads-break-ui/references/design-data.md +137 -29
- package/dist/skills/ads-break-ui/references/drafts.md +3 -1
- package/dist/skills/ads-break-ui/references/guarded-editing.md +3 -2
- package/dist/skills/ads-break-ui/references/validation.md +13 -4
- package/dist/skills/ads-designer/SKILL.md +23 -16
- package/dist/skills/ads-designer/references/accessibility.md +41 -5
- package/dist/skills/ads-designer/references/atomic-styles.md +12 -12
- package/dist/skills/ads-designer/references/branding.md +37 -10
- package/dist/skills/ads-designer/references/cli.md +8 -2
- package/dist/skills/ads-designer/references/contracts.md +13 -10
- package/dist/skills/ads-designer/references/design-data.md +137 -29
- package/dist/skills/ads-designer/references/drafts.md +3 -1
- package/dist/skills/ads-designer/references/guarded-editing.md +3 -2
- package/dist/skills/ads-designer/references/validation.md +13 -4
- package/dist/skills/ads-import/SKILL.md +9 -8
- package/dist/skills/ads-import/references/atomic-styles.md +12 -12
- package/dist/skills/ads-import/references/cli.md +8 -2
- package/dist/skills/ads-import/references/contracts.md +13 -10
- package/dist/skills/ads-import/references/design-data.md +137 -29
- package/dist/skills/ads-import/references/drafts.md +3 -1
- package/dist/skills/ads-import/references/guarded-editing.md +3 -2
- package/dist/skills/ads-import/references/tokens.md +7 -3
- package/dist/skills/ads-import/references/validation.md +13 -4
- package/dist/skills/ads-motion/SKILL.md +6 -5
- package/dist/skills/ads-motion/references/atomic-styles.md +12 -12
- package/dist/skills/ads-motion/references/contracts.md +13 -10
- package/dist/skills/ads-motion/references/design-data.md +137 -29
- package/dist/skills/ads-motion/references/drafts.md +3 -1
- package/dist/skills/ads-motion/references/guarded-editing.md +3 -2
- package/dist/skills/ads-motion/references/validation.md +13 -4
- package/dist/skills/ads-port/SKILL.md +6 -5
- package/dist/skills/ads-port/references/atomic-styles.md +12 -12
- package/dist/skills/ads-port/references/cli.md +8 -2
- package/dist/skills/ads-port/references/contracts.md +13 -10
- package/dist/skills/ads-port/references/design-data.md +137 -29
- package/dist/skills/ads-port/references/drafts.md +3 -1
- package/dist/skills/ads-port/references/guarded-editing.md +3 -2
- package/dist/skills/ads-port/references/validation.md +13 -4
- package/dist/starters/preact/design-system/review/token-preview/TokenPreview.tsx +11 -2
- package/dist/starters/react/ADS.md +43 -10
- package/dist/starters/react/README.md +14 -9
- package/dist/starters/react/design-system/assets/brand/README.md +8 -3
- package/dist/starters/react/design-system/assets/glyphs/README.md +4 -1
- package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.fixture.ts +6 -1
- package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.scenario.tsx +3 -2
- package/dist/starters/react/design-system/components/Content/Icon/README.md +2 -1
- package/dist/starters/react/design-system/components/Content/Logo/Logo.tsx +3 -9
- package/dist/starters/react/design-system/components/Content/Logo/README.md +4 -2
- package/dist/starters/react/design-system/controllers/Palette/Palette.ts +164 -0
- package/dist/starters/react/design-system/index.ts +3 -0
- package/dist/starters/react/design-system/review/brand-preview/BrandPreview.tsx +2 -5
- package/dist/starters/react/design-system/review/token-preview/TokenPreview.tsx +11 -2
- package/dist/starters/react/design-system/styles.css +1 -0
- package/dist/starters/react/design-system/tokens/base.css +8 -5
- package/dist/starters/react/design-system/tokens/colors.css +167 -175
- package/dist/starters/react/design-system/tokens/elevation.css +14 -21
- package/dist/starters/react/design-system/tokens/themes.generated.css +142 -0
- package/dist/starters/react/design-system/tokens/themes.generated.ts +402 -0
- package/dist/style-boundaries.mjs +2 -1
- package/dist/themes-generated.mjs +150 -0
- package/dist/themes-watch.mjs +42 -0
- package/dist/themes.mjs +214 -63
- package/dist/token-export.mjs +22 -11
- package/dist/token-policy.mjs +2 -1
- package/dist/token-quality.mjs +28 -25
- package/dist/tokens.mjs +27 -32
- package/dist/validation.mjs +17 -1
- package/dist/verification/browser.mjs +14 -3
- package/dist/verification.mjs +25 -4
- package/docs/ADS.md +41 -27
- package/docs/ARCHITECTURE.md +49 -22
- package/docs/CACHING.md +2 -3
- package/docs/CHANGELOG.md +117 -13
- package/docs/CONTRACTS.md +13 -10
- package/docs/GUIDE.md +94 -22
- package/docs/MCP.md +50 -30
- package/docs/benchmarks/bun-previews.md +5 -5
- package/docs/benchmarks/{gidi-preview-memory.md → preview-memory.md} +14 -12
- package/docs/benchmarks/turbo-poc.md +24 -6
- package/package.json +2 -1
|
@@ -145,11 +145,11 @@ helpers do not grant custom scenario CSS.
|
|
|
145
145
|
|
|
146
146
|
For atomic base/variant styling, helper/wrapper class composition, extracted
|
|
147
147
|
custom-property arithmetic, typed `@property` registrations, or an
|
|
148
|
-
`atomic-composition-review` / `atomic-composition-limit`
|
|
148
|
+
`atomic-composition-review` / `atomic-composition-limit` finding, read
|
|
149
149
|
[atomic style composition](references/atomic-styles.md). The same guide is served
|
|
150
150
|
as `ads://guides/atomic-styles`. It explains shorthand/logical conflicts and
|
|
151
151
|
matching-property fixes, plus the build resolver for preserving opaque custom
|
|
152
|
-
properties through extraction.
|
|
152
|
+
properties through extraction. Check review items in the real `cx` composition and verify
|
|
153
153
|
computed styles across affected sizes/states; retain intentional product behavior.
|
|
154
154
|
|
|
155
155
|
For positioning, menu/listbox keyboard handling, focus trapping and virtual lists,
|
|
@@ -210,7 +210,8 @@ Never copy starter files by hand or port React files to Preact.
|
|
|
210
210
|
The created project's `README.md` and `ADS.md` explain it. It has semantic token
|
|
211
211
|
foundation in six groups (Color ramps and AA-checked roles, Type, Space & sizing, Shape &
|
|
212
212
|
elevation, Motion, Layout) with light and dark themes declared in `ds.config.json`
|
|
213
|
-
(`[data-theme]` themes the page or one section;
|
|
213
|
+
(`[data-theme]` themes the page or one section; optional `brands` add a brand axis beside
|
|
214
|
+
the themes; see `ads://guides/tokens`), React or Preact
|
|
214
215
|
TypeScript/Linaria configuration, general lint, a public barrel, project-owned
|
|
215
216
|
review renderers (token tiles, brand preview, demo and screen frames), placeholder
|
|
216
217
|
brand artwork with an app icon, a `Grid` (`GridItem`) on the grid tokens, an icon set with
|
|
@@ -269,11 +270,11 @@ architectural reuse does not require moving application services into the ADS.
|
|
|
269
270
|
ADS-owned frame patterns use `--ux-*`. Do not introduce configurable or
|
|
270
271
|
product-prefixed token vocabularies.
|
|
271
272
|
- Shared token names, meanings, types, and alias relationships form the contract;
|
|
272
|
-
project values and theme
|
|
273
|
+
project values and per-theme halves can differ. Item imports retain existing
|
|
273
274
|
values and add missing definitions. Explicit token-values imports adopt source
|
|
274
|
-
values and theme
|
|
275
|
-
- Scaffold defaults are
|
|
276
|
-
text, rose
|
|
275
|
+
values and their per-theme halves.
|
|
276
|
+
- Scaffold defaults are 16 px body text, the 2 px spacing rhythm, slate surfaces
|
|
277
|
+
and text, a rose accent, restrained elevation, and system fonts. Treat these as
|
|
277
278
|
initial project values; honor requested branding and preserve existing themes.
|
|
278
279
|
- Reuse existing public components, patterns, and shared icons when compatible.
|
|
279
280
|
Add missing primitives in their owning layer; inspect exports rather than
|
|
@@ -297,7 +298,8 @@ in the existing token files using fixed ADS names, and original artwork plus its
|
|
|
297
298
|
usage, backgrounds, credits, and licenses in `assets/brand/`. Keep fonts in
|
|
298
299
|
`assets/fonts/`, with optional `tokens/fonts.css` imported first. Follow the
|
|
299
300
|
canonical foundation import order: fonts (if present), colors, typography,
|
|
300
|
-
spacing, elevation, base
|
|
301
|
+
spacing, elevation, base, then the generated `themes.generated.css`. Artwork can
|
|
302
|
+
have fixed SVG colors; UI styles must
|
|
301
303
|
still use tokens and must not override primitive state.
|
|
302
304
|
|
|
303
305
|
For standard web icons, set `assets.iconSource` to an SVG under `assets/brand/`,
|
|
@@ -316,15 +318,19 @@ and license each artwork in `assets/brand/README.md`, pair dark-theme variants a
|
|
|
316
318
|
`<name>.dark.svg`, show them through a component, and preview them in the Brand
|
|
317
319
|
section (`brand/<Group>/<Name>` scenarios). Finished PNG/JPEG/WebP images and
|
|
318
320
|
delivered `.ico`/`.icns` files are artwork too; ADS never enlarges a finished
|
|
319
|
-
image.
|
|
320
|
-
|
|
321
|
+
image. Other products' logos are not brand artwork or glyphs: keep them, in their own
|
|
322
|
+
colors and under their owners' trademark and usage terms, in `assets/logos/` and
|
|
323
|
+
show them as images (a CSS mask over `currentColor` for a muted use); ADS generates
|
|
324
|
+
and checks nothing there.
|
|
325
|
+
Read [branding.md](references/branding.md) (`ads://guides/branding`) before changing
|
|
321
326
|
brand artwork, icon outputs or glyphs.
|
|
322
327
|
|
|
323
328
|
## Accessibility
|
|
324
329
|
|
|
325
|
-
Target WCAG 2.2 AA. `ads check`
|
|
326
|
-
text resize, reduced motion, text spacing, image alternatives and
|
|
327
|
-
and `token-contrast`)
|
|
330
|
+
Target WCAG 2.2 AA. `ads check` fails on contrast in every theme and brand, target size,
|
|
331
|
+
focus, text resize, reduced motion, text spacing, image alternatives and icon-only controls
|
|
332
|
+
(`a11y-*` and `token-contrast`), and lists keyboard reach for review (`a11y-keyboard`);
|
|
333
|
+
`ads audit` adds axe-core in the browser. Read [accessibility.md](references/accessibility.md)
|
|
328
334
|
(`ads://guides/accessibility`) for the rules and the practice no tool can check.
|
|
329
335
|
|
|
330
336
|
## Design craft and mobile behavior
|
|
@@ -473,9 +479,10 @@ foundation CSS rather than assigning shared token values in JavaScript. Keep
|
|
|
473
479
|
full-app integration harnesses and workflow coverage in application test support.
|
|
474
480
|
|
|
475
481
|
Foundation CSS is checked, not an escape hatch. Value sheets define shared tokens
|
|
476
|
-
on the document root
|
|
477
|
-
three closed roles: root/body typography,
|
|
478
|
-
normalization; and global focus
|
|
482
|
+
on the document root (per-theme halves) or a brand's `[data-brand]`; `fonts.css`
|
|
483
|
+
holds font-face metadata. `base.css` has three closed roles: root/body typography,
|
|
484
|
+
canvas and theme defaults; limited native normalization; and global focus
|
|
485
|
+
indicators/reduced-motion rules. Every selector
|
|
479
486
|
branch, property and value must fit its role. Token-backed control skins, layout,
|
|
480
487
|
interactive state rules and owner hooks are rejected even through `:where()`.
|
|
481
488
|
Do not copy an unchecked upstream preflight or turn a component repair into a reset.
|
|
@@ -3,25 +3,60 @@
|
|
|
3
3
|
Target WCAG 2.2 AA. ADS checks what it can from
|
|
4
4
|
tokens and source; the rest is design and testing practice.
|
|
5
5
|
|
|
6
|
-
## What `ads check`
|
|
6
|
+
## What `ads check` checks
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
`a11y-keyboard` is a review item (it cannot see every key handler); the others are errors.
|
|
9
|
+
Each message names its WCAG criterion.
|
|
9
10
|
|
|
10
11
|
| Rule | What it reviews | WCAG |
|
|
11
12
|
|---|---|---|
|
|
12
|
-
| `token-contrast` | Text, link, accent and status text on their backgrounds (4.5:1); focus and control borders on canvas and surface (3:1); in every theme | 1.4.3, 1.4.11 |
|
|
13
|
+
| `token-contrast` | Text, link, accent and status text on their backgrounds (4.5:1); focus and control borders on canvas and surface (3:1); in every theme and brand | 1.4.3, 1.4.11 |
|
|
13
14
|
| `a11y-target-size` | `--control-height-*` of at least 24 px (44 px where touch is common) | 2.5.8 |
|
|
14
15
|
| `a11y-focus` | `--focus-w` of at least 2 px, and a `:focus-visible` indicator in `base.css` | 2.4.7, 2.4.13 |
|
|
15
16
|
| `a11y-text-resize` | Font-size tokens in `rem`, so text follows the reader's browser font size | 1.4.4 |
|
|
16
17
|
| `a11y-reduced-motion` | Every non-zero `--dur-*` set to 0 under `prefers-reduced-motion`; infinite animations in components stopped there | 2.3.3, 2.2.2 |
|
|
17
18
|
| `a11y-text-spacing` | `--leading-normal` of at least 1.5; `--content-max` under 80 characters | 1.4.8, 1.4.12 |
|
|
18
19
|
| `a11y-image-alt` | `<img>` in components with `alt` (`alt=""` when decorative) | 1.1.1 |
|
|
20
|
+
| `a11y-icon-label` | A `<button>` or `<a>` in components whose only content is an icon has an accessible name (`aria-label`, or `IconButton` with its `label`) | 4.1.2 |
|
|
19
21
|
| `a11y-keyboard` | No `onClick` on `div`, `span` and other non-interactive elements without `role`, `tabIndex` and a key handler; prefer `<button>` | 2.1.1 |
|
|
20
22
|
|
|
21
|
-
Fix a
|
|
23
|
+
Fix a finding in its owner: choose a different ramp step or size token, add the missing
|
|
22
24
|
attribute, or move the interaction to a native control. Do not silence it with a one-off
|
|
23
25
|
value.
|
|
24
26
|
|
|
27
|
+
## Browser audit (axe-core)
|
|
28
|
+
|
|
29
|
+
Run `ads audit` after changing a component, pattern or composition scenario. It renders
|
|
30
|
+
each one in every declared brand and theme and runs axe-core's WCAG A/AA rules on the
|
|
31
|
+
scenario content.
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
ads audit # every UI scenario, brand and theme
|
|
35
|
+
ads audit --scenario components/Button --theme dark --brand acme --json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Each finding is an `a11y-axe` error on the scenario file, naming the axe rule, the WCAG
|
|
39
|
+
criterion, the themes and brands it fails in, the failing elements and the rule's help link:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
design-system/components/Broken.scenario.tsx:1:1 [error:a11y-axe] axe button-name (critical), WCAG 4.1.2 in components/Broken [light, dark]: Buttons must have discernible text. 1 element: button. https://dequeuniversity.com/rules/axe/4.14/button-name?application=axeAPI
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- Fix the finding in the component that renders the failing element, not in the scenario.
|
|
46
|
+
- A `color-contrast` finding that `token-contrast` also reports is a token pair: change the
|
|
47
|
+
ramp step. One only the audit reports comes from a component pairing tokens itself: use
|
|
48
|
+
a role pair that `token-contrast` checks.
|
|
49
|
+
- Token and brand scenarios are skipped; name one with `--scenario` to audit it.
|
|
50
|
+
- To run the audit in `ads validate`/`ads_validate`, set `browserAudit: true` in that
|
|
51
|
+
policy (`validation` or `acceptance`); its findings then fail that policy, as they fail
|
|
52
|
+
`ads audit`. With `acceptance.browserAudit`, `ads_accept`, `ads_apply_patch` and
|
|
53
|
+
`ads_apply_transaction` also audit the candidate's affected scenarios and reject the
|
|
54
|
+
change on any `a11y-axe` error; read the findings with `ads_results` (`diagnostics`).
|
|
55
|
+
- It needs the project's Playwright and browser, as captures do (`mcp.capture`).
|
|
56
|
+
|
|
57
|
+
A clean audit is not a pass: automated rules find only part of the WCAG failures. Keep the
|
|
58
|
+
manual checks below.
|
|
59
|
+
|
|
25
60
|
## What only design and testing establish
|
|
26
61
|
|
|
27
62
|
- **Color is never the only signal.** Pair status color with text or an icon; underline links
|
|
@@ -40,4 +75,5 @@ value.
|
|
|
40
75
|
|
|
41
76
|
Test by using each new view with the keyboard only, with a screen reader (VoiceOver, NVDA or
|
|
42
77
|
Orca), at 200% zoom, and in both themes. Browser checks run against real previews (`ads
|
|
43
|
-
verify`) can assert focus order and accessible names for important flows
|
|
78
|
+
verify`) can assert focus order and accessible names for important flows; `ads audit`
|
|
79
|
+
covers the rule-checkable rest of every scenario.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Atomic style composition
|
|
2
2
|
|
|
3
3
|
Use this guide when creating or migrating component/pattern styles, changing
|
|
4
|
-
base/size/state combinations, or reviewing `atomic-composition-review`
|
|
4
|
+
base/size/state combinations, or reviewing `atomic-composition-review` items.
|
|
5
5
|
It is also available as `ads://guides/atomic-styles` through ADS MCP.
|
|
6
6
|
|
|
7
7
|
## Why valid tokens can still render incorrectly
|
|
@@ -203,7 +203,7 @@ entire className; `<button {...props} className={cx(base, className)} />` compos
|
|
|
203
203
|
it explicitly. Keep the product's intended forwarding behavior when fixing an
|
|
204
204
|
overlap. Do not change the public API simply to make tracing easier.
|
|
205
205
|
|
|
206
|
-
|
|
206
|
+
Review items include a bounded `composition` path through traced helpers and
|
|
207
207
|
components. A `target` identifies a statically reached DOM element. This
|
|
208
208
|
establishes source composition, not that a scenario mounted it or that its
|
|
209
209
|
computed result is wrong. `writingModeDependent: true` identifies overlaps that
|
|
@@ -213,9 +213,9 @@ expand them safely. Token formulas, inheritance and runtime values still need
|
|
|
213
213
|
review. A margin shorthand and `margin-inline: auto` may agree horizontally but
|
|
214
214
|
disagree in vertical text, so horizontal equality alone is insufficient.
|
|
215
215
|
|
|
216
|
-
## Respond to a
|
|
216
|
+
## Respond to a review item
|
|
217
217
|
|
|
218
|
-
1. Follow the
|
|
218
|
+
1. Follow the review item's related file/line locations and inspect the actual `cx`
|
|
219
219
|
composition. Variant lookups may contribute several possible combinations.
|
|
220
220
|
2. In a current built preview, inspect computed properties and the winning CSS
|
|
221
221
|
rules. Establish whether extraction order, specificity, writing mode or an
|
|
@@ -231,7 +231,7 @@ Increasing specificity, adding `!important`, copying styles into scenarios or
|
|
|
231
231
|
moving component styling into `base.css` can hide the symptom while retaining
|
|
232
232
|
the conflict. Prefer resolving the composition itself. If an overlap is
|
|
233
233
|
intentional, document why its precedence is stable and verify the resulting
|
|
234
|
-
behavior rather than changing product capabilities to silence a
|
|
234
|
+
behavior rather than changing product capabilities to silence a review item.
|
|
235
235
|
|
|
236
236
|
Use existing behavior contracts and `ads_verify` for important geometry. Register
|
|
237
237
|
a check beside its owner, link its real scenario and use the project's browser
|
|
@@ -249,16 +249,16 @@ states, themes and supported writing modes. Wait for observable readiness; an
|
|
|
249
249
|
event-stream connection can prevent `networkidle` from settling. A generic
|
|
250
250
|
overlap scan cannot decide which dimensions the product intended. A failed
|
|
251
251
|
registered geometry assertion is blocking through the existing verification
|
|
252
|
-
contract; an overlap
|
|
252
|
+
contract; an overlap review item remains a review signal.
|
|
253
253
|
|
|
254
254
|
## What ADS checks
|
|
255
255
|
|
|
256
|
-
`atomic-composition-review` is a nonblocking
|
|
257
|
-
with `severity: "
|
|
258
|
-
errors; MCP checks and mutations preserve the
|
|
256
|
+
`atomic-composition-review` is a nonblocking review item, returned under `advisories`
|
|
257
|
+
with `severity: "review"`. CLI checks still exit successfully when there are no
|
|
258
|
+
errors; MCP checks and mutations preserve the review item and its guidance URI.
|
|
259
259
|
|
|
260
260
|
An unchanged advisory baseline is not evidence that the affected styles are
|
|
261
|
-
correct. Triage
|
|
261
|
+
correct. Triage review items that reach an edited owner or its shared helpers against
|
|
262
262
|
the actual DOM classes and computed styles in a compiled scenario. Interaction
|
|
263
263
|
checks may pass without measuring padding, alignment or sizing. When an intended
|
|
264
264
|
layout is known, add a focused rendered assertion for that contract; when keeping
|
|
@@ -285,7 +285,7 @@ unresolved DOM targets and traversal limits produce bounded
|
|
|
285
285
|
`atomic-composition-limit` informational advisories where known atomic styles
|
|
286
286
|
reach an unresolved composition. Ordinary externally supplied className values
|
|
287
287
|
remain open inputs, not guaranteed safe styles. Depth, work and alternative
|
|
288
|
-
limits keep source inspection bounded; an unreported path or an empty
|
|
288
|
+
limits keep source inspection bounded; an unreported path or an empty review
|
|
289
289
|
list does not establish visual correctness. Actual failed registered
|
|
290
290
|
browser/behavior checks remain blocking; potentially intentional source overlaps
|
|
291
|
-
remain
|
|
291
|
+
remain review items.
|
|
@@ -7,8 +7,9 @@ that it stays complete; the project chooses the look.
|
|
|
7
7
|
|
|
8
8
|
Change values in the existing token files, never names: `--accent`,
|
|
9
9
|
`--font-sans`, `--radius-md` and the other shared roles keep their meaning across
|
|
10
|
-
projects. `--brand-*` and other foreign prefixes fail checks.
|
|
11
|
-
|
|
10
|
+
projects. `--brand-*` and other foreign prefixes fail checks. A value that differs per
|
|
11
|
+
theme is written as halves (`--color-accent-9-light`, `--color-accent-9-dark`), and a
|
|
12
|
+
second brand re-sets halves on `[data-brand]` (`ads://guides/tokens`). Components read shared
|
|
12
13
|
roles, so a brand change is a token change.
|
|
13
14
|
|
|
14
15
|
## Artwork
|
|
@@ -17,13 +18,16 @@ Keep every original SVG in `assets/brand/`. Fixed colors are allowed inside the
|
|
|
17
18
|
artwork; component styles still use tokens.
|
|
18
19
|
|
|
19
20
|
- **Document it.** `assets/brand/README.md` names each file, what it is for, the
|
|
20
|
-
backgrounds it suits, its credits and its license. `ads check`
|
|
21
|
+
backgrounds it suits, its credits and its license. `ads check` fails on an
|
|
21
22
|
undescribed file (`brand-readme`) and a README without a license
|
|
22
23
|
(`brand-license`).
|
|
23
24
|
- **Pair light and dark variants by name.** `logo.svg` is the default (light
|
|
24
25
|
theme); `logo.dark.svg` is the same artwork for dark backgrounds. The component
|
|
25
|
-
that shows it renders both and
|
|
26
|
-
|
|
26
|
+
that shows it renders both and shows each in its own theme with the generated display
|
|
27
|
+
switches: `display: var(--display-light, block)` on the light one and
|
|
28
|
+
`display: var(--display-dark, block)` on the dark one. They follow the nearest
|
|
29
|
+
`data-theme`, so a dark section shows the dark logo; a brand's own logo uses
|
|
30
|
+
`--display-brand-<brand>` the same way.
|
|
27
31
|
- **Show it in a component.** A logo appears in the UI through a project
|
|
28
32
|
component (the starter's `components/Content/Logo`) that imports the SVG with
|
|
29
33
|
`?url`. Artwork that nothing uses is reported (`brand-unused`).
|
|
@@ -119,14 +123,37 @@ Each file becomes `glyphs[name]` with `attributes` added where its `<svg>` does
|
|
|
119
123
|
set them. `aliases.json` in the folder maps extra names to existing glyphs
|
|
120
124
|
(`glyphAliases`); a file named like an alias is skipped. `ads assets` writes the
|
|
121
125
|
module; `ads check` fails (`brand-output-stale`) when it is out of date. The icon
|
|
122
|
-
component
|
|
126
|
+
component reads `glyphs` and `glyphAliases`. Review the set in the showcase's **Icons**
|
|
127
|
+
tab: every glyph at the size used beside text, so an outlier in weight or size stands out,
|
|
128
|
+
and each glyph on its grid at every icon size with its aliases and errors. Check a new or
|
|
129
|
+
redrawn glyph there before committing it.
|
|
123
130
|
|
|
124
131
|
Keep every glyph on one `viewBox` (the starter uses 24 × 24) and draw in `currentColor`:
|
|
125
|
-
`ads check`
|
|
126
|
-
stroke colors (`glyph-color`). Other products' logos keep their own colors: keep them
|
|
127
|
-
|
|
132
|
+
`ads check` fails on a different or missing viewBox (`glyph-viewbox`) and fixed fill or
|
|
133
|
+
stroke colors (`glyph-color`). Other products' logos keep their own colors: keep them in
|
|
134
|
+
`assets/logos/` (see [Other products' logos](#other-products-logos)), not in the glyph set. The starter's `Icon` sizes glyphs with `--icon-sm/md/lg/xl`
|
|
128
135
|
(16/20/24/32 px; 16 beside body text), centers them beside text and hides decorative ones
|
|
129
136
|
from assistive technology; `label` names a meaningful one. Icons have no states of their
|
|
130
137
|
own: interactive icons go in `IconButton`, whose required `label` is its accessible name
|
|
131
138
|
and tooltip and whose background carries hover, pressed and disabled. `a11y-icon-label`
|
|
132
|
-
|
|
139
|
+
fails on icon-only buttons and links without a name.
|
|
140
|
+
|
|
141
|
+
## Other products' logos
|
|
142
|
+
|
|
143
|
+
Logos of other products (a chat service, a model provider, a sign-in provider) are
|
|
144
|
+
not the project's brand and not UI icons. Keep them in `assets/logos/`, each in the
|
|
145
|
+
colors its owner publishes, with a `README.md` that names each file, its source and
|
|
146
|
+
the usage terms it is used under. Their owners' trademark and usage guidelines
|
|
147
|
+
apply: use the official artwork, keep its colors and proportions, and do not change
|
|
148
|
+
it to match the project's look.
|
|
149
|
+
|
|
150
|
+
Show them as images: import the file with `?url` and render an `<img>` with an
|
|
151
|
+
`alt` that names the product, or `alt=""` beside text that already names it. Where
|
|
152
|
+
the logo must follow the text color (a muted or monochrome use), use the file as a
|
|
153
|
+
CSS mask over `currentColor`, so its shape stays and the color follows the theme.
|
|
154
|
+
|
|
155
|
+
ADS generates nothing from `assets/logos/` and does not treat its files as brand
|
|
156
|
+
artwork or glyphs: the brand checks (`brand-readme`, `brand-preview`,
|
|
157
|
+
`brand-unused`), `assets.iconSource` and `assets.targets` cover only
|
|
158
|
+
`assets/brand/`, and the glyph checks cover only `assets.glyphs.source`. Keep the
|
|
159
|
+
project's own colored artwork, including its pictograms, in `assets/brand/`.
|
|
@@ -90,14 +90,20 @@ For an initialized project, from its root:
|
|
|
90
90
|
npx @reqvire-org/ads check
|
|
91
91
|
npx @reqvire-org/ads tokens --json
|
|
92
92
|
npx @reqvire-org/ads assets
|
|
93
|
+
npx @reqvire-org/ads audit
|
|
93
94
|
```
|
|
94
95
|
|
|
95
96
|
Use the selected real distribution; for a local tarball, invoke
|
|
96
97
|
`npx --yes --package "$ads_tool_package" ads check` instead. Other inspection
|
|
97
98
|
commands accept a directory; init deliberately does not.
|
|
98
99
|
|
|
99
|
-
Normal builds run native `ads check`, then
|
|
100
|
-
icons in `.ds/assets
|
|
100
|
+
Normal builds run native `ads check`, then `ads assets`: configured standard brand
|
|
101
|
+
icons in `.ds/assets/`, committed `assets.targets`, the `assets.glyphs` module and the
|
|
102
|
+
generated `tokens/themes.generated.css` and `tokens/themes.generated.ts`. Run `ads
|
|
103
|
+
assets` after editing tokens or `ds.config.json` themes and brands without a running
|
|
104
|
+
showcase or MCP server (`themes-generated` fails while they are stale). `ads audit`
|
|
105
|
+
runs axe-core in every rendered UI scenario (`a11y-axe` errors; see
|
|
106
|
+
ads://guides/accessibility). Set `assets.iconSource` to an SVG inside the ADS's
|
|
101
107
|
`assets/brand/`, relative to the ADS folder; no source means generation is a no-op.
|
|
102
108
|
Integrate that directory through the app's existing asset mount. Fixed token
|
|
103
109
|
names and prefixes are required; project values and artwork remain project-owned.
|
|
@@ -154,11 +154,14 @@ valueFrom: ["paint", "scheme.day", "scheme.night"],
|
|
|
154
154
|
```
|
|
155
155
|
|
|
156
156
|
Register each matching `config.*.<path>` in `paintInputs`. The producer may write
|
|
157
|
-
one declared field, or
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
157
|
+
one declared field, or a per-theme value built with the generated helpers from
|
|
158
|
+
`tokens/themes.generated.ts`: `themed({ light: entry.scheme.day, dark: entry.scheme.night })`
|
|
159
|
+
(keys exactly the declared themes) or `themedByScheme({ light: …, dark: … })` (each theme
|
|
160
|
+
takes the value for its color scheme). Every value is a declared field and the argument is
|
|
161
|
+
an object literal without spreads. The normal key/map/root proof still applies. Raw
|
|
162
|
+
constants, undeclared fields, `light-dark()`, extra writes and unknown transforms are
|
|
163
|
+
rejected. The browser audit checks an accessible color reference in every theme's branch;
|
|
164
|
+
a local SVG URL or `none` is not a color there.
|
|
162
165
|
|
|
163
166
|
Families cannot overlap shared tokens, private runtime
|
|
164
167
|
prefixes or other bindings. A broad family such as `--color-${key}` grants no
|
|
@@ -167,12 +170,12 @@ cannot be established. Registered paint consumers list their allowed binding IDs
|
|
|
167
170
|
borrowing a peer's binding family or private runtime variable remains invalid. Bindings are scoped
|
|
168
171
|
to their actual root; portals outside it need deliberate project integration.
|
|
169
172
|
|
|
170
|
-
A registered binding producer
|
|
171
|
-
`
|
|
172
|
-
|
|
173
|
-
undefined tokens and SVG URLs
|
|
173
|
+
A registered binding producer gives a per-theme value with `themed()` or
|
|
174
|
+
`themedByScheme()`; its output is `var(--ads-if-<theme>, <reference>)` once per declared
|
|
175
|
+
theme, in declared order. The App paint audit checks every branch and its observed effect
|
|
176
|
+
in the active theme. Raw colors, undefined tokens and SVG URLs in a branch remain invalid.
|
|
174
177
|
This derived binding form does not widen public paint-input types; use constrained
|
|
175
|
-
references for each theme input and verify
|
|
178
|
+
references for each theme input and verify every theme in browser checks.
|
|
176
179
|
|
|
177
180
|
The App audit checks current mounted instances, accessible values, local SVG
|
|
178
181
|
resources and computed paint-property responses. Visibility and complete rendered
|
|
@@ -74,7 +74,7 @@ Review that intent and do not disguise a new design decision as arithmetic.
|
|
|
74
74
|
|
|
75
75
|
## Review overlap without deleting legitimate roles
|
|
76
76
|
|
|
77
|
-
`token-overlap-review` is a nonblocking
|
|
77
|
+
`token-overlap-review` is a nonblocking review item for shared tokens with identical
|
|
78
78
|
normalized definitions across their declared theme/condition scopes. It identifies
|
|
79
79
|
the tokens and source. Inspect their consumers and roles. If one decision is being
|
|
80
80
|
copied, reuse one shared token or make its relationship explicit with an alias.
|
|
@@ -82,7 +82,7 @@ Equal values alone do not prove equal purpose: body text and strong text, spacin
|
|
|
82
82
|
and control sizes, or two motion roles may intentionally differ later. A light-only
|
|
83
83
|
match does not justify merging tokens whose dark/reduced-motion values differ.
|
|
84
84
|
|
|
85
|
-
For
|
|
85
|
+
For existing workspaces, convert independent component constants explicitly:
|
|
86
86
|
select an existing shared role when it means the same thing; centralize genuinely
|
|
87
87
|
missing decisions; remove private sheets/imports and contract fields; update token
|
|
88
88
|
sample coverage in the shared directory. Preserve themes, units, public APIs and
|
|
@@ -90,24 +90,25 @@ behavior unless changing the visual policy was explicitly intended. Review a Git
|
|
|
90
90
|
diff and run core, project and browser checks. There is no compatibility mode that
|
|
91
91
|
keeps independent component token definitions valid.
|
|
92
92
|
|
|
93
|
-
## Accessibility and rhythm
|
|
93
|
+
## Accessibility and rhythm checks
|
|
94
94
|
|
|
95
|
-
`ads check`
|
|
96
|
-
resolving `var()` aliases there):
|
|
95
|
+
`ads check` checks token values in every theme and brand. Each finding below is an error:
|
|
97
96
|
|
|
98
|
-
- `token-contrast
|
|
99
|
-
`--text-
|
|
100
|
-
`--bg-
|
|
101
|
-
|
|
102
|
-
`--border-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
- `
|
|
106
|
-
-
|
|
107
|
-
|
|
97
|
+
- `token-contrast`: the roles that meet on screen fall below WCAG 2.2 AA: `--text-strong`,
|
|
98
|
+
`--text-body`, `--text-muted`, `--text-link` and `--accent-text` on `--bg-canvas`,
|
|
99
|
+
`--bg-surface` and `--bg-hover`; `--accent-fg` on `--accent` and `--accent-hover`; each
|
|
100
|
+
status's `-fg` on its solid and `-text` on its `-bg` (4.5:1); `--border-focus` and
|
|
101
|
+
`--border-strong` on the canvas and surface (3:1). Fix it by choosing a different ramp
|
|
102
|
+
step for the role, in the theme the message names, never with a one-off color.
|
|
103
|
+
- `token-rhythm`: a numbered spacing step leaves the scale `--space-N` = N × 2 px.
|
|
104
|
+
- `control-padding`: pad a control with the token for its size. A block sized with
|
|
105
|
+
`--control-height-<size>` pads its sides with `--control-padding-<size>`; the small gap
|
|
106
|
+
inside a track (segmented control, switch) uses `--control-inset` (add it to the spacing
|
|
107
|
+
tokens if the project has none). Anything that is not a control does not use
|
|
108
|
+
`--control-height-*`.
|
|
108
109
|
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
`token-overlap-review` (review) compares values only within a token family (`--radius-*`
|
|
111
|
+
with `--radius-*`): a radius equal to a spacing step is two scales meeting, not a duplicate.
|
|
111
112
|
|
|
112
113
|
## Exchange format
|
|
113
114
|
|
|
@@ -143,18 +144,125 @@ Name roles by element and purpose, the same in every theme; only their values ch
|
|
|
143
144
|
|
|
144
145
|
## Themes
|
|
145
146
|
|
|
146
|
-
Declare themes in `ds.config.json` (`themes: [{ name, scheme }]`, the first is the default
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
-
|
|
156
|
-
|
|
157
|
-
-
|
|
147
|
+
Declare themes in `ds.config.json` (`themes: [{ name, scheme }]`, the first is the default;
|
|
148
|
+
`scheme` sets `color-scheme` for native controls and scrollbars).
|
|
149
|
+
|
|
150
|
+
Write a token that differs per theme as one half per theme, named with the theme as suffix,
|
|
151
|
+
on `:root`:
|
|
152
|
+
|
|
153
|
+
```css
|
|
154
|
+
:root {
|
|
155
|
+
--color-accent-9-light: oklch(55% .2 280);
|
|
156
|
+
--color-accent-9-dark: oklch(70% .16 280);
|
|
157
|
+
--bg-canvas-light: var(--slate-1-light);
|
|
158
|
+
--bg-canvas-dark: var(--slate-2-dark);
|
|
159
|
+
--accent: var(--color-accent-9);
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
- A half is a plain value or refers to halves: `--text-muted-dark: var(--slate-11-dark)`,
|
|
164
|
+
never `var(--slate-11)` (`theme-half-reference`).
|
|
165
|
+
- Give every themed token a half for every declared theme (`theme-coverage`). Tokens that do
|
|
166
|
+
not change per theme stay single values; a role that aliases a ramp step
|
|
167
|
+
(`--accent: var(--color-accent-9)`) needs no halves.
|
|
168
|
+
- Never set token values under `[data-theme]` or `prefers-color-scheme` (`theme-old-form`),
|
|
169
|
+
and never set a token both as one value and as halves (`theme-half-conflict`).
|
|
170
|
+
- ADS writes `tokens/themes.generated.css` from the halves and the declared themes and
|
|
171
|
+
brands: `ads assets` writes it, and the showcase and MCP server rewrite it whenever tokens
|
|
172
|
+
or `ds.config.json` change. Commit it, never edit it; it is the last foundation import.
|
|
173
|
+
After editing tokens without a running showcase, run `ads assets` (`themes-generated`
|
|
174
|
+
fails when it is stale).
|
|
175
|
+
- `data-theme="<name>"` on `<html>` themes the page; on any element it themes that section
|
|
176
|
+
and everything inside it, down to the next `data-theme`. A themed section paints its own
|
|
177
|
+
canvas and text (`base.css`).
|
|
178
|
+
- Add a theme for a real need: high contrast, a dimmed reading mode. Add a half for it to
|
|
179
|
+
every themed token. Check a theme in the showcase (the theme button steps through declared
|
|
180
|
+
themes) and capture it by name.
|
|
181
|
+
- Show content that belongs to one theme (a dark logo variant) with the generated display
|
|
182
|
+
switch: `display: var(--display-dark, block)`. It is `none` outside the nearest dark
|
|
183
|
+
theme. Never style by theme or brand with a selector (`[data-theme="dark"] &`,
|
|
184
|
+
`:root[data-brand] &`): it ignores the nearest section (`theme-selector`). Give per-theme
|
|
185
|
+
values as token halves instead.
|
|
186
|
+
- A per-theme value that comes from data at runtime (a chart series color, a highlighter
|
|
187
|
+
color) uses the generated helpers, never `light-dark()` (`theme-light-dark`):
|
|
188
|
+
`style={{ "--series": themed({ light: a, dark: b }) }}` with every declared theme as a key,
|
|
189
|
+
or `themedByScheme({ light: a, dark: b })` when the data has only light and dark (each
|
|
190
|
+
theme takes the value for its scheme). Values are complete colors.
|
|
191
|
+
- To follow the OS setting, set `"followSystemTheme": true` in `ds.config.json`: a page
|
|
192
|
+
without `data-theme` takes the first declared theme whose scheme matches
|
|
193
|
+
`prefers-color-scheme`. An explicit `data-theme` always wins. Letting the user choose and
|
|
194
|
+
remembering it is application code: it sets `data-theme`.
|
|
195
|
+
|
|
196
|
+
## Brands
|
|
197
|
+
|
|
198
|
+
A brand is a second axis beside the theme: the theme sets the color mode, the brand sets
|
|
199
|
+
identity (an accent ramp, a font). Use brands for white label (one product, each customer's
|
|
200
|
+
accent, font and logo, each in light and dark), a product family, or a co-branded partner
|
|
201
|
+
section; without them every combination becomes a theme (`acme-light`, `acme-dark`, …).
|
|
202
|
+
|
|
203
|
+
Declare brands in `ds.config.json` (`brands: [{ name }]`, the first is the default; leave
|
|
204
|
+
`brands` out for one brand). The default brand's values are the ones on `:root`. Another
|
|
205
|
+
brand re-sets existing tokens on its own selector only, with every half of a themed token it
|
|
206
|
+
changes:
|
|
207
|
+
|
|
208
|
+
```css
|
|
209
|
+
[data-brand="acme"] {
|
|
210
|
+
--color-accent-9-light: oklch(55% .2 25);
|
|
211
|
+
--color-accent-9-dark: oklch(70% .16 25);
|
|
212
|
+
--font-sans: Georgia, serif;
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
- `data-brand="<name>"` on `<html>` brands the page; on any element that section. Brand and
|
|
217
|
+
theme are independent: each element takes its nearest brand and its nearest theme, at any
|
|
218
|
+
nesting depth, including the default brand inside another brand's section.
|
|
219
|
+
- Errors: a brand that gives a themed token one value (`brand-theme-value`) or only some of
|
|
220
|
+
its halves or ramp steps (`brand-coverage`), a token only a brand defines
|
|
221
|
+
(`brand-new-token`), a declared brand without values (`brand-empty`), a `data-brand` name
|
|
222
|
+
the config does not declare (`brand-undeclared`). `token-contrast` runs for every brand
|
|
223
|
+
in every theme.
|
|
224
|
+
- A brand's logo is brand artwork (`ads://guides/branding`). Render every brand's logo and
|
|
225
|
+
show each with `display: var(--display-brand-<brand>, block)`, so a section shows its
|
|
226
|
+
nearest brand's logo.
|
|
227
|
+
- The showcase shows a brand selector next to the theme button; captures take `brand`;
|
|
228
|
+
`ads tokens --format dtcg --brand <name>` exports a brand (with `--theme`, one brand in
|
|
229
|
+
one theme).
|
|
230
|
+
|
|
231
|
+
## Colors in Canvas, WebGL and SVG renderers
|
|
232
|
+
|
|
233
|
+
A renderer that needs colors as values (a graph, a chart, a canvas) reads them from the
|
|
234
|
+
generated palette, never from the page per item. `tokens/themes.generated.ts` holds every
|
|
235
|
+
color token resolved for every context (`<theme>`, and `<brand>/<theme>` for other brands)
|
|
236
|
+
as `{ css, rgba }`: `css` is `#rrggbb`, or `rgba(…)` when translucent; `rgba` is sRGB
|
|
237
|
+
0–255 with alpha 0–1. Aliases, halves and `color-mix()` are resolved; out-of-gamut colors
|
|
238
|
+
are clipped per channel, as a canvas does. ADS writes it with `themes.generated.css`.
|
|
239
|
+
|
|
240
|
+
```ts
|
|
241
|
+
import { paletteFor, observePalette } from "@ds";
|
|
242
|
+
|
|
243
|
+
let colors = paletteFor(container); // once per render pass
|
|
244
|
+
const fill = colors["--accent"].rgba; // inside the per-node loop
|
|
245
|
+
const stop = observePalette(container, next => { colors = next; redraw(); });
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
- `paletteFor(element)` returns the palette of the element's nearest theme and brand (and
|
|
249
|
+
the OS setting under `followSystemTheme`). Call it once per render or context change; look
|
|
250
|
+
colors up inside loops.
|
|
251
|
+
- `observePalette(element, callback)` calls back once when the element's theme or brand
|
|
252
|
+
changes; redraw from it instead of rebuilding the renderer. It returns the unsubscribe.
|
|
253
|
+
- `paletteContext(element)` returns the context key (`<theme>` or `<brand>/<theme>`) for
|
|
254
|
+
`palette[key]` or for caching per context.
|
|
255
|
+
- `resolveColor(element, value)` resolves a color that is not a palette token (currentColor,
|
|
256
|
+
a value from data) once, without inserting elements, and caches it.
|
|
257
|
+
- A token whose value cannot be resolved ahead of time (currentColor, relative color syntax,
|
|
258
|
+
system colors) is not in the palette in any context; `unresolved` lists it. Use
|
|
259
|
+
`resolveColor` for those.
|
|
260
|
+
- The palette reflects token sheets, not inline token overrides at runtime or `@media`
|
|
261
|
+
variants.
|
|
262
|
+
|
|
263
|
+
`render-color-probe` (review) flags a computed-style color read or `getImageData` inside a
|
|
264
|
+
per-item path (an array callback, a loop body, `nodeReducer`/`edgeReducer`, d3 `.attr`/
|
|
265
|
+
`.style` callbacks). Move the read out with `paletteFor`.
|
|
158
266
|
|
|
159
267
|
## Spacing
|
|
160
268
|
|
|
@@ -152,7 +152,9 @@ current rendered revision and complete acceptance before finishing the change.
|
|
|
152
152
|
After rendered review, call `ads_accept({id,revision})` once. It checks that exact
|
|
153
153
|
revision, runs mandatory ADS guards plus `acceptance.checks` and, when
|
|
154
154
|
`acceptance.behaviorChecks` is enabled, affected registered behavior checks against an isolated candidate, and applies passing changes at
|
|
155
|
-
their normal paths.
|
|
155
|
+
their normal paths. When `acceptance.browserAudit` is enabled it also runs the axe-core
|
|
156
|
+
audit on the candidate's affected UI scenarios; an `a11y-axe` error rejects the draft.
|
|
157
|
+
Fix it in the component and accept the new revision. Changes during checking or baseline conflicts prevent
|
|
156
158
|
application. Successful acceptance removes the proposal and records an event.
|
|
157
159
|
There is no separate Apply or Iterate action. A failed attempt retains the draft;
|
|
158
160
|
inspect its returned resultId with `ads_results` and fix the reported boundary.
|
|
@@ -23,8 +23,9 @@ ads_apply_patch({"unit":"components/Example","patchFile":"<returned patchFile>",
|
|
|
23
23
|
The dry run validates the candidate in an isolated project copy using mandatory
|
|
24
24
|
ADS guards, `acceptance.checks` and, when `acceptance.behaviorChecks` is enabled,
|
|
25
25
|
affected registered behavior checks. Registration alone does not require a test
|
|
26
|
-
at acceptance.
|
|
27
|
-
|
|
26
|
+
at acceptance. With `acceptance.browserAudit`, axe-core also audits the candidate's
|
|
27
|
+
affected UI scenarios; `a11y-axe` errors reject the patch. See [validation policies](validation.md).
|
|
28
|
+
Configured browser checks use that candidate's managed preview, not the live showcase. Read the summary, then page failing
|
|
28
29
|
`outcomes`, `diagnostics` or pipeline `checks` through `ads_results` with its
|
|
29
30
|
`resultId`. Inspect one exact outcome with `ads_investigate({unit,check,runId})`;
|
|
30
31
|
fix the draft and diff again. See [evidence.md](evidence.md) for page/range limits.
|