Skip to content

Commit 5756474

Browse files
A11y: Convert snippet triggers into buttons.
1 parent 01080ee commit 5756474

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

editor.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ <h2><i class="fa fa-cogs"></i> <strong>{{ title }}</strong></h2>
150150
</tr>
151151
{{#snippets}}
152152
<tr id="snippet-{{trigger}}" class="action snippet-selection">
153-
<td><a role="button">{{trigger}}</a> <span class="snippet-name">{{name}}</span></td>
153+
<td><button class="snippet-button">{{trigger}}</button> <span class="snippet-name">{{name}}</span></td>
154154
<td>{{#describe}}{{name}}{{/describe}}</td>
155155
</tr>
156156
{{/snippets}}

static/css/style.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,21 @@ a.command:hover {
506506
width: 200px;
507507
}
508508

509+
.snippet-button {
510+
text-decoration: none;
511+
background: none;
512+
color: inherit;
513+
border: none;
514+
border-radius: 5px;
515+
padding: 2px;
516+
font: inherit;
517+
cursor: pointer;
518+
outline: inherit;
519+
}
520+
.snippet-button:focus {
521+
box-shadow: 0px 0px 5px 3px #FFCC33;
522+
}
523+
509524
#share-link {
510525
display: none;
511526
}

0 commit comments

Comments
 (0)