fix: add aria-label to startStopBtn for screen reader accessibility (#785)

Agent-Logs-Url: https://github.com/librespeed/speedtest/sessions/cfb05653-7d75-4f0d-9e9a-1765eeaa8903

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>
This commit is contained in:
Copilot 2026-04-13 07:56:17 +02:00 committed by GitHub
parent da29334083
commit 03d62a0ca1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 27 additions and 8 deletions

View file

@ -22,6 +22,7 @@ s.onupdate=function(data){ //callback to update data in UI
}
s.onend=function(aborted){ //callback for test ended/aborted
I("startStopBtn").className=""; //show start button again
I("startStopBtn").setAttribute("aria-label","Start");
if(aborted){ //if the test was aborted, clear the UI and prepare for new test
initUI();
}
@ -35,6 +36,7 @@ function startStop(){ //start/stop button pressed
//test is not running, begin
s.start();
I("startStopBtn").className="running";
I("startStopBtn").setAttribute("aria-label","Abort");
}
}
@ -153,7 +155,7 @@ function I(id){return document.getElementById(id);}
</head>
<body>
<h1>LibreSpeed Example</h1>
<button id="startStopBtn" onclick="startStop()"></button>
<button id="startStopBtn" onclick="startStop()" aria-label="Start"></button>
<div id="test">
<div class="testGroup">
<div class="testArea">