MDL-34556 accessibility compliance for course: Add forform input text and select tag
authorRossiani Wijaya <rwijaya@moodle.com>
Fri, 27 Jul 2012 10:13:16 +0000 (18:13 +0800)
committerAparup Banerjee <aparup@moodle.com>
Tue, 31 Jul 2012 09:16:19 +0000 (17:16 +0800)
course/category.php
course/index.php
course/scales.php
course/search.php

index 91efb2d..f88d867 100644 (file)
@@ -422,6 +422,7 @@ if (!$courses) {
         make_categories_list($movetocategories, $notused, 'moodle/category:manage');
         $movetocategories[$category->id] = get_string('moveselectedcoursesto');
         echo '<tr><td colspan="3" align="right">';
+        echo html_writer::label(get_string('moveselectedcoursesto'), 'movetoid', false, array('class' => 'accesshide'));
         echo html_writer::select($movetocategories, 'moveto', $category->id, null, array('id'=>'movetoid'));
         $PAGE->requires->js_init_call('M.util.init_select_autosubmit', array('movecourses', 'movetoid', false));
         echo '<input type="hidden" name="id" value="'.$category->id.'" />';
index 3a40df8..66435ef 100644 (file)
@@ -369,6 +369,7 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $
             }
             $popupurl = new moodle_url("index.php?move=$category->id&sesskey=".sesskey());
             $select = new single_select($popupurl, 'moveto', $tempdisplaylist, $category->parent, null, "moveform$category->id");
+            $select->set_label(get_string('frontpagecategorynames'), array('class' => 'accesshide'));
             echo $OUTPUT->render($select);
         }
         echo '</td>';
index 37d6473..d212489 100644 (file)
@@ -70,7 +70,8 @@ if ($scaleid) {
             echo $OUTPUT->box_start();
             echo $OUTPUT->heading($scale->name);
             echo "<center>";
-            echo html_writer::select($scalemenu, 'unused');
+            echo html_writer::label(get_string('scales'), 'scaleunused'. $scaleid, false, array('class' => 'accesshide'));
+            echo html_writer::select($scalemenu, 'unused', '', array('' => 'choosedots'), array('id' => 'scaleunused'.$scaleid));
             echo "</center>";
             echo text_to_html($scale->description);
             echo $OUTPUT->box_end();
@@ -101,7 +102,8 @@ if ($scales = $DB->get_records("scale", array("courseid"=>$course->id), "name AS
         echo $OUTPUT->box_start();
         echo $OUTPUT->heading($scale->name);
         echo "<center>";
-        echo html_writer::select($scalemenu, 'unused');
+        echo html_writer::label(get_string('scales'), 'courseunused' . $scale->id, false, array('class' => 'accesshide'));
+        echo html_writer::select($scalemenu, 'unused', '', array('' => 'choosedots'), array('id' => 'courseunused' . $scale->id));
         echo "</center>";
         echo text_to_html($scale->description);
         echo $OUTPUT->box_end();
@@ -127,7 +129,8 @@ if ($scales = $DB->get_records("scale", array("courseid"=>0), "name ASC")) {
         echo $OUTPUT->box_start();
         echo $OUTPUT->heading($scale->name);
         echo "<center>";
-        echo html_writer::select($scalemenu, 'unused');
+        echo html_writer::label(get_string('scales'), 'sitescale' . $scale->id, false, array('class' => 'accesshide'));
+        echo html_writer::select($scalemenu, 'unused', '', array('' => 'choosedots'), array('id' => 'sitescale' . $scale->id));
         echo "</center>";
         echo text_to_html($scale->description);
         echo $OUTPUT->box_end();
index 246577c..8c9f85c 100644 (file)
@@ -377,6 +377,7 @@ if ($courses) {
         echo "<input type=\"button\" onclick=\"checkall()\" value=\"$strselectall\" />\n";
         echo "<input type=\"button\" onclick=\"checknone()\" value=\"$strdeselectall\" />\n";
         // Select box should only show categories in which user has min capability to move course.
+        echo html_writer::label(get_string('moveselectedcoursesto'), 'movetoid', false, array('class' => 'accesshide'));
         echo html_writer::select($usercatlist, 'moveto', '', array(''=>get_string('moveselectedcoursesto')), array('id'=>'movetoid'));
         $PAGE->requires->js_init_call('M.util.init_select_autosubmit', array('movecourses', 'movetoid', false));
         echo "</td>\n</tr>\n";