Skip to content

Commit bcb2dc2

Browse files
microbit-markmicrobit-carlos
authored andcommitted
A11y: Axe CI testing fixes (#303)
1 parent 63655b3 commit bcb2dc2

File tree

3 files changed

+21
-19
lines changed

3 files changed

+21
-19
lines changed

editor.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
UPY_VERSION = "1.0.1";
8383
</script>
8484
<script id="files-template" type="x-tmpl-mustache">
85-
<div tabindex="-1" role="dialog" aria-labelledby="loadSave-modal" aria-modal="true" class="modal-div">
85+
<div tabindex="-1" role="dialog" aria-label="load/save modal" aria-modal="true" class="modal-div">
8686
<h2 class="modal-title"><i class="fa fa-upload"></i> <strong>{{ load-title }}</strong></h2>
8787
<div class="load-drag-target" id="load-drag-target">
8888
<input type="file" style="display: none" name="load-form-file-upload" id="file-upload-input">
@@ -98,7 +98,7 @@ <h2 class="modal-title"><i class="fa fa-download"></i> <strong>{{ save-but }}</s
9898
<h2 class="modal-title"><i class="fa fa-download"></i> <strong>{{ files-title }}</strong></h2>
9999
</div>
100100
<div id="addFileHelp">
101-
<button aria-labelledby="add-files" aria-expanded="false" type="button" class="snippet-button" id="expandHelpPara"><i class="fa fa-info-circle"></i> {{ help-button }}</button>
101+
<button aria-label="add files" aria-expanded="false" type="button" class="snippet-button" id="expandHelpPara"><i class="fa fa-info-circle"></i> {{ help-button }}</button>
102102
</div>
103103
</div>
104104
<div id="fileHelpPara">{{ file-help-text }}<a href="help.html#fs" target="_blank" class="action" id="files-help-link">{{ help-link }}</a>.
@@ -140,7 +140,7 @@ <h2 class="modal-title"><i class="fa fa-download"></i> <strong>{{ files-title }}
140140
</div>
141141
</script>
142142
<script id="snippet-template" type="x-tmpl-mustache">
143-
<div tabindex="-1" role="dialog" aria-labelledby="snippets-modal" aria-modal="true" class="modal-div">
143+
<div tabindex="-1" role="dialog" aria-label="snippets modal" aria-modal="true" class="modal-div">
144144
<h2><i class="fa fa-cogs"></i> <strong>{{ title }}</strong></h2>
145145
<p>{{ description }}</p>
146146
<p>{{ instructions }}</p>
@@ -348,15 +348,15 @@ <h2><i class="fa fa-unlock-alt"></i> <strong>{{ title }}</strong></h2>
348348
<div class="buttons_menu_item"><span id="mp-ver">MicroPython Version:</span> <script>document.write(UPY_VERSION);</script></div>
349349
</div>
350350
</div>
351-
<div id="small-icons" class="vbox">
351+
<div id="small-icons-left" class="vbox small-icons">
352352
<a aria-label="Zoom in" class="roundbutton holder zoomer action" tabindex="90" id="command-zoom-in" href="#" title="Zoom in">
353353
<div class="status-icon"><i class="fa fa-search-plus"></i></div>
354354
</a>
355355
<a aria-label="Zoom out" class="roundbutton holder zoomer action" tabindex="100" id="command-zoom-out" href="#" title="Zoom out">
356356
<div class="status-icon"><i class="fa fa-search-minus"></i></div>
357357
</a>
358358
</div>
359-
<div id="small-icons" class="vbox">
359+
<div id="small-icons-right" class="vbox small-icons">
360360
<a aria-label="Show snippets (code shortcuts)" class="roundbutton holder zoomer action" tabindex="110" id="command-snippet" href="#" title="Show snippets (code shortcuts)">
361361
<div class="status-icon"><i class="fa fa-cogs"></i></div>
362362
</a>

python-main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1757,7 +1757,8 @@ function web_editor(config) {
17571757
function setupButtons() {
17581758
if(navigator.platform.match('Win') !== null){
17591759
$(".roundsymbol").addClass("winroundsymbol");
1760-
$("#small-icons .status-icon").addClass("win-status-icon");
1760+
$("#small-icons-left .status-icon").addClass("win-status-icon");
1761+
$("#small-icons-right .status-icon").addClass("win-status-icon");
17611762
}
17621763
$("#command-download").click(function () {
17631764
doDownload();

static/css/style.css

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ h2 {
121121
border-radius: 0.5rem;
122122
}
123123

124-
#small-icons > *:not(:first-child) {
124+
.small-icons > *:not(:first-child) {
125125
display: inline-block;
126126
cursor: pointer;
127127
}
@@ -131,7 +131,7 @@ h2 {
131131
cursor: pointer !important;
132132
}
133133

134-
#small-icons {
134+
.small-icons {
135135
width: 54px;
136136
min-width: 54px;
137137
display: -webkit-flex;
@@ -142,7 +142,7 @@ h2 {
142142
flex-direction: column;
143143
}
144144

145-
#small-icons .status-icon {
145+
.small-icons .status-icon{
146146
width: 37px;
147147
height: 37px;
148148
border: 6px solid #FFCC33;
@@ -151,27 +151,28 @@ h2 {
151151
text-align: center;
152152
font-size: 1.4rem;
153153
line-height: 2.4rem;
154-
padding: 0;
154+
padding: 0 !important;
155155
font-family: "Segoe UI Emoji", "Segoe UI Symbol", "Symbola", sans-serif;
156156
color: #336699;
157157
background: #FFFFFF;
158158
}
159159

160-
html[data-useragent*='MSIE 10.0'] #small-icons .status-icon {
160+
html[data-useragent*='MSIE 10.0'] .small-icons .status-icon {
161161
line-height: 2.15rem;
162162
}
163163

164-
#small-icons .win-status-icon{
164+
165+
.small-icons .win-status-icon {
165166
line-height: 2.2rem;
166167
}
167168

168-
#small-icons .holder {
169+
.small-icons .holder {
169170
width: 56px;
170171
min-width: 56px;
171172
color: #336699;
172173
text-decoration: none;
173174
text-align: center;
174-
padding: 0px;
175+
padding: 0px !important;
175176
}
176177

177178
/* Popups */
@@ -409,7 +410,7 @@ a.command:hover {
409410
padding: .4em;
410411
}
411412

412-
#small-icons {
413+
.small-icons {
413414
min-width: 120px;
414415
display: -ms-flexbox;
415416
display: flex;
@@ -418,8 +419,8 @@ a.command:hover {
418419
flex-direction: row;
419420
}
420421

421-
#small-icons .holder {
422-
padding: 0.2em;
422+
.small-icons .holder {
423+
padding: 0.2em !important;
423424
}
424425

425426
.roundsymbol {
@@ -575,7 +576,7 @@ div.expandable-content {
575576

576577
div.load-drag-target {
577578
height: 160px;
578-
background: #ddd;
579+
background: #e0e0e0;
579580
border: 1px solid #aaa;
580581
border-radius: 9px;
581582
position: relative;
@@ -832,7 +833,7 @@ input:checked + .menu-switch-slider:before {
832833
width: 100%;
833834
width: -moz-available;
834835
width: -webkit-fill-available;
835-
background: #ddd;
836+
background: #e0e0e0;
836837
border: 1px solid #aaa;
837838
margin: 5px 2px 5px 1px;
838839
border-radius: 5px;

0 commit comments

Comments
 (0)