MDL-68312 grade: Fix empty links
If a link contains no text, the function or purpose of the link will not be presented to the user. This can introduce confusion for keyboard and screen reader users.
This commit is contained in:
@@ -417,8 +417,8 @@ abstract class grade_report {
|
||||
$matrix = array('up' => 'desc', 'down' => 'asc', 'move' => 'desc');
|
||||
$strsort = $this->get_lang_string('sort' . $matrix[$direction]);
|
||||
|
||||
$arrow = $OUTPUT->pix_icon($pix[$direction], $strsort, '', array('class' => 'sorticon'));
|
||||
return html_writer::link($sortlink, $arrow, array('title'=>$strsort));
|
||||
$arrow = $OUTPUT->pix_icon($pix[$direction], '', '', ['class' => 'sorticon']);
|
||||
return html_writer::link($sortlink, $arrow, ['title' => $strsort, 'aria-label' => $strsort]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user