Drop the image description field
CI / Deploy / PHP 8.5 (push) Successful in 1m24s
CI / Deploy / PHP 8.4 (push) Successful in 1m27s
CI / Deploy / test (push) Successful in 2s
CI / Deploy / deploy (push) Skipped

Slide images are shown on the presenter's screen, so a description for
screen readers is not asked for any more. The column stays (always empty).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-15 13:59:33 +01:00
1 parent 33c75e504f
commit 4caff47a09
5 files changed
+7 -35

No files matched your search

+2 -4
View File
@@ -415,12 +415,10 @@ class SlidesController extends AdminAppController
return $state;
}
// The description is optional (recommended for screen readers); empty means alt="" (skipped by them).
// Never reject an upload for it: the file input cannot be refilled after a failed save.
$alt = mb_substr(trim((string)($data['image_alt'] ?? '')), 0, Slide::IMAGE_ALT_MAX);
$layout = $data['image_layout'] ?? null;
$slide->patch([
'image_alt' => $alt,
// Presentation images are decoration: no description is asked for (alt="").
'image_alt' => '',
'image_layout' => in_array($layout, Slide::IMAGE_LAYOUTS, true) ? $layout : null,
], ['guard' => false]);
$this->setErrors($slide, $errors);