Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-34562 accessibility compliance for chat module: Add <label> for i…

…nput text and select tag
  • Loading branch information...
commit 90f288d617ea1e018b65522413496899778630b0 1 parent f2ddce9
rwijaya rwijaya authored
2  mod/chat/gui_ajax/index.php
@@ -77,7 +77,7 @@
77 77 echo $OUTPUT->box('<ul id="messages-list"></ul>', '', 'chat-messages');
78 78 $table = new html_table();
79 79 $table->data = array(
80   - 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>')
  80 + 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>')
81 81 );
82 82 echo $OUTPUT->box(html_writer::table($table), '', 'chat-input-area');
83 83 echo $OUTPUT->box('', '', 'chat-notify');
1  mod/chat/gui_header_js/chatinput.php
@@ -46,6 +46,7 @@
46 46 echo $OUTPUT->header();
47 47
48 48 echo html_writer::start_tag('form', array('action'=>'../empty.php', 'method'=>'post', 'target'=>'empty', 'id'=>'inputForm', 'style'=>'margin:0'));
  49 +echo html_writer::label(get_string('entermessage', 'chat'), 'input_chat_message', false, array('class' => 'accesshide'));
49 50 echo html_writer::empty_tag('input', array('type'=>'text', 'id'=>'input_chat_message', 'name'=>'chat_message', 'size'=>'50', 'value'=>''));
50 51 echo html_writer::empty_tag('input', array('type'=>'checkbox', 'id'=>'auto', 'checked'=>'checked', 'value'=>''));
51 52 echo html_writer::tag('label', get_string('autoscroll', 'chat'), array('for'=>'auto'));
1  mod/chat/gui_sockets/chatinput.php
@@ -28,6 +28,7 @@
28 28
29 29 <form action="../empty.php" method="get" target="empty" id="inputform"
30 30 onsubmit="return empty_field_and_submit();">
  31 + <label class="accesshide" for="chat_message"><?php print_string('entermessage', 'chat'); ?></label>
31 32 <input type="text" name="chat_message" id="chat_message" size="60" value="" />
32 33 <?php echo $OUTPUT->help_icon('usingchat', 'chat'); ?>
33 34 </form>
1  mod/chat/lang/en/chat.php
@@ -57,6 +57,7 @@
57 57 $string['chatreport'] = 'Chat sessions';
58 58 $string['chat:talk'] = 'Talk in a chat';
59 59 $string['chattime'] = 'Next chat time';
  60 +$string['entermessage'] = "Enter your message";
60 61 $string['idle'] = 'Idle';
61 62 $string['inputarea'] = 'Input area';
62 63 $string['invalidid'] = 'Could not find that chat room!';

0 comments on commit 90f288d

Please sign in to comment.
Something went wrong with that request. Please try again.