Fixing accessibility bug where users could not tab through on wiki

LMS-1307
This commit is contained in:
Julia Hansbrough
2013-10-24 21:00:06 +00:00
parent 30861d0b3d
commit 4261569215
4 changed files with 14 additions and 0 deletions

View File

@@ -11,6 +11,8 @@ Studio: Change course overview page, checklists, assets, and course staff manage
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.

View File

@@ -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",
)

View File

@@ -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

View File

@@ -0,0 +1,10 @@
/* 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 */
var keyMap = CodeMirror.keyMap.accessible = {
"Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",
"End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown",
"Delete": "delCharRight", "Backspace": "delCharLeft", "Shift-Tab": "indentAuto",
"Enter": "newlineAndIndent", "Insert": "toggleOverwrite"
};