Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

… select tag
  • Loading branch information...
commit 2134ddcba1b8983f173f9cb4b162f705cbbe9b1b 1 parent 470d47f
@rwijaya rwijaya authored
View
1  lang/en/notes.php
@@ -59,4 +59,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
5 user/addnote.php
@@ -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
2  user/groupaddnote.php
@@ -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
3  user/index.php
@@ -804,7 +804,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
2  user/message.html
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.