Permalink
Browse files

MDL-34555 accessibility compliance for calendar: Add forform input te…

…xt and select tag
  • Loading branch information...
1 parent 5b711b3 commit 5c5765521861b22a7b62fa94bfc3c290786d21fb @rwijaya rwijaya committed with nebgor Jul 27, 2012
Showing with 4 additions and 1 deletion.
  1. +1 −0 calendar/lib.php
  2. +3 −1 calendar/renderer.php
View
@@ -1619,6 +1619,7 @@ function calendar_print_month_selector($name, $selected) {
for ($i=1; $i<=12; $i++) {
$months[$i] = userdate(gmmktime(12, 0, 0, $i, 15, 2000), '%B');
}
+ echo html_writer::label(get_string('months'), 'menu'. $name, false, array('class' => 'accesshide'));
echo html_writer::select($months, $name, $selected, false);
}
View
@@ -710,7 +710,9 @@ protected function course_filter_selector(moodle_url $returnurl, $label=null) {
$select = new single_select(new moodle_url(CALENDAR_URL.'set.php', array('return' => base64_encode($returnurl->out(false)), 'var' => 'setcourse', 'sesskey'=>sesskey())), 'id', $courseoptions, $selected, null);
$select->class = 'cal_courses_flt';
if ($label !== null) {
- $select->label = $label;
+ $select->set_label($label);
+ } else {
+ $select->set_label(get_string('listofcourses'), array('class' => 'accesshide'));
}
return $this->output->render($select);
}

0 comments on commit 5c57655

Please sign in to comment.