MDL-77035 grades: Update toggleall for a11y

This commit is contained in:
Mathew May 2023-08-28 20:05:40 +08:00 committed by Mihail Geshoski
parent 255165f786
commit 7f33dfc887
6 changed files with 25 additions and 16 deletions

View File

@ -831,12 +831,12 @@ class grade_edit_tree_column_name extends grade_edit_tree_column {
'id' => 'select_category_' . $category->id,
'name' => $togglegroup,
'value' => 1,
'classes' => 'itemselect ignoredirty mr-2',
'classes' => 'itemselect ignoredirty',
'label' => $masterlabel,
// Consistent label to prevent the select column from resizing.
'selectall' => $masterlabel,
'deselectall' => $masterlabel,
'labelclasses' => 'accesshide m-0',
'labelclasses' => 'accesshide',
]);
$mastercheckbox = $OUTPUT->render($mastercheckbox);

View File

@ -424,7 +424,6 @@ Feature: Changing the aggregation of an item affects its weight and extra credit
And I set the field "Select Item a3" to "1"
And I set the field "Select Item a4" to "1"
And I click on "Move" "button" in the "sticky-footer" "region"
And I should not see "Cat natural &" in the "Move items" "dialogue"
And I click on "Cat natural &" "list_item" in the "Move items" "dialogue"
When I click on "Move" "button" in the "Move items" "dialogue"
And I navigate to "View > Grader report" in the course gradebook
@ -566,7 +565,7 @@ Feature: Changing the aggregation of an item affects its weight and extra credit
And I set the field "Select Item a3" to "1"
And I set the field "Select Item a4" to "1"
And I click on "Move" "button" in the "sticky-footer" "region"
And I click on "Course 1" "list_item" in the "Move items" "dialogue"
And I click on "Cat natural &" "list_item" in the "Move items" "dialogue"
And I click on "Move" "button" in the "Move items" "dialogue"
And I navigate to "View > Grader report" in the course gradebook
And I click on grade item menu "Item a1" of type "gradeitem" on "grader" page

View File

@ -37,18 +37,18 @@
"labelclasses": "badge badge-info"
}
}}
<input id="{{id}}" name="{{name}}" type="checkbox" {{#classes}}class="{{.}}"{{/classes}} value="{{value}}"
data-action="toggle"
data-toggle="master"
data-togglegroup="{{togglegroup}}"
data-toggle-selectall="{{selectall}}"
data-toggle-deselectall="{{deselectall}}"
{{#checked}}checked="checked"{{/checked}}
/>
{{#label}}
<label for="{{id}}" class="{{labelclasses}}">{{.}}</label>
{{/label}}
<div class="form-check">
<input id="{{id}}" name="{{name}}" type="checkbox" class="mr-1 {{classes}}" value="{{value}}"
aria-labelledby="{{id}}-label"
data-action="toggle"
data-toggle="master"
data-togglegroup="{{togglegroup}}"
data-toggle-selectall="{{selectall}}"
data-toggle-deselectall="{{deselectall}}"
{{#checked}}checked="checked"{{/checked}}
/>
<label id="{{id}}-label" for="{{id}}" class="form-check-label d-block pr-2 {{labelclasses}}">{{label}}</label>
</div>
{{#js}}
require(['core/checkbox-toggleall'], function(ToggleAll) {
ToggleAll.init();

View File

@ -498,6 +498,10 @@
min-height: 30px;
align-items: center;
.form-check {
padding: 0;
}
a {
&.toggle-category {
height: 24px;

View File

@ -35742,6 +35742,9 @@ p.arrow_button {
min-height: 30px;
align-items: center;
}
.path-grade-edit-tree .gradetree-wrapper .setup-grades.generaltable tr.category td.column-name div .form-check {
padding: 0;
}
.path-grade-edit-tree .gradetree-wrapper .setup-grades.generaltable tr.category td.column-name div a.toggle-category {
height: 24px;
width: 24px;

View File

@ -35742,6 +35742,9 @@ p.arrow_button {
min-height: 30px;
align-items: center;
}
.path-grade-edit-tree .gradetree-wrapper .setup-grades.generaltable tr.category td.column-name div .form-check {
padding: 0;
}
.path-grade-edit-tree .gradetree-wrapper .setup-grades.generaltable tr.category td.column-name div a.toggle-category {
height: 24px;
width: 24px;