Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Accessibility: missing ALT attribute in course summary images #756

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions classes/core_course_renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ protected function coursecat_coursebox_content(coursecat_helper $chelper, $cours
$file->get_filearea(). $file->get_filepath(). $file->get_filename(), !$isimage);
if ($isimage) {
$contentimages .= html_writer::tag('div',
html_writer::empty_tag('img', array('src' => $url)),
html_writer::empty_tag('img', array('src' => $url, 'alt' => $file->get_filename())),
array('class' => 'courseimage'));
} else {
$image = $this->output->pix_icon(file_file_icon($file, 24), $file->get_filename(), 'moodle');
Expand Down Expand Up @@ -360,4 +360,4 @@ public function inspector_ajax($term) {

return $data;
}
}
}