diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3bc0544bfbe66d1ad47acff078207f5ad2e18d0b..9ba3178ac5c0489aeaf7c34d8eaf7a97787da23b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -32,6 +32,8 @@ Studio: Change course overview page, checklists, assets, and course staff management page URLs to a RESTful interface. Also removed "\listing", which duplicated "\index". +LMS: Fixed accessibility bug where users could not tab through wiki (LMS-1307) + Blades: When start time and end time are specified for a video, a visual range will be shown on the time slider to highlight the place in the video that will be played. diff --git a/lms/djangoapps/course_wiki/editors.py b/lms/djangoapps/course_wiki/editors.py index 2ca8260bfe5011ff643ea385caf8b9bb32e754d3..e823bfdafa6c86d4c104de98584332c377499951 100644 --- a/lms/djangoapps/course_wiki/editors.py +++ b/lms/djangoapps/course_wiki/editors.py @@ -58,6 +58,7 @@ class CodeMirror(BaseEditor): js = ("js/vendor/CodeMirror/codemirror.js", "js/vendor/CodeMirror/xml.js", "js/vendor/CodeMirror/mitx_markdown.js", + "js/wiki/accessible.js", "js/wiki/CodeMirror.init.js", "js/wiki/cheatsheet.js", ) diff --git a/lms/static/js/wiki/CodeMirror.init.js b/lms/static/js/wiki/CodeMirror.init.js index 60a4917fc2f3bfde9fa82c1c727e2e7df3463ffb..2ef21aa4be9407940d12d7e201a4202307042a3b 100644 --- a/lms/static/js/wiki/CodeMirror.init.js +++ b/lms/static/js/wiki/CodeMirror.init.js @@ -5,6 +5,7 @@ $(document).ready(function() { matchBrackets: true, theme: "default", lineWrapping: true, + keyMap: "accessible" }); //Store the inital contents so we can compare for unsaved changes diff --git a/lms/static/js/wiki/accessible.js b/lms/static/js/wiki/accessible.js new file mode 100644 index 0000000000000000000000000000000000000000..90a647ceaa327e1615560af06528cfd65c1553ad --- /dev/null +++ b/lms/static/js/wiki/accessible.js @@ -0,0 +1,11 @@ +/* By default, CodeMirror turns tabs into indents, which makes it difficult for keyboard-only + users to "tab through" elements on a page. Including this file and setting keyMap to + "accessible" removes the "tab" from CodeMirror's default KeyMap to remedy this problem */ + +(function() { + var keyMap = CodeMirror.keyMap.accessible = { + "Tab": false, + "Shift-Tab": false, + fallthrough: "default" + }; +})();