MDL-73386 mod_quiz: Use plain text for quiz navigation fake block title

* No need to enclose the title of the quiz navigation fake block in
a span tag. The block title also gets appended to the skip link which
means that a block title with a span tag assigned with an identifier
can cause duplicate ID errors on the DOM.
This commit is contained in:
Jun Pataleta
2022-05-21 00:32:38 +08:00
parent 6c114e2a80
commit 60fcabfa6d
+1 -2
View File
@@ -1900,8 +1900,7 @@ class quiz_attempt {
$bc = new block_contents();
$bc->attributes['id'] = 'mod_quiz_navblock';
$bc->attributes['role'] = 'navigation';
$bc->attributes['aria-labelledby'] = 'mod_quiz_navblock_title';
$bc->title = html_writer::span(get_string('quiznavigation', 'quiz'), '', array('id' => 'mod_quiz_navblock_title'));
$bc->title = get_string('quiznavigation', 'quiz');
$bc->content = $output->navigation_panel($panel);
return $bc;
}