mirror of
https://github.com/librespeed/speedtest.git
synced 2026-08-27 03:46:58 +00:00
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:
parent
da29334083
commit
03d62a0ca1
8 changed files with 27 additions and 8 deletions
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue