Fixing accessibility bug where users could not tab through on wiki
LMS-1307
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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",
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
10
lms/static/js/wiki/accessible.js
Normal file
10
lms/static/js/wiki/accessible.js
Normal 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"
|
||||
};
|
||||
Reference in New Issue
Block a user