From c2a956a63d501f6d7ff100498c13829d29c4822d Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Fri, 4 Jan 2019 11:17:06 +0800 Subject: [PATCH] MDL-64492 course: Hide activity icons for Ally Empty alt text results in an image with no label. role="presentation" does not hide - it only removes the semantic information. If the image provides no information, make it hidden with aria-hidden. --- course/renderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/course/renderer.php b/course/renderer.php index e09d7d98f01..405e7a907d5 100644 --- a/course/renderer.php +++ b/course/renderer.php @@ -697,7 +697,7 @@ class core_course_renderer extends plugin_renderer_base { // Display link itself. $activitylink = html_writer::empty_tag('img', array('src' => $mod->get_icon_url(), - 'class' => 'iconlarge activityicon', 'alt' => ' ', 'role' => 'presentation')) . + 'class' => 'iconlarge activityicon', 'alt' => '', 'role' => 'presentation', 'aria-hidden' => 'true')) . html_writer::tag('span', $instancename . $altname, array('class' => 'instancename')); if ($mod->uservisible) { $output .= html_writer::link($url, $activitylink, array('class' => $linkclasses, 'onclick' => $onclick));