Permalink
Browse files

MDL-34575 accessibility compliance for notes: Add form input text and…

… select tag
  • Loading branch information...
1 parent 02814bf commit 1445fd133737e39bbc7b61692babdacef9004c71 @rwijaya rwijaya committed Aug 3, 2012
Showing with 7 additions and 6 deletions.
  1. +1 −0 lang/en/notes.php
  2. +2 −3 user/addnote.php
  3. +1 −1 user/groupaddnote.php
  4. +2 −1 user/index.php
  5. +1 −1 user/message.html
View
@@ -60,4 +60,5 @@
* Site - The note will be visible to teachers in all courses';
$string['site'] = 'site';
$string['sitenotes'] = 'Site notes';
+$string['selectnotestate'] = "Select note state";
$string['unknown'] = 'unknown';
View
@@ -79,7 +79,6 @@
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
-
// this will contain all available the based On select options, but we'll disable some on them on a per user basis
echo $OUTPUT->heading($straddnote);
@@ -104,12 +103,12 @@
}
}
}
-
foreach ($users as $k => $v) {
if(!$user = $DB->get_record('user', array('id'=>$v))) {
continue;
}
- $checkbox = html_writer::select($state_names, 'states[' . $k . ']', empty($states[$k]) ? NOTES_STATE_PUBLIC : $states[$k], false);
+ $checkbox = html_writer::label(get_string('selectnotestate', 'note'), 'menustates', false, array('class' => 'accesshide'));
+ $checkbox .= html_writer::select($state_names, 'states[' . $k . ']', empty($states[$k]) ? NOTES_STATE_PUBLIC : $states[$k], false, array('id' => 'menustates'));
$table->data[] = array(
'<input type="hidden" name="userid['.$k.']" value="'.$v.'" />'. fullname($user, true),
'<textarea name="contents['. $k . ']" rows="2" cols="40">' . strip_tags(@$contents[$k]) . '</textarea>',
View
@@ -117,7 +117,7 @@
echo '<br /><textarea name="content" rows="5" cols="50">' . strip_tags(@$content) . '</textarea></p>';
echo '<p>';
-echo get_string('publishstate', 'notes');
+echo html_writer::label(get_string('publishstate', 'notes'), 'menustate');
echo $OUTPUT->help_icon('publishstate', 'notes');
echo html_writer::select($state_names, 'state', empty($state) ? NOTES_STATE_PUBLIC : $state, false);
echo '</p>';
View
@@ -813,7 +813,8 @@
if (has_capability('moodle/site:viewparticipants', $context) && $totalcount > ($perpage*3)) {
echo '<form action="index.php" class="searchform"><div><input type="hidden" name="id" value="'.$course->id.'" />'.get_string('search').':&nbsp;'."\n";
- echo '<input type="text" name="search" value="'.s($search).'" />&nbsp;<input type="submit" value="'.get_string('search').'" /></div></form>'."\n";
+ echo '<label class="accesshide" for="search">' . get_string('search', 'search') . '</label>';
+ echo '<input type="text" id="search" name="search" value="'.s($search).'" />&nbsp;<input type="submit" value="'.get_string('search').'" /></div></form>'."\n";
}
$perpageurl = clone($baseurl);
View
@@ -14,7 +14,7 @@
</tr>
<tr valign="top">
- <td align="right"><b><?php print_string("formattexttype"); ?>:</b></td>
+ <td align="right"><label for="menuformat"><b><?php print_string("formattexttype"); ?>:</b></label></td>
<td>
<?php
if ($usehtmleditor) { /// Trying this out for a while

0 comments on commit 1445fd1

Please sign in to comment.