fix(stammbaum): raise cross-link opacity to 0.7 + add dash-render test (#724)

Review follow-ups:
- Leonie/UX: 0.55 navy on the sand canvas was ~2.6:1, under the WCAG 1.4.11 3:1
  non-text floor for senior readers; 0.7 clears it.
- Sara/QA: add a browser test that actually renders a cross-level link and
  asserts the distinct 2 6 dash, and that a non-cross-link parent edge stays
  solid — the cadence was previously only validated via the structural
  crossLinks array, never where it renders.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-06-04 14:16:01 +02:00
committed by marcel
parent e1d404609e
commit 4e8a430dc3
2 changed files with 86 additions and 2 deletions

View File

@@ -28,9 +28,11 @@ let { edges, positions, crossLinks = [], isConnectorActive = () => true }: Props
// Dash cadence + opacity for a cross-link, deliberately distinct from the
// ended-marriage spouse dash (`4 4`) so the two never read alike (WCAG 1.4.1:
// geometry carries the meaning too, not stroke alone).
// geometry carries the meaning too, not stroke alone). Opacity stays at 0.7 so
// the dotted line clears the WCAG 1.4.11 3:1 non-text contrast floor for
// senior / low-vision readers (a lighter 0.55 fell just under).
const CROSS_LINK_DASH = '2 6';
const CROSS_LINK_OPACITY = 0.55;
const CROSS_LINK_OPACITY = 0.7;
const crossLinkSet = $derived(new SvelteSet(crossLinks.map((c) => `${c.parentId}->${c.childId}`)));
function isCrossLink(parentId: string, childId: string): boolean {