MDL-86512 mod_assign: Make the select column header name more accessible

This commit is contained in:
Jun Pataleta
2025-09-18 13:56:22 +08:00
parent 280d9de9c3
commit f1b25ca028
2 changed files with 19 additions and 3 deletions
+18 -3
View File
@@ -383,9 +383,24 @@ class assign_grading_table extends table_sql implements renderable {
// Select.
if (!$this->is_downloading() && $this->hasgrade) {
$columns[] = 'select';
$headers[] = get_string('select') .
'<div class="selectall"><label class="accesshide" for="selectall">' . get_string('selectall') . '</label>
<input type="checkbox" id="selectall" name="selectall" title="' . get_string('selectall') . '"/></div>';
// The displayed text for the column header. Hidden to assistive technologies.
$visibleheader = html_writer::span(get_string('select'), '', ['aria-hidden' => 'true']);
// The actual accessible name for the column header which provides more context about the column's purpose to
// screen reader users.
$bulkactionsselection = html_writer::span(get_string('bulkactionsselection', 'assign'), 'visually-hidden');
// The select all checkbox.
$selectalllabel = html_writer::label(get_string('selectall'), 'selectall', false, ['class' => 'visually-hidden']);
$selectallcheckbox = html_writer::empty_tag(
'input',
[
'type' => 'checkbox',
'id' => 'selectall',
'name' => 'selectall',
],
);
$headers[] = $visibleheader . $bulkactionsselection .
html_writer::div($selectalllabel . $selectallcheckbox, 'selectall');
}
if ($this->hasviewblind || !$this->assignment->is_blind_marking()) {
+1
View File
@@ -150,6 +150,7 @@ $string['blindmarking'] = 'Anonymous submissions';
$string['blindmarkingenabledwarning'] = 'Anonymous submissions are enabled for this activity.';
$string['blindmarkingnogradewarning'] = 'Anonymous submissions are enabled for this activity. Grades will not be added to the gradebook until student identities are revealed via the "Actions" menu.';
$string['blindmarking_help'] = 'Anonymous submissions hide the identity of students from markers. Anonymous submission settings will be locked once a submission or grade has been made in relation to this assignment.';
$string['bulkactionsselection'] = 'Bulk actions selection';
$string['cachedef_overrides'] = 'User and group override information';
$string['calendardue'] = '{$a} is due';
$string['calendarextension'] = '{$a} is due (extension)';