From f1932fd5f62f9e9b7944cf4f0616c25d7ccad7d4 Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 29 Apr 2026 16:19:34 +0200 Subject: [PATCH] fix(person-mention): WCAG 1.4.11 contrast for mention pill and dropdown ring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two non-text-contrast failures, both flagged by Leonie #5621: 1. PersonMentionEditor mention pill: decoration-brand-mint (#A6DAD8) on white is ≈1.7:1 — fails the 3:1 minimum for meaningful UI indicators. Switch to decoration-ink/50, which matches the read-mode .person-mention rule (≈6.4:1) and keeps a unified underline language across modes. 2. MentionDropdown highlighted-row ring: ring-brand-mint on bg-brand-mint/20 is ≈2.5:1 — same failure class. Switch to ring-brand-navy (≈14.5:1 against the highlight background) so keyboard-driven selection has a clearly visible indicator. Co-Authored-By: Claude Opus 4.7 --- frontend/src/lib/components/MentionDropdown.svelte | 5 ++++- frontend/src/lib/components/PersonMentionEditor.svelte | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/MentionDropdown.svelte b/frontend/src/lib/components/MentionDropdown.svelte index acfaae49..5090b0bc 100644 --- a/frontend/src/lib/components/MentionDropdown.svelte +++ b/frontend/src/lib/components/MentionDropdown.svelte @@ -127,7 +127,10 @@ function selectItem(item: Person) {
{ }), CustomMention.configure({ renderHTML({ node }) { + // Underline color matches the read-mode .person-mention rule + // (ink at ~50% alpha) — brand-mint on white fails WCAG 1.4.11 + // Non-Text Contrast (≈1.7:1, needs 3:1). Leonie #5621. return [ 'span', { @@ -110,7 +113,7 @@ onMount(() => { 'data-person-id': node.attrs.personId, 'data-display-name': node.attrs.displayName, class: - 'mention-token underline decoration-brand-mint underline-offset-2 text-brand-navy font-medium' + 'mention-token underline decoration-ink/50 underline-offset-2 text-brand-navy font-medium' }, `@${node.attrs.displayName}` ];