mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2024-06-26 17:30:15 +02:00
Addressing accessibility issues with using links instead of buttons.
This commit is contained in:
parent
5b8611628b
commit
4bf96ffd32
|
@ -112,7 +112,9 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-toolbar a {
|
.editor-toolbar a,
|
||||||
|
.editor-toolbar button {
|
||||||
|
background: transparent;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-decoration: none!important;
|
text-decoration: none!important;
|
||||||
|
@ -120,18 +122,22 @@
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-toolbar a.active,
|
.editor-toolbar a.active,
|
||||||
.editor-toolbar a:hover {
|
.editor-toolbar a:hover,
|
||||||
|
.editor-toolbar button.active,
|
||||||
|
.editor-toolbar button:hover {
|
||||||
background: #fcfcfc;
|
background: #fcfcfc;
|
||||||
border-color: #95a5a6;
|
border-color: #95a5a6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-toolbar a:before {
|
.editor-toolbar a:before,
|
||||||
|
.editor-toolbar button:before {
|
||||||
line-height: 30px
|
line-height: 30px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ function fixShortcut(name) {
|
||||||
*/
|
*/
|
||||||
function createIcon(options, enableTooltips, shortcuts) {
|
function createIcon(options, enableTooltips, shortcuts) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
var el = document.createElement("a");
|
var el = document.createElement("button");
|
||||||
enableTooltips = (enableTooltips == undefined) ? true : enableTooltips;
|
enableTooltips = (enableTooltips == undefined) ? true : enableTooltips;
|
||||||
|
|
||||||
if(options.title && enableTooltips) {
|
if(options.title && enableTooltips) {
|
||||||
|
|
Loading…
Reference in a new issue