diff --git a/app/views/course/members/accepted_list.php b/app/views/course/members/accepted_list.php index c25c7c1905b2c1cd58a9f94d7d03502f6ab03e7f..e789a10c668ea7ace5f976e3519a7dc58b450ab7 100644 --- a/app/views/course/members/accepted_list.php +++ b/app/views/course/members/accepted_list.php @@ -87,8 +87,7 @@ <?= Avatar::getAvatar($accept['user_id'], $accept['username'])->getImageTag( Avatar::SMALL, [ - 'style' => 'margin-right: 5px', - 'title' => $fullname, + 'style' => 'margin-right: 5px' ] ) ?> <?= htmlReady($fullname) ?> diff --git a/app/views/course/members/autor_list.php b/app/views/course/members/autor_list.php index 6d8e8da493cac9f5ba7ad9a0f7b87502cb89df8c..ed031a43ceff8929a218fe2bc26c61d95f933447 100644 --- a/app/views/course/members/autor_list.php +++ b/app/views/course/members/autor_list.php @@ -98,8 +98,7 @@ <?= Avatar::getAvatar($autor['user_id'], $autor['username'])->getImageTag( Avatar::SMALL, [ - 'style' => 'margin-right: 5px', - 'title' => $fullname + 'style' => 'margin-right: 5px' ] ) ?> <?= htmlReady($fullname) ?> diff --git a/app/views/course/members/dozent_list.php b/app/views/course/members/dozent_list.php index 2206fb0488abb0213be7a7f1c98c162429e96fa6..e955b569c128ecbd9d415fbdc79bac6f9bb9e0e8 100644 --- a/app/views/course/members/dozent_list.php +++ b/app/views/course/members/dozent_list.php @@ -53,8 +53,7 @@ <td> <a href="<?= $controller->url_for(sprintf('profile?username=%s',$dozent['username'])) ?>" <? if ($dozent['mkdate'] >= $last_visitdate) echo 'class="new-member"'; ?>> <?= Avatar::getAvatar($dozent['user_id'], $dozent['username'])->getImageTag(Avatar::SMALL, [ - 'style' => 'margin-right: 5px', - 'title' => $fullname, + 'style' => 'margin-right: 5px' ]) ?> <?= htmlReady($fullname) ?> </a> diff --git a/app/views/course/members/tutor_list.php b/app/views/course/members/tutor_list.php index b14674a711894d57eb9e1755dba377cc97c2d228..e07b4302a70979d2fb1c02390d905f7c9c03691c 100644 --- a/app/views/course/members/tutor_list.php +++ b/app/views/course/members/tutor_list.php @@ -91,8 +91,7 @@ <td> <a href="<?= $controller->url_for('profile?username=' . $tutor['username']) ?>" <? if ($tutor['mkdate'] >= $last_visitdate) echo 'class="new-member"'; ?>> <?= Avatar::getAvatar($tutor['user_id'], $tutor['username'])->getImageTag(Avatar::SMALL, [ - 'style' => 'margin-right: 5px', - 'title' => $fullname, + 'style' => 'margin-right: 5px' ]) ?> <?= htmlReady($fullname) ?> </a> diff --git a/app/views/course/members/user_list.php b/app/views/course/members/user_list.php index c9bb48deddbd2f8f31da7e36e2697aa441424141..6ebd3b01f03819e3924ad7f987a408fd39febad5 100644 --- a/app/views/course/members/user_list.php +++ b/app/views/course/members/user_list.php @@ -91,8 +91,7 @@ <td> <a href="<?= $controller->url_for('profile?username=' . $leser['username']) ?>" <? if ($leser['mkdate'] >= $last_visitdate) echo 'class="new-member"'; ?>> <?= Avatar::getAvatar($leser['user_id'],$leser['username'])->getImageTag(Avatar::SMALL, [ - 'style' => 'margin-right: 5px', - 'title' => $fullname, + 'style' => 'margin-right: 5px' ]); ?> <?= htmlReady($fullname) ?> </a> diff --git a/lib/classes/Avatar.class.php b/lib/classes/Avatar.class.php index b6b4e06deb46f749d5f3b229a5df4b91de550eff..b355a8ac093628b9ce3ba00a0f46a9ccbc11dac2 100644 --- a/lib/classes/Avatar.class.php +++ b/lib/classes/Avatar.class.php @@ -244,9 +244,7 @@ class Avatar { $opt['class'] = $this->getCssClass($size); } - if (!isset($opt['title'])) { - $opt['title'] = $this->getDefaultTitle(); - } elseif (is_string($opt['title']) && $opt['title'] !== html_entity_decode($opt['title'])) { + if (is_string($opt['title']) && $opt['title'] !== html_entity_decode($opt['title'])) { // Decode already htmlready encoded titles (which were used until // all attributes were encoded inside this method) $opt['title'] = html_entity_decode($opt['title']); @@ -263,8 +261,10 @@ class Avatar { } } - if (!isset($opt['alt'])) { - $opt['alt'] = $opt['title']; + if (!isset($opt['alt']) && !isset($opt['title'])) { + //Add an empty alt attribute to prevent screen readers from + //reading the URL of the icon: + $opt['alt'] = ''; } return '<img ' . arrayToHtmlAttributes($opt) . '>';