Commit e86ff28f by Andy Armstrong Committed by GitHub

Merge pull request #13260 from edx/bjacobel/discussions-markdown

A11Y fixes for discussions markdown editor
parents ce0009ab 50dab158
...@@ -127,6 +127,8 @@ if Markdown? ...@@ -127,6 +127,8 @@ if Markdown?
_append = appended_id || "" _append = appended_id || ""
wmdInputId = "wmd-input#{_append}" wmdInputId = "wmd-input#{_append}"
$wmdPreviewContainer = $("<div>").addClass("wmd-preview-container") $wmdPreviewContainer = $("<div>").addClass("wmd-preview-container")
.attr("role", "region")
.attr("aria-label", gettext("HTML preview of post"))
.append($("<div>").addClass("wmd-preview-label").text(gettext("Preview"))) .append($("<div>").addClass("wmd-preview-label").text(gettext("Preview")))
.append($("<div>").attr("id", "wmd-preview#{_append}").addClass("wmd-panel wmd-preview")) .append($("<div>").attr("id", "wmd-preview#{_append}").addClass("wmd-panel wmd-preview"))
$wmdPanel = $("<div>").addClass("wmd-panel") $wmdPanel = $("<div>").addClass("wmd-panel")
......
...@@ -1434,8 +1434,7 @@ ...@@ -1434,8 +1434,7 @@
buttonRow = buttonBar.appendChild(buttonRow); buttonRow = buttonBar.appendChild(buttonRow);
var xPosition = 0; var xPosition = 0;
var makeButton = function(id, title, XShift, textOp) { var makeButton = function(id, title, XShift, textOp) {
var button = document.createElement('span'); var button = document.createElement('button');
button.setAttribute('role', 'button');
button.tabIndex = 0; button.tabIndex = 0;
button.className = 'wmd-button'; button.className = 'wmd-button';
button.style.left = xPosition + 'px'; button.style.left = xPosition + 'px';
......
...@@ -106,15 +106,15 @@ body.discussion { ...@@ -106,15 +106,15 @@ body.discussion {
} }
.wmd-button { .wmd-button {
@include padding-right(3px);
@include padding-left(3px);
position: absolute; position: absolute;
display: inline-block; display: inline-block;
width: 20px; width: 20px;
height: 20px; height: 20px;
border: none;
background: none; background: none;
list-style: none; list-style: none;
cursor: pointer; cursor: pointer;
padding: 0;
} }
.wmd-button > span { .wmd-button > span {
...@@ -288,10 +288,6 @@ body.discussion { ...@@ -288,10 +288,6 @@ body.discussion {
@include blue-button; @include blue-button;
@include float(left); @include float(left);
} }
.wmd-button {
width: 15px;
}
} }
// ==================== // ====================
......
...@@ -87,13 +87,18 @@ ...@@ -87,13 +87,18 @@
.wmd-button { .wmd-button {
position: absolute; position: absolute;
display: inline-block; display: inline-block;
padding-right: 3px;
padding-left: 2px;
width: 20px; width: 20px;
height: 20px; height: 20px;
border: none;
background: none; background: none;
list-style: none; list-style: none;
cursor: pointer; cursor: pointer;
padding: 0;
}
.wmd-button:hover {
background: none;
box-shadow: none;
} }
.wmd-button > span { .wmd-button > span {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment