Skip to content

Commit

Permalink
Merge branch 'MDL-64488-35' of git://github.com/damyon/moodle into MO…
Browse files Browse the repository at this point in the history
…ODLE_35_STABLE
  • Loading branch information
junpataleta committed Feb 11, 2019
2 parents 1e41439 + 2f4185c commit 302a14d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/outputrenderers.php
Original file line number Diff line number Diff line change
Expand Up @@ -2524,9 +2524,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 302a14d

Please sign in to comment.