From b5a249b756e48e94ba9c491d1e0a00db84c05143 Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Sun, 24 Nov 2024 17:13:36 +1000 Subject: [PATCH] Add alt tags to image attachments --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 317c598..952e278 100644 --- a/src/main.rs +++ b/src/main.rs @@ -259,7 +259,7 @@ markup::define! { Attachment<'a>(attachment: &'a pleroma::activity::Attachment) { @match attachment.media_type.as_str() { "image/gif" |"image/jpeg" | "image/png" => { - img[src=&attachment.url, loading="lazy"]; + img[src=&attachment.url, alt=&attachment.name, loading="lazy"]; } _ => { a[href=&attachment.url] { @attachment.media_type " attachment" }