From c96efdb613c70bce91a9832f4d85e1fbeba4a2a0 Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Tue, 26 Mar 2024 00:03:14 +0800 Subject: [PATCH] MDL-80384 courseformat: Set activity icon alt text on editing mode From a warning using WAVE: * The title attribute value for images that lack an alt attribute value will be presented to screen reader users. However, providing image content in the alt attribute typically provides better accessibility, and should be used in most cases. The title attribute will generate a mouse hover tooltip which may or may not be desired - this tooltip will not be presented to touch screen or keyboard users. --- course/format/templates/local/content/cm/cmicon.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/course/format/templates/local/content/cm/cmicon.mustache b/course/format/templates/local/content/cm/cmicon.mustache index b7edabe0207..c86be6c9953 100644 --- a/course/format/templates/local/content/cm/cmicon.mustache +++ b/course/format/templates/local/content/cm/cmicon.mustache @@ -35,7 +35,7 @@ class="activityicon {{iconclass}}" data-region="activity-icon" data-id="{{cmid}}" - alt="" + alt="{{#showtooltip}}{{#cleanstr}} activityicon, moodle, {{{pluginname}}} {{/cleanstr}}{{/showtooltip}}" {{#showtooltip}}title="{{{pluginname}}}"{{/showtooltip}} >