Skip to content

Commit

Permalink
MDL-34564 accessibility compliance for feedback module: Add forform i…
Browse files Browse the repository at this point in the history
…nput text and select tag
  • Loading branch information
Rossiani Wijaya committed Aug 3, 2012
1 parent 02814bf commit d0d9c13
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
7 changes: 3 additions & 4 deletions mod/feedback/analysis_course.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@
} }
} else { } else {


echo get_string('search_course', 'feedback') . ': '; echo html_writer::label(get_string('search_course', 'feedback') . ': ', 'searchcourse');
echo '<input type="text" name="searchcourse" value="'.s($searchcourse).'"/> '; echo '<input id="searchcourse" type="text" name="searchcourse" value="'.s($searchcourse).'"/> ';
echo '<input type="submit" value="'.get_string('search').'"/>'; echo '<input type="submit" value="'.get_string('search').'"/>';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />'; echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="hidden" name="id" value="'.$id.'" />'; echo '<input type="hidden" name="id" value="'.$id.'" />';
Expand All @@ -185,8 +185,7 @@


if ($courses = $DB->get_records_sql_menu($sql, $params)) { if ($courses = $DB->get_records_sql_menu($sql, $params)) {


echo ' ' . get_string('filter_by_course', 'feedback') . ': '; echo ' '. html_writer::label(get_string('filter_by_course', 'feedback'), 'coursefilterid'). ': ';

echo html_writer::select($courses, 'coursefilter', $coursefilter, echo html_writer::select($courses, 'coursefilter', $coursefilter,
null, array('id'=>'coursefilterid')); null, array('id'=>'coursefilterid'));


Expand Down
3 changes: 2 additions & 1 deletion mod/feedback/item/multichoice/lib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -763,7 +763,8 @@ private function print_item_dropdown($presentation, $item, $value, $info, $align


?> ?>
<li class="feedback_item_select_<?php echo $hv.'_'.$align;?>"> <li class="feedback_item_select_<?php echo $hv.'_'.$align;?>">
<select name="<?php echo $item->typ .'_' . $item->id;?>[]" size="1"> <label class="accesshide" for="<?php echo $item->typ .'_' . $item->id;?>"><?php echo $item->name; ?></label>
<select id="<?php echo $item->typ .'_' . $item->id;?>" name="<?php echo $item->typ .'_' . $item->id;?>[]" size="1">
<option value="0">&nbsp;</option> <option value="0">&nbsp;</option>
<?php <?php
$index = 1; $index = 1;
Expand Down
3 changes: 2 additions & 1 deletion mod/feedback/item/multichoicerated/lib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -575,7 +575,8 @@ private function print_item_dropdown($item, $value, $info, $align, $showrating,
echo '<ul>'; echo '<ul>';
?> ?>
<li class="feedback_item_select_<?php echo $hv.'_'.$align;?>"> <li class="feedback_item_select_<?php echo $hv.'_'.$align;?>">
<select name="<?php echo $item->typ.'_'.$item->id;?>"> <label class="accesshide" for="<?php echo $item->typ.'_'.$item->id;?>"><?php echo $item->name; ?></label>
<select id="<?php echo $item->typ.'_'.$item->id;?>" name="<?php echo $item->typ.'_'.$item->id;?>">
<option value="0">&nbsp;</option> <option value="0">&nbsp;</option>
<?php <?php
$index = 1; $index = 1;
Expand Down
2 changes: 1 addition & 1 deletion mod/feedback/mapcourse.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
$params = array("%{$searchcourse}%", "%{$searchcourse}%"); $params = array("%{$searchcourse}%", "%{$searchcourse}%");


if (($courses = $DB->get_records_sql_menu($sql, $params)) && !empty($searchcourse)) { if (($courses = $DB->get_records_sql_menu($sql, $params)) && !empty($searchcourse)) {
echo ' ' . get_string('courses') . ': '; echo ' '. html_writer::label(get_string('courses'), 'menucoursefilter', false). ': ';
echo html_writer::select($courses, 'coursefilter', $coursefilter); echo html_writer::select($courses, 'coursefilter', $coursefilter);
echo '<input type="submit" value="'.get_string('mapcourse', 'feedback').'"/>'; echo '<input type="submit" value="'.get_string('mapcourse', 'feedback').'"/>';
echo $OUTPUT->help_icon('mapcourses', 'feedback'); echo $OUTPUT->help_icon('mapcourses', 'feedback');
Expand Down
1 change: 1 addition & 0 deletions mod/feedback/show_nonrespondents.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@
print_string('formathtml'); print_string('formathtml');
echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />'; echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
} else { } else {
echo '<label for="menuformat" class="accesshide">'. get_string('format') .'</label>';
choose_from_menu(format_text_menu(), "format", $format, ""); choose_from_menu(format_text_menu(), "format", $format, "");
} }
echo '<br /><div class="buttons">'; echo '<br /><div class="buttons">';
Expand Down

0 comments on commit d0d9c13

Please sign in to comment.