MDL-79071 course: An empty alt text is needed for decorative images

This commit is contained in:
Jun Pataleta 2023-08-18 17:03:05 +08:00
parent e998f14061
commit ec02ec88f3
No known key found for this signature in database
GPG Key ID: F83510526D99E2C7

View File

@ -976,7 +976,7 @@ class core_course_renderer extends plugin_renderer_base {
$file->get_filearea() . $file->get_filepath() . $file->get_filename(), !$isimage);
if ($isimage) {
$contentimages .= html_writer::tag('div',
html_writer::empty_tag('img', ['src' => $url]),
html_writer::empty_tag('img', ['src' => $url, 'alt' => '']),
['class' => 'courseimage']);
} else {
$image = $this->output->pix_icon(file_file_icon($file, 24), $file->get_filename(), 'moodle');