Skip to content

Commit da29334

Browse files
Copilotsstidl
andauthored
Fix accessibility: replace div#startStopBtn with <button> in classic design (#782)
* Initial plan * Replace div#startStopBtn with button element for keyboard accessibility Agent-Logs-Url: https://github.com/librespeed/speedtest/sessions/f3d60a26-754c-48da-9672-542810806f72 Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>
1 parent dce0bdd commit da29334

8 files changed

Lines changed: 24 additions & 8 deletions

examples/example-multipleServers-full.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@
230230
color:#6060AA;
231231
background-color:rgba(0,0,0,0);
232232
border:0.15em solid #6060FF;
233+
padding:0;
234+
font:inherit;
233235
border-radius:0.3em;
234236
transition:all 0.3s;
235237
box-sizing:border-box;
@@ -402,7 +404,7 @@ <h1>LibreSpeed Example</h1>
402404
<p id="message"><span class="loadCircle"></span>Selecting a server...</p>
403405
</div>
404406
<div id="testWrapper" class="hidden">
405-
<div id="startStopBtn" onclick="startStop()"></div><br/>
407+
<button id="startStopBtn" onclick="startStop()"></button><br/>
406408
<a class="privacy" href="#" onclick="I('privacyPolicy').style.display=''">Privacy</a>
407409
<div id="serverArea">
408410
Server: <select id="server" onchange="s.setSelectedServer(SPEEDTEST_SERVERS[this.value])"></select>

examples/example-multipleServers-pretty.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@
117117
color:#6060AA;
118118
background-color:rgba(0,0,0,0);
119119
border:0.15em solid #6060FF;
120+
padding:0;
121+
font:inherit;
120122
border-radius:0.3em;
121123
transition:all 0.3s;
122124
box-sizing:border-box;
@@ -205,7 +207,7 @@
205207
</head>
206208
<body>
207209
<h1>LibreSpeed Example</h1>
208-
<div id="startStopBtn" onclick="startStop()"></div>
210+
<button id="startStopBtn" onclick="startStop()"></button>
209211
<div id="serverId">Selecting server...</div>
210212
<div id="test">
211213
<div class="testGroup">

examples/example-singleServer-customSettings.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666
color:#6060AA;
6767
background-color:rgba(0,0,0,0);
6868
border:0.15em solid #6060FF;
69+
padding:0;
70+
font:inherit;
6971
border-radius:0.3em;
7072
transition:all 0.3s;
7173
box-sizing:border-box;
@@ -151,7 +153,7 @@
151153
</head>
152154
<body>
153155
<h1>LibreSpeed Example</h1>
154-
<div id="startStopBtn" onclick="startStop()"></div>
156+
<button id="startStopBtn" onclick="startStop()"></button>
155157
<div id="test">
156158
<div class="testGroup">
157159
<div class="testArea">

examples/example-singleServer-gauges.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@
127127
color:#6060AA;
128128
background-color:rgba(0,0,0,0);
129129
border:0.15em solid #6060FF;
130+
padding:0;
131+
font:inherit;
130132
border-radius:0.3em;
131133
transition:all 0.3s;
132134
box-sizing:border-box;
@@ -223,7 +225,7 @@
223225
<body>
224226
<h1>LibreSpeed Example</h1>
225227
<div id="testWrapper">
226-
<div id="startStopBtn" onclick="startStop()"></div>
228+
<button id="startStopBtn" onclick="startStop()"></button>
227229
<div id="test">
228230
<div class="testGroup">
229231
<div class="testArea2">

examples/example-singleServer-modern.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@
8484
color:#fff;
8585
background-color:#007bff;
8686
border:none;
87+
padding:0;
88+
font:inherit;
8789
border-radius:0.3em;
8890
transition:all 0.3s;
8991
box-sizing:border-box;
@@ -188,7 +190,7 @@
188190
</head>
189191
<body>
190192
<h1>LibreSpeed</h1>
191-
<div id="startStopBtn" onclick="startStop()"></div>
193+
<button id="startStopBtn" onclick="startStop()"></button>
192194
<div id="test">
193195
<div class="testGroup">
194196
<div class="testArea">

examples/example-singleServer-pretty.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666
color:#6060AA;
6767
background-color:rgba(0,0,0,0);
6868
border:0.15em solid #6060FF;
69+
padding:0;
70+
font:inherit;
6971
border-radius:0.3em;
7072
transition:all 0.3s;
7173
box-sizing:border-box;
@@ -154,7 +156,7 @@
154156
</head>
155157
<body>
156158
<h1>LibreSpeed Example</h1>
157-
<div id="startStopBtn" onclick="startStop()"></div>
159+
<button id="startStopBtn" onclick="startStop()"></button>
158160
<div id="test">
159161
<div class="testGroup">
160162
<div class="testArea">

examples/example-singleServer-progressBar.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@
6868
color:#6060AA;
6969
background-color:rgba(0,0,0,0);
7070
border:0.15em solid #6060FF;
71+
padding:0;
72+
font:inherit;
7173
border-radius:0.3em;
7274
transition:all 0.3s;
7375
box-sizing:border-box;
@@ -173,7 +175,7 @@
173175
</head>
174176
<body>
175177
<h1>LibreSpeed Example</h1>
176-
<div id="startStopBtn" onclick="startStop()"></div>
178+
<button id="startStopBtn" onclick="startStop()"></button>
177179
<div id="test">
178180
<div id="progressBar"><div id="progress"></div></div>
179181
<div class="testGroup">

index-classic.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@
252252
color: #6060AA;
253253
background-color: rgba(0, 0, 0, 0);
254254
border: 0.15em solid #6060FF;
255+
padding: 0;
256+
font: inherit;
255257
border-radius: 0.3em;
256258
transition: all 0.3s;
257259
box-sizing: border-box;
@@ -490,7 +492,7 @@ <h1>LibreSpeed</h1>
490492
<p id="message"><span class="loadCircle"></span>Selecting a server...</p>
491493
</div>
492494
<div id="testWrapper" class="hidden">
493-
<div id="startStopBtn" onclick="startStop()"></div><br />
495+
<button id="startStopBtn" onclick="startStop()"></button><br />
494496
<a class="privacy" href="#" onclick="I('privacyPolicy').style.display=''">Privacy</a>
495497
<div id="serverArea">
496498
Server: <select id="server" onchange="s.setSelectedServer(SPEEDTEST_SERVERS[this.value])"></select>

0 commit comments

Comments
 (0)