Skip to content
Browse files

MDL-36108 - Blocks - Online User block's user image's alt attribute i…

…s now empty to prevent repetition of text for screen readers
  • Loading branch information...
1 parent 5fa7d72 commit a5dbb601ce7f7955e0f864a1d21e53c79cc3e9f2 @jsnfwlr jsnfwlr committed Dec 4, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 blocks/online_users/block_online_users.php
View
7 blocks/online_users/block_online_users.php
@@ -151,12 +151,13 @@ function get_content() {
$timeago = format_time($now - $user->lastaccess); //bruno to calculate correctly on frontpage
if (isguestuser($user)) {
- $this->content->text .= '<div class="user">'.$OUTPUT->user_picture($user, array('size'=>16));
+ $this->content->text .= '<div class="user">'.$OUTPUT->user_picture($user, array('size'=>16, 'alttext'=>false));
$this->content->text .= get_string('guestuser').'</div>';
} else {
- $this->content->text .= '<div class="user">'.$OUTPUT->user_picture($user, array('size'=>16));
- $this->content->text .= '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.$this->page->course->id.'" title="'.$timeago.'">'.$user->fullname.'</a></div>';
+ $this->content->text .= '<div class="user">';
+ $this->content->text .= '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&amp;course='.$this->page->course->id.'" title="'.$timeago.'">';
+ $this->content->text .= $OUTPUT->user_picture($user, array('size'=>16, 'alttext'=>false, 'link'=>false)) .$user->fullname.'</a></div>';
}
if ($canshowicon and ($USER->id != $user->id) and !isguestuser($user)) { // Only when logged in and messaging active etc
$anchortagcontents = '<img class="iconsmall" src="'.$OUTPUT->pix_url('t/message') . '" alt="'. get_string('messageselectadd') .'" />';

0 comments on commit a5dbb60

Please sign in to comment.
Something went wrong with that request. Please try again.