diff options
author | John McLear <john@mclear.co.uk> | 2015-03-26 16:44:22 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2015-03-26 16:44:22 +0000 |
commit | 428b547d2450b9e7fbbf50a36f8fe06a75a0625e (patch) | |
tree | fee1295fb8320c8271c5ec74ea14172128185483 | |
parent | 548cef70184989b674184a786affa3e114821529 (diff) | |
download | etherpad-lite-428b547d2450b9e7fbbf50a36f8fe06a75a0625e.zip |
alt c to focus on chat and gritter and chat both now work with aria
-rw-r--r-- | src/static/js/ace2_inner.js | 7 | ||||
-rw-r--r-- | src/static/js/chat.js | 4 | ||||
-rw-r--r-- | src/static/js/gritter.js | 2 | ||||
-rw-r--r-- | src/templates/pad.html | 2 |
4 files changed, 13 insertions, 2 deletions
diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index e190bfd7..cb09432b 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -3718,6 +3718,13 @@ function Ace2Inner(){ firstEditbarElement.focus(); evt.preventDefault(); } + if ((!specialHandled) && isTypeForSpecialKey && keyCode == 67){ + // Alt c focuses on the Chat window + parent.parent.chat.show(); + parent.parent.chat.focus(); + $(this).blur(); + evt.preventDefault(); + } if ((!specialHandled) && isTypeForSpecialKey && keyCode == 8) { // "delete" key; in mozilla, if we're at the beginning of a line, normalize now, diff --git a/src/static/js/chat.js b/src/static/js/chat.js index 811b1320..021a906a 100644 --- a/src/static/js/chat.js +++ b/src/static/js/chat.js @@ -36,6 +36,10 @@ var chat = (function() chatMentions = 0; Tinycon.setBubble(0); }, + focus: function () + { + $("#chatinput").focus(); + }, stickToScreen: function(fromInitialCall) // Make chat stick to right hand side of screen { chat.show(); diff --git a/src/static/js/gritter.js b/src/static/js/gritter.js index 9778707e..7f8c5b6e 100644 --- a/src/static/js/gritter.js +++ b/src/static/js/gritter.js @@ -78,7 +78,7 @@ _tpl_close: '<div class="gritter-close"></div>', _tpl_title: '<span class="gritter-title">[[title]]</span>', _tpl_item: '<div id="gritter-item-[[number]]" class="gritter-item-wrapper [[item_class]]" style="display:none"><div class="gritter-top"></div><div class="gritter-item">[[close]][[image]]<div class="[[class_name]]">[[title]]<p>[[text]]</p></div><div style="clear:both"></div></div><div class="gritter-bottom"></div></div>', - _tpl_wrap: '<div id="gritter-notice-wrapper"></div>', + _tpl_wrap: '<div id="gritter-notice-wrapper" aria-live="polite" aria-atomic="false" aria-relevant="additions" role="log"></div>', /** * Add a gritter notification to the screen diff --git a/src/templates/pad.html b/src/templates/pad.html index c18a67d9..32cf7296 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -332,7 +332,7 @@ <a id="titlecross" onClick="chat.hide();return false;">- </a> <a id="titlesticky" onClick="chat.stickToScreen(true);$('#options-stickychat').prop('checked', true);return false;" title="Stick chat to screen">█ </a> </div> - <div id="chattext" class="authorColors"> + <div id="chattext" class="authorColors" aria-live="polite" aria-relevant="additions removals text" role="log" aria-atomic="false"> <div alt="loading.." id="chatloadmessagesball" class="chatloadmessages loadingAnimation" align="top"></div> <button id="chatloadmessagesbutton" class="chatloadmessages" data-l10n-id="pad.chat.loadmessages"></button> </div> |