mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-70172 output: Fix empty links
The approach taken is inline with font-awesome documentation: https://fontawesome.com/how-to-use/on-the-web/other-topics/accessibility
This commit is contained in:
parent
95dd305cc6
commit
2896cb83cc
@ -2016,10 +2016,17 @@ function course_get_cm_move(cm_info $mod, $sr = null) {
|
||||
$pixicon = 't/move';
|
||||
}
|
||||
|
||||
$attributes = [
|
||||
'class' => 'editing_move',
|
||||
'data-action' => 'move',
|
||||
'data-sectionreturn' => $sr,
|
||||
'title' => $str->move,
|
||||
'aria-label' => $str->move,
|
||||
];
|
||||
return html_writer::link(
|
||||
new moodle_url($baseurl, array('copy' => $mod->id)),
|
||||
$OUTPUT->pix_icon($pixicon, $str->move, 'moodle', array('class' => 'iconsmall', 'title' => '')),
|
||||
array('class' => 'editing_move', 'data-action' => 'move', 'data-sectionreturn' => $sr)
|
||||
new moodle_url($baseurl, ['copy' => $mod->id]),
|
||||
$OUTPUT->pix_icon($pixicon, '', 'moodle', ['class' => 'iconsmall']),
|
||||
$attributes
|
||||
);
|
||||
}
|
||||
return '';
|
||||
|
@ -2294,7 +2294,8 @@ class core_course_renderer extends plugin_renderer_base {
|
||||
if ($editing && has_capability('moodle/course:update', $context)) {
|
||||
$streditsummary = get_string('editsummary');
|
||||
$editsectionurl = new moodle_url('/course/editsection.php', ['id' => $section->id]);
|
||||
$output .= html_writer::link($editsectionurl, $this->pix_icon('t/edit', $streditsummary)) .
|
||||
$attributes = ['title' => $streditsummary, 'aria-label' => $streditsummary];
|
||||
$output .= html_writer::link($editsectionurl, $this->pix_icon('t/edit', ''), $attributes) .
|
||||
"<br /><br />";
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user