Permalink
Browse files

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

…orm input text and select tag
  • Loading branch information...
1 parent a81e8c4 commit f01c7ddc7ca8b09a9356f745bff1f86dd558f9d8 @rwijaya rwijaya committed Mar 30, 2012
Showing with 390 additions and 216 deletions.
  1. +2 −0 admin/filters.php
  2. +4 −3 admin/mnet/access_control.php
  3. +1 −0 admin/portfolio.php
  4. +2 −1 admin/repository.php
  5. +4 −1 admin/roles/lib.php
  6. +1 −1 admin/timezone.php
  7. +2 −2 admin/tool/langimport/index.php
  8. +1 −0 admin/tool/spamcleaner/index.php
  9. +1 −0 admin/tool/spamcleaner/lang/en/tool_spamcleaner.php
  10. +1 −1 admin/tool/xmldb/actions/new_table_from_mysql/new_table_from_mysql.class.php
  11. +1 −1 admin/tool/xmldb/actions/view_structure_php/view_structure_php.class.php
  12. +1 −1 admin/tool/xmldb/actions/view_table_php/view_table_php.class.php
  13. +14 −14 auth/cas/config.html
  14. +8 −8 auth/fc/config.html
  15. +7 −7 auth/imap/config.html
  16. +1 −1 auth/ldap/config.html
  17. +3 −3 auth/mnet/config.html
  18. +6 −6 auth/nntp/config.html
  19. +9 −9 auth/pop3/config.html
  20. +9 −9 auth/radius/config.html
  21. +11 −11 auth/shibboleth/config.html
  22. +2 −2 auth/shibboleth/index_form.html
  23. +10 −1 backup/util/ui/renderer.php
  24. +2 −2 blocks/section_links/config_instance.html
  25. +2 −2 blocks/tags/block_tags.php
  26. +1 −0 calendar/lib.php
  27. +3 −1 calendar/renderer.php
  28. +2 −1 course/category.php
  29. +1 −0 course/index.php
  30. +3 −0 course/scales.php
  31. +1 −0 course/search.php
  32. +5 −1 enrol/authorize/locallib.php
  33. +3 −3 enrol/manual/manage.php
  34. +3 −3 filter/algebra/algebradebug.php
  35. +4 −1 filter/manage.php
  36. +1 −0 grade/edit/tree/calculation.php
  37. +1 −1 grade/edit/tree/index.php
  38. +2 −1 grade/edit/tree/lib.php
  39. +4 −3 grade/grading/form/rubric/renderer.php
  40. +1 −1 grade/lib.php
  41. +2 −1 grade/report/grader/lib.php
  42. +2 −0 lang/en/moodle.php
  43. +18 −6 lib/adminlib.php
  44. +3 −3 lib/deprecatedlib.php
  45. +3 −2 lib/form/editor.php
  46. +13 −1 lib/outputrenderers.php
  47. +2 −1 lib/portfoliolib.php
  48. +1 −1 lib/questionlib.php
  49. +1 −0 lib/tablelib.php
  50. +1 −0 lib/weblib.php
  51. +4 −3 message/lib.php
  52. +6 −2 mod/assignment/lib.php
  53. +1 −1 mod/chat/gui_ajax/index.php
  54. +1 −0 mod/chat/gui_header_js/chatinput.php
  55. +1 −0 mod/chat/gui_sockets/chatinput.php
  56. +1 −0 mod/data/field.php
  57. +2 −1 mod/data/field/file/field.class.php
  58. +1 −0 mod/data/field/file/mod.html
  59. +6 −2 mod/data/field/latlong/field.class.php
  60. +4 −2 mod/data/field/menu/field.class.php
  61. +3 −1 mod/data/field/multimenu/field.class.php
  62. +2 −1 mod/data/field/number/field.class.php
  63. +2 −1 mod/data/field/picture/field.class.php
  64. +1 −0 mod/data/field/picture/mod.html
  65. +3 −1 mod/data/field/radiobutton/field.class.php
  66. +1 −1 mod/data/field/text/field.class.php
  67. +4 −2 mod/data/field/textarea/field.class.php
  68. +6 −2 mod/data/field/url/field.class.php
  69. +4 −5 mod/feedback/analysis_course.php
  70. +2 −1 mod/feedback/item/multichoice/lib.php
  71. +2 −1 mod/feedback/item/multichoicerated/lib.php
  72. +1 −1 mod/feedback/mapcourse.php
  73. +1 −0 mod/feedback/show_nonrespondents.php
  74. +2 −0 mod/forum/lib.php
  75. +12 −2 mod/forum/search.php
  76. +4 −4 mod/glossary/editcategories.html
  77. +11 −11 mod/glossary/formats.php
  78. +4 −2 mod/glossary/lib.php
  79. +6 −3 mod/lesson/pagetypes/matching.php
  80. +1 −0 mod/lesson/report.php
  81. +7 −2 mod/quiz/editlib.php
  82. +2 −1 mod/quiz/report/statistics/report.php
  83. +2 −1 mod/scorm/locallib.php
  84. +2 −1 mod/wiki/editors/wikieditor.php
  85. +6 −3 mod/wiki/renderer.php
  86. +1 −0 question/behaviour/rendererbase.php
  87. +2 −1 question/format/xhtml/format.php
  88. +8 −4 question/type/calculated/questiontype.php
  89. +1 −0 question/type/essay/renderer.php
  90. +1 −0 question/type/match/renderer.php
  91. +3 −3 question/type/multianswer/renderer.php
  92. +4 −2 question/type/numerical/renderer.php
  93. +2 −2 question/type/shortanswer/renderer.php
  94. +5 −2 report/courseoverview/index.php
  95. +18 −0 report/log/locallib.php
  96. +1 −1 report/participation/index.php
  97. +10 −9 report/stats/locallib.php
  98. +1 −1 repository/alfresco/lib.php
  99. +3 −1 repository/draftfiles_manager.php
  100. +2 −2 repository/filepicker.php
  101. +7 −4 tag/coursetags_edit.php
  102. +5 −2 tag/manage.php
  103. +1 −1 theme/mymobile/layout/general.php
  104. +2 −0 theme/mymobile/renderers.php
  105. +5 −4 user/addnote.php
  106. +1 −0 user/groupaddnote.php
  107. +2 −1 user/index.php
  108. +1 −1 user/message.html
View
2 admin/filters.php
@@ -242,6 +242,7 @@ function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings)
// Disable/off/on
$select = new single_select(filters_action_url($filter, 'setstate'), 'newstate', $activechoices, $filterinfo->active, null, 'active' . basename($filter));
+ $select->set_label(get_accesshide(get_string('isactive', 'filters')));
$row[] = $OUTPUT->render($select);
// Re-order
@@ -263,6 +264,7 @@ function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings)
// Apply to strings.
$select = new single_select(filters_action_url($filter, 'setapplyto'), 'stringstoo', $applytochoices, $applytostrings, null, 'applyto' . basename($filter));
+ $select->set_label(get_accesshide(get_string('applyto', 'filters')));
$select->disabled = $filterinfo->active == TEXTFILTER_DISABLED;
$row[] = $OUTPUT->render($select);
View
7 admin/mnet/access_control.php
@@ -203,17 +203,18 @@
if (!empty($formerror['username'])) {
echo '<span class="error"> * </span>';
}
-echo '<input type="text" name="username" size="20" maxlength="100" />';
+echo html_writer::label(get_string('username'), 'menuusername', false, array('class' =>'accesshide'));
+echo '<input id="menuusername" type="text" name="username" size="20" maxlength="100" />';
// choose a remote host
-echo " " . get_string('remotehost', 'mnet') . ":\n";
+echo html_writer::label(get_string('remotehost', 'mnet'), 'menumnet_host_id');
if (!empty($formerror['mnet_host_id'])) {
echo '<span class="error"> * </span>';
}
echo html_writer::select($mnethosts, 'mnet_host_id');
// choose an access level
-echo " " . get_string('accesslevel', 'mnet') . ":\n";
+echo html_writer::label(get_string('accesslevel', 'mnet'), 'menuaccessctrl');
if (!empty($formerror['accessctrl'])) {
echo '<span class="error"> * </span>';
}
View
1 admin/portfolio.php
@@ -197,6 +197,7 @@ function portfolio_action_url($portfolio) {
$currentaction = 'hide';
}
$select = new single_select(portfolio_action_url($pluginid, 'pf'), 'action', $actionchoicesforexisting, $currentaction, null, 'applyto' . $pluginid);
+ $select->set_label(get_accesshide(get_string('portfolio', 'portfolio')));
$table->data[] = array($pluginname, $OUTPUT->render($select), $settings);
}
if (!in_array($plugin, $usedplugins)) {
View
3 admin/repository.php
@@ -305,7 +305,7 @@ function repository_action_url($repository) {
}
$select = new single_select(repository_action_url($typename, 'repos'), 'action', $actionchoicesforexisting, $currentaction, null, 'applyto' . basename($typename));
-
+ $select->set_label(get_accesshide(get_string('action')));
// Display up/down link
$updown = '';
$spacer = $OUTPUT->spacer(array('height'=>15, 'width'=>15)); // should be done with CSS instead
@@ -342,6 +342,7 @@ function repository_action_url($repository) {
// Check that it has not already been listed
if (!in_array($plugin, $alreadyplugins)) {
$select = new single_select(repository_action_url($plugin, 'repos'), 'action', $actionchoicesfornew, 'delete', null, 'applyto' . basename($plugin));
+ $select->set_label(get_accesshide(get_string('action')));
$table->data[] = array(get_string('pluginname', 'repository_'.$plugin), $OUTPUT->render($select), '', '');
}
}
View
5 admin/roles/lib.php
@@ -721,7 +721,10 @@ protected function get_archetype_field($id) {
foreach(get_role_archetypes() as $type) {
$options[$type] = get_string('archetype'.$type, 'role');
}
- return html_writer::select($options, 'archetype', $this->role->archetype, false);
+
+ $return = html_writer::label(get_string('archetype'.$type, 'role'), 'menuarchetype', false, array('class' => 'accesshide'));
+ $return .= html_writer::select($options, 'archetype', $this->role->archetype, false);
+ return $return;
}
protected function get_assignable_levels_control() {
View
2 admin/timezone.php
@@ -42,7 +42,7 @@
$timezones = get_list_of_timezones();
echo '<center><form action="timezone.php" method="post">';
- echo "$strusers ($strall): ";
+ echo html_writer::label($strusers . ' (' . $strall . '): ', 'menuzone');
echo html_writer::select($timezones, "zone", $current, array('99'=>get_string("serverlocaltime")));
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />";
echo '<input type="submit" value="'.s($strsavechanges).'" />';
View
4 admin/tool/langimport/index.php
@@ -287,7 +287,7 @@
echo html_writer::start_tag('td', array('valign' => 'top'));
echo html_writer::start_tag('form', array('id' => 'uninstallform', 'action' => $url->out(), 'method' => 'post'));
echo html_writer::start_tag('fieldset');
-echo html_writer::label(get_string('installedlangs', 'tool_langimport'), 'uninstalllang');
+echo html_writer::label(get_string('installedlangs', 'tool_langimport'), 'menuuninstalllang');
echo html_writer::empty_tag('br');
echo html_writer::select($installedlangs, 'uninstalllang', '', false, array('size' => 15));
echo html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'sesskey', 'value' => sesskey()));
@@ -315,7 +315,7 @@
$url = new moodle_url('/admin/tool/langimport/index.php', array('mode' => INSTALLATION_OF_SELECTED_LANG));
echo html_writer::start_tag('form', array('id' => 'installform', 'action' => $url->out(), 'method' => 'post'));
echo html_writer::start_tag('fieldset');
- echo html_writer::label(get_string('availablelangs','install'), 'pack');
+ echo html_writer::label(get_string('availablelangs','install'), 'menupack');
echo html_writer::empty_tag('br');
echo html_writer::select($options, 'pack[]', '', false, array('size' => 15, 'multiple' => 'multiple'));
echo html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'sesskey', 'value' => sesskey()));
View
1 admin/tool/spamcleaner/index.php
@@ -96,6 +96,7 @@
<form method="post" action="index.php">
<div>
+ <label class="accesshide" for="keyword_el"><?php get_string('keyword', 'tool_spamcleaner') ?></label>
<input type="text" name="keyword" id="keyword_el" value="<?php p($keyword) ?>" />
<input type="hidden" name="sesskey" value="<?php echo sesskey();?>" />
<input type="submit" value="<?php echo get_string('spamsearch', 'tool_spamcleaner')?>" />
View
1 admin/tool/spamcleaner/lang/en/tool_spamcleaner.php
@@ -38,6 +38,7 @@
$string['spamfrommessages'] = 'From messages:';
$string['spamfromforumpost'] = 'From forum post:';
$string['spaminvalidresult'] = 'Unknown but invalid result';
+$string['spamkeyword'] = 'Keyword';
$string['spamoperation'] = 'Operation';
$string['spamresult'] = 'Results of searching user profiles containing:';
$string['spamsearch'] = 'Search for these keywords';
View
2 admin/tool/xmldb/actions/new_table_from_mysql/new_table_from_mysql.class.php
@@ -115,7 +115,7 @@ function invoke() {
$o.= ' <input type="hidden" name ="postaction" value="edit_table" />';
$o.= ' <input type="hidden" name ="sesskey" value="' . sesskey() . '" />';
$o.= ' <table id="formelements" class="boxaligncenter" cellpadding="5">';
- $o.= ' <tr><td><label for="table" accesskey="t">' . $this->str['createtable'] .' </label>' . html_writer::select($selecttables, 'table') . '<label for="after" accesskey="a">' . $this->str['aftertable'] . ' </label>' .html_writer::select($aftertables, 'after') . '</td></tr>';
+ $o.= ' <tr><td><label for="menutable" accesskey="t">' . $this->str['createtable'] .' </label>' . html_writer::select($selecttables, 'table') . '<label for="after" accesskey="a">' . $this->str['aftertable'] . ' </label>' .html_writer::select($aftertables, 'after') . '</td></tr>';
$o.= ' <tr><td colspan="2" align="center"><input type="submit" value="' .$this->str['create'] . '" /></td></tr>';
$o.= ' <tr><td colspan="2" align="center"><a href="index.php?action=edit_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' . $this->str['back'] . ']</a></td></tr>';
$o.= ' </table>';
View
2 admin/tool/xmldb/actions/view_structure_php/view_structure_php.class.php
@@ -116,7 +116,7 @@ function invoke() {
$o.= ' <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />';
$o.= ' <input type="hidden" name ="action" value="view_structure_php" />';
$o.= ' <table id="formelements" class="boxaligncenter" cellpadding="5">';
- $o.= ' <tr><td><label for="action" accesskey="c">' . $this->str['selectaction'] .' </label>' . html_writer::select($popcommands, 'command', $commandparam, false) . '&nbsp;<label for="table" accesskey="t">' . $this->str['selecttable'] . ' </label>' .html_writer::select($poptables, 'table', $tableparam, false) . '</td></tr>';
+ $o.= ' <tr><td><label for="menucommand" accesskey="c">' . $this->str['selectaction'] .' </label>' . html_writer::select($popcommands, 'command', $commandparam, false) . '&nbsp;<label for="menutable" accesskey="t">' . $this->str['selecttable'] . ' </label>' .html_writer::select($poptables, 'table', $tableparam, false) . '</td></tr>';
$o.= ' <tr><td colspan="2" align="center"><input type="submit" value="' .$this->str['view'] . '" /></td></tr>';
$o.= ' </table>';
$o.= '</div></form>';
View
2 admin/tool/xmldb/actions/view_table_php/view_table_php.class.php
@@ -167,7 +167,7 @@ function invoke() {
$o.= ' <input type="hidden" name ="table" value="' . s($tableparam) . '" />';
$o.= ' <input type="hidden" name ="action" value="view_table_php" />';
$o.= ' <table id="formelements" class="boxaligncenter" cellpadding="5">';
- $o.= ' <tr><td><label for="action" accesskey="c">' . $this->str['selectaction'] .' </label>' . html_writer::select($popcommands, 'command', $commandparam, false) . '&nbsp;<label for="fieldkeyindex" accesskey="f">' . $this->str['selectfieldkeyindex'] . ' </label>' .html_writer::select($popfields, 'fieldkeyindex', $origfieldkeyindexparam, false) . '</td></tr>';
+ $o.= ' <tr><td><label for="menucommand" accesskey="c">' . $this->str['selectaction'] .' </label>' . html_writer::select($popcommands, 'command', $commandparam, false) . '&nbsp;<label for="menufieldkeyindex" accesskey="f">' . $this->str['selectfieldkeyindex'] . ' </label>' .html_writer::select($popfields, 'fieldkeyindex', $origfieldkeyindexparam, false) . '</td></tr>';
$o.= ' <tr><td colspan="2" align="center"><input type="submit" value="' .$this->str['view'] . '" /></td></tr>';
$o.= ' </table>';
$o.= '</div></form>';
View
28 auth/cas/config.html
@@ -94,9 +94,9 @@
</td>
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_cas_hostname_key', 'auth_cas') ?>:</td>
+ <td align="right"><label for="hostname"><?php print_string('auth_cas_hostname_key', 'auth_cas') ?>: </label></td>
<td>
- <input name="hostname" type="text" size="30" value="<?php echo $config->hostname ?>" />
+ <input name="hostname" id="hostname" type="text" size="30" value="<?php echo $config->hostname ?>" />
<?php if (isset($err['hostname'])) { echo $OUTPUT->error_text($err['hostname']); } ?>
</td>
<td>
@@ -105,10 +105,10 @@
</tr>
<tr valign="top" class="required">
<td align="right">
- <?php print_string('auth_cas_baseuri_key', 'auth_cas') ?>:
+ <label for="baseuri"><?php print_string('auth_cas_baseuri_key', 'auth_cas') ?>: </label>
</td>
<td>
- <input name="baseuri" type="text" size="30" value="<?php echo $config->baseuri ?>" />
+ <input name="baseuri" id="baseuri" type="text" size="30" value="<?php echo $config->baseuri ?>" />
<?php if (isset($err['baseuri'])) { echo $OUTPUT->error_text($err['baseuri']); } ?>
</td>
<td>
@@ -117,10 +117,10 @@
</tr>
<tr valign="top" class="required">
<td align="right">
- <?php print_string('auth_cas_port_key', 'auth_cas') ?>:
+ <label for="port"><?php print_string('auth_cas_port_key', 'auth_cas') ?>: </label>
</td>
<td>
- <input name="port" type="text" size="30" value="<?php echo $config->port ?>" />
+ <input name="port" id="port" type="text" size="30" value="<?php echo $config->port ?>" />
<?php if (isset($err['port'])) { echo $OUTPUT->error_text($err['port']); } ?>
</td>
<td>
@@ -129,7 +129,7 @@
</tr>
<tr valign="top" class="required">
<td align="right">
- <?php print_string('auth_cas_casversion', 'auth_cas') ?>:
+ <?php echo html_writer::label(get_string('auth_cas_casversion', 'auth_cas'), 'menucasversion'); ?>:
</td>
<td>
<?php
@@ -145,7 +145,7 @@
</td>
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_cas_language_key', 'auth_cas') ?>:</td>
+ <td align="right"><?php echo html_writer::label(get_string('auth_cas_language_key', 'auth_cas'), 'menulanguage'); ?>:</td>
<td>
<?php echo html_writer::select($CASLANGUAGES, 'language', $config->language, false); ?>
</td>
@@ -155,7 +155,7 @@
</tr>
<tr valign="top" class="required">
<td align="right">
- <?php print_string('auth_cas_proxycas_key', 'auth_cas') ?>:
+ <?php echo html_writer::label(get_string('auth_cas_proxycas_key', 'auth_cas'), 'menuproxycas'); ?>:
</td>
<td>
<?php echo html_writer::select($yesno, 'proxycas', $config->proxycas, false); ?>
@@ -165,7 +165,7 @@
</td>
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_cas_logoutcas_key', 'auth_cas') ?>:</td>
+ <td align="right"><?php echo html_writer::label(get_string('auth_cas_logoutcas_key', 'auth_cas'), 'menulogoutcas'); ?>:</td>
<td>
<?php echo html_writer::select($yesno, 'logoutcas', $config->logoutcas, false); ?>
</td>
@@ -174,7 +174,7 @@
</td>
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_cas_multiauth_key', 'auth_cas') ?>:</td>
+ <td align="right"><?php echo html_writer::label(get_string('auth_cas_multiauth_key', 'auth_cas'), 'menumultiauth'); ?>:</td>
<td>
<?php echo html_writer::select($yesno, 'multiauth', $config->multiauth, false); ?>
</td>
@@ -183,7 +183,7 @@
</td>
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_cas_certificate_check_key', 'auth_cas') ?>:</td>
+ <td align="right"><?php echo html_writer::label(get_string('auth_cas_certificate_check_key', 'auth_cas'), 'menucertificate_check'); ?>:</td>
<td>
<?php echo html_writer::select($yesno, 'certificate_check', $config->certificate_check, false); ?>
</td>
@@ -192,7 +192,7 @@
</td>
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_cas_certificate_path_key', 'auth_cas') ?>:</td>
+ <td align="right"><label for="certificate_path"><?php print_string('auth_cas_certificate_path_key', 'auth_cas') ?>: </label></td>
<td>
<input name="certificate_path" id="certificate_path" type="text" size="30" value="<?php echo $config->certificate_path ?>" />
<?php if (isset($err['certificate_path'])) echo $OUTPUT->error_text($err['certificate_path']); ?>
@@ -219,7 +219,7 @@
</td>
</tr>
<tr valign="top" class="required">
- <td align="right"><label for="menuversion"><?php print_string('auth_ldap_version_key', 'auth_ldap') ?></label></td>
+ <td align="right"><label for="menuldap_version"><?php print_string('auth_ldap_version_key', 'auth_ldap') ?></label></td>
<td>
<?php
$versions = array();
View
16 auth/fc/config.html
@@ -27,9 +27,9 @@
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
- <td align="right"><?php print_string("auth_fchost_key", "auth_fc") ?>:</td>
+ <td align="right"><label for="host"><?php print_string("auth_fchost_key", "auth_fc") ?>:</label></td>
<td>
- <input name="host" type="text" size="30" value="<?php echo $config->host?>" />
+ <input name="host" id="host" type="text" size="30" value="<?php echo $config->host?>" />
<?php if (isset($err["host"])) echo $OUTPUT->error_text($err["host"]); ?>
</td>
<td>
@@ -38,9 +38,9 @@
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string("auth_fcfppport_key", "auth_fc") ?>:</td>
+ <td align="right"><label for="fppport"><?php print_string("auth_fcfppport_key", "auth_fc") ?>: </label></td>
<td>
- <input name="fppport" type="text" size="30" value="<?php echo $config->fppport?>" />
+ <input name="fppport" id="fppport" type="text" size="30" value="<?php echo $config->fppport?>" />
<?php if (isset($err["fppport"])) echo $OUTPUT->error_text($err["host"]); ?>
</td>
<td>
@@ -70,9 +70,9 @@
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string("auth_fccreators_key", "auth_fc") ?>:</td>
+ <td align="right"><label for="creators"><?php print_string("auth_fccreators_key", "auth_fc") ?>: </label></td>
<td>
- <input name="creators" type="text" size="30" value="<?php echo $config->creators?>" />
+ <input name="creators" id="creators" type="text" size="30" value="<?php echo $config->creators?>" />
<?php if (isset($err["creators"])) echo $OUTPUT->error_text($err["creators"]); ?>
</td>
<td>
@@ -81,9 +81,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string('auth_fcchangepasswordurl', 'auth_fc') ?>: </td>
+ <td align="right"><label for="changepasswordurl"><?php print_string('auth_fcchangepasswordurl', 'auth_fc') ?>: </label></td>
<td>
- <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
+ <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
View
14 auth/imap/config.html
@@ -18,9 +18,9 @@
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_imaphost_key', 'auth_imap') ?>: </td>
+ <td align="right"><label for="host"><?php print_string('auth_imaphost_key', 'auth_imap') ?>: </label></td>
<td>
- <input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
+ <input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
<?php
if (isset($err['host'])) {
@@ -40,7 +40,7 @@
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_imaptype_key', 'auth_imap') ?>: </td>
+ <td align="right"><?php echo html_writer::label(get_string('auth_imaptype_key', 'auth_imap'), 'menutype'); ?>: </td>
<td>
<?php
@@ -56,9 +56,9 @@
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_imapport_key', 'auth_imap') ?>: </td>
+ <td align="right"><label for="port"><?php print_string('auth_imapport_key', 'auth_imap') ?>: </label></td>
<td>
- <input name="port" type="text" size="6" value="<?php echo $config->port ?>" />
+ <input name="port" id="port" type="text" size="6" value="<?php echo $config->port ?>" />
<?php
if (isset($err['port'])) {
@@ -71,9 +71,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string('auth_imapchangepasswordurl_key', 'auth_imap') ?>: </td>
+ <td align="right"><label for="changepasswordurl"><?php print_string('auth_imapchangepasswordurl_key', 'auth_imap') ?>: </label></td>
<td>
- <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
+ <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
View
2 auth/ldap/config.html
@@ -118,7 +118,7 @@
</tr>
<tr valign="top" class="required">
<td align="right">
- <label for="menuversion"><?php print_string('auth_ldap_version_key', 'auth_ldap') ?></label>
+ <label for="menuldap_version"><?php print_string('auth_ldap_version_key', 'auth_ldap') ?></label>
</td>
<td>
<?php
View
6 auth/mnet/config.html
@@ -22,9 +22,9 @@
<table cellspacing="0" cellpadding="5">
<tr valign="top" class="required">
- <td align="right"><?php print_string('rpc_negotiation_timeout', 'auth_mnet'); ?>: </td>
+ <td align="right"><label for="rpc_negotiation_timeout"><?php print_string('rpc_negotiation_timeout', 'auth_mnet'); ?>: </label></td>
<td>
- <input name="rpc_negotiation_timeout" type="text" size="5" value="<?php echo $config->rpc_negotiation_timeout ?>" />
+ <input name="rpc_negotiation_timeout" id="rpc_negotiation_timeout" type="text" size="5" value="<?php echo $config->rpc_negotiation_timeout ?>" />
<?php
if (isset($err['rpc_negotiation_timeout'])) {
@@ -45,7 +45,7 @@
<?php /*
See MDL-21327 for why this is commented out
<tr valign="top" class="required">
- <td align="right"><?php print_string('auto_add_remote_users', 'auth_mnet'); ?>: </td>
+ <td align="right"><?php echo html_writer::label(get_string('auto_add_remote_users', 'auth_mnet'), 'menuauto_add_remote_users'); ?>: </td>
<td>
<?php
View
12 auth/nntp/config.html
@@ -15,9 +15,9 @@
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_nntphost_key', 'auth_nntp') ?>: </td>
+ <td align="right"><label for="host"><?php print_string('auth_nntphost_key', 'auth_nntp') ?>: </label></td>
<td>
- <input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
+ <input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
<?php
if (isset($err["host"])) {
@@ -37,9 +37,9 @@
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_nntpport_key', 'auth_nntp') ?>: </td>
+ <td align="right"><label for="port"><?php print_string('auth_nntpport_key', 'auth_nntp') ?>: </label></td>
<td>
- <input name="port" type="text" size="6" value="<?php echo $config->port ?>" />
+ <input name="port" id="port" type="text" size="6" value="<?php echo $config->port ?>" />
<?php
if (isset($err["port"])) {
@@ -52,9 +52,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string('auth_nntpchangepasswordurl_key', 'auth_nntp') ?>: </td>
+ <td align="right"><label for="changepasswordurl"><?php print_string('auth_nntpchangepasswordurl_key', 'auth_nntp') ?>: </label></td>
<td>
- <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
+ <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
View
18 auth/pop3/config.html
@@ -21,9 +21,9 @@
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_pop3host_key', 'auth_pop3') ?>: </td>
+ <td align="right"><label for="host"><?php print_string('auth_pop3host_key', 'auth_pop3') ?>: </label></td>
<td>
- <input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
+ <input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
<?php
if (isset($err['host'])) {
@@ -43,7 +43,7 @@
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_pop3type_key', 'auth_pop3') ?>: </td>
+ <td align="right"><?php echo html_writer::label(get_string('auth_pop3type_key', 'auth_pop3'), 'menutype'); ?>: </td>
<td>
<?php
@@ -59,9 +59,9 @@
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_pop3port_key', 'auth_pop3') ?>: </td>
+ <td align="right"><label for="port"><?php print_string('auth_pop3port_key', 'auth_pop3') ?>: </label></td>
<td>
- <input name="port" type="text" size="6" value="<?php echo $config->port ?>" />
+ <input name="port" id="port" type="text" size="6" value="<?php echo $config->port ?>" />
<?php
if (isset($err['port'])) {
@@ -74,9 +74,9 @@
</tr>
<tr valign="top" class="required">
- <td align="right"><?php print_string('auth_pop3mailbox_key', 'auth_pop3') ?>: </td>
+ <td align="right"><label for="mailbox"><?php print_string('auth_pop3mailbox_key', 'auth_pop3') ?>: </label></td>
<td>
- <input name="mailbox" type="text" size="6" value="<?php echo $config->mailbox ?>" />
+ <input name="mailbox" id="mailbox" type="text" size="6" value="<?php echo $config->mailbox ?>" />
<?php
if (isset($err['mailbox'])) {
@@ -89,9 +89,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string('auth_pop3changepasswordurl_key', 'auth_pop3') ?>: </td>
+ <td align="right"><label for="changepasswordurl"><?php print_string('auth_pop3changepasswordurl_key', 'auth_pop3') ?>: </label></td>
<td>
- <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
+ <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
View
18 auth/radius/config.html
@@ -30,9 +30,9 @@
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top">
- <td align="right"><?php print_string('auth_radiushost_key', 'auth_radius') ?>: </td>
+ <td align="right"><label for="host"><?php print_string('auth_radiushost_key', 'auth_radius') ?>: </label></td>
<td>
- <input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
+ <input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
<?php
if (isset($err['host'])) {
@@ -45,9 +45,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string('auth_radiusnasport_key', 'auth_radius') ?>: </td>
+ <td align="right"><label for="nasport"><?php print_string('auth_radiusnasport_key', 'auth_radius') ?>: </label></td>
<td>
- <input name="nasport" type="text" size="6" value="<?php echo $config->nasport ?>" />
+ <input name="nasport" id="nasport" type="text" size="6" value="<?php echo $config->nasport ?>" />
<?php
if (isset($err['nasport'])) {
@@ -60,7 +60,7 @@
</tr>
<tr valign="top" >
- <td align="right"><?php print_string('auth_radiustype_key', 'auth_radius') ?>: </td>
+ <td align="right"><?php echo html_writer::label(get_string('auth_radiustype_key', 'auth_radius'), 'menuradiustype'); ?>: </td>
<td>
<?php
@@ -82,9 +82,9 @@
<tr valign="top" >
- <td align="right"><?php print_string('auth_radiussecret_key', 'auth_radius') ?>: </td>
+ <td align="right"><label for="secret"><?php print_string('auth_radiussecret_key', 'auth_radius') ?>: </label></td>
<td>
- <input name="secret" type="text" size="6" value="<?php echo $config->secret ?>" />
+ <input name="secret" id="secret" type="text" size="6" value="<?php echo $config->secret ?>" />
<?php
if (isset($err['secret'])) {
@@ -97,9 +97,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string('auth_radiuschangepasswordurl_key', 'auth_radius') ?>: </td>
+ <td align="right"><label for="changepasswordurl"><?php print_string('auth_radiuschangepasswordurl_key', 'auth_radius') ?>: </label></td>
<td>
- <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
+ <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
View
22 auth/shibboleth/config.html
@@ -20,17 +20,17 @@
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
- <td align="right"><?php print_string("username") ?>:</td>
+ <td align="right"><label for="user_attribute"><?php print_string("username") ?>: </label></td>
<td>
<input name="user_attribute" type="text" size="30" value="<?php echo $config->user_attribute ?>" />
</td>
<td><?php print_string("auth_shib_username_description", "auth_shibboleth") ?></td>
</tr>
<tr valign="top">
- <td align="right"><?php print_string("auth_shib_convert_data", "auth_shibboleth") ?>:</td>
+ <td align="right"><label for="convert_data"><?php print_string("auth_shib_convert_data", "auth_shibboleth") ?>: </label></td>
<td>
- <input name="convert_data" type="text" size="30" value="<?php echo $config->convert_data?>" />
+ <input name="convert_data" id="convert_data" type="text" size="30" value="<?php echo $config->convert_data?>" />
<?php
if ($config->convert_data and $config->convert_data != '' and !is_readable($config->convert_data)) {
@@ -82,9 +82,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string("auth_shib_logout_url", "auth_shibboleth") ?>:</td>
+ <td align="right"><label for="logout_handler"><?php print_string("auth_shib_logout_url", "auth_shibboleth") ?>: </label></td>
<td>
- <input name="logout_handler" type="text" size="30" value="<?php
+ <input name="logout_handler" id="logout_handler" type="text" size="30" value="<?php
if ( isset($config->logout_handler) and !empty($config->logout_handler)){
echo $config->logout_handler;
}
@@ -94,9 +94,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string("auth_shib_logout_return_url", "auth_shibboleth") ?>:</td>
+ <td align="right"><label for="logout_return_url"><?php print_string("auth_shib_logout_return_url", "auth_shibboleth") ?>: </label></td>
<td>
- <input name="logout_return_url" type="text" size="30" value="<?php
+ <input name="logout_return_url" id="logout_return_url" type="text" size="30" value="<?php
if ( isset($config->logout_return_url) and !empty($config->logout_return_url)){
echo $config->logout_return_url;
}
@@ -106,9 +106,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string("auth_shib_auth_method", "auth_shibboleth") ?>:</td>
+ <td align="right"><label for="login_name"><?php print_string("auth_shib_auth_method", "auth_shibboleth") ?>: </label></td>
<td>
- <input name="login_name" type="text" size="30" value="<?php
+ <input name="login_name" id="login_name" type="text" size="30" value="<?php
if ( isset($config->login_name) and !empty($config->login_name)){
echo htmlentities($config->login_name);
} else {
@@ -120,9 +120,9 @@
</tr>
<tr valign="top">
- <td align="right"><?php print_string('auth_shib_changepasswordurl', 'auth_shibboleth') ?>: </td>
+ <td align="right"><label for="changepasswordurl"><?php print_string('auth_shib_changepasswordurl', 'auth_shibboleth') ?>: </label></td>
<td>
- <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
+ <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
<?php
if (isset($err['changepasswordurl'])) {
View
4 auth/shibboleth/index_form.html
@@ -29,9 +29,9 @@
?>
<div class="guestsub">
- <p><?php print_string("auth_shibboleth_select_organization", "auth_shibboleth"); ?></p>
+ <p><label for="idp"><?php print_string("auth_shibboleth_select_organization", "auth_shibboleth"); ?></label></p>
<form action="login.php" method="post" id="guestlogin">
- <select name="idp">
+ <select id="idp" name="idp">
<option value="-" ><?php print_string("auth_shibboleth_select_member", "auth_shibboleth"); ?></option>
<?php
print_idp_list();
View
11 backup/util/ui/renderer.php
@@ -343,7 +343,16 @@ protected function backup_detail_input($label, $type, $name, $value, array $attr
} else {
$description = '';
}
- return $this->backup_detail_pair($label, html_writer::empty_tag('input', $attributes+array('name'=>$name, 'type'=>$type, 'value'=>$value)).$description);
+
+ if ($type == 'text') {
+ if (empty($attributes['id'])) {
+ $attributes['id'] = $name;
+ }
+ $label = html_writer::label($name, $attibutes['id'], false, array('class' => 'accesshide'));
+ } else {
+ $label = '';
+ }
+ return $this->backup_detail_pair($label, $label . html_writer::empty_tag('input', $attributes+array('name'=>$name, 'type'=>$type, 'value'=>$value)).$description);
}
/**
View
4 blocks/section_links/config_instance.html
@@ -66,7 +66,7 @@
?>
<tr valign="top">
<td align="right">
- <?php print_string('numsections'.$i, 'block_section_links'); ?>:
+ <label for="menunumsections<?php echo $i; ?>"><?php print_string('numsections'.$i, 'block_section_links'); ?>:</label>
</td>
<td>
<?php choose_from_menu($numberofsections, 'numsections'.$i, $selected[$i][0]); ?>
@@ -77,7 +77,7 @@
</tr>
<tr valign="top">
<td align="right">
- <?php print_string('incby'.$i, 'block_section_links'); ?>:
+ <label for="menuincby<?php echo $i;?>"><?php print_string('incby'.$i, 'block_section_links'); ?>:</label>
</td>
<td>
<?php choose_from_menu($increments, 'incby'.$i, $selected[$i][1]); ?>
View
4 blocks/tags/block_tags.php
@@ -225,7 +225,6 @@ function get_content() {
if ($officialtags) { $this->content->text .= $officialtagscontent; }
if ($coursetags) { $this->content->text .= $coursetagscontent; }
if ($commtags) { $this->content->text .= $commtagscontent; }
-
// add the input form section (allowing a user to tag the current course) and navigation, or loggin message
if ($loggedin) {
// only show the input form on course pages for those allowed (or not barred)
@@ -250,7 +249,8 @@ function get_content() {
<div class="coursetag_form_wrapper">
<div class="coursetag_form_positioner">
<div class="coursetag_form_input1">
- <input type="text" name="coursetag_sug_keyword" class="coursetag_form_input1a" disabled="disabled" />
+ <label class="accesshide" for="coursetag_sug_keyword">$tagthisunit</label>
+ <input type="text" name="coursetag_sug_keyword" id="coursetag_sug_keyword" class="coursetag_form_input1a" disabled="disabled" />
</div>
<div class="coursetag_form_input2">
<input type="text" name="coursetag_new_tag" id="coursetag_new_tag" class="coursetag_form_input2a"
View
1 calendar/lib.php
@@ -1472,6 +1472,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
4 calendar/renderer.php
@@ -704,7 +704,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_accesshide(get_string('course')));
}
return $this->output->render($select);
}
View
3 course/category.php
@@ -399,7 +399,7 @@
echo '<input type="checkbox" name="c'.$acourse->id.'" />';
echo '</td>';
} else {
- echo '<td align="right">';
+ echo '<td align="right">';$movetocategories[$category->id] = get_string('moveselectedcoursesto');
// print enrol info
if ($icons = enrol_get_course_info_icons($acourse)) {
foreach ($icons as $pix_icon) {
@@ -422,6 +422,7 @@
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.'" />';
View
1 course/index.php
@@ -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_accesshide(get_string('frontpagecategorynames')));
echo $OUTPUT->render($select);
}
echo '</td>';
View
3 course/scales.php
@@ -70,6 +70,7 @@
echo $OUTPUT->box_start();
echo $OUTPUT->heading($scale->name);
echo "<center>";
+ echo html_writer::label(get_string('scales'), 'menuunused', false, array('class' => 'accesshide'));
echo html_writer::select($scalemenu, 'unused');
echo "</center>";
echo text_to_html($scale->description);
@@ -101,6 +102,7 @@
echo $OUTPUT->box_start();
echo $OUTPUT->heading($scale->name);
echo "<center>";
+ echo html_writer::label(get_string('scales'), 'menuunused', false, array('class' => 'accesshide'));
echo html_writer::select($scalemenu, 'unused');
echo "</center>";
echo text_to_html($scale->description);
@@ -127,6 +129,7 @@
echo $OUTPUT->box_start();
echo $OUTPUT->heading($scale->name);
echo "<center>";
+ echo html_writer::label(get_string('scales'), 'menuunused', false, array('class' => 'accesshide'));
echo html_writer::select($scalemenu, 'unused');
echo "</center>";
echo text_to_html($scale->description);
View
1 course/search.php
@@ -353,6 +353,7 @@
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";
View
6 enrol/authorize/locallib.php
@@ -58,7 +58,9 @@ function authorize_print_orders($courseid, $userid) {
$searchmenu = array('orderid' => $authstrs->orderid, 'transid' => $authstrs->transid, 'cclastfour' => $authstrs->cclastfour);
$buttons = "<form method='post' action='index.php' autocomplete='off'><div>";
+ $buttons .= html_writer::label(get_string('orderdetails', 'enrol_authorize'), 'menusearchtype', false, array('class' => 'accesshide'));
$buttons .= html_writer::select($searchmenu, 'searchtype', $searchtype, false);
+ $buttons .= html_writer::label(get_string('search'), 'menusearchtype', false, array('class' => 'accesshide'));
$buttons .= "<input type='text' size='16' name='searchquery' value='' />";
$buttons .= "<input type='submit' value='$strs->search' />";
$buttons .= "</div></form>";
@@ -81,7 +83,8 @@ function authorize_print_orders($courseid, $userid) {
if (($popupcrs = $DB->get_records_sql_menu($sql, $params))) {
$popupcrs = array($SITE->id => $SITE->fullname) + $popupcrs;
}
- $popupmenu = empty($popupcrs) ? '' : $OUTPUT->single_select(new moodle_url($baseurl.'&status='.$status), 'course', $popupcrs, $courseid, null, 'coursesmenu');
+ $popmenulabel = array('' => get_accesshide(get_string('course')));
+ $popupmenu = empty($popupcrs) ? '' : $OUTPUT->single_select(new moodle_url($baseurl.'&status='.$status), 'course', $popupcrs, $courseid, $popmenulabel, 'coursesmenu');
$popupmenu .= '<br />';
$statusmenu = array(
AN_STATUS_NONE => $strs->all,
@@ -97,6 +100,7 @@ function authorize_print_orders($courseid, $userid) {
AN_STATUS_TEST => $authstrs->tested
);
+ $popmenulabel = array('' => get_accesshide(get_string('status')));
$popupmenu .= $OUTPUT->single_select(new moodle_url($baseurl.'&course='.$courseid), 'status', $statusmenu, $status, null, 'statusmenu');
if ($canmanagepayments) {
$popupmenu .= '<br />';
View
6 enrol/manual/manage.php
@@ -162,13 +162,13 @@
<div class="enroloptions">
- <p><label for="roleid"><?php print_string('assignrole', 'enrol_manual') ?></label><br />
+ <p><label for="menuroleid"><?php print_string('assignrole', 'enrol_manual') ?></label><br />
<?php echo html_writer::select($roles, 'roleid', $roleid, false); ?></p>
- <p><label for="extendperiod"><?php print_string('enrolperiod', 'enrol') ?></label><br />
+ <p><label for="menuextendperiod"><?php print_string('enrolperiod', 'enrol') ?></label><br />
<?php echo html_writer::select($periodmenu, 'extendperiod', $defaultperiod, $unlimitedperiod); ?></p>
- <p><label for="extendbase"><?php print_string('startingfrom') ?></label><br />
+ <p><label for="menuextendbase"><?php print_string('startingfrom') ?></label><br />
<?php echo html_writer::select($basemenu, 'extendbase', $extendbase, false); ?></p>
</div>
View
6 filter/algebra/algebradebug.php
@@ -275,12 +275,12 @@ function slasharguments($texexp, $md5) {
<html>
<head><title>Algebra Filter Debugger</title></head>
<body>
- <p>Please enter an algebraic expression <b>without</b> any surrounding @@ into
- the text box below. (Click <a href="#help">here for help.</a>)
+ <p><label for="algebra">Please enter an algebraic expression <b>without</b> any surrounding @@ into
+ the text box below. (Click <a href="#help">here for help.</a>)</label>
<form action="algebradebug.php" method="get"
target="inlineframe">
<center>
- <input type="text" name="algebra" size="50"
+ <input type="text" id="algebra" name="algebra" size="50"
value="sin(z)/(x^2+y^2)" />
</center>
<ol>
View
5 filter/manage.php
@@ -181,7 +181,10 @@
} else {
$activechoices[TEXTFILTER_INHERIT] = $strdefaultoff;
}
- $row[] = html_writer::select($activechoices, str_replace('/', '_', $filter), $filterinfo->localstate, false);
+ $filtername = str_replace('/', '_', $filter);
+ $select = html_writer::label($filterinfo->localstate, 'menu'. $filtername, false, array('class' => 'accesshide'));
+ $select .= html_writer::select($activechoices, $filtername, $filterinfo->localstate, false);
+ $row[] = $select;
// Settings link, if required
if ($settingscol) {
View
1 grade/edit/tree/calculation.php
@@ -177,6 +177,7 @@ function get_grade_tree(&$gtree, $element, $current_itemid=null, $errors=null) {
$name .= '<div class="error"><span class="error">' . $errors[$grade_item->id].'</span><br />'."\n";
$closingdiv = "</div>\n";
}
+ $name .= '<label class="accesshide" for="id_idnumber_' . $grade_item->id . '">' . get_string('gradeitems', 'grades') .'</label>';
$name .= '<input class="idnumber" id="id_idnumber_'.$grade_item->id.'" type="text" name="idnumbers['.$grade_item->id.']" />' . "\n";
$name .= $closingdiv;
}
View
2 grade/edit/tree/index.php
@@ -343,8 +343,8 @@
if (!$moving && count($grade_edit_tree->categories) > 1) {
echo '<br /><br />';
echo '<input type="hidden" name="bulkmove" value="0" id="bulkmoveinput" />';
- echo get_string('moveselectedto', 'grades') . ' ';
$attributes = array('id'=>'menumoveafter');
+ echo html_writer::label(get_string('moveselectedto', 'grades'), 'menumoveafter', false, array('class' => 'accesshide'));
echo html_writer::select($grade_edit_tree->categories, 'moveafter', '', array(''=>'choosedots'), $attributes);
$OUTPUT->add_action_handler(new component_action('change', 'submit_bulk_move'), 'menumoveafter');
echo '<div id="noscriptgradetreeform" class="hiddenifjs">
View
3 grade/edit/tree/lib.php
@@ -666,7 +666,8 @@ public function get_category_cell($category, $levelclass, $params) {
} else {
$attributes = array();
$attributes['id'] = 'aggregation_'.$category->id;
- $aggregation = html_writer::select($options, 'aggregation_'.$category->id, $category->aggregation, null, $attributes);
+ $aggregation = html_writer::label(get_string('aggregation', 'grades'), 'aggregation_'.$category->id, false, array('class' => 'accesshide'));
+ $aggregation .= html_writer::select($options, 'aggregation_'.$category->id, $category->aggregation, null, $attributes);
$action = new component_action('change', 'update_category_aggregation', array('courseid' => $params['id'], 'category' => $category->id, 'sesskey' => sesskey()));
$OUTPUT->add_action_handler($action, 'aggregation_'.$category->id);
}
View
7 grade/grading/form/rubric/renderer.php
@@ -164,7 +164,8 @@ public function level_template($mode, $options, $elementname = '{NAME}', $criter
$leveltemplate .= html_writer::start_tag('div', array('class' => 'level-wrapper'));
if ($mode == gradingform_rubric_controller::DISPLAY_EDIT_FULL) {
$definition = html_writer::tag('textarea', htmlspecialchars($level['definition']), array('name' => '{NAME}[criteria][{CRITERION-id}][levels][{LEVEL-id}][definition]', 'cols' => '10', 'rows' => '4'));
- $score = html_writer::empty_tag('input', array('type' => 'text', 'name' => '{NAME}[criteria][{CRITERION-id}][levels][{LEVEL-id}][score]', 'size' => '3', 'value' => $level['score']));
+ $score = html_writer::label(get_string('criterionempty', 'gradingform_rubric'), '{NAME}criteria{CRITERION-id}levels{LEVEL-id}', false, array('class' => 'accesshide'));
+ $score .= html_writer::empty_tag('input', array('type' => 'text', 'name' => '{NAME}[criteria][{CRITERION-id}][levels][{LEVEL-id}][score]', 'size' => '3', 'value' => $level['score']));
} else {
if ($mode == gradingform_rubric_controller::DISPLAY_EDIT_FROZEN) {
$leveltemplate .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => '{NAME}[criteria][{CRITERION-id}][levels][{LEVEL-id}][definition]', 'value' => $level['definition']));
@@ -290,7 +291,7 @@ protected function rubric_edit_options($mode, $options) {
switch ($option) {
case 'sortlevelsasc':
// Display option as dropdown
- $html .= html_writer::tag('span', get_string($option, 'gradingform_rubric'), array('class' => 'label'));
+ $html .= html_writer::tag('span', html_writer::label(get_string($option, 'gradingform_rubric'), $attrs['id']), array('class' => 'label'));
$value = (int)(!!$value); // make sure $value is either 0 or 1
if ($mode == gradingform_rubric_controller::DISPLAY_EDIT_FULL) {
$selectoptions = array(0 => get_string($option.'0', 'gradingform_rubric'), 1 => get_string($option.'1', 'gradingform_rubric'));
@@ -448,7 +449,7 @@ public function display_instance(gradingform_rubric_instance $instance, $idx, $c
public function display_regrade_confirmation($elementname, $changelevel, $value) {
$html = html_writer::start_tag('div', array('class' => 'gradingform_rubric-regrade'));
if ($changelevel<=2) {
- $html .= get_string('regrademessage1', 'gradingform_rubric');
+ $html .= html_writer::label(get_string('regrademessage1', 'gradingform_rubric'), 'menu' . $elementname . 'regrade');
$selectoptions = array(
0 => get_string('regradeoption0', 'gradingform_rubric'),
1 => get_string('regradeoption1', 'gradingform_rubric')
View
2 grade/lib.php
@@ -380,7 +380,7 @@ function print_grade_plugin_selector($plugin_info, $active_type, $active_plugin,
// finally print/return the popup form
if ($count > 1) {
$select = new url_select($menu, $active, null, 'choosepluginreport');
-
+ $select->set_label(get_accesshide(get_string('gradereport', 'grades')));
if ($return) {
return $OUTPUT->render($select);
} else {
View
3 grade/report/grader/lib.php
@@ -949,7 +949,8 @@ public function get_right_rows() {
}
$itemcell->text .= '<input type="hidden" id="oldgrade_'.$userid.'_'.$item->id.'" name="oldgrade_'.$userid.'_'.$item->id.'" value="'.$oldval.'"/>';
$attributes = array('tabindex' => $tabindices[$item->id]['grade'], 'id'=>'grade_'.$userid.'_'.$item->id);
- $itemcell->text .= html_writer::select($scaleopt, 'grade_'.$userid.'_'.$item->id, $gradeval, array(-1=>$nogradestr), $attributes);;
+ $itemcell->text .= html_writer::label(get_string('typescale', 'grades'), 'grade_'.$userid.'_'.$item->id, false, array('class' => 'accesshide'));
+ $itemcell->text .= html_writer::select($scaleopt, 'grade_'.$userid.'_'.$item->id, $gradeval, array(-1=>$nogradestr), $attributes);
} elseif(!empty($scale)) {
$scales = explode(",", $scale->scale);
View
2 lang/en/moodle.php
@@ -1023,6 +1023,8 @@
$string['missingteacher'] = 'Must choose something';
$string['missingurl'] = 'Missing URL';
$string['missingusername'] = 'Missing username';
+$string['month'] = 'Month';
+$string['months'] = 'Months';
$string['modified'] = 'Modified';
$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?';
$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}';
View
24 lib/adminlib.php
@@ -1792,7 +1792,7 @@ public function output_html($data, $query='') {
return format_admin_setting($this, $this->visiblename,
'<div class="form-text defaultsnext"><input type="text" size="'.$this->size.'" id="'.$this->get_id().'" name="'.$this->get_full_name().'" value="'.s($data).'" /></div>',
- $this->description, true, '', $default, $query);
+ $this->description, true, '', $default, $query);
}
}
@@ -1997,7 +1997,7 @@ public function output_html($data, $query='') {
return format_admin_setting($this, $this->visiblename,
'<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>',
- $this->description, true, '', $default, $query);
+ $this->description, true, '', $default, $query);
}
}
@@ -2031,7 +2031,7 @@ public function output_html($data, $query='') {
return format_admin_setting($this, $this->visiblename,
'<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>',
- $this->description, true, '', $default, $query);
+ $this->description, true, '', $default, $query);
}
}
@@ -2065,7 +2065,7 @@ public function output_html($data, $query='') {
return format_admin_setting($this, $this->visiblename,
'<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>',
- $this->description, true, '', $default, $query);
+ $this->description, true, '', $default, $query);
}
}
@@ -2756,11 +2756,14 @@ public function output_html($data, $query='') {
}
$return = '<div class="form-time defaultsnext">'.
+ '<label class="accesshide" for="' . $this->get_id() . '">' . get_string('hour') . '</label>' .
'<select id="'.$this->get_id().'h" name="'.$this->get_full_name().'[h]">';
for ($i = 0; $i < 24; $i++) {
$return .= '<option value="'.$i.'"'.($i == $data['h'] ? ' selected="selected"' : '').'>'.$i.'</option>';
}
- $return .= '</select>:<select id="'.$this->get_id().'m" name="'.$this->get_full_name().'[m]">';
+ $return .= '</select>:';
+ $return .= '<label class="accesshide" for="' . $this->get_id() . '">' . get_string('minutes') . '</label>';
+ $return .= '<select id="'.$this->get_id().'m" name="'.$this->get_full_name().'[m]">';
for ($i = 0; $i < 60; $i += 5) {
$return .= '<option value="'.$i.'"'.($i == $data['m'] ? ' selected="selected"' : '').'>'.$i.'</option>';
}
@@ -3173,6 +3176,7 @@ public function output_html($data, $query='') {
if (!array_key_exists($i, $currentsetting)) {
$currentsetting[$i] = 'none'; //none
}
+ $return .= '<label class="accesshide" for="' . $this->get_id().$i . '">' . get_string($this->name, 'admin') . '</label>';
$return .='<select class="form-select" id="'.$this->get_id().$i.'" name="'.$this->get_full_name().'[]">';
foreach ($this->choices as $key => $value) {
$return .= '<option value="'.$key.'"'.("$key" == $currentsetting[$i] ? ' selected="selected"' : '').'>'.$value.'</option>';
@@ -3444,8 +3448,10 @@ public function output_html($data, $query='') {
}
$out .= html_writer::tag('td',
+ html_writer::label($value, $this->get_full_name() . $field, false, array('class' => 'accesshide')) .
html_writer::empty_tag('input',
array(
+ 'id' => $this->get_full_name() . $field,
'type' => 'text',
'class' => 'form-text',
'name' => $this->get_full_name().'['.$field.']',
@@ -6539,7 +6545,7 @@ public function output_html($data, $query='') {
}
$select = new single_select($this->repository_action_url($typename, 'repos'), 'action', $actionchoicesforexisting, $currentaction, null, 'applyto' . basename($typename));
-
+ $select->set_label(get_accesshide(get_string('select') . ' '. get_string('action')));
// Display up/down link
$updown = '';
$spacer = $OUTPUT->spacer(array('height'=>15, 'width'=>15)); // should be done with CSS instead
@@ -6576,6 +6582,7 @@ public function output_html($data, $query='') {
// Check that it has not already been listed
if (!in_array($plugin, $alreadyplugins)) {
$select = new single_select($this->repository_action_url($plugin, 'repos'), 'action', $actionchoicesfornew, 'delete', null, 'applyto' . basename($plugin));
+ $select->set_label(get_accesshide(get_string('select') . ' '. get_string('action')));
$table->data[] = array(get_string('pluginname', 'repository_'.$plugin), $OUTPUT->render($select), '', '');
}
}
@@ -7689,6 +7696,7 @@ public function output_html($data, $query = '') {
$PAGE->requires->js_init_call('M.util.init_colour_picker', array($this->get_id(), $this->previewconfig));
$content = html_writer::start_tag('div', array('class'=>'form-colourpicker defaultsnext'));
$content .= html_writer::tag('div', $OUTPUT->pix_icon('i/loading', get_string('loading', 'admin'), 'moodle', array('class'=>'loadingicon')), array('class'=>'admin_colourpicker clearfix'));
+ $content .= html_writer::label($this->get_full_name(), $this->get_id(), false, array('class' => 'accesshide'));
$content .= html_writer::empty_tag('input', array('type'=>'text','id'=>$this->get_id(), 'name'=>$this->get_full_name(), 'value'=>$this->get_setting(), 'size'=>'12'));
if (!empty($this->previewconfig)) {
$content .= html_writer::empty_tag('input', array('type'=>'button','id'=>$this->get_id().'_preview', 'value'=>get_string('preview'), 'class'=>'admin_colourpicker_preview'));
@@ -7788,8 +7796,10 @@ public function output_html($data, $query='') {
}
$out .= html_writer::tag('td',
+ html_writer::label($this->get_full_name(), $this->get_full_name() . 'expression' . $i, false, array('class' => 'accesshide')) .
html_writer::empty_tag('input',
array(
+ 'id' => $this->get_full_name() . 'expression' . $i,
'type' => 'text',
'class' => 'form-text',
'name' => $this->get_full_name().'[expression'.$i.']',
@@ -7807,8 +7817,10 @@ public function output_html($data, $query='') {
}
$out .= html_writer::tag('td',
+ html_writer::label($this->get_full_name(), $this->get_full_name() . 'value' . $i, false, array('class' => 'accesshide')) .
html_writer::empty_tag('input',
array(
+ 'id' => $this->get_full_name() . 'value' . $i,
'type' => 'text',
'class' => 'form-text',
'name' => $this->get_full_name().'[value'.$i.']',
View
6 lib/deprecatedlib.php
@@ -3621,12 +3621,12 @@ function print_textfield($name, $value, $alt = '', $size=50, $maxlength=0, $retu
}
$style = "width: {$size}px;";
- $attributes = array('type'=>'text', 'name'=>$name, 'alt'=>$alt, 'style'=>$style, 'value'=>$value);
+ $attributes = array('type' => 'text', 'id' => $name, 'name' => $name, 'alt' => $alt, 'style' => $style, 'value' => $value);
if ($maxlength) {
$attributes['maxlength'] = $maxlength;
}
-
- $output = html_writer::empty_tag('input', $attributes);
+ $output = html_writer::label($name, $name, false, array('class' => 'accesshide'));
+ $output .= html_writer::empty_tag('input', $attributes);
if (empty($return)) {
echo $output;
View
5 lib/form/editor.php
@@ -238,9 +238,10 @@ function toHtml() {
$str .= '<div>';
if (count($formats)>1) {
- $str.= html_writer::select($formats, $elname.'[format]', $format, false);
+ $str .= html_writer::label(get_string('format'), 'menu'. $elname. '[format]', false, array('class' => 'accesshide'));
+ $str .= html_writer::select($formats, $elname.'[format]', $format, false);
} else {
- $str.= html_writer::empty_tag('input',
+ $str .= html_writer::empty_tag('input',
array('name'=>$elname.'[format]', 'type'=> 'hidden', 'value' => array_pop(array_keys($formats))));
}
$str .= '</div>';
View
14 lib/outputrenderers.php
@@ -1235,14 +1235,19 @@ protected function render_single_select(single_select $select) {
if ($select->label) {
$output .= html_writer::label($select->label, $select->attributes['id']);
+ } else {
+ if (isset($select->nothing)) {
+ $label = $select->nothing;
+ $label = array_pop($label);
+ $output .= html_writer::label($label, $select->attributes['id'], false, array('class' => 'accesshide'));
+ }
}
if ($select->helpicon instanceof help_icon) {
$output .= $this->render($select->helpicon);
} 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')));
@@ -1311,6 +1316,12 @@ protected function render_url_select(url_select $select) {
if ($select->label) {
$output .= html_writer::label($select->label, $select->attributes['id']);
+ } else {
+ if (isset($select->nothing)) {
+ $label = $select->nothing;
+ $label = array_pop($label);
+ $output .= html_writer::label($label, $select->attributes['id'], false, array('class' => 'accesshide'));
+ }
}
if ($select->helpicon instanceof help_icon) {
@@ -1521,6 +1532,7 @@ function render_rating(rating $rating) {
$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
View
3 lib/portfoliolib.php
@@ -443,7 +443,8 @@ function portfolio_instance_select($instances, $callerformats, $callbackclass, $
$pinsane = portfolio_plugin_sanity_check();
$count = 0;
- $selectoutput = "\n" . '<select name="' . $selectname . '">' . "\n";
+ $selectoutput = "\n" . '<label class="accesshide" for="' . $selectname . '">' . get_string('plugin', 'portfolio') . '</label>';
+ $selectoutput .= "\n" . '<select id="' . $selectname . '" name="' . $selectname . '">' . "\n";
$existingexports = portfolio_existing_exports_by_plugin($USER->id);
foreach ($instances as $instance) {
$formats = portfolio_supported_formats_intersect($callerformats, $instance->supported_formats());
View
2 lib/questionlib.php
@@ -992,7 +992,7 @@ function question_category_select_menu($contexts, $top = false, $currentcat = 0,
foreach ($categoriesarray as $group => $opts) {
$options[] = array($group => $opts);
}
-
+ echo html_writer::label($selected, 'menucategory', false, array('class' => 'accesshide'));
echo html_writer::select($options, 'category', $selected, $choose);
}
View
1 lib/tablelib.php
@@ -929,6 +929,7 @@ function download_buttons() {
$html = '<form action="'. $this->baseurl .'" method="post">';
$html .= '<div class="mdl-align">';
$html .= '<input type="submit" value="'.get_string('downloadas', 'table').'"/>';