From 99836bb08c5af98e3f0a006f793d44fb0abe4305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Mon, 27 Jul 2026 17:41:49 +0200 Subject: [PATCH] fix(documents): make the delete-key hint readable enough to be a hint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Del chip added beside the document card measured 4.06:1 against the card's background, under the 4.5:1 floor, and axe failed the vault on it. So the change that made the destructive key visible introduced a barrier of its own. It uses the full foreground token now. The design rule says muted for meta text, and a key hint is meta — but it is the one kind of meta that has to be readable at a glance, so here the contrast rule wins and the reason sits next to the class list rather than in a commit nobody will read again. Found by running the e2e suite locally before pushing rather than after. --- src/components/documents/document-card.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/documents/document-card.tsx b/src/components/documents/document-card.tsx index a1c05ffb1..94dec093d 100644 --- a/src/components/documents/document-card.tsx +++ b/src/components/documents/document-card.tsx @@ -296,12 +296,18 @@ export function DocumentCard({ the card holds focus (same `group-focus-within` trigger the checkbox uses) and hidden from the accessibility tree, because `aria-keyshortcuts` on the overlay button already announces the same - key. `pointer-events-none` keeps it out of the click target. */} + key. `pointer-events-none` keeps it out of the click target. + + Full `text-foreground`, not `text-muted-foreground`: the muted token + on this card's background measures 4.06:1, under the 4.5:1 floor, and + axe fails the vault on it. A key hint is the one piece of meta text + that has to be readable at a glance, so the usual muted-for-meta rule + gives way here rather than the contrast one. */} {onDelete ? ( {t("documents.card.deleteKey")}