diff --git a/lms/static/coffee/src/customwmd.coffee b/lms/static/coffee/src/customwmd.coffee index 8a23f8231e..c0240b4617 100644 --- a/lms/static/coffee/src/customwmd.coffee +++ b/lms/static/coffee/src/customwmd.coffee @@ -127,6 +127,8 @@ if Markdown? _append = appended_id || "" wmdInputId = "wmd-input#{_append}" $wmdPreviewContainer = $("
").addClass("wmd-preview-container") + .attr("role", "region") + .attr("aria-label", gettext("HTML preview of post")) .append($("
").addClass("wmd-preview-label").text(gettext("Preview"))) .append($("
").attr("id", "wmd-preview#{_append}").addClass("wmd-panel wmd-preview")) $wmdPanel = $("
").addClass("wmd-panel") diff --git a/lms/static/js/Markdown.Editor.js b/lms/static/js/Markdown.Editor.js index 95e45a4464..9149a80471 100644 --- a/lms/static/js/Markdown.Editor.js +++ b/lms/static/js/Markdown.Editor.js @@ -1434,8 +1434,7 @@ buttonRow = buttonBar.appendChild(buttonRow); var xPosition = 0; var makeButton = function(id, title, XShift, textOp) { - var button = document.createElement('span'); - button.setAttribute('role', 'button'); + var button = document.createElement('button'); button.tabIndex = 0; button.className = 'wmd-button'; button.style.left = xPosition + 'px'; diff --git a/lms/static/sass/discussion/_discussion.scss b/lms/static/sass/discussion/_discussion.scss index 5caaff66fe..7ed23a75c1 100644 --- a/lms/static/sass/discussion/_discussion.scss +++ b/lms/static/sass/discussion/_discussion.scss @@ -106,15 +106,15 @@ body.discussion { } .wmd-button { - @include padding-right(3px); - @include padding-left(3px); position: absolute; display: inline-block; width: 20px; height: 20px; + border: none; background: none; list-style: none; cursor: pointer; + padding: 0; } .wmd-button > span { @@ -288,10 +288,6 @@ body.discussion { @include blue-button; @include float(left); } - - .wmd-button { - width: 15px; - } } // ==================== diff --git a/lms/static/sass/discussion/elements/_editor.scss b/lms/static/sass/discussion/elements/_editor.scss index 4c09e74ef4..a8a62ff655 100644 --- a/lms/static/sass/discussion/elements/_editor.scss +++ b/lms/static/sass/discussion/elements/_editor.scss @@ -87,13 +87,18 @@ .wmd-button { position: absolute; display: inline-block; - padding-right: 3px; - padding-left: 2px; width: 20px; height: 20px; + border: none; background: none; list-style: none; cursor: pointer; + padding: 0; + } + + .wmd-button:hover { + background: none; + box-shadow: none; } .wmd-button > span {