dorfteich/CLAUDE.md
Claude Opus 5 5a4a99196e
All checks were successful
CI / Auth e2e pack (pull_request) Successful in 8m36s
CI / Import/export fidelity gate (pull_request) Successful in 58s
CI / Lint, typecheck, test (pull_request) Successful in 6m22s
CI / Build container images (pull_request) Successful in 3m51s
CD / Build and push images (push) Successful in 15s
CD / Deploy to Test (push) Successful in 16s
CD / Smoke tests against Test (push) Successful in 1m16s
CD / Promote to Int (push) Successful in 13s
CI / Lint, typecheck, test (push) Successful in 6m32s
CI / Build container images (push) Has been skipped
CI / Auth e2e pack (push) Successful in 8m25s
CI / Import/export fidelity gate (push) Successful in 58s
#300: route icon-only controls through IconButton/IconLink
The notification bell sat higher and larger than search and the theme
toggle next to it. The cause was not the glyph: `.notifications-bell__button`
carried its own rules with neither flex centring nor an icon size, so the
svg was laid out inline on the text baseline and rendered at lucide's
24px default instead of the 1.15rem the shared `.icon-button` enforces.

Route every icon-only control through the shared components instead:

- `IconLink` joins `IconButton`, sharing one class helper. Three controls
  navigate (pond settings, graph, trash) and are links, not buttons —
  without a link twin they would have stayed the one group gluing the
  class on by hand.
- 17 hand-applied `className="icon-button …"` usages across nine files
  now go through the components, which is what enforces the accessible
  name on a control that shows only an icon.
- The bell's unread count reaches assistive technology. The badge sits
  inside the control, so `aria-label` hid it and a screen reader
  announced "Notifications" without ever saying how many.

An ESLint rule keeps it that way: `icon-button` on a raw button, anchor
or Link is now an error, in both string and template-literal form.

The plugin uninstall button keeps a title that differs from its name (it
explains why a required plugin is locked); IconButton spreads rest last,
so the explicit title still wins.

Also drops the graphify block from CLAUDE.md — it duplicates the
workspace-level instructions.
2026-08-01 06:56:13 +02:00

30 lines
1.6 KiB
Markdown

## Barrierefreiheit (verbindlich, ADR 0017)
Jede UI-Änderung wird von Anfang an barrierefrei entwickelt (WCAG 2.1
AA) — nicht nachträglich. Kurzfassung; Details und Begründung in
`docs/architecture/adr/0017-accessibility-by-default.md`:
- **Bausteine wiederverwenden:** `IconButton` (erzwungener Name),
`Field` (Label + Fehler-Verdrahtung), `useModalFocus` für Dialoge
(Trap/Initialfokus/Rückgabe + `aria-labelledby`). Keine Parallelbauten.
- **Tastatur zuerst:** alles erreichbar/bedienbar, Fokus sichtbar,
Escape schließt, kein Fokusverlust; Einzeltasten-Shortcuts respektieren
`lib/single-key-shortcuts.ts`.
- **Name/Rolle/Wert:** korrekte Rollen, lokalisierte (de+en) Labels,
Zustände via aria-*; dekorative Icons `aria-hidden`.
- **BEIDE Renderpfade:** Editor-/NodeView-Pfad UND docToHtml/Server-Pfad
gleichwertig behandeln (Cache rollt lazy aus).
- **Kontrast/Farbe:** Tokens nutzen (Text ≥ 4,5:1, UI ≥ 3:1;
`--color-border-input` für Feldränder; `--color-favorite` nur Icons);
Farbe nie als einziges Merkmal.
- **Reflow:** kein seitenweites Horizontal-Scrollen bei 320 px
(`min-width: 0` an Flex-/Grid-Kindern nicht vergessen).
- **Bewegung/Zeit:** `prefers-reduced-motion` respektieren, keine zu
kurzen Auto-Dismiss-Zeiten.
- **CI-Pack pflegen:** neue Kern-Screens in `apps/web/e2e/a11y.spec.ts`
aufnehmen; die Allowlist bleibt leer bzw. nur mit Begründung.
- Neue aria-Labels können bestehende `getByLabel`-e2e-Locator mehrdeutig
machen — betroffene Specs mit anpassen (scopen), nicht das Label opfern.
Verstöße gelten in Review und Abnahme als Funktionsfehler.