diff --git a/course/lib.php b/course/lib.php
index d4374ecfdb8..1f503ce1ad0 100644
--- a/course/lib.php
+++ b/course/lib.php
@@ -1407,25 +1407,28 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
$possaltname = $modinfo[$modnumber]->icon;
$mimetype = mimeinfo_from_icon('type', $possaltname);
- $altname = get_mimetype_description($mimetype); //get_string($mimetype, 'mimetypes');
+ $altname = get_mimetype_description($mimetype);
} else {
$altname = $mod->modfullname;
}
} else {
$altname = $mod->modfullname;
}
-
// Avoid unnecessary duplication.
if (false!==stripos($instancename, $altname)) {
$altname = '';
}
+ // File type after name, for alphabetic lists (screen reader).
+ if ($altname) {
+ $altname = get_accesshide(' '.$altname);
+ }
$linkcss = $mod->visible ? "" : " class=\"dimmed\" ";
echo ''.
- '
'.
- $instancename.'';
+ '
'.
+ $instancename.$altname.'';
+
if (!empty($CFG->enablegroupings) && !empty($mod->groupingid) && has_capability('moodle/course:managegroups', get_context_instance(CONTEXT_COURSE, $course->id))) {
echo " - ".format_string($groupings[$mod->groupingid]->name).'';
}