From b698957e23d52e4fa720fb8b47ea4acfc0ef9d06 Mon Sep 17 00:00:00 2001 From: scheinriese Date: Tue, 19 May 2026 23:07:39 +0200 Subject: [PATCH] fix(a11y): mark avatar image as decorative with explicit empty alt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit shui/avatar-image was called without an :alt prop, which leaves the underlying with no alt attribute — some screen readers fall back to announcing the URL or filename. The avatar is always rendered next to its label (page/block title), which the screen reader already announces. Passing the title as alt would double-announce; the right call is explicit empty alt to mark the image as decorative per WCAG. Co-Authored-By: Claude Opus 4.7 --- src/main/frontend/components/icon.cljs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/frontend/components/icon.cljs b/src/main/frontend/components/icon.cljs index 0b127e6946..f3ffa12b83 100644 --- a/src/main/frontend/components/icon.cljs +++ b/src/main/frontend/components/icon.cljs @@ -579,6 +579,11 @@ ;; Image (shows when loaded, circular with cover fit) (when url (shui/avatar-image {:src url + ;; Decorative: the avatar is always rendered next + ;; to its label (page/block title), which the + ;; screen reader already announces. Content- + ;; bearing alt would double-announce. + :alt "" :style {:object-fit "cover"} :data-shape (name shape)})) ;; Fallback (shows while loading, on error, OR when there's no image