Merge pull request #523 from jrsinclair/development

Addressing accessibility issues with using links instead of buttons.
This commit is contained in:
Wes Cossick 2017-02-27 01:03:56 -06:00 committed by GitHub
commit 44b5b14e9b
2 changed files with 10 additions and 4 deletions

View file

@ -114,7 +114,9 @@
padding: 0;
}
.editor-toolbar a {
.editor-toolbar a,
.editor-toolbar button {
background: transparent;
display: inline-block;
text-align: center;
text-decoration: none!important;
@ -122,18 +124,22 @@
width: 30px;
height: 30px;
margin: 0;
padding: 0;
border: 1px solid transparent;
border-radius: 3px;
cursor: pointer;
}
.editor-toolbar a.active,
.editor-toolbar a:hover {
.editor-toolbar a:hover,
.editor-toolbar button.active,
.editor-toolbar button:hover {
background: #fcfcfc;
border-color: #95a5a6;
}
.editor-toolbar a:before {
.editor-toolbar a:before,
.editor-toolbar button:before {
line-height: 30px
}

View file

@ -96,7 +96,7 @@ function fixShortcut(name) {
*/
function createIcon(options, enableTooltips, shortcuts) {
options = options || {};
var el = document.createElement("a");
var el = document.createElement("button");
enableTooltips = (enableTooltips == undefined) ? true : enableTooltips;
if(options.title && enableTooltips) {