MDL-85535 forum: Label discussion navigation

This commit is contained in:
Jun Pataleta
2026-01-12 15:04:46 +08:00
parent e394149084
commit e46b6a53ed
2 changed files with 6 additions and 2 deletions
+1
View File
@@ -63,6 +63,7 @@ $string['blockperiod'] = 'Time period for blocking';
$string['blockperiod_help'] = 'Students can be blocked from posting more than a given number of posts in a given time period. Users with the capability mod/forum:postwithoutthrottling are exempt from post limits.';
$string['blockperioddisabled'] = 'Don\'t block';
$string['blogforum'] = 'Standard forum displayed in a blog-like format';
$string['browsediscussions'] = 'Browse discussions';
$string['bynameondate'] = 'by {$a->name} - {$a->date}';
$string['cachedef_forum_count_discussions'] = 'Forum discussions count';
$string['cachedef_forum_is_tracked'] = 'Forum tracking status for user';
+5 -2
View File
@@ -43,7 +43,10 @@ class mod_forum_renderer extends plugin_renderer_base {
public function neighbouring_discussion_navigation($prev, $next) {
$html = '';
if ($prev || $next) {
$html .= html_writer::start_tag('div', array('class' => 'discussion-nav clearfix'));
$html .= html_writer::start_tag('nav', [
'class' => 'discussion-nav clearfix',
'aria-label' => get_string('browsediscussions', 'mod_forum'),
]);
$html .= html_writer::start_tag('ul');
if ($prev) {
$url = new moodle_url('/mod/forum/discuss.php', array('d' => $prev->id));
@@ -62,7 +65,7 @@ class mod_forum_renderer extends plugin_renderer_base {
$html .= html_writer::end_tag('li');
}
$html .= html_writer::end_tag('ul');
$html .= html_writer::end_tag('div');
$html .= html_writer::end_tag('nav');
}
return $html;
}