Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-30843 and MDL-30842 - accessibility compliance: Add <label> for f…

…orm input text and select tag
  • Loading branch information...
commit 0add004b0ed1d93b9ee7396b64a60af8de33784d 1 parent a7899ca
rwijaya authored March 30, 2012

Showing 93 changed files with 339 additions and 193 deletions. Show diff stats Hide diff stats

  1. 2  admin/filters.php
  2. 7  admin/mnet/access_control.php
  3. 1  admin/portfolio.php
  4. 3  admin/repository.php
  5. 5  admin/roles/lib.php
  6. 2  admin/timezone.php
  7. 28  auth/cas/config.html
  8. 16  auth/fc/config.html
  9. 14  auth/imap/config.html
  10. 2  auth/ldap/config.html
  11. 6  auth/mnet/config.html
  12. 12  auth/nntp/config.html
  13. 18  auth/pop3/config.html
  14. 18  auth/radius/config.html
  15. 22  auth/shibboleth/config.html
  16. 4  auth/shibboleth/index_form.html
  17. 11  backup/util/ui/renderer.php
  18. 4  blocks/section_links/config_instance.html
  19. 4  blocks/tags/block_tags.php
  20. 1  calendar/lib.php
  21. 4  calendar/renderer.php
  22. 1  course/index.php
  23. 3  course/scales.php
  24. 6  enrol/authorize/locallib.php
  25. 6  enrol/manual/manage.php
  26. 6  filter/algebra/algebradebug.php
  27. 5  filter/manage.php
  28. 1  grade/edit/tree/calculation.php
  29. 2  grade/edit/tree/index.php
  30. 3  grade/edit/tree/lib.php
  31. 2  grade/lib.php
  32. 3  grade/report/grader/lib.php
  33. 2  lang/en/moodle.php
  34. 24  lib/adminlib.php
  35. 6  lib/deprecatedlib.php
  36. 5  lib/form/editor.php
  37. 14  lib/outputrenderers.php
  38. 3  lib/portfoliolib.php
  39. 2  lib/questionlib.php
  40. 1  lib/tablelib.php
  41. 1  lib/weblib.php
  42. 7  message/lib.php
  43. 8  mod/assignment/lib.php
  44. 2  mod/chat/gui_ajax/index.php
  45. 1  mod/chat/gui_header_js/chatinput.php
  46. 1  mod/chat/gui_sockets/chatinput.php
  47. 1  mod/data/field.php
  48. 3  mod/data/field/file/field.class.php
  49. 1  mod/data/field/file/mod.html
  50. 8  mod/data/field/latlong/field.class.php
  51. 6  mod/data/field/menu/field.class.php
  52. 4  mod/data/field/multimenu/field.class.php
  53. 3  mod/data/field/number/field.class.php
  54. 3  mod/data/field/picture/field.class.php
  55. 1  mod/data/field/picture/mod.html
  56. 4  mod/data/field/radiobutton/field.class.php
  57. 2  mod/data/field/text/field.class.php
  58. 6  mod/data/field/textarea/field.class.php
  59. 8  mod/data/field/url/field.class.php
  60. 8  mod/feedback/analysis_course.php
  61. 3  mod/feedback/item/multichoice/lib.php
  62. 3  mod/feedback/item/multichoicerated/lib.php
  63. 2  mod/feedback/mapcourse.php
  64. 1  mod/feedback/show_nonrespondents.php
  65. 2  mod/forum/lib.php
  66. 14  mod/forum/search.php
  67. 8  mod/glossary/editcategories.html
  68. 22  mod/glossary/formats.php
  69. 6  mod/glossary/lib.php
  70. 9  mod/lesson/pagetypes/matching.php
  71. 1  mod/lesson/report.php
  72. 9  mod/quiz/editlib.php
  73. 3  mod/quiz/report/statistics/report.php
  74. 3  mod/scorm/locallib.php
  75. 3  mod/wiki/editors/wikieditor.php
  76. 9  mod/wiki/renderer.php
  77. 1  question/behaviour/rendererbase.php
  78. 3  question/format/xhtml/format.php
  79. 12  question/type/calculated/questiontype.php
  80. 1  question/type/essay/renderer.php
  81. 1  question/type/match/renderer.php
  82. 6  question/type/multianswer/renderer.php
  83. 6  question/type/numerical/renderer.php
  84. 4  question/type/shortanswer/renderer.php
  85. 2  repository/alfresco/lib.php
  86. 4  repository/draftfiles_manager.php
  87. 4  repository/filepicker.php
  88. 11  tag/coursetags_edit.php
  89. 7  tag/manage.php
  90. 9  user/addnote.php
  91. 1  user/groupaddnote.php
  92. 3  user/index.php
  93. 2  user/message.html
2  admin/filters.php
@@ -242,6 +242,7 @@ function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings)
242 242
 
243 243
     // Disable/off/on
244 244
     $select = new single_select(filters_action_url($filter, 'setstate'), 'newstate', $activechoices, $filterinfo->active, null, 'active' . basename($filter));
  245
+    $select->set_label(get_accesshide(get_string('isactive', 'filters')));
245 246
     $row[] = $OUTPUT->render($select);
246 247
 
247 248
     // Re-order
@@ -263,6 +264,7 @@ function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings)
263 264
 
264 265
     // Apply to strings.
265 266
     $select = new single_select(filters_action_url($filter, 'setapplyto'), 'stringstoo', $applytochoices, $applytostrings, null, 'applyto' . basename($filter));
  267
+    $select->set_label(get_accesshide(get_string('applyto', 'filters')));
266 268
     $select->disabled = $filterinfo->active == TEXTFILTER_DISABLED;
267 269
     $row[] = $OUTPUT->render($select);
268 270
 
7  admin/mnet/access_control.php
@@ -203,17 +203,18 @@
203 203
 if (!empty($formerror['username'])) {
204 204
     echo '<span class="error"> * </span>';
205 205
 }
206  
-echo '<input type="text" name="username" size="20" maxlength="100" />';
  206
+echo html_writer::label(get_string('username'), 'menuusername', false, array('class' =>'accesshide'));
  207
+echo '<input id="menuusername" type="text" name="username" size="20" maxlength="100" />';
207 208
 
208 209
 // choose a remote host
209  
-echo " " . get_string('remotehost', 'mnet') . ":\n";
  210
+echo html_writer::label(get_string('remotehost', 'mnet'), 'menumnet_host_id');
210 211
 if (!empty($formerror['mnet_host_id'])) {
211 212
     echo '<span class="error"> * </span>';
212 213
 }
213 214
 echo html_writer::select($mnethosts, 'mnet_host_id');
214 215
 
215 216
 // choose an access level
216  
-echo " " . get_string('accesslevel', 'mnet') . ":\n";
  217
+echo html_writer::label(get_string('accesslevel', 'mnet'), 'menuaccessctrl');
217 218
 if (!empty($formerror['accessctrl'])) {
218 219
     echo '<span class="error"> * </span>';
219 220
 }
1  admin/portfolio.php
@@ -197,6 +197,7 @@ function portfolio_action_url($portfolio) {
197 197
                 $currentaction = 'hide';
198 198
             }
199 199
             $select = new single_select(portfolio_action_url($pluginid, 'pf'), 'action', $actionchoicesforexisting, $currentaction, null, 'applyto' . $pluginid);
  200
+            $select->set_label(get_accesshide(get_string('portfolio', 'portfolio')));
200 201
             $table->data[] = array($pluginname, $OUTPUT->render($select), $settings);
201 202
         }
202 203
         if (!in_array($plugin, $usedplugins)) {
3  admin/repository.php
@@ -305,7 +305,7 @@ function repository_action_url($repository) {
305 305
             }
306 306
 
307 307
             $select = new single_select(repository_action_url($typename, 'repos'), 'action', $actionchoicesforexisting, $currentaction, null, 'applyto' . basename($typename));
308  
-
  308
+            $select->set_label(get_accesshide(get_string('action')));
309 309
             // Display up/down link
310 310
             $updown = '';
311 311
             $spacer = $OUTPUT->spacer(array('height'=>15, 'width'=>15)); // should be done with CSS instead
@@ -342,6 +342,7 @@ function repository_action_url($repository) {
342 342
             // Check that it has not already been listed
343 343
             if (!in_array($plugin, $alreadyplugins)) {
344 344
                 $select = new single_select(repository_action_url($plugin, 'repos'), 'action', $actionchoicesfornew, 'delete', null, 'applyto' . basename($plugin));
  345
+                $select->set_label(get_accesshide(get_string('action')));
345 346
                 $table->data[] = array(get_string('pluginname', 'repository_'.$plugin), $OUTPUT->render($select), '', '');
346 347
             }
347 348
         }
5  admin/roles/lib.php
@@ -721,7 +721,10 @@ protected function get_archetype_field($id) {
721 721
         foreach(get_role_archetypes() as $type) {
722 722
             $options[$type] = get_string('archetype'.$type, 'role');
723 723
         }
724  
-        return html_writer::select($options, 'archetype', $this->role->archetype, false);
  724
+
  725
+        $return = html_writer::label(get_string('archetype'.$type, 'role'), 'menuarchetype', false, array('class' => 'accesshide'));
  726
+        $return .= html_writer::select($options, 'archetype', $this->role->archetype, false);
  727
+        return $return;
725 728
     }
726 729
 
727 730
     protected function get_assignable_levels_control() {
2  admin/timezone.php
@@ -42,7 +42,7 @@
42 42
     $timezones = get_list_of_timezones();
43 43
 
44 44
     echo '<center><form action="timezone.php" method="post">';
45  
-    echo "$strusers ($strall): ";
  45
+    echo html_writer::label($strusers . ' (' . $strall . '): ', 'menuzone');
46 46
     echo html_writer::select($timezones, "zone", $current, array('99'=>get_string("serverlocaltime")));
47 47
     echo "<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />";
48 48
     echo '<input type="submit" value="'.s($strsavechanges).'" />';
28  auth/cas/config.html
@@ -94,9 +94,9 @@
94 94
     </td>
95 95
 </tr>
96 96
 <tr valign="top" class="required">
97  
-    <td align="right"><?php print_string('auth_cas_hostname_key', 'auth_cas') ?>:</td>
  97
+    <td align="right"><label for="hostname"><?php print_string('auth_cas_hostname_key', 'auth_cas') ?>: </label></td>
98 98
     <td>
99  
-        <input name="hostname" type="text" size="30" value="<?php echo $config->hostname ?>" />
  99
+        <input name="hostname" id="hostname" type="text" size="30" value="<?php echo $config->hostname ?>" />
100 100
         <?php if (isset($err['hostname'])) { echo $OUTPUT->error_text($err['hostname']); } ?>
101 101
     </td>
102 102
     <td>
@@ -105,10 +105,10 @@
105 105
 </tr>
106 106
 <tr valign="top" class="required">
107 107
     <td align="right">
108  
-        <?php print_string('auth_cas_baseuri_key', 'auth_cas') ?>:
  108
+        <label for="baseuri"><?php print_string('auth_cas_baseuri_key', 'auth_cas') ?>: </label>
109 109
     </td>
110 110
     <td>
111  
-        <input name="baseuri" type="text" size="30" value="<?php echo $config->baseuri ?>" />
  111
+        <input name="baseuri" id="baseuri" type="text" size="30" value="<?php echo $config->baseuri ?>" />
112 112
         <?php if (isset($err['baseuri'])) { echo $OUTPUT->error_text($err['baseuri']); } ?>
113 113
     </td>
114 114
     <td>
@@ -117,10 +117,10 @@
117 117
 </tr>
118 118
 <tr valign="top" class="required">
119 119
     <td align="right">
120  
-        <?php print_string('auth_cas_port_key', 'auth_cas') ?>:
  120
+        <label for="port"><?php print_string('auth_cas_port_key', 'auth_cas') ?>: </label>
121 121
     </td>
122 122
     <td>
123  
-        <input name="port" type="text" size="30" value="<?php echo $config->port ?>" />
  123
+        <input name="port" id="port" type="text" size="30" value="<?php echo $config->port ?>" />
124 124
         <?php if (isset($err['port'])) { echo $OUTPUT->error_text($err['port']); } ?>
125 125
     </td>
126 126
     <td>
@@ -129,7 +129,7 @@
129 129
 </tr>
130 130
 <tr valign="top" class="required">
131 131
     <td align="right">
132  
-        <?php print_string('auth_cas_casversion', 'auth_cas') ?>:
  132
+        <?php echo html_writer::label(get_string('auth_cas_casversion', 'auth_cas'), 'menucasversion'); ?>:
133 133
     </td>
134 134
     <td>
135 135
         <?php
@@ -145,7 +145,7 @@
145 145
     </td>
146 146
 </tr>
147 147
 <tr valign="top" class="required">
148  
-    <td align="right"><?php print_string('auth_cas_language_key', 'auth_cas') ?>:</td>
  148
+    <td align="right"><?php echo html_writer::label(get_string('auth_cas_language_key', 'auth_cas'), 'menulanguage'); ?>:</td>
149 149
     <td>
150 150
         <?php echo html_writer::select($CASLANGUAGES, 'language', $config->language, false); ?>
151 151
     </td>
@@ -155,7 +155,7 @@
155 155
 </tr>
156 156
 <tr valign="top" class="required">
157 157
     <td align="right">
158  
-        <?php print_string('auth_cas_proxycas_key', 'auth_cas') ?>:
  158
+        <?php echo html_writer::label(get_string('auth_cas_proxycas_key', 'auth_cas'), 'menuproxycas'); ?>:
159 159
     </td>
160 160
     <td>
161 161
         <?php echo html_writer::select($yesno, 'proxycas', $config->proxycas, false); ?>
@@ -165,7 +165,7 @@
165 165
     </td>
166 166
 </tr>
167 167
 <tr valign="top" class="required">
168  
-    <td align="right"><?php print_string('auth_cas_logoutcas_key', 'auth_cas') ?>:</td>
  168
+    <td align="right"><?php echo html_writer::label(get_string('auth_cas_logoutcas_key', 'auth_cas'), 'menulogoutcas'); ?>:</td>
169 169
     <td>
170 170
         <?php echo html_writer::select($yesno, 'logoutcas', $config->logoutcas, false); ?>
171 171
     </td>
@@ -174,7 +174,7 @@
174 174
     </td>
175 175
 </tr>
176 176
 <tr valign="top" class="required">
177  
-    <td align="right"><?php print_string('auth_cas_multiauth_key', 'auth_cas') ?>:</td>
  177
+    <td align="right"><?php echo html_writer::label(get_string('auth_cas_multiauth_key', 'auth_cas'), 'menumultiauth'); ?>:</td>
178 178
     <td>
179 179
         <?php echo html_writer::select($yesno, 'multiauth', $config->multiauth, false); ?>
180 180
     </td>
@@ -183,7 +183,7 @@
183 183
     </td>
184 184
 </tr>
185 185
 <tr valign="top"  class="required">
186  
-    <td align="right"><?php print_string('auth_cas_certificate_check_key', 'auth_cas') ?>:</td>
  186
+    <td align="right"><?php echo html_writer::label(get_string('auth_cas_certificate_check_key', 'auth_cas'), 'menucertificate_check'); ?>:</td>
187 187
     <td>
188 188
         <?php echo html_writer::select($yesno, 'certificate_check', $config->certificate_check, false); ?>
189 189
     </td>
@@ -192,7 +192,7 @@
192 192
     </td>
193 193
 </tr>
194 194
 <tr valign="top" class="required">
195  
-    <td align="right"><?php print_string('auth_cas_certificate_path_key', 'auth_cas') ?>:</td>
  195
+    <td align="right"><label for="certificate_path"><?php print_string('auth_cas_certificate_path_key', 'auth_cas') ?>: </label></td>
196 196
     <td>
197 197
         <input name="certificate_path" id="certificate_path" type="text" size="30" value="<?php echo $config->certificate_path ?>" />
198 198
         <?php if (isset($err['certificate_path'])) echo $OUTPUT->error_text($err['certificate_path']); ?>
@@ -219,7 +219,7 @@
219 219
     </td>
220 220
 </tr>
221 221
 <tr valign="top" class="required">
222  
-    <td align="right"><label for="menuversion"><?php print_string('auth_ldap_version_key', 'auth_ldap') ?></label></td>
  222
+    <td align="right"><label for="menuldap_version"><?php print_string('auth_ldap_version_key', 'auth_ldap') ?></label></td>
223 223
     <td>
224 224
         <?php
225 225
              $versions = array();
16  auth/fc/config.html
@@ -27,9 +27,9 @@
27 27
 <table cellspacing="0" cellpadding="5" border="0">
28 28
 
29 29
 <tr valign="top" class="required">
30  
-    <td align="right"><?php  print_string("auth_fchost_key", "auth_fc") ?>:</td>
  30
+    <td align="right"><label for="host"><?php  print_string("auth_fchost_key", "auth_fc") ?>:</label></td>
31 31
     <td>
32  
-        <input name="host" type="text" size="30" value="<?php echo $config->host?>" />
  32
+        <input name="host" id="host" type="text" size="30" value="<?php echo $config->host?>" />
33 33
     <?php  if (isset($err["host"])) echo $OUTPUT->error_text($err["host"]); ?>
34 34
     </td>
35 35
     <td>
@@ -38,9 +38,9 @@
38 38
 </tr>
39 39
 
40 40
 <tr valign="top" class="required">
41  
-    <td align="right"><?php  print_string("auth_fcfppport_key", "auth_fc") ?>:</td>
  41
+    <td align="right"><label for="fppport"><?php  print_string("auth_fcfppport_key", "auth_fc") ?>: </label></td>
42 42
     <td>
43  
-        <input name="fppport" type="text" size="30" value="<?php echo $config->fppport?>" />
  43
+        <input name="fppport" id="fppport" type="text" size="30" value="<?php echo $config->fppport?>" />
44 44
     <?php  if (isset($err["fppport"])) echo $OUTPUT->error_text($err["host"]); ?>
45 45
     </td>
46 46
     <td>
@@ -70,9 +70,9 @@
70 70
 </tr>
71 71
 
72 72
 <tr valign="top" class="required">
73  
-    <td align="right"><?php  print_string("auth_fccreators_key", "auth_fc") ?>:</td>
  73
+    <td align="right"><label for="creators"><?php  print_string("auth_fccreators_key", "auth_fc") ?>: </label></td>
74 74
     <td>
75  
-        <input name="creators" type="text" size="30" value="<?php echo $config->creators?>" />
  75
+        <input name="creators" id="creators" type="text" size="30" value="<?php echo $config->creators?>" />
76 76
     <?php  if (isset($err["creators"])) echo $OUTPUT->error_text($err["creators"]); ?>
77 77
     </td>
78 78
     <td>
@@ -81,9 +81,9 @@
81 81
 </tr>
82 82
 
83 83
 <tr valign="top">
84  
-    <td align="right"><?php print_string('auth_fcchangepasswordurl', 'auth_fc') ?>: </td>
  84
+    <td align="right"><label for="changepasswordurl"><?php print_string('auth_fcchangepasswordurl', 'auth_fc') ?>: </label></td>
85 85
     <td>
86  
-        <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
  86
+        <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
87 87
         <?php
88 88
 
89 89
         if (isset($err['changepasswordurl'])) {
14  auth/imap/config.html
@@ -18,9 +18,9 @@
18 18
 <table cellspacing="0" cellpadding="5" border="0">
19 19
 
20 20
 <tr valign="top" class="required">
21  
-    <td align="right"><?php print_string('auth_imaphost_key', 'auth_imap') ?>: </td>
  21
+    <td align="right"><label for="host"><?php print_string('auth_imaphost_key', 'auth_imap') ?>: </label></td>
22 22
     <td>
23  
-        <input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
  23
+        <input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
24 24
         <?php
25 25
 
26 26
         if (isset($err['host'])) {
@@ -40,7 +40,7 @@
40 40
 </tr>
41 41
 
42 42
 <tr valign="top" class="required">
43  
-    <td align="right"><?php print_string('auth_imaptype_key', 'auth_imap') ?>: </td>
  43
+    <td align="right"><?php echo html_writer::label(get_string('auth_imaptype_key', 'auth_imap'), 'menutype'); ?>: </td>
44 44
     <td>
45 45
         <?php
46 46
 
@@ -56,9 +56,9 @@
56 56
 </tr>
57 57
 
58 58
 <tr valign="top" class="required">
59  
-    <td align="right"><?php print_string('auth_imapport_key', 'auth_imap') ?>: </td>
  59
+    <td align="right"><label for="port"><?php print_string('auth_imapport_key', 'auth_imap') ?>: </label></td>
60 60
     <td>
61  
-        <input name="port" type="text" size="6" value="<?php echo $config->port ?>" />
  61
+        <input name="port" id="port" type="text" size="6" value="<?php echo $config->port ?>" />
62 62
         <?php
63 63
 
64 64
         if (isset($err['port'])) {
@@ -71,9 +71,9 @@
71 71
 </tr>
72 72
 
73 73
 <tr valign="top">
74  
-    <td align="right"><?php print_string('auth_imapchangepasswordurl_key', 'auth_imap') ?>: </td>
  74
+    <td align="right"><label for="changepasswordurl"><?php print_string('auth_imapchangepasswordurl_key', 'auth_imap') ?>: </label></td>
75 75
     <td>
76  
-        <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
  76
+        <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
77 77
         <?php
78 78
 
79 79
         if (isset($err['changepasswordurl'])) {
2  auth/ldap/config.html
@@ -118,7 +118,7 @@
118 118
 </tr>
119 119
 <tr valign="top" class="required">
120 120
     <td align="right">
121  
-        <label for="menuversion"><?php print_string('auth_ldap_version_key', 'auth_ldap') ?></label>
  121
+        <label for="menuldap_version"><?php print_string('auth_ldap_version_key', 'auth_ldap') ?></label>
122 122
     </td>
123 123
     <td>
124 124
         <?php
6  auth/mnet/config.html
@@ -22,9 +22,9 @@
22 22
 <table cellspacing="0" cellpadding="5">
23 23
 
24 24
 <tr valign="top" class="required">
25  
-    <td align="right"><?php print_string('rpc_negotiation_timeout', 'auth_mnet'); ?>: </td>
  25
+    <td align="right"><label for="rpc_negotiation_timeout"><?php print_string('rpc_negotiation_timeout', 'auth_mnet'); ?>: </label></td>
26 26
     <td>
27  
-        <input name="rpc_negotiation_timeout" type="text" size="5" value="<?php echo $config->rpc_negotiation_timeout ?>" />
  27
+        <input name="rpc_negotiation_timeout" id="rpc_negotiation_timeout" type="text" size="5" value="<?php echo $config->rpc_negotiation_timeout ?>" />
28 28
         <?php
29 29
 
30 30
         if (isset($err['rpc_negotiation_timeout'])) {
@@ -45,7 +45,7 @@
45 45
 <?php /*
46 46
  See MDL-21327   for why this is commented out
47 47
 <tr valign="top" class="required">
48  
-    <td align="right"><?php print_string('auto_add_remote_users', 'auth_mnet'); ?>: </td>
  48
+    <td align="right"><?php echo html_writer::label(get_string('auto_add_remote_users', 'auth_mnet'), 'menuauto_add_remote_users'); ?>: </td>
49 49
     <td>
50 50
         <?php
51 51
 
12  auth/nntp/config.html
@@ -15,9 +15,9 @@
15 15
 <table cellspacing="0" cellpadding="5" border="0">
16 16
 
17 17
 <tr valign="top" class="required">
18  
-    <td align="right"><?php print_string('auth_nntphost_key', 'auth_nntp') ?>: </td>
  18
+    <td align="right"><label for="host"><?php print_string('auth_nntphost_key', 'auth_nntp') ?>: </label></td>
19 19
     <td>
20  
-        <input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
  20
+        <input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
21 21
         <?php
22 22
 
23 23
         if (isset($err["host"])) {
@@ -37,9 +37,9 @@
37 37
 </tr>
38 38
 
39 39
 <tr valign="top" class="required">
40  
-    <td align="right"><?php print_string('auth_nntpport_key', 'auth_nntp') ?>: </td>
  40
+    <td align="right"><label for="port"><?php print_string('auth_nntpport_key', 'auth_nntp') ?>: </label></td>
41 41
     <td>
42  
-        <input name="port" type="text" size="6" value="<?php echo $config->port ?>" />
  42
+        <input name="port" id="port" type="text" size="6" value="<?php echo $config->port ?>" />
43 43
         <?php
44 44
 
45 45
         if (isset($err["port"])) {
@@ -52,9 +52,9 @@
52 52
 </tr>
53 53
 
54 54
 <tr valign="top">
55  
-    <td align="right"><?php print_string('auth_nntpchangepasswordurl_key', 'auth_nntp') ?>: </td>
  55
+    <td align="right"><label for="changepasswordurl"><?php print_string('auth_nntpchangepasswordurl_key', 'auth_nntp') ?>: </label></td>
56 56
     <td>
57  
-        <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
  57
+        <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
58 58
         <?php
59 59
 
60 60
         if (isset($err['changepasswordurl'])) {
18  auth/pop3/config.html
@@ -21,9 +21,9 @@
21 21
 <table cellspacing="0" cellpadding="5" border="0">
22 22
 
23 23
 <tr valign="top" class="required">
24  
-    <td align="right"><?php print_string('auth_pop3host_key', 'auth_pop3') ?>: </td>
  24
+    <td align="right"><label for="host"><?php print_string('auth_pop3host_key', 'auth_pop3') ?>: </label></td>
25 25
     <td>
26  
-        <input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
  26
+        <input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
27 27
         <?php
28 28
 
29 29
         if (isset($err['host'])) {
@@ -43,7 +43,7 @@
43 43
 </tr>
44 44
 
45 45
 <tr valign="top" class="required">
46  
-    <td align="right"><?php print_string('auth_pop3type_key', 'auth_pop3') ?>: </td>
  46
+    <td align="right"><?php echo html_writer::label(get_string('auth_pop3type_key', 'auth_pop3'), 'menutype'); ?>: </td>
47 47
     <td>
48 48
         <?php
49 49
 
@@ -59,9 +59,9 @@
59 59
 </tr>
60 60
 
61 61
 <tr valign="top" class="required">
62  
-    <td align="right"><?php print_string('auth_pop3port_key', 'auth_pop3') ?>: </td>
  62
+    <td align="right"><label for="port"><?php print_string('auth_pop3port_key', 'auth_pop3') ?>: </label></td>
63 63
     <td>
64  
-        <input name="port" type="text" size="6" value="<?php echo $config->port ?>" />
  64
+        <input name="port" id="port" type="text" size="6" value="<?php echo $config->port ?>" />
65 65
         <?php
66 66
 
67 67
         if (isset($err['port'])) {
@@ -74,9 +74,9 @@
74 74
 </tr>
75 75
 
76 76
 <tr valign="top" class="required">
77  
-    <td align="right"><?php print_string('auth_pop3mailbox_key', 'auth_pop3') ?>: </td>
  77
+    <td align="right"><label for="mailbox"><?php print_string('auth_pop3mailbox_key', 'auth_pop3') ?>: </label></td>
78 78
     <td>
79  
-        <input name="mailbox" type="text" size="6" value="<?php echo $config->mailbox ?>" />
  79
+        <input name="mailbox" id="mailbox" type="text" size="6" value="<?php echo $config->mailbox ?>" />
80 80
         <?php
81 81
 
82 82
         if (isset($err['mailbox'])) {
@@ -89,9 +89,9 @@
89 89
 </tr>
90 90
 
91 91
 <tr valign="top">
92  
-    <td align="right"><?php print_string('auth_pop3changepasswordurl_key', 'auth_pop3') ?>: </td>
  92
+    <td align="right"><label for="changepasswordurl"><?php print_string('auth_pop3changepasswordurl_key', 'auth_pop3') ?>: </label></td>
93 93
     <td>
94  
-        <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
  94
+        <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
95 95
         <?php
96 96
 
97 97
         if (isset($err['changepasswordurl'])) {
18  auth/radius/config.html
@@ -30,9 +30,9 @@
30 30
 <table cellspacing="0" cellpadding="5" border="0">
31 31
 
32 32
 <tr valign="top">
33  
-    <td align="right"><?php print_string('auth_radiushost_key', 'auth_radius') ?>: </td>
  33
+    <td align="right"><label for="host"><?php print_string('auth_radiushost_key', 'auth_radius') ?>: </label></td>
34 34
     <td>
35  
-        <input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
  35
+        <input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
36 36
         <?php
37 37
 
38 38
         if (isset($err['host'])) {
@@ -45,9 +45,9 @@
45 45
 </tr>
46 46
 
47 47
 <tr valign="top">
48  
-    <td align="right"><?php print_string('auth_radiusnasport_key', 'auth_radius') ?>: </td>
  48
+    <td align="right"><label for="nasport"><?php print_string('auth_radiusnasport_key', 'auth_radius') ?>: </label></td>
49 49
     <td>
50  
-        <input name="nasport" type="text" size="6" value="<?php echo $config->nasport ?>" />
  50
+        <input name="nasport" id="nasport" type="text" size="6" value="<?php echo $config->nasport ?>" />
51 51
         <?php
52 52
 
53 53
         if (isset($err['nasport'])) {
@@ -60,7 +60,7 @@
60 60
 </tr>
61 61
 
62 62
 <tr valign="top" >
63  
-    <td align="right"><?php print_string('auth_radiustype_key', 'auth_radius') ?>: </td>
  63
+    <td align="right"><?php echo html_writer::label(get_string('auth_radiustype_key', 'auth_radius'), 'menuradiustype'); ?>: </td>
64 64
     <td>
65 65
 <?php
66 66
 
@@ -82,9 +82,9 @@
82 82
 
83 83
 
84 84
 <tr valign="top" >
85  
-    <td align="right"><?php print_string('auth_radiussecret_key', 'auth_radius') ?>: </td>
  85
+    <td align="right"><label for="secret"><?php print_string('auth_radiussecret_key', 'auth_radius') ?>: </label></td>
86 86
     <td>
87  
-        <input name="secret" type="text" size="6" value="<?php echo $config->secret ?>" />
  87
+        <input name="secret" id="secret" type="text" size="6" value="<?php echo $config->secret ?>" />
88 88
         <?php
89 89
 
90 90
         if (isset($err['secret'])) {
@@ -97,9 +97,9 @@
97 97
 </tr>
98 98
 
99 99
 <tr valign="top">
100  
-    <td align="right"><?php print_string('auth_radiuschangepasswordurl_key', 'auth_radius') ?>: </td>
  100
+    <td align="right"><label for="changepasswordurl"><?php print_string('auth_radiuschangepasswordurl_key', 'auth_radius') ?>: </label></td>
101 101
     <td>
102  
-        <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
  102
+        <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
103 103
         <?php
104 104
 
105 105
         if (isset($err['changepasswordurl'])) {
22  auth/shibboleth/config.html
@@ -20,7 +20,7 @@
20 20
 <table cellspacing="0" cellpadding="5" border="0">
21 21
 
22 22
 <tr valign="top" class="required">
23  
-    <td align="right"><?php print_string("username") ?>:</td>
  23
+    <td align="right"><label for="user_attribute"><?php print_string("username") ?>: </label></td>
24 24
     <td>
25 25
         <input name="user_attribute" type="text" size="30" value="<?php echo $config->user_attribute ?>" />
26 26
     </td>
@@ -28,9 +28,9 @@
28 28
 </tr>
29 29
 
30 30
 <tr valign="top">
31  
-    <td align="right"><?php print_string("auth_shib_convert_data", "auth_shibboleth") ?>:</td>
  31
+    <td align="right"><label for="convert_data"><?php print_string("auth_shib_convert_data", "auth_shibboleth") ?>: </label></td>
32 32
     <td>
33  
-        <input name="convert_data" type="text" size="30" value="<?php echo $config->convert_data?>" />
  33
+        <input name="convert_data" id="convert_data" type="text" size="30" value="<?php echo $config->convert_data?>" />
34 34
         <?php
35 35
 
36 36
         if ($config->convert_data and $config->convert_data != '' and !is_readable($config->convert_data)) {
@@ -82,9 +82,9 @@
82 82
 </tr>
83 83
 
84 84
 <tr valign="top">
85  
-    <td align="right"><?php print_string("auth_shib_logout_url", "auth_shibboleth") ?>:</td>
  85
+    <td align="right"><label for="logout_handler"><?php print_string("auth_shib_logout_url", "auth_shibboleth") ?>: </label></td>
86 86
     <td>
87  
-        <input name="logout_handler" type="text" size="30" value="<?php
  87
+        <input name="logout_handler" id="logout_handler" type="text" size="30" value="<?php
88 88
         if ( isset($config->logout_handler) and !empty($config->logout_handler)){
89 89
             echo $config->logout_handler;
90 90
         }
@@ -94,9 +94,9 @@
94 94
 </tr>
95 95
 
96 96
 <tr valign="top">
97  
-    <td align="right"><?php print_string("auth_shib_logout_return_url", "auth_shibboleth") ?>:</td>
  97
+    <td align="right"><label for="logout_return_url"><?php print_string("auth_shib_logout_return_url", "auth_shibboleth") ?>: </label></td>
98 98
     <td>
99  
-        <input name="logout_return_url" type="text" size="30" value="<?php
  99
+        <input name="logout_return_url" id="logout_return_url" type="text" size="30" value="<?php
100 100
         if ( isset($config->logout_return_url) and !empty($config->logout_return_url)){
101 101
             echo $config->logout_return_url;
102 102
         }
@@ -106,9 +106,9 @@
106 106
 </tr>
107 107
 
108 108
 <tr valign="top">
109  
-    <td align="right"><?php print_string("auth_shib_auth_method", "auth_shibboleth") ?>:</td>
  109
+    <td align="right"><label for="login_name"><?php print_string("auth_shib_auth_method", "auth_shibboleth") ?>: </label></td>
110 110
     <td>
111  
-        <input name="login_name" type="text" size="30" value="<?php
  111
+        <input name="login_name" id="login_name" type="text" size="30" value="<?php
112 112
         if ( isset($config->login_name) and !empty($config->login_name)){
113 113
             echo htmlentities($config->login_name);
114 114
         } else {
@@ -120,9 +120,9 @@
120 120
 </tr>
121 121
 
122 122
 <tr valign="top">
123  
-    <td align="right"><?php print_string('auth_shib_changepasswordurl', 'auth_shibboleth') ?>: </td>
  123
+    <td align="right"><label for="changepasswordurl"><?php print_string('auth_shib_changepasswordurl', 'auth_shibboleth') ?>: </label></td>
124 124
     <td>
125  
-        <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
  125
+        <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
126 126
         <?php
127 127
 
128 128
         if (isset($err['changepasswordurl'])) {
4  auth/shibboleth/index_form.html
@@ -29,9 +29,9 @@
29 29
 
30 30
         ?>
31 31
           <div class="guestsub">
32  
-          <p><?php print_string("auth_shibboleth_select_organization", "auth_shibboleth"); ?></p>
  32
+          <p><label for="idp"><?php print_string("auth_shibboleth_select_organization", "auth_shibboleth"); ?></label></p>
33 33
             <form action="login.php" method="post" id="guestlogin">
34  
-            <select name="idp">
  34
+            <select id="idp" name="idp">
35 35
                 <option value="-" ><?php print_string("auth_shibboleth_select_member", "auth_shibboleth"); ?></option>
36 36
                 <?php
37 37
                     print_idp_list();
11  backup/util/ui/renderer.php
@@ -343,7 +343,16 @@ protected function backup_detail_input($label, $type, $name, $value, array $attr
343 343
         } else {
344 344
             $description = '';
345 345
         }
346  
-        return $this->backup_detail_pair($label, html_writer::empty_tag('input', $attributes+array('name'=>$name, 'type'=>$type, 'value'=>$value)).$description);
  346
+
  347
+        if ($type == 'text') {
  348
+            if (empty($attributes['id'])) {
  349
+                $attributes['id'] = $name;
  350
+            }
  351
+            $label = html_writer::label($name, $attibutes['id'], false, array('class' => 'accesshide'));
  352
+        } else {
  353
+            $label = '';
  354
+        }
  355
+        return $this->backup_detail_pair($label, $label . html_writer::empty_tag('input', $attributes+array('name'=>$name, 'type'=>$type, 'value'=>$value)).$description);
347 356
     }
348 357
 
349 358
     /**
4  blocks/section_links/config_instance.html
@@ -66,7 +66,7 @@
@@ -77,7 +77,7 @@
4  blocks/tags/block_tags.php
@@ -225,7 +225,6 @@ function get_content() {
225 225
             if ($officialtags) { $this->content->text .= $officialtagscontent; }
226 226
             if ($coursetags) { $this->content->text .= $coursetagscontent; }
227 227
             if ($commtags) { $this->content->text .= $commtagscontent; }
228  
-
229 228
             // add the input form section (allowing a user to tag the current course) and navigation, or loggin message
230 229
             if ($loggedin) {
231 230
                 // only show the input form on course pages for those allowed (or not barred)
@@ -250,7 +249,8 @@ function get_content() {
250 249
                             <div class="coursetag_form_wrapper">
251 250
                             <div class="coursetag_form_positioner">
252 251
                                 <div class="coursetag_form_input1">
253  
-                                    <input type="text" name="coursetag_sug_keyword" class="coursetag_form_input1a" disabled="disabled" />
  252
+                                    <label class="accesshide" for="coursetag_sug_keyword">$tagthisunit</label>
  253
+                                    <input type="text" name="coursetag_sug_keyword" id="coursetag_sug_keyword" class="coursetag_form_input1a" disabled="disabled" />
254 254
                                 </div>
255 255
                                 <div class="coursetag_form_input2">
256 256
                                     <input type="text" name="coursetag_new_tag" id="coursetag_new_tag" class="coursetag_form_input2a"
1  calendar/lib.php
@@ -1472,6 +1472,7 @@ function calendar_print_month_selector($name, $selected) {
1472 1472
     for ($i=1; $i<=12; $i++) {
1473 1473
         $months[$i] = userdate(gmmktime(12, 0, 0, $i, 15, 2000), '%B');
1474 1474
     }
  1475
+    echo html_writer::label(get_string('months'), 'menu'. $name, false, array('class' => 'accesshide'));
1475 1476
     echo html_writer::select($months, $name, $selected, false);
1476 1477
 }
1477 1478
 
4  calendar/renderer.php
@@ -704,7 +704,9 @@ protected function course_filter_selector(moodle_url $returnurl, $label=null) {
704 704
         $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);
705 705
         $select->class = 'cal_courses_flt';
706 706
         if ($label !== null) {
707  
-            $select->label = $label;
  707
+            $select->set_label($label);
  708
+        } else {
  709
+            $select->set_label(get_accesshide(get_string('course')));
708 710
         }
709 711
         return $this->output->render($select);
710 712
     }
1  course/index.php
@@ -369,6 +369,7 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $
369 369
             }
370 370
             $popupurl = new moodle_url("index.php?move=$category->id&sesskey=".sesskey());
371 371
             $select = new single_select($popupurl, 'moveto', $tempdisplaylist, $category->parent, null, "moveform$category->id");
  372
+            $select->set_label(get_accesshide(get_string('frontpagecategorynames')));
372 373
             echo $OUTPUT->render($select);
373 374
         }
374 375
         echo '</td>';
3  course/scales.php
@@ -70,6 +70,7 @@
70 70
             echo $OUTPUT->box_start();
71 71
             echo $OUTPUT->heading($scale->name);
72 72
             echo "<center>";
  73
+            echo html_writer::label(get_string('scales'), 'menuunused', false, array('class' => 'accesshide'));
73 74
             echo html_writer::select($scalemenu, 'unused');
74 75
             echo "</center>";
75 76
             echo text_to_html($scale->description);
@@ -101,6 +102,7 @@
101 102
         echo $OUTPUT->box_start();
102 103
         echo $OUTPUT->heading($scale->name);
103 104
         echo "<center>";
  105
+        echo html_writer::label(get_string('scales'), 'menuunused', false, array('class' => 'accesshide'));
104 106
         echo html_writer::select($scalemenu, 'unused');
105 107
         echo "</center>";
106 108
         echo text_to_html($scale->description);
@@ -127,6 +129,7 @@
127 129
         echo $OUTPUT->box_start();
128 130
         echo $OUTPUT->heading($scale->name);
129 131
         echo "<center>";
  132
+        echo html_writer::label(get_string('scales'), 'menuunused', false, array('class' => 'accesshide'));
130 133
         echo html_writer::select($scalemenu, 'unused');
131 134
         echo "</center>";
132 135
         echo text_to_html($scale->description);
6  enrol/authorize/locallib.php
@@ -58,7 +58,9 @@ function authorize_print_orders($courseid, $userid) {
58 58
 
59 59
     $searchmenu = array('orderid' => $authstrs->orderid, 'transid' => $authstrs->transid, 'cclastfour' => $authstrs->cclastfour);
60 60
     $buttons = "<form method='post' action='index.php' autocomplete='off'><div>";
  61
+    $buttons .= html_writer::label(get_string('orderdetails', 'enrol_authorize'), 'menusearchtype', false, array('class' => 'accesshide'));
61 62
     $buttons .= html_writer::select($searchmenu, 'searchtype', $searchtype, false);
  63
+    $buttons .= html_writer::label(get_string('search'), 'menusearchtype', false, array('class' => 'accesshide'));
62 64
     $buttons .= "<input type='text' size='16' name='searchquery' value='' />";
63 65
     $buttons .= "<input type='submit' value='$strs->search' />";
64 66
     $buttons .= "</div></form>";
@@ -81,7 +83,8 @@ function authorize_print_orders($courseid, $userid) {
81 83
     if (($popupcrs = $DB->get_records_sql_menu($sql, $params))) {
82 84
         $popupcrs = array($SITE->id => $SITE->fullname) + $popupcrs;
83 85
     }
84  
-    $popupmenu = empty($popupcrs) ? '' : $OUTPUT->single_select(new moodle_url($baseurl.'&status='.$status), 'course', $popupcrs, $courseid, null, 'coursesmenu');
  86
+    $popmenulabel = array('' => get_accesshide(get_string('course')));
  87
+    $popupmenu = empty($popupcrs) ? '' : $OUTPUT->single_select(new moodle_url($baseurl.'&status='.$status), 'course', $popupcrs, $courseid, $popmenulabel, 'coursesmenu');
85 88
     $popupmenu .= '<br />';
86 89
     $statusmenu = array(
87 90
         AN_STATUS_NONE => $strs->all,
@@ -97,6 +100,7 @@ function authorize_print_orders($courseid, $userid) {
97 100
         AN_STATUS_TEST => $authstrs->tested
98 101
     );
99 102
 
  103
+    $popmenulabel = array('' => get_accesshide(get_string('status')));
100 104
     $popupmenu .= $OUTPUT->single_select(new moodle_url($baseurl.'&course='.$courseid), 'status', $statusmenu, $status, null, 'statusmenu');
101 105
     if ($canmanagepayments) {
102 106
         $popupmenu .= '<br />';
6  enrol/manual/manage.php
@@ -162,13 +162,13 @@
162 162
 
163 163
               <div class="enroloptions">
164 164
 
165  
-              <p><label for="roleid"><?php print_string('assignrole', 'enrol_manual') ?></label><br />
  165
+              <p><label for="menuroleid"><?php print_string('assignrole', 'enrol_manual') ?></label><br />
166 166
               <?php echo html_writer::select($roles, 'roleid', $roleid, false); ?></p>
167 167
 
168  
-              <p><label for="extendperiod"><?php print_string('enrolperiod', 'enrol') ?></label><br />
  168
+              <p><label for="menuextendperiod"><?php print_string('enrolperiod', 'enrol') ?></label><br />
169 169
               <?php echo html_writer::select($periodmenu, 'extendperiod', $defaultperiod, $unlimitedperiod); ?></p>
170 170
 
171  
-              <p><label for="extendbase"><?php print_string('startingfrom') ?></label><br />
  171
+              <p><label for="menuextendbase"><?php print_string('startingfrom') ?></label><br />
172 172
               <?php echo html_writer::select($basemenu, 'extendbase', $extendbase, false); ?></p>
173 173
 
174 174
               </div>
6  filter/algebra/algebradebug.php
@@ -275,12 +275,12 @@ function slasharguments($texexp, $md5) {
275 275
 <html>
276 276
 <head><title>Algebra Filter Debugger</title></head>
277 277
 <body>
278  
-    <p>Please enter an algebraic expression <b>without</b> any surrounding @@ into
279  
-       the text box below. (Click <a href="#help">here for help.</a>)
  278
+    <p><label for="algebra">Please enter an algebraic expression <b>without</b> any surrounding @@ into
  279
+       the text box below. (Click <a href="#help">here for help.</a>)</label>
280 280
           <form action="algebradebug.php" method="get"
281 281
            target="inlineframe">
282 282
             <center>
283  
-             <input type="text" name="algebra" size="50"
  283
+             <input type="text" id="algebra" name="algebra" size="50"
284 284
                     value="sin(z)/(x^2+y^2)" />
285 285
             </center>
286 286
            <ol>
5  filter/manage.php
@@ -181,7 +181,10 @@
181 181
         } else {
182 182
             $activechoices[TEXTFILTER_INHERIT] = $strdefaultoff;
183 183
         }
184  
-        $row[] = html_writer::select($activechoices, str_replace('/', '_', $filter), $filterinfo->localstate, false);
  184
+        $filtername = str_replace('/', '_', $filter);
  185
+        $select = html_writer::label($filterinfo->localstate, 'menu'. $filtername, false, array('class' => 'accesshide'));
  186
+        $select .= html_writer::select($activechoices, $filtername, $filterinfo->localstate, false);
  187
+        $row[] = $select;
185 188
 
186 189
         // Settings link, if required
187 190
         if ($settingscol) {
1  grade/edit/tree/calculation.php
@@ -177,6 +177,7 @@ function get_grade_tree(&$gtree, $element, $current_itemid=null, $errors=null) {
177 177
                     $name .= '<div class="error"><span class="error">' . $errors[$grade_item->id].'</span><br />'."\n";
178 178
                     $closingdiv = "</div>\n";
179 179
                 }
  180
+                $name .= '<label class="accesshide" for="id_idnumber_' . $grade_item->id . '">' . get_string('gradeitems', 'grades')  .'</label>';
180 181
                 $name .= '<input class="idnumber" id="id_idnumber_'.$grade_item->id.'" type="text" name="idnumbers['.$grade_item->id.']" />' . "\n";
181 182
                 $name .= $closingdiv;
182 183
             }
2  grade/edit/tree/index.php
@@ -343,8 +343,8 @@
343 343
 if (!$moving && count($grade_edit_tree->categories) > 1) {
344 344
     echo '<br /><br />';
345 345
     echo '<input type="hidden" name="bulkmove" value="0" id="bulkmoveinput" />';
346  
-    echo get_string('moveselectedto', 'grades') . ' ';
347 346
     $attributes = array('id'=>'menumoveafter');
  347
+    echo html_writer::label(get_string('moveselectedto', 'grades'), 'menumoveafter', false, array('class' => 'accesshide'));
348 348
     echo html_writer::select($grade_edit_tree->categories, 'moveafter', '', array(''=>'choosedots'), $attributes);
349 349
     $OUTPUT->add_action_handler(new component_action('change', 'submit_bulk_move'), 'menumoveafter');
350 350
     echo '<div id="noscriptgradetreeform" class="hiddenifjs">
3  grade/edit/tree/lib.php
@@ -666,7 +666,8 @@ public function get_category_cell($category, $levelclass, $params) {
666 666
         } else {
667 667
             $attributes = array();
668 668
             $attributes['id'] = 'aggregation_'.$category->id;
669  
-            $aggregation = html_writer::select($options, 'aggregation_'.$category->id, $category->aggregation, null, $attributes);
  669
+            $aggregation = html_writer::label(get_string('aggregation', 'grades'), 'aggregation_'.$category->id, false, array('class' => 'accesshide'));
  670
+            $aggregation .= html_writer::select($options, 'aggregation_'.$category->id, $category->aggregation, null, $attributes);
670 671
             $action = new component_action('change', 'update_category_aggregation', array('courseid' => $params['id'], 'category' => $category->id, 'sesskey' => sesskey()));
671 672
             $OUTPUT->add_action_handler($action, 'aggregation_'.$category->id);
672 673
         }
2  grade/lib.php
@@ -380,7 +380,7 @@ function print_grade_plugin_selector($plugin_info, $active_type, $active_plugin,
380 380
     // finally print/return the popup form
381 381
     if ($count > 1) {
382 382
         $select = new url_select($menu, $active, null, 'choosepluginreport');
383  
-
  383
+        $select->set_label(get_accesshide(get_string('gradereport', 'grades')));
384 384
         if ($return) {
385 385
             return $OUTPUT->render($select);
386 386
         } else {
3  grade/report/grader/lib.php
@@ -954,7 +954,8 @@ public function get_right_rows() {
954 954
                             }
955 955
                             $itemcell->text .= '<input type="hidden" id="oldgrade_'.$userid.'_'.$item->id.'" name="oldgrade_'.$userid.'_'.$item->id.'" value="'.$oldval.'"/>';
956 956
                             $attributes = array('tabindex' => $tabindices[$item->id]['grade'], 'id'=>'grade_'.$userid.'_'.$item->id);
957  
-                            $itemcell->text .= html_writer::select($scaleopt, 'grade_'.$userid.'_'.$item->id, $gradeval, array(-1=>$nogradestr), $attributes);;
  957
+                            $itemcell->text .= html_writer::label(get_string('typescale', 'grades'), 'grade_'.$userid.'_'.$item->id, false, array('class' => 'accesshide'));
  958
+                            $itemcell->text .= html_writer::select($scaleopt, 'grade_'.$userid.'_'.$item->id, $gradeval, array(-1=>$nogradestr), $attributes);
958 959
                         } elseif(!empty($scale)) {
959 960
                             $scales = explode(",", $scale->scale);
960 961
 
2  lang/en/moodle.php
@@ -1032,6 +1032,8 @@
1032 1032
 $string['missingteacher'] = 'Must choose something';
1033 1033
 $string['missingurl'] = 'Missing URL';
1034 1034
 $string['missingusername'] = 'Missing username';
  1035
+$string['month'] = 'Month';
  1036
+$string['months'] = 'Months';
1035 1037
 $string['modified'] = 'Modified';
1036 1038
 $string['moduledeleteconfirm'] = 'You are about to completely delete the module \'{$a}\'.  This will completely delete everything in the database associated with this activity module.  Are you SURE you want to continue?';
1037 1039
 $string['moduledeletefiles'] = 'All data associated with the module \'{$a->module}\' has been deleted from the database.  To complete the deletion (and prevent the module re-installing itself), you should now delete this directory from your server: {$a->directory}';
24  lib/adminlib.php
@@ -1768,7 +1768,7 @@ public function output_html($data, $query='') {
1768 1768
 
1769 1769
         return format_admin_setting($this, $this->visiblename,
1770 1770
         '<div class="form-text defaultsnext"><input type="text" size="'.$this->size.'" id="'.$this->get_id().'" name="'.$this->get_full_name().'" value="'.s($data).'" /></div>',
1771  
-        $this->description, true, '', $default, $query);
  1771
+               $this->description, true, '', $default, $query);
1772 1772
     }
1773 1773
 }
1774 1774
 
@@ -1973,7 +1973,7 @@ public function output_html($data, $query='') {
1973 1973
 
1974 1974
         return format_admin_setting($this, $this->visiblename,
1975 1975
         '<div class="form-file defaultsnext"><input type="text" size="'.$this->size.'" id="'.$this->get_id().'" name="'.$this->get_full_name().'" value="'.s($data).'" />'.$executable.'</div>',
1976  
-        $this->description, true, '', $default, $query);
  1976
+               $this->description, true, '', $default, $query);
1977 1977
     }
1978 1978
 }
1979 1979
 
@@ -2007,7 +2007,7 @@ public function output_html($data, $query='') {
2007 2007
 
2008 2008
         return format_admin_setting($this, $this->visiblename,
2009 2009
         '<div class="form-file defaultsnext"><input type="text" size="'.$this->size.'" id="'.$this->get_id().'" name="'.$this->get_full_name().'" value="'.s($data).'" />'.$executable.'</div>',
2010  
-        $this->description, true, '', $default, $query);
  2010
+               $this->description, true, '', $default, $query);
2011 2011
     }
2012 2012
 }
2013 2013
 
@@ -2041,7 +2041,7 @@ public function output_html($data, $query='') {
2041 2041
 
2042 2042
         return format_admin_setting($this, $this->visiblename,
2043 2043
         '<div class="form-file defaultsnext"><input type="text" size="'.$this->size.'" id="'.$this->get_id().'" name="'.$this->get_full_name().'" value="'.s($data).'" />'.$executable.'</div>',
2044  
-        $this->description, true, '', $default, $query);
  2044
+               $this->description, true, '', $default, $query);
2045 2045
     }
2046 2046
 }
2047 2047
 
@@ -2732,11 +2732,14 @@ public function output_html($data, $query='') {
2732 2732
         }
2733 2733
 
2734 2734
         $return = '<div class="form-time defaultsnext">'.
  2735
+            '<label class="accesshide" for="' . $this->get_id() . '">' . get_string('hour') . '</label>' .
2735 2736
             '<select id="'.$this->get_id().'h" name="'.$this->get_full_name().'[h]">';
2736 2737
         for ($i = 0; $i < 24; $i++) {
2737 2738
             $return .= '<option value="'.$i.'"'.($i == $data['h'] ? ' selected="selected"' : '').'>'.$i.'</option>';
2738 2739
         }
2739  
-        $return .= '</select>:<select id="'.$this->get_id().'m" name="'.$this->get_full_name().'[m]">';
  2740
+        $return .= '</select>:';
  2741
+        $return .= '<label class="accesshide" for="' . $this->get_id() . '">' . get_string('minutes') . '</label>';
  2742
+        $return .= '<select id="'.$this->get_id().'m" name="'.$this->get_full_name().'[m]">';
2740 2743
         for ($i = 0; $i < 60; $i += 5) {
2741 2744
             $return .= '<option value="'.$i.'"'.($i == $data['m'] ? ' selected="selected"' : '').'>'.$i.'</option>';
2742 2745
         }
@@ -3149,6 +3152,7 @@ public function output_html($data, $query='') {
3149 3152
             if (!array_key_exists($i, $currentsetting)) {
3150 3153
                 $currentsetting[$i] = 'none'; //none
3151 3154
             }
  3155
+            $return .= '<label class="accesshide" for="' . $this->get_id().$i . '">' . get_string($this->name, 'admin') . '</label>';
3152 3156
             $return .='<select class="form-select" id="'.$this->get_id().$i.'" name="'.$this->get_full_name().'[]">';
3153 3157
             foreach ($this->choices as $key => $value) {
3154 3158
                 $return .= '<option value="'.$key.'"'.("$key" == $currentsetting[$i] ? ' selected="selected"' : '').'>'.$value.'</option>';
@@ -3420,8 +3424,10 @@ public function output_html($data, $query='') {
3420 3424
             }
3421 3425
 
3422 3426
             $out .= html_writer::tag('td',
  3427
+                html_writer::label($value, $this->get_full_name() . $field, false, array('class' => 'accesshide')) .
3423 3428
                 html_writer::empty_tag('input',
3424 3429
                     array(
  3430
+                        'id'    => $this->get_full_name() . $field,
3425 3431
                         'type'  => 'text',
3426 3432
                         'class' => 'form-text',
3427 3433
                         'name'  => $this->get_full_name().'['.$field.']',
@@ -6515,7 +6521,7 @@ public function output_html($data, $query='') {
6515 6521
                 }
6516 6522
 
6517 6523
                 $select = new single_select($this->repository_action_url($typename, 'repos'), 'action', $actionchoicesforexisting, $currentaction, null, 'applyto' . basename($typename));
6518  
-
  6524
+                $select->set_label(get_accesshide(get_string('select') . ' '. get_string('action')));
6519 6525
                 // Display up/down link
6520 6526
                 $updown = '';
6521 6527
                 $spacer = $OUTPUT->spacer(array('height'=>15, 'width'=>15)); // should be done with CSS instead
@@ -6552,6 +6558,7 @@ public function output_html($data, $query='') {
6552 6558
                 // Check that it has not already been listed
6553 6559
                 if (!in_array($plugin, $alreadyplugins)) {
6554 6560
                     $select = new single_select($this->repository_action_url($plugin, 'repos'), 'action', $actionchoicesfornew, 'delete', null, 'applyto' . basename($plugin));
  6561
+                    $select->set_label(get_accesshide(get_string('select') . ' '. get_string('action')));
6555 6562
                     $table->data[] = array(get_string('pluginname', 'repository_'.$plugin), $OUTPUT->render($select), '', '');
6556 6563
                 }
6557 6564
             }
@@ -7665,6 +7672,7 @@ public function output_html($data, $query = '') {
7665 7672
         $PAGE->requires->js_init_call('M.util.init_colour_picker', array($this->get_id(), $this->previewconfig));
7666 7673
         $content  = html_writer::start_tag('div', array('class'=>'form-colourpicker defaultsnext'));
7667 7674
         $content .= html_writer::tag('div', $OUTPUT->pix_icon('i/loading', get_string('loading', 'admin'), 'moodle', array('class'=>'loadingicon')), array('class'=>'admin_colourpicker clearfix'));
  7675
+        $content .= html_writer::label($this->get_full_name(), $this->get_id(), false, array('class' => 'accesshide'));
7668 7676
         $content .= html_writer::empty_tag('input', array('type'=>'text','id'=>$this->get_id(), 'name'=>$this->get_full_name(), 'value'=>$this->get_setting(), 'size'=>'12'));
7669 7677
         if (!empty($this->previewconfig)) {
7670 7678
             $content .= html_writer::empty_tag('input', array('type'=>'button','id'=>$this->get_id().'_preview', 'value'=>get_string('preview'), 'class'=>'admin_colourpicker_preview'));
@@ -7764,8 +7772,10 @@ public function output_html($data, $query='') {
7764 7772
             }
7765 7773
 
7766 7774
             $out .= html_writer::tag('td',
  7775
+                html_writer::label($this->get_full_name(), $this->get_full_name() . 'expression' . $i, false, array('class' => 'accesshide')) .
7767 7776
                 html_writer::empty_tag('input',
7768 7777
                     array(
  7778
+                        'id'    => $this->get_full_name() . 'expression' . $i,
7769 7779
                         'type'  => 'text',
7770 7780
                         'class' => 'form-text',
7771 7781
                         'name'  => $this->get_full_name().'[expression'.$i.']',
@@ -7783,8 +7793,10 @@ public function output_html($data, $query='') {
7783 7793
             }
7784 7794
 
7785 7795
             $out .= html_writer::tag('td',
  7796
+                    html_writer::label($this->get_full_name(), $this->get_full_name() . 'value' . $i, false, array('class' => 'accesshide')) .
7786 7797
                 html_writer::empty_tag('input',
7787 7798
                     array(
  7799
+                        'id'    => $this->get_full_name() . 'value' . $i,
7788 7800
                         'type'  => 'text',
7789 7801
                         'class' => 'form-text',
7790 7802
                         'name'  => $this->get_full_name().'[value'.$i.']',
6  lib/deprecatedlib.php
@@ -3626,12 +3626,12 @@ function print_textfield($name, $value, $alt = '', $size=50, $maxlength=0, $retu
3626 3626
     }
3627 3627
 
3628 3628
     $style = "width: {$size}px;";
3629  
-    $attributes = array('type'=>'text', 'name'=>$name, 'alt'=>$alt, 'style'=>$style, 'value'=>$value);
  3629
+    $attributes = array('type' => 'text', 'id' => $name, 'name' => $name, 'alt' => $alt, 'style' => $style, 'value' => $value);
3630 3630
     if ($maxlength) {
3631 3631
         $attributes['maxlength'] = $maxlength;
3632 3632
     }
3633  
-
3634  
-    $output = html_writer::empty_tag('input', $attributes);
  3633
+    $output =  html_writer::label($name, $name, false, array('class' => 'accesshide'));
  3634
+    $output .= html_writer::empty_tag('input', $attributes);
3635 3635
 
3636 3636
     if (empty($return)) {
3637 3637
         echo $output;
5  lib/form/editor.php
@@ -238,9 +238,10 @@ function toHtml() {
238 238
 
239 239
         $str .= '<div>';
240 240
         if (count($formats)>1) {
241  
-            $str.= html_writer::select($formats, $elname.'[format]', $format, false);
  241
+            $str .= html_writer::label(get_string('format'), 'menu'. $elname. '[format]', false, array('class' => 'accesshide'));
  242
+            $str .= html_writer::select($formats, $elname.'[format]', $format, false);
242 243
         } else {
243  
-            $str.= html_writer::empty_tag('input',
  244
+            $str .= html_writer::empty_tag('input',
244 245
                     array('name'=>$elname.'[format]', 'type'=> 'hidden', 'value' => array_pop(array_keys($formats))));
245 246
         }
246 247
         $str .= '</div>';
14  lib/outputrenderers.php
@@ -1198,6 +1198,12 @@ protected function render_single_select(single_select $select) {
1198 1198
 
1199 1199
         if ($select->label) {
1200 1200
             $output .= html_writer::label($select->label, $select->attributes['id']);
  1201
+        } else {
  1202
+            if (isset($select->nothing)) {
  1203
+                $label = $select->nothing;
  1204
+                $label = array_pop($label);
  1205
+                $output .= html_writer::label($label, $select->attributes['id'], false, array('class' => 'accesshide'));
  1206
+            }
1201 1207
         }
1202 1208
 
1203 1209
         if ($select->helpicon instanceof help_icon) {
@@ -1205,7 +1211,6 @@ protected function render_single_select(single_select $select) {
1205 1211
         } else if ($select->helpicon instanceof old_help_icon) {
1206 1212
             $output .= $this->render($select->helpicon);
1207 1213
         }
1208  
-
1209 1214
         $output .= html_writer::select($select->options, $select->name, $select->selected, $select->nothing, $select->attributes);
1210 1215
 
1211 1216
         $go = html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('go')));
@@ -1274,6 +1279,12 @@ protected function render_url_select(url_select $select) {
1274 1279
 
1275 1280
         if ($select->label) {
1276 1281
             $output .= html_writer::label($select->label, $select->attributes['id']);
  1282
+        } else {
  1283
+            if (isset($select->nothing)) {
  1284
+                $label = $select->nothing;
  1285
+                $label = array_pop($label);
  1286
+                $output .= html_writer::label($label, $select->attributes['id'], false, array('class' => 'accesshide'));
  1287
+            }
1277 1288
         }
1278 1289
 
1279 1290
         if ($select->helpicon instanceof help_icon) {
@@ -1484,6 +1495,7 @@ function render_rating(rating $rating) {
1484 1495
 
1485 1496
             $scalearray = array(RATING_UNSET_RATING => $strrate.'...') + $rating->settings->scale->scaleitems;
1486 1497
             $scaleattrs = array('class'=>'postratingmenu ratinginput','id'=>'menurating'.$rating->itemid);
  1498
+            $ratinghtml .= html_writer::label($rating->rating, 'menurating'.$rating->itemid, false, array('class' => 'accesshide'));
1487 1499
             $ratinghtml .= html_writer::select($scalearray, 'rating', $rating->rating, false, $scaleattrs);
1488 1500
 
1489 1501
             //output submit button
3  lib/portfoliolib.php
@@ -443,7 +443,8 @@ function portfolio_instance_select($instances, $callerformats, $callbackclass, $
443 443
     $pinsane = portfolio_plugin_sanity_check();
444 444
 
445 445
     $count = 0;
446  
-    $selectoutput = "\n" . '<select name="' . $selectname . '">' . "\n";
  446
+    $selectoutput = "\n" . '<label class="accesshide" for="' . $selectname . '">' . get_string('plugin', 'portfolio') . '</label>';
  447
+    $selectoutput .= "\n" . '<select id="' . $selectname . '" name="' . $selectname . '">' . "\n";
447 448
     $existingexports = portfolio_existing_exports_by_plugin($USER->id);
448 449
     foreach ($instances as $instance) {
449 450
         $formats = portfolio_supported_formats_intersect($callerformats, $instance->supported_formats());
2  lib/questionlib.php
@@ -1003,7 +1003,7 @@ function question_category_select_menu($contexts, $top = false, $currentcat = 0,
1003 1003
     foreach ($categoriesarray as $group => $opts) {
1004 1004
         $options[] = array($group => $opts);
1005 1005
     }
1006  
-
  1006
+    echo html_writer::label($selected, 'menucategory', false, array('class' => 'accesshide'));
1007 1007
     echo html_writer::select($options, 'category', $selected, $choose);
1008 1008
 }
1009 1009
 
1  lib/tablelib.php
@@ -929,6 +929,7 @@ function download_buttons() {
929 929
             $html = '<form action="'. $this->baseurl .'" method="post">';
930 930
             $html .= '<div class="mdl-align">';
931 931
             $html .= '<input type="submit" value="'.get_string('downloadas', 'table').'"/>';
  932
+            $html .= html_writer::labe