MDL-86599 assignment: add hidden captions to the table in the assign UI

This helps screen-reader users trying to navigate quickly to the right table.
This commit is contained in:
Tim Hunt
2025-09-12 15:31:03 +01:00
parent 6bc92d4ba4
commit 29d621c8fb
+8
View File
@@ -304,6 +304,8 @@ class renderer extends \plugin_renderer_base {
$o .= $this->output->box_start('boxaligncenter gradingsummarytable');
$t = new \html_table();
$t->attributes['class'] = 'generaltable table table-striped table-bordered';
$t->caption = get_string('gradingsummary', 'assign');
$t->captionhide = true; // Hidden because it matches the title above.
// Visibility Status.
$cell1content = get_string('hiddenfromstudents');
@@ -410,6 +412,8 @@ class renderer extends \plugin_renderer_base {
$o .= $this->output->heading(get_string('feedback', 'assign'), 3);
$o .= $this->output->box_start('boxaligncenter feedbacktable');
$t = new \html_table();
$t->caption = get_string('feedback', 'assign');
$t->captionhide = true; // Hidden because it matches the title above.
// Grade.
if (isset($status->gradefordisplay)) {
@@ -650,6 +654,8 @@ class renderer extends \plugin_renderer_base {
$t = new \html_table();
$t->attributes['class'] = 'generaltable table table-striped table-bordered';
$t->caption = get_string('submissionstatusheading', 'assign');
$t->captionhide = true; // Hidden because it matches the title above.
$warningmsg = '';
if ($status->teamsubmissionenabled) {
@@ -936,6 +942,8 @@ class renderer extends \plugin_renderer_base {
$o .= $this->heading(get_string('attemptheading', 'assign', $attemptsummaryparams), 4);
$t = new \html_table();
$t->caption = get_string('attemptheading', 'assign', $attemptsummaryparams);
$t->captionhide = true; // Hidden because it matches the title above.
if ($submission) {
$cell1content = get_string('submissionstatus', 'assign');