MDL-85678 mod_feedback: Fix a11y issues in the Manage templates page

- Fix the heading hierarchy.
- Add a visually-hidden column header for the actions column.
This commit is contained in:
Jun Pataleta
2025-06-16 13:50:25 +08:00
parent 95518023c6
commit 5c3e474160
2 changed files with 7 additions and 4 deletions
+4 -1
View File
@@ -53,7 +53,10 @@ class mod_feedback_templates_table extends flexible_table {
$tablecolumns[] = 'actions';
}
$tableheaders = array(get_string('template', 'feedback'), '');
$tableheaders = [
get_string('template', 'feedback'),
html_writer::span(get_string('actions'), 'sr-only'),
];
$this->set_attribute('class', 'templateslist');
+3 -3
View File
@@ -80,12 +80,12 @@ echo $OUTPUT->header();
if (!$mode) {
echo $renderer->main_action_bar($actionbar);
}
echo $OUTPUT->heading(get_string('templates', 'mod_feedback'), 3);
echo $OUTPUT->heading(get_string('templates', 'mod_feedback'), 2);
// First we get the course templates.
$templates = feedback_get_template_list($course, 'own');
echo $OUTPUT->box_start('coursetemplates');
echo $OUTPUT->heading(get_string('course'), 4);
echo $OUTPUT->heading(get_string('course'), 3);
$baseurl = new moodle_url('/mod/feedback/use_templ.php', $params);
$tablecourse = new mod_feedback_templates_table('feedback_template_course_table', $baseurl, $mode);
@@ -94,7 +94,7 @@ echo $OUTPUT->box_end();
$templates = feedback_get_template_list($course, 'public');
echo $OUTPUT->box_start('publictemplates');
echo $OUTPUT->heading(get_string('public', 'feedback'), 4);
echo $OUTPUT->heading(get_string('public', 'feedback'), 3);
$tablepublic = new mod_feedback_templates_table('feedback_template_public_table', $baseurl, $mode);
$tablepublic->display($templates);
echo $OUTPUT->box_end();