Drop the image description field
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:
1 parent
33c75e504f
commit
4caff47a09
5 files changed
+7
-35
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user