@su-sws/synthetic-web-team 0.1.0

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.
Files changed (82) hide show
  1. package/AGENTS.md +149 -0
  2. package/README.md +321 -0
  3. package/package.json +58 -0
  4. package/packages/cli/bin/sws.mjs +722 -0
  5. package/packages/cli/src/axe.mjs +164 -0
  6. package/packages/cli/src/browser.mjs +192 -0
  7. package/packages/cli/src/checks.mjs +1254 -0
  8. package/packages/cli/src/github.mjs +131 -0
  9. package/packages/cli/src/history.mjs +137 -0
  10. package/packages/cli/src/perf.mjs +245 -0
  11. package/packages/cli/src/preflight.mjs +185 -0
  12. package/packages/cli/src/report.mjs +315 -0
  13. package/packages/cli/src/states.mjs +556 -0
  14. package/packages/wizard/bin/wizard.mjs +767 -0
  15. package/packages/wizard/src/detect.mjs +135 -0
  16. package/packages/wizard/src/emit.mjs +553 -0
  17. package/skills/role-accessibility-lead/SKILL.md +183 -0
  18. package/skills/role-api-architect/SKILL.md +65 -0
  19. package/skills/role-backend-developer/SKILL.md +66 -0
  20. package/skills/role-compliance-officer/SKILL.md +73 -0
  21. package/skills/role-content-designer/SKILL.md +145 -0
  22. package/skills/role-devops/SKILL.md +200 -0
  23. package/skills/role-discoverability/SKILL.md +164 -0
  24. package/skills/role-frontend-developer/SKILL.md +167 -0
  25. package/skills/role-fullstack-developer/SKILL.md +56 -0
  26. package/skills/role-identity-engineer/SKILL.md +77 -0
  27. package/skills/role-information-architect/SKILL.md +136 -0
  28. package/skills/role-infrastructure-architect/SKILL.md +60 -0
  29. package/skills/role-qa-engineer/SKILL.md +81 -0
  30. package/skills/role-security-operations/SKILL.md +56 -0
  31. package/skills/role-software-architect/SKILL.md +75 -0
  32. package/skills/role-staff-technical-architect/SKILL.md +73 -0
  33. package/skills/role-strategist/SKILL.md +122 -0
  34. package/skills/role-user-researcher/SKILL.md +66 -0
  35. package/skills/role-ux-designer/SKILL.md +159 -0
  36. package/skills/sws-compliance-check/SKILL.md +153 -0
  37. package/skills/sws-decanter/SKILL.md +191 -0
  38. package/skills/sws-deploy/SKILL.md +162 -0
  39. package/skills/sws-diverge/SKILL.md +131 -0
  40. package/skills/sws-github/SKILL.md +171 -0
  41. package/skills/sws-install/SKILL.md +97 -0
  42. package/skills/sws-netlify/SKILL.md +110 -0
  43. package/skills/sws-onboard/SKILL.md +85 -0
  44. package/skills/sws-preflight/SKILL.md +87 -0
  45. package/skills/sws-prior-art/SKILL.md +137 -0
  46. package/skills/sws-vercel/SKILL.md +117 -0
  47. package/standards/fragments/global-footer.yml +137 -0
  48. package/standards/fragments/identity-bar.yml +180 -0
  49. package/standards/hosting/capabilities.yml +215 -0
  50. package/standards/hosting/github-pages.yml +306 -0
  51. package/standards/hosting/netlify.yml +234 -0
  52. package/standards/hosting/vercel.yml +284 -0
  53. package/standards/patterns/components.md +162 -0
  54. package/standards/patterns/content.md +130 -0
  55. package/standards/patterns/decanter.md +352 -0
  56. package/standards/patterns/discoverability.md +121 -0
  57. package/standards/patterns/forms.md +116 -0
  58. package/standards/patterns/ia.md +126 -0
  59. package/standards/patterns/motion.md +267 -0
  60. package/standards/patterns/sws-conventions.md +225 -0
  61. package/standards/policy/accessibility.md +241 -0
  62. package/standards/policy/brand.md +213 -0
  63. package/standards/policy/escalation.md +53 -0
  64. package/standards/policy/identity.md +96 -0
  65. package/standards/policy/minsec.md +119 -0
  66. package/standards/policy/minweb.md +87 -0
  67. package/standards/policy/privacy.md +114 -0
  68. package/standards/policy/procurement.md +79 -0
  69. package/standards/prior-art/README.md +205 -0
  70. package/standards/prior-art/catalog.yml +409 -0
  71. package/standards/prior-art/patterns/INDEX.md +53 -0
  72. package/standards/prior-art/repos.yml +734 -0
  73. package/standards/recipes/astro-ssr/RECIPE.md +274 -0
  74. package/standards/recipes/astro-ssr/acceptance.yml +168 -0
  75. package/standards/recipes/astro-static/RECIPE.md +468 -0
  76. package/standards/recipes/astro-static/acceptance.yml +800 -0
  77. package/standards/recipes/next-ssr/RECIPE.md +407 -0
  78. package/standards/recipes/next-ssr/acceptance.yml +187 -0
  79. package/standards/scope.md +111 -0
  80. package/standards/stack/performance-budget.yml +95 -0
  81. package/standards/stack/reference-versions.yml +168 -0
  82. package/standards/stack/requirements.yml +154 -0
@@ -0,0 +1,225 @@
1
+ # SWS conventions, derived from production repos
2
+
3
+ **What SWS actually does, established by reading 11 production repos on 2026-08-10, then corrected by SWS on the same day.**
4
+
5
+ Source: `standards/prior-art/repos.yml`. Method: `package.json` on each default branch, followed by a review conversation.
6
+
7
+ ## Read this part first
8
+
9
+ The first version of this document proposed four corrections to the project's standards, drawn from what the repos showed. **Three of the four were wrong.** They are preserved below with the correction, because the pattern of error is more useful than the conclusions were.
10
+
11
+ | I claimed | Reality | My error |
12
+ |---|---|---|
13
+ | Use Astro 6, since `sws-astro` does | Astro 7 is fine. More importantly, **stop naming versions at all** | Solved the wrong problem. I treated a version mismatch as needing a decision when it needed to be designed away |
14
+ | `sa11y` is the house dev a11y tool | It is a **content-author** tool in Visual Editor overlays | Inferred purpose from presence. A dependency tells you *what*, never *why* |
15
+ | Use Cypress, since Playwright appears nowhere | **Playwright**, because that is where the market is going | Read current practice as intent. Where a team is heading is not in its lockfiles |
16
+ | npm, never pnpm | npm primary, yarn secondary. Correct | Fine |
17
+ | Ask before recommending Turbopack, since four repos opt out | **Turbopack is the forward choice.** The four `--webpack` pins are one point-in-time decision, copy-forked | Counted repos instead of lineages. Four siblings are one data point |
18
+
19
+ The last row was added 2026-09-01, three weeks after the others, and it is the most useful of the four because it failed a *different* clause. The first three misread purpose or direction. This one misread **sample size**: I treated four repos in one family as four independent votes, when copy-forking means they are one decision replicated. And copy-forking is a practice this project deliberately endorses, so the pattern will recur.
20
+
21
+ **Count lineages, not repos.** Before treating agreement as a convention, ask whether the repos are siblings. If they are, you have found a frozen decision rather than a live convention.
22
+
23
+ The broader lesson is in the third clause of the precedence rule (see `standards/prior-art/README.md`): prior art establishes what an org *does*, and cannot establish *why* or *where it is going*. Both require asking a person. An agent that mines repos and skips that conversation will confidently entrench the present.
24
+
25
+ Scoreboard, which is the honest summary: **five proposed corrections, four wrong.** The one that was right was the one that changed nothing.
26
+
27
+ ## The one real correction
28
+
29
+ ### npm primary, yarn secondary, pnpm not in use
30
+
31
+ Package managers split by family: **npm** across the Storyblok/ADAPT repos, **yarn 4.x** across the decoupled Drupal repos and `ccc-bulletin`, **pnpm** nowhere.
32
+
33
+ An earlier draft proposed pnpm for our own monorepo, justified partly by needing `overrides` for the Decanter/Tailwind clash. Decanter 8 removed that clash and the justification with it.
34
+
35
+ **Standard:** our repo uses npm. Recipes respect whatever a project already has and never convert it. Any advice touching dependency overrides must be manager-aware, since npm `overrides` and yarn `resolutions` behave differently.
36
+
37
+ ## Versions: install latest, do not pin
38
+
39
+ The most important correction is a philosophy, not a fact. **Recipes name no versions.**
40
+
41
+ I had built a `constraints.yml` with allowed major ranges and a canary to flag when latest moved past them. That is a version-pinning scheme wearing a different hat, and it recreates exactly the rot that dropping starter packages was meant to avoid.
42
+
43
+ **Standard:** recipes install current releases and record what resolved. Constraints exist only where a version boundary is genuinely load-bearing, meaning getting it wrong produces a broken or non-compliant result. Across the whole `astro-static` recipe there is **exactly one**: Decanter 8 rather than 7, because it is a breaking architecture change and `npm i decanter` currently resolves to v7.
44
+
45
+ Everything else follows or does not matter. Tailwind 4 arrives transitively through Decanter. Node requirements come from whatever Astro currently needs. Astro majors are just latest.
46
+
47
+ Prefer expressing standards as **things to avoid**, which age far better than versions to require: no `@astrojs/tailwind`, no `tailwind.config.js`, no `output: 'hybrid'`. Those stay true across releases.
48
+
49
+ `reference-versions.yml` keeps a dated snapshot for the canary to diff against, and is explicitly advisory. Nothing installs from it.
50
+
51
+ ## Accessibility: sa11y is for content authors
52
+
53
+ `sa11y` appears in five repos, and I read that as a developer tooling convention. It is not. **SWS uses it in Visual Editor overlays so content authors can spot accessibility problems while editing their own content.**
54
+
55
+ The dependency data supports the correction exactly, and I should have noticed. sa11y correlates **perfectly** with Storyblok across all 11 repos:
56
+
57
+ | Repo | Storyblok | sa11y |
58
+ |---|---|---|
59
+ | `adapt-stanford-homesite` | yes | yes |
60
+ | `adapt-online-giving` | yes | yes |
61
+ | `ood-giving-campaign` | yes | yes |
62
+ | `ood-stanford-tour` | yes | yes |
63
+ | `ccc-bulletin` | yes | yes |
64
+ | `adapt-directory` | no | no |
65
+ | `sws-astro` | no | no |
66
+ | 4 decoupled Drupal repos | no | no |
67
+
68
+ Five for five with Storyblok, six for six without. A perfect correlation with the CMS was the clue that it was a CMS-authoring tool, and I read the count instead of the pattern.
69
+
70
+ **Why this matters beyond a tooling label.** It fills a real gap that a build-time a11y gate cannot: everything axe checks in CI concerns the site as built, and says nothing about what an editor publishes next week. On a CMS-backed site most accessibility debt arrives *after* launch, through content. sa11y in the authoring overlay is the only control in the whole system that addresses it.
71
+
72
+ **Standard:**
73
+
74
+ - Build-time gate: Playwright plus axe. Covers roughly 30 percent of issues per ODA guidance.
75
+ - Authoring-time feedback: **sa11y in the Visual Editor overlay, on every CMS-backed project.** Belongs to `role-content-designer` as much as to `role-accessibility-lead`.
76
+ - Manual checklist: the remaining ~70 percent.
77
+ - Siteimprove: post-launch, its own criteria, registration required by MinWeb.
78
+
79
+ Note `ccc-bulletin` is on sa11y 5.x while the others are on 4.x, so check for a migration guide.
80
+
81
+ **SCOPE NOTE, added 2026-09-03.** The analysis above stands and the correction it
82
+ records was right. But **this package now has no CMS** — see
83
+ `standards/scope.md` — so the authoring-time row has nothing to attach to and
84
+ `sa11y` is deferred with the CMS.
85
+
86
+ Worth being precise about what that does to the gap, because it is the strongest
87
+ argument for the narrow scope: with content in the repo there is no "what an
88
+ editor publishes next week" that bypasses the build. Every content change is a
89
+ commit, and it runs the build-time gate. The control did not disappear; it moved
90
+ into CI, where it is harder to skip. The 30 percent ceiling is unchanged, and
91
+ embedded third-party content is still published outside the build.
92
+
93
+ ## Testing: Playwright forward, Cypress present
94
+
95
+ Cypress is configured in `adapt-stanford-homesite`, `adapt-directory`, and `ccc-bulletin`, with e2e and component testing. Playwright appears in none.
96
+
97
+ **Standard: new work uses Playwright**, per SWS direction and the wider market. Never convert an existing Cypress project, and expect to encounter Cypress when reading prior art. `ccc-bulletin` also runs BackstopJS for visual regression, which is the only instance and worth knowing about rather than requiring.
98
+
99
+ ## Conventions confirmed as conventions
100
+
101
+ These held up, and unlike the sa11y case the purpose is unambiguous from usage.
102
+
103
+ ### `cnbuilder` for conditional classes
104
+
105
+ `cnbuilder ^3.1.0`, the same version across seven repos: `sws-astro`, `adapt-stanford-homesite`, `adapt-online-giving`, `adapt-directory`, `ood-giving-campaign`, `ood-stanford-tour`, `ccc-bulletin`. The decoupled Drupal family uses `clsx` plus `tailwind-merge` instead. Both legitimate, split by family. New Astro and Storyblok work uses `cnbuilder`.
106
+
107
+ ### Heroicons, and the FontAwesome exception
108
+
109
+ `@heroicons/react` is near-universal and matches Decanter's own recommendation. `adapt-stanford-homesite` uses **FontAwesome Pro** behind a licence-gated token with a `preinstall` check. Reasonable for the university homepage, bad to propagate: a unit site inheriting it gets an install failure and a licence nobody mentioned. Recipes use Heroicons.
110
+
111
+ ### HashiCorp Vault for secrets
112
+
113
+ `netlify-plugin-vault-variables` across the ADAPT family, `node-vault` across the decoupled Drupal family. SWS does not keep production secrets in `.env` files. This means MinWeb's "no API keys in Git" requirement is already handled institutionally, and our secrets check is a backstop rather than the primary control.
114
+
115
+ ### Two platforms, split by family
116
+
117
+ **Corrected 2026-09-03.** This section previously read "Netlify is the platform"
118
+ and called Vercel a swap that costs you the shared tooling. That was wrong, and
119
+ wrong in a way worth keeping visible.
120
+
121
+ There are **two hosts in production, one per lineage**:
122
+
123
+ | Family | Host | Secrets |
124
+ |---|---|---|
125
+ | `storyblok-next-netlify` (ADAPT/OOD, 6 repos) | **Netlify** | `netlify-plugin-vault-variables` |
126
+ | `decoupled-drupal` (Cardinal Sites, 5 repos) | **Vercel** | `node-vault` |
127
+
128
+ Count lineages, not repos: that is **two decisions**, not eleven, and neither is
129
+ a majority over the other.
130
+
131
+ **How the error happened**, because the mechanism will recur. Hosting was
132
+ inferred from `package.json`, and `package.json` does not record where a repo
133
+ deploys. The Vercel family barely appears in dependency data *because* it uses
134
+ `node-vault` rather than a host build plugin — the more portable choice, and
135
+ therefore the invisible one. The single real signal, a stray
136
+ `@vercel/speed-insights` in `csp-nextjs`, got discounted as copy-fork noise.
137
+ Absence of vendor dependencies is not absence of the vendor.
138
+
139
+ So: **neither host is the default in the abstract.** Recipes carry a hosting
140
+ axis instead, in `standards/hosting/`, and the right host is usually the one the
141
+ unit is already on. GitHub Pages remains the cheapest path for a purely static
142
+ site.
143
+
144
+ ### Decanter 8 arrives from the git branch
145
+
146
+ Both v8 consumers install from git, predating the npm publish:
147
+
148
+ ```json
149
+ "decanter": "github:SU-SWS/decanter#v8" // sws-astro
150
+ "decanter": "https://github.com/SU-SWS/decanter.git#v8" // ccc-bulletin
151
+ ```
152
+
153
+ Recipes prefer npm since it is versioned and lockfile-friendly, and the `decanter.installed` check must accept both forms without flagging the git one.
154
+
155
+ ### Two CMS paths, both current at SWS, both out of scope here
156
+
157
+ **Deferred 2026-09-03.** Recorded because the record is accurate and the scope is
158
+ expected to widen, not because you should wire one up today. See
159
+ `standards/scope.md`.
160
+
161
+ **Storyblok** via `@storyblok/react`, with versions spread from 3.x in the older OOD sites to 6.x in `ccc-bulletin` and `adapt-online-giving`. Cite `ccc-bulletin` for current practice. **Decoupled Drupal** via `graphql-request` plus `graphql-codegen`, or `next-drupal` in `sulgryphon-nextjs`.
162
+
163
+ Both are real, in production, and not wrong. This package simply has no tested
164
+ recipe for either, and a CMS request is **out of scope rather than a divergence**
165
+ — see the `sws-diverge` skill for how to handle it.
166
+
167
+ ### Search: Algolia default, Coveo by context
168
+
169
+ Algolia with `react-instantsearch` across the decoupled Drupal family. Coveo only in `adapt-directory` for Stanford GSB, with a substantial CLI-driven org resource workflow. Confirms the earlier recommendation.
170
+
171
+ ## The design system is not monolithic
172
+
173
+ `www.stanford.edu` does not consume Decanter. It is **its own design system, heavily derived from Decanter, and currently influencing Decanter 8.**
174
+
175
+ I had logged the missing `decanter` dependency as a gap to explain. It is an architectural fact, and it changes how the whole design layer should be described.
176
+
177
+ **Consequences:**
178
+
179
+ 1. **The homesite is not a Decanter conformance reference.** Its brand furniture is authoritative, because brand is brand and this is the canonical site. Its tokens and CSS are a **parallel vocabulary**. Copying them into a Decanter 8 project yields something that looks approximately right and does not use the design system, which passes visual review and fails every token check. That failure is invisible in a screenshot, which is what makes it worth a standing warning.
180
+
181
+ 2. **It is a preview of Decanter 8's direction.** Patterns proven on the homesite are feeding back into the system. `role-ux-designer` should read it as "where this is going," not "what to match today."
182
+
183
+ 3. **"What does Stanford's design system say?" sometimes has two answers.** Decanter 8 says X, the homesite is piloting Y. A feedback loop from a flagship project into the design system is healthy and how these things should evolve, but it means there is no single instantaneous source of truth, and guidance should stop implying there is.
184
+
185
+ 4. **It breaks the `era` model.** Era assumes a line from Decanter 6 to 7 to 8 where newer is better. The homesite is simultaneously ahead of Decanter 8 and incompatible with it. `prior-art/README.md` now tracks **lineage** (consumer, derived, upstream) alongside era.
186
+
187
+ **New open question:** if a unit site wants a pattern that exists on `www.stanford.edu` but not yet in Decanter 8, does it wait for the pattern to land, or adopt early and accept a parallel vocabulary? This will come up, and neither answer is obviously right.
188
+
189
+ ## Copy-forking is the incumbent workflow
190
+
191
+ `cardinalsites-nextjs` and `csp-nextjs` are **intentional sibling instances**: two clients, one repo copied to create the other. I had flagged them as possible unmanaged divergence. They are neither a problem nor an accident.
192
+
193
+ This deserves more than a correction in a footnote, because **copy-forking a previous client site is the existing solution to the problem this project is trying to solve.** It is fast, it carries genuinely working code, and it preserves a hundred decisions no document ever captured. It is a good practice, and any tool that treats a near-duplicate repo as a defect has misread the shop.
194
+
195
+ What copy-forking cannot do is carry standards forward or tell you what has moved. A fork made 18 months ago silently inherits that era's Decanter, that era's accessibility target, and that era's dependency set, permanently and invisibly.
196
+
197
+ So the honest positioning is not "stop copy-forking." It is: **keep the reuse, add a way to know what changed.** A recipe is the diff a fork cannot give you. That framing is also better for adoption, since it starts from something the team already does well rather than asking them to abandon it.
198
+
199
+ Practical consequence: `relationship: sibling-instance` is a recognised, legitimate pattern in `repos.yml`. The agent reports it as context, never as drift.
200
+
201
+ ## Observations worth acting on
202
+
203
+ **`react-cookiebot` in `summer-nextjs` is a client requirement, not a convention.** It is the only cookie-consent tooling in the set, and SWS confirms Stanford centrally licenses **no** banner service. That instance was required by the client for that site.
204
+
205
+ This is a useful example of clause 2 of the precedence rule failing safely. A single occurrence is not a repeated independent choice, so it never qualified as a convention. Had it appeared in five repos I would have had to ask *why* before concluding anything, which is exactly the sa11y lesson.
206
+
207
+ The resulting guidance, which generalises well beyond cookies: no banner is required, do not hand-roll one, and **do not name a vendor**. Route to the University Privacy Office. See "route, don't recommend" in the project plan: for anything with legal, policy, or procurement implications, name the responsible office rather than a product. SWS is not the university's privacy or procurement authority, and guidance that reads like an endorsement quietly implies it is.
208
+
209
+ **AI search is already in production.** `adapt-stanford-homesite` carries `@google-cloud/discoveryengine` and `@google/genai`. `role-discoverability` is a conversation with that team, not greenfield work.
210
+
211
+ **No house headless-component library.** `react-aria` and `react-stately` in `sulgryphon-nextjs`, `@base-ui/react` in the decoupled family, MUI in `ccc-bulletin` and `adapt-directory`, `@headlessui/react` in the ADAPT family. This is the layer where accessibility is usually won or lost, so it is worth asking whether there should be a house choice. `sulgryphon-nextjs` picking react-aria is the strongest a11y signal in the set.
212
+
213
+ **The decoupled Drupal family runs `--webpack` across all four repos.** Asked, and answered 2026-09-01: **a point-in-time decision to not adopt Turbopack, not a forward choice. Turbopack is the forward default for Next.js sites.** Recommend Turbopack for new work; do not convert an existing `--webpack` project to match. This is the fourth entry in the record of error above, and the sharpest one — see the note on lineage.
214
+
215
+ **Node floors vary** from `>=20` to `>=24`, most on 22. Since recipes no longer pin, this only matters as a reason not to fail an existing project for its Node version.
216
+
217
+ ## What this pass says about the method
218
+
219
+ The headline number is uncomfortable and worth keeping: **reading repos produced four proposed corrections and three were wrong.** The value was still real, because the review conversation those wrong proposals triggered produced better standards than either the repos or my reasoning alone. But the failure mode is now documented:
220
+
221
+ - Presence tells you **what**, never **why**. Confirm purpose before declaring a convention. The sa11y misread would have put a content-authoring tool into a CI pipeline where it does nothing useful, and left the actual post-launch content gap unaddressed.
222
+ - Current practice is not **intent**. Lockfiles are a record of decisions already made, and say nothing about direction. Playwright was invisible to the analysis precisely because the decision had not been executed yet.
223
+ - A version mismatch is often a **design smell**, not a decision to make. The right answer to "Astro 6 or 7" was to stop asking.
224
+
225
+ So prior art is a required input and an insufficient one. The recipe's step 0 stays, and it now ends with a human check rather than a conclusion.
@@ -0,0 +1,241 @@
1
+ ---
2
+ policy: accessibility
3
+ title: Accessibility, WCAG 2.1 AA, Siteimprove, and ODA
4
+ reviewed: 2026-09-02
5
+ ---
6
+
7
+ # Accessibility
8
+
9
+ ## The standard, and the wrinkle in it
10
+
11
+ **The target is WCAG 2.1 AA.**
12
+
13
+ Published Stanford policy (**Admin Guide 6.8.1**) still states WCAG **2.0 A and
14
+ AA**, and the university is moving to 2.1, which SWS has set as the working
15
+ standard. Where policy text lags the working standard, say so and date the note
16
+ rather than pretending the discrepancy does not exist.
17
+
18
+ Admin Guide 6.8.1 covers **existing content, new content, and purchases or major
19
+ revisions**. Not just new work. That scope is the part most often missed.
20
+
21
+ For context on whether a 2.1 target is obsolete: WCAG 2.0, 2.1, and 2.2 are all
22
+ simultaneously valid W3C Recommendations. 2.2 has been a Recommendation since
23
+ October 2023 and is also ISO/IEC 40500:2025. WCAG 3.0 is a Working Draft with no
24
+ firm timeline. So 2.1 AA is a current target, not a legacy one. WCAG 2.2 adds six
25
+ criteria and axe covers exactly one of them (`target-size`), which is a useful
26
+ measure of how far automation reaches.
27
+
28
+ ## The 30 percent number, which is the most useful sentence here
29
+
30
+ **Automated testing catches roughly 30 percent of accessibility issues.** That is
31
+ ODA's own figure.
32
+
33
+ Say it out loud, every time. A green axe run is a **floor, not a conformance
34
+ claim**. Never describe a site as accessible on the strength of a passing test,
35
+ and never let a report imply it.
36
+
37
+ ## Five signals, none sufficient alone
38
+
39
+ | Signal | When | Catches |
40
+ |---|---|---|
41
+ | **Content review in git** | Every content change | Content problems, before publish. Under this package's static-content scope every edit is a commit, so it runs the two CI signals below |
42
+ | **axe** via Playwright in CI | Every build | ~30 percent of issues in the built site |
43
+ | **State audit**, in the same `sws a11y` run | Every build | Hover and focus states that change colour and nothing else, which axe cannot see |
44
+ | **Manual checklist** | Pre-launch, and on significant change | The rest |
45
+ | **Siteimprove** | After launch, continuously | Its own criteria, site-wide |
46
+
47
+ **On the `sa11y` row that used to head that table.** `sa11y` is a
48
+ **content-author** tool, not a developer tool, and it belongs in the Visual
49
+ Editor overlay on a CMS-backed site, because content published after launch is
50
+ the accessibility risk no CI run can reach. **This package has no CMS** — see
51
+ `standards/scope.md` — so content arrives through git and CI reaches all of it.
52
+ The tool returns when a CMS does.
53
+
54
+ That is a genuine improvement, and it is also the smaller of the two limits.
55
+ The 30 percent ceiling above is untouched by it.
56
+
57
+ ## Siteimprove and axe are not comparable
58
+
59
+ This causes recurring confusion, so be precise.
60
+
61
+ Siteimprove runs **Alfa**, its own ACT-rules engine, not axe-core. Its
62
+ Accessibility score spans **A, AA, and AAA** plus two non-normative categories,
63
+ WAI-ARIA authoring practices and Best Practices. So AAA and best-practice
64
+ findings drag a number whose policy target is 2.1 AA.
65
+
66
+ Scoring is **proprietary and weighted**: most issues are assessed **site-wide**,
67
+ meaning one violation anywhere can cap the score, with only about 30 points
68
+ available from per-page work. It also reports **"Potential Issues"** requiring
69
+ human confirmation, a bucket with no axe equivalent, and the usual explanation
70
+ for "Siteimprove found more than axe."
71
+
72
+ Present them **side by side with distinct labels, never as one number or a
73
+ delta**. Explain that a score below 100 may be entirely AAA and best-practice
74
+ findings out of scope for the policy target. **ACT rule IDs are the only clean
75
+ join key** if the two ever need correlating.
76
+
77
+ Siteimprove **registration** is a MinWeb requirement, not an accessibility one.
78
+ See [`minweb.md`](minweb.md).
79
+
80
+ ## What automation cannot see
81
+
82
+ The manual checklist is the substance of the work. Structure it around what axe
83
+ provably misses:
84
+
85
+ - **Keyboard operability end to end.** Focus order matches visual order, focus is
86
+ always visible, nothing traps focus, modals return focus on close.
87
+ - **Screen reader pass** on key templates: landmarks, heading outline, link
88
+ lists, announced form errors.
89
+ - **Contrast in context**, including text on images and gradients, and in every
90
+ state: hover, focus, disabled, visited.
91
+ - **Meaning not carried by colour alone.** The hover and focus half of this is
92
+ now measured — see [State feedback](#state-feedback-must-not-be-colour-alone)
93
+ below — but colour used to carry meaning in charts, status badges, required
94
+ fields, and map keys still needs a person.
95
+ - **Alt text quality.** `alt="image"` passes the presence check and fails the
96
+ human.
97
+ - **Reflow at 320 pixels and 400 percent zoom.**
98
+ - **`prefers-reduced-motion` honoured**, meaning the static thing renders rather
99
+ than a faster animation. And **content still visible with JavaScript
100
+ disabled**: entry motion that ships its hidden state in the HTML makes content
101
+ permanently invisible if the script never runs, which happened on this
102
+ project's own site to 13 blocks. See
103
+ [`../patterns/motion.md`](../patterns/motion.md).
104
+ - **Captions and audio description on all new video**, which Stanford policy
105
+ requires. Not optional, not a nice-to-have.
106
+ - **Plain language and reading level**, which is cognitive accessibility. See
107
+ [`../patterns/content.md`](../patterns/content.md).
108
+ - **Error recovery.** Can someone who makes a mistake fix it without starting
109
+ over.
110
+
111
+ Record results in `docs/a11y/manual-checklist.md`, dated, with who did it.
112
+
113
+ ## State feedback must not be colour alone
114
+
115
+ **Hover and focus states have to change something other than colour.** Adding an
116
+ underline, or removing one that is there at rest, is the fix in almost every
117
+ case: it is one class, it costs no layout, and it reads in monochrome, in Windows
118
+ High Contrast, and to anyone with a colour vision deficiency.
119
+
120
+ The basis in WCAG 2.1:
121
+
122
+ | Criterion | What it gives you |
123
+ |---|---|
124
+ | **1.4.1 Use of Color** (A), technique **G183** | Where colour identifies a control, a non-colour cue is required on **both** hover **and** focus. G183 is the technique that makes an unstyled-looking link conformant, and it is a package: 3:1 contrast against surrounding text *plus* the cue on hover *plus* the cue on focus. Two out of three is not the technique |
125
+ | **2.4.7 Focus Visible** (AA) | Focus must be visible at all. A control whose focus state changes nothing fails here, and the usual cause is a removed outline that was never replaced |
126
+ | **1.4.11 Non-text Contrast** (AA) | A focus indicator needs 3:1 against what is behind it, so a colour swap between two similar tones fails even where a cue exists |
127
+
128
+ **SWS applies the cue rule to every interactive control, not only to links that
129
+ depend on colour at rest.** That is deliberately stricter than G183 read
130
+ narrowly, for two reasons: a reader cannot tell which of your links happens to
131
+ carry an underline, and "is this link distinguishable from surrounding text"
132
+ is a judgment that changes every time the design does, so it is not a rule an
133
+ author can apply reliably or a check can measure honestly.
134
+
135
+ **This is measured, by `sws a11y`.** axe cannot see it — it audits one static
136
+ snapshot of the DOM, and a hover state does not exist in a snapshot — so a
137
+ control whose whole hover state is `hover:text-poppy-light` reads as a clean
138
+ page. The runner moves a real mouse, presses a real Tab key, and diffs computed
139
+ style, classifying each change as a colour or as a non-colour cue. Findings:
140
+ `a11y.state.hover-non-color`, `a11y.state.focus-non-color`,
141
+ `a11y.state.focus-visible`.
142
+
143
+ Found on this project's own site by a person, not a tool, which is the whole
144
+ argument for the manual checklist. Four control shapes were colour-only on
145
+ hover: the header wordmark, a bordered secondary button, the code-card copy
146
+ button, and a `<summary>`. All four were one class each.
147
+
148
+ ## Two ways an automated a11y result lies to you
149
+
150
+ Both were hit for real while building this project's own harness, and both make a
151
+ report worse than no report.
152
+
153
+ **1. axe can succeed without running.** A harness here once printed
154
+ `TOTAL VIOLATIONS: 0` while axe had silently failed to load. A clean result and a
155
+ result that never happened look identical in a report. The rule that follows:
156
+ **anything that cannot run reports `unknown`, never `pass`**, and `unknown`
157
+ withholds the criterion's points rather than awarding them. `sws a11y` checks that
158
+ axe classified at least one rule before believing a clean result.
159
+
160
+ **2. Animations produce false contrast failures.** axe reads *computed* colour, so
161
+ an element captured mid-fade measures the blend against its backdrop. This
162
+ project's own site produced four `color-contrast` violations at ratios of 1.05 to
163
+ 1.55, foregrounds like `#f9f9f9` on white — all false, all caused by `opacity-0`
164
+ plus a delayed `fadeInUp ... forwards`. `sws a11y` waits for animations to settle
165
+ before auditing.
166
+
167
+ **So: if you see near-white foregrounds and ratios close to 1, suspect the
168
+ harness before you suspect the design.** And treat a stale results file as no
169
+ result at all — a pass recorded against a previous build is not evidence about
170
+ this one.
171
+
172
+ ## Hiding things correctly, which Decanter documented wrongly for years
173
+
174
+ A recurring and genuine confusion, now settled upstream. There are **two
175
+ different** things people mean by "hidden," and picking the wrong one is either a
176
+ silent accessibility bug or a visible layout bug.
177
+
178
+ | What you want | Use |
179
+ |---|---|
180
+ | Hidden from **everyone**, in sync with `aria-hidden="true"` | `aria-hidden:hidden` |
181
+ | **Visually** hidden, still announced by screen readers | `sr-only` |
182
+ | Visually hidden until focused — the skip link pattern | `sr-only focus:not-sr-only` |
183
+
184
+ **Decanter's `.accessibility-hidden` and `.a11y-hidden` were removed in 7.5.0**,
185
+ and the docs describing them were wrong: they were said to hide content visually
186
+ while keeping it available to screen readers. **They never did that. They hid
187
+ content from everyone.** Anything relying on them for screen-reader-only text was
188
+ already broken.
189
+
190
+ Two practical consequences:
191
+
192
+ 1. **Audit before upgrading.** Removal does not break the build — elements that
193
+ used those classes simply **become visible**. Grep templates for
194
+ `a11y-hidden` and `accessibility-hidden`.
195
+ 2. **If you wanted the screen-reader behaviour, you need `sr-only`**, not a
196
+ rename. This is the case worth checking by hand, because the markup looks
197
+ correct either way.
198
+
199
+ See [`../patterns/decanter.md`](../patterns/decanter.md) for the migration detail.
200
+
201
+ ## Responding to a reported barrier
202
+
203
+ A defined obligation, and the first step is the one most often skipped.
204
+
205
+ 1. **Acknowledge in writing to the reporter.**
206
+ 2. **Copy ODA**, including the date and the issue.
207
+ 3. ODA coordinates the review, fix, and timeframe.
208
+ 4. If it genuinely cannot be remediated, provide **alternative access** to the
209
+ content or function.
210
+ 5. Log it in `docs/a11y/remediation-log.md`.
211
+
212
+ ## The accessibility statement
213
+
214
+ Every site needs the **Accessibility** link in the Global Footer, pointing at
215
+ Stanford's barrier-reporting page. That is the requirement and it is not yours to
216
+ reword. See [`brand.md`](brand.md).
217
+
218
+ A site-specific statement on top of that is good practice. Be honest in it: name
219
+ the standard (WCAG 2.1 AA), state known limitations, give a contact, and date it.
220
+ **A statement claiming full conformance without a manual audit behind it is worse
221
+ than none.**
222
+
223
+ ## Purchases
224
+
225
+ Any purchased product needs a **VPAT or ACR dated within the past 12 months**.
226
+ See [`procurement.md`](procurement.md).
227
+
228
+ ## ODA, and the temporary exception
229
+
230
+ Three doors, chosen by situation, never listed. Route per
231
+ [`escalation.md`](escalation.md).
232
+
233
+ A **temporary exception** exists where conformance is not technically feasible or
234
+ would fundamentally alter the service. That is a request to ODA, not a decision
235
+ an agent makes.
236
+
237
+ ## Tone
238
+
239
+ Accessibility advice fails when it moralises. Name the barrier, name who it
240
+ affects, give the fix, note the policy, move on. Someone who finds this preachy
241
+ stops listening, which helps nobody.