MDL-30843 and MDL-30842 - accessibility compliance: Add <label> for form input text and select tag
This commit is contained in:
@@ -1462,7 +1462,8 @@ class assignment_base {
|
||||
} else if ($quickgrade) {
|
||||
$attributes = array();
|
||||
$attributes['tabindex'] = $tabindex++;
|
||||
$menu = html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes);
|
||||
$menu = html_writer::label(get_string('assignment:grade', 'assignment'), 'menumenu'. $auser->id, false, array('class' => 'accesshide'));
|
||||
$menu .= html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes);
|
||||
$grade = '<div id="g'.$auser->id.'">'. $menu .'</div>';
|
||||
} else {
|
||||
$grade = '<div id="g'.$auser->id.'">'.$this->display_grade($auser->grade).'</div>';
|
||||
@@ -1475,6 +1476,7 @@ class assignment_base {
|
||||
} else if ($quickgrade) {
|
||||
$attributes = array();
|
||||
$attributes['tabindex'] = $tabindex++;
|
||||
html_writer::label(get_string('assignment:grade', 'assignment'), 'menumenu'. $auser->id, false, array('class' => 'accesshide'));
|
||||
$menu = html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes);
|
||||
$grade = '<div id="g'.$auser->id.'">'.$menu.'</div>';
|
||||
} else {
|
||||
@@ -1503,6 +1505,7 @@ class assignment_base {
|
||||
} else if ($quickgrade) { // allow editing
|
||||
$attributes = array();
|
||||
$attributes['tabindex'] = $tabindex++;
|
||||
html_writer::label(get_string('assignment:grade', 'assignment'), 'menumenu'. $auser->id, false, array('class' => 'accesshide'));
|
||||
$menu = html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes);
|
||||
$grade = '<div id="g'.$auser->id.'">'.$menu.'</div>';
|
||||
$hassubmission = true;
|
||||
@@ -1547,7 +1550,7 @@ class assignment_base {
|
||||
if ($uses_outcomes) {
|
||||
|
||||
foreach($grading_info->outcomes as $n=>$outcome) {
|
||||
$outcomes .= '<div class="outcome"><label>'.$outcome->name.'</label>';
|
||||
$outcomes .= '<div class="outcome"><label for="'. 'outcome_'.$n.'_'.$auser->id .'">'.$outcome->name.'</label>';
|
||||
$options = make_grades_menu(-$outcome->scaleid);
|
||||
|
||||
if ($outcome->grades[$auser->id]->locked or !$quickgrade) {
|
||||
@@ -1557,6 +1560,7 @@ class assignment_base {
|
||||
$attributes = array();
|
||||
$attributes['tabindex'] = $tabindex++;
|
||||
$attributes['id'] = 'outcome_'.$n.'_'.$auser->id;
|
||||
html_writer::label(get_string('assignment:grade', 'assignment'), 'outcome_'.$n.'_'.$auser->id, false, array('class' => 'accesshide'));
|
||||
$outcomes .= ' '.html_writer::select($options, 'outcome_'.$n.'['.$auser->id.']', $outcome->grades[$auser->id]->grade, array(0=>get_string('nooutcome', 'grades')), $attributes);
|
||||
}
|
||||
$outcomes .= '</div>';
|
||||
|
||||
Reference in New Issue
Block a user