MDL-34650 - accessibility compliance: Add <label> for form input text and select tag
This commit is contained in:
@@ -1334,7 +1334,7 @@ class core_renderer extends renderer_base {
|
||||
}
|
||||
|
||||
if ($select->label) {
|
||||
$output .= html_writer::label($select->label, $select->attributes['id']);
|
||||
$output .= html_writer::label($select->label, $select->attributes['id'], false, $select->labelattributes);
|
||||
}
|
||||
|
||||
if ($select->helpicon instanceof help_icon) {
|
||||
@@ -1342,7 +1342,6 @@ class core_renderer extends renderer_base {
|
||||
} else if ($select->helpicon instanceof old_help_icon) {
|
||||
$output .= $this->render($select->helpicon);
|
||||
}
|
||||
|
||||
$output .= html_writer::select($select->options, $select->name, $select->selected, $select->nothing, $select->attributes);
|
||||
|
||||
$go = html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('go')));
|
||||
@@ -1412,7 +1411,7 @@ class core_renderer extends renderer_base {
|
||||
$output = '';
|
||||
|
||||
if ($select->label) {
|
||||
$output .= html_writer::label($select->label, $select->attributes['id']);
|
||||
$output .= html_writer::label($select->label, $select->attributes['id'], false, $select->labelattributes);
|
||||
}
|
||||
|
||||
if ($select->helpicon instanceof help_icon) {
|
||||
@@ -1629,6 +1628,7 @@ class core_renderer extends renderer_base {
|
||||
|
||||
$scalearray = array(RATING_UNSET_RATING => $strrate.'...') + $rating->settings->scale->scaleitems;
|
||||
$scaleattrs = array('class'=>'postratingmenu ratinginput','id'=>'menurating'.$rating->itemid);
|
||||
$ratinghtml .= html_writer::label($rating->rating, 'menurating'.$rating->itemid, false, array('class' => 'accesshide'));
|
||||
$ratinghtml .= html_writer::select($scalearray, 'rating', $rating->rating, false, $scaleattrs);
|
||||
|
||||
//output submit button
|
||||
|
||||
Reference in New Issue
Block a user