From ecc9afa19c27c925e9aeeaef4b7561c11d555ffc Mon Sep 17 00:00:00 2001 From: Brian Jacobel Date: Tue, 31 Jan 2017 17:11:28 -0500 Subject: [PATCH] Add aria-disabled to WMD undo/redo buttons --- lms/static/js/Markdown.Editor.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lms/static/js/Markdown.Editor.js b/lms/static/js/Markdown.Editor.js index 5a5f22fdcf..2111efa6c3 100644 --- a/lms/static/js/Markdown.Editor.js +++ b/lms/static/js/Markdown.Editor.js @@ -1408,10 +1408,18 @@ } }); } + // This line does not appear in vanilla WMD. It was added by edX to improve accessibility. + // It should become a separate commit applied to WMD's official HEAD if we remove this edited version + // of WMD from Git and install it from NPM / a maintained public fork. + button.removeAttribute('aria-disabled'); } else { image.style.backgroundPosition = button.XShift + ' ' + disabledYShift; button.onmouseover = button.onmouseout = button.onclick = function() { }; + // This line does not appear in vanilla WMD. It was added by edX to improve accessibility. + // It should become a separate commit applied to WMD's official HEAD if we remove this edited version + // of WMD from Git and install it from NPM / a maintained public fork. + button.setAttribute('aria-disabled', true); } }