Skip to content

Commit

Permalink
MDL-34562 accessibility compliance for chat module: Add <label> for i…
Browse files Browse the repository at this point in the history
…nput text and select tag
  • Loading branch information
Rossiani Wijaya committed Aug 6, 2012
1 parent 470d47f commit da248cb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mod/chat/gui_ajax/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
echo $OUTPUT->box('<ul id="messages-list"></ul>', '', 'chat-messages');
$table = new html_table();
$table->data = array(
array(' &raquo; <input type="text" disabled="true" id="input-message" value="Loading..." size="50" /> <input type="button" id="button-send" value="'.get_string('send', 'chat').'" /> <a id="choosetheme" href="###">'.get_string('themes').' &raquo; </a>')
array(' &raquo; <label class="accesshide" for="input-message">' . get_string('entermessage', 'chat') . ' </label><input type="text" disabled="true" id="input-message" value="Loading..." size="50" /> <input type="button" id="button-send" value="'.get_string('send', 'chat').'" /> <a id="choosetheme" href="###">'.get_string('themes').' &raquo; </a>')
);
echo $OUTPUT->box(html_writer::table($table), '', 'chat-input-area');
echo $OUTPUT->box('', '', 'chat-notify');
Expand Down
1 change: 1 addition & 0 deletions mod/chat/gui_header_js/chatinput.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
echo $OUTPUT->header();

echo html_writer::start_tag('form', array('action'=>'../empty.php', 'method'=>'post', 'target'=>'empty', 'id'=>'inputForm', 'style'=>'margin:0'));
echo html_writer::label(get_string('entermessage', 'chat'), 'input_chat_message', false, array('class' => 'accesshide'));
echo html_writer::empty_tag('input', array('type'=>'text', 'id'=>'input_chat_message', 'name'=>'chat_message', 'size'=>'50', 'value'=>''));
echo html_writer::empty_tag('input', array('type'=>'checkbox', 'id'=>'auto', 'checked'=>'checked', 'value'=>''));
echo html_writer::tag('label', get_string('autoscroll', 'chat'), array('for'=>'auto'));
Expand Down
1 change: 1 addition & 0 deletions mod/chat/gui_sockets/chatinput.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

<form action="../empty.php" method="get" target="empty" id="inputform"
onsubmit="return empty_field_and_submit();">
<label class="accesshide" for="chat_message"><?php print_string('entermessage', 'chat'); ?></label>
<input type="text" name="chat_message" id="chat_message" size="60" value="" />
<?php echo $OUTPUT->help_icon('usingchat', 'chat'); ?>
</form>
Expand Down
1 change: 1 addition & 0 deletions mod/chat/lang/en/chat.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
$string['chatreport'] = 'Chat sessions';
$string['chat:talk'] = 'Talk in a chat';
$string['chattime'] = 'Next chat time';
$string['entermessage'] = "Enter your message";
$string['idle'] = 'Idle';
$string['inputarea'] = 'Input area';
$string['invalidid'] = 'Could not find that chat room!';
Expand Down

0 comments on commit da248cb

Please sign in to comment.