Commit dc4bff32 authored by Jetha Chan's avatar Jetha Chan
Browse files

MDL-45893 user_menu: fix to hide user_pictures from screen readers

parent a535004e
......@@ -677,8 +677,13 @@ function user_get_user_navigation_info($user, $page) {
$returnobject->metadata['userprofileurl'] = new moodle_url('/user/profile.php', array(
'id' => $user->id
));
$returnobject->metadata['useravatar'] = $OUTPUT->user_picture ($user, array('link' => false));
$returnobject->metadata['useravatar'] = $OUTPUT->user_picture (
$user,
array(
'link' => false,
'visibletoscreenreaders' => false
)
);
if (isguestuser()) {
// Build a list of items for a guest.
......@@ -747,7 +752,13 @@ function user_get_user_navigation_info($user, $page) {
$returnobject->metadata['realuserprofileurl'] = new moodle_url('/user/profile.php', array(
'id' => $realuser->id
));
$returnobject->metadata['realuseravatar'] = $OUTPUT->user_picture ($realuser, array('link' => false));
$returnobject->metadata['realuseravatar'] = $OUTPUT->user_picture (
$realuser,
array(
'link' => false,
'visibletoscreenreaders' => false
)
);
// Build a user-revert link.
$userrevert = new stdClass();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment