aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2016-05-23 10:48:39 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2016-05-23 10:48:39 +0200
commit2418a12cb9fd355161c57f61a1d69663ae927b8a (patch)
tree985cd29a558f8fb1008ca6d2f772fbcf98f637ab /js
parent6593ac3d5f83ec49b168d49d7963146e67fd0e79 (diff)
parentdec6d1745b780e67960afe20a5a0d86f23ba0733 (diff)
downloadfosdem-2018-presentation-2418a12cb9fd355161c57f61a1d69663ae927b8a.tar
fosdem-2018-presentation-2418a12cb9fd355161c57f61a1d69663ae927b8a.tar.gz
Merge pull request #1586 from jasonkiss/feature/accessible-speaker-notes
make speaker notes keyboard accessible
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 47b4f01..d2b93bb 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -499,6 +499,7 @@
// Element containing notes that are visible to the audience
dom.speakerNotes = createSingletonNode( dom.wrapper, 'div', 'speaker-notes', null );
dom.speakerNotes.setAttribute( 'data-prevent-swipe', '' );
+ dom.speakerNotes.setAttribute( 'tabindex', '0');
// Overlay graphic which is displayed during the paused mode
createSingletonNode( dom.wrapper, 'div', 'pause-overlay', null );
@@ -3922,10 +3923,11 @@
// the keyboard
var activeElementIsCE = document.activeElement && document.activeElement.contentEditable !== 'inherit';
var activeElementIsInput = document.activeElement && document.activeElement.tagName && /input|textarea/i.test( document.activeElement.tagName );
+ var activeElementIsNotes = document.activeElement && document.activeElement.className && /speaker-notes/i.test( document.activeElement.className);
// Disregard the event if there's a focused element or a
// keyboard modifier key is present
- if( activeElementIsCE || activeElementIsInput || (event.shiftKey && event.keyCode !== 32) || event.altKey || event.ctrlKey || event.metaKey ) return;
+ if( activeElementIsCE || activeElementIsInput || activeElementIsNotes || (event.shiftKey && event.keyCode !== 32) || event.altKey || event.ctrlKey || event.metaKey ) return;
// While paused only allow resume keyboard events; 'b', '.''
var resumeKeyCodes = [66,190,191];