fix(a11y): mark avatar image as decorative with explicit empty alt

shui/avatar-image was called without an :alt prop, which leaves the
underlying <img> 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 <noreply@anthropic.com>
This commit is contained in:
scheinriese
2026-05-19 23:07:39 +02:00
parent 546cdfc6ee
commit b698957e23

View File

@@ -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