Skip to content

Commit

Permalink
MDL-72990 badges: Use imagecaption as alternative text for badge image
Browse files Browse the repository at this point in the history
  • Loading branch information
rezaies committed Nov 4, 2021
1 parent ee1c3d9 commit c6f3ea3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion badges/renderer.php
Expand Up @@ -334,7 +334,7 @@ protected function render_issued_badge(\core_badges\output\issued_badge $ibadge)
$output = '';
$output .= html_writer::start_tag('div', array('id' => 'badge'));
$output .= html_writer::start_tag('div', array('id' => 'badge-image'));
$output .= html_writer::empty_tag('img', array('src' => $badgeimage, 'alt' => $badge->name, 'width' => '100'));
$output .= html_writer::empty_tag('img', array('src' => $badgeimage, 'alt' => $badge->imagecaption, 'width' => '100'));
if ($expiration < $now) {
$output .= $this->output->pix_icon('i/expired',
get_string('expireddate', 'badges', userdate($issued['expires'])),
Expand Down

0 comments on commit c6f3ea3

Please sign in to comment.