Skip to content

Commit

Permalink
Merge branch 'MDL-64488-master' of git://github.com/damyon/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Feb 11, 2019
2 parents c18f59e + 5689bb9 commit 1636578
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/outputrenderers.php
Expand Up @@ -2606,9 +2606,16 @@ protected function render_user_picture(user_picture $userpicture) {

$src = $userpicture->get_url($this->page, $this);

$attributes = array('src'=>$src, 'alt'=>$alt, 'title'=>$alt, 'class'=>$class, 'width'=>$size, 'height'=>$size);
$attributes = array('src' => $src, 'class' => $class, 'width' => $size, 'height' => $size);
if (!$userpicture->visibletoscreenreaders) {
$attributes['role'] = 'presentation';
$alt = '';
$attributes['aria-hidden'] = 'true';
}

if (!empty($alt)) {
$attributes['alt'] = $alt;
$attributes['title'] = $alt;
}

// get the image html output fisrt
Expand Down

0 comments on commit 1636578

Please sign in to comment.