From 60ba9df2f78912da2f211f2e54a17b7f627ee96d Mon Sep 17 00:00:00 2001 From: isUnknown Date: Thu, 19 Sep 2024 11:53:58 +0200 Subject: [PATCH] aria ignore cover images --- site/snippets/event-card.php | 2 +- site/snippets/picture.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/site/snippets/event-card.php b/site/snippets/event-card.php index 4cb6a22..90f3cff 100644 --- a/site/snippets/event-card.php +++ b/site/snippets/event-card.php @@ -10,7 +10,7 @@ gallery()->toFiles()->count() > 1 ? $event->gallery()->toFiles()->nth(1) : $event->gallery()->toFiles()->first(); - snippet('picture', ["file" => $file, 'size' => (100 / (12 / $span) - 10)]); + snippet('picture', ["file" => $file, 'size' => (100 / (12 / $span) - 10), 'alt' => null]); ?>
diff --git a/site/snippets/picture.php b/site/snippets/picture.php index cfcb3ce..fce2f35 100644 --- a/site/snippets/picture.php +++ b/site/snippets/picture.php @@ -1,7 +1,7 @@ alt(); + $alt = $alt ?? $file->alt(); $crop = $crop ?? false; $webPSrcset = $crop === 'banner' ? $file->crop(1600, 800)->srcset('webp') : $file->srcset('webp');