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
|
|
@ -60,15 +60,18 @@ function startStop(){
|
|||
s.abort();
|
||||
data=null;
|
||||
I("startStopBtn").className="";
|
||||
I("startStopBtn").setAttribute("aria-label","Start");
|
||||
initUI();
|
||||
}else{
|
||||
//test is not running, begin
|
||||
I("startStopBtn").className="running";
|
||||
I("startStopBtn").setAttribute("aria-label","Abort");
|
||||
s.onupdate=function(data){
|
||||
uiData=data;
|
||||
};
|
||||
s.onend=function(aborted){
|
||||
I("startStopBtn").className="";
|
||||
I("startStopBtn").setAttribute("aria-label","Start");
|
||||
updateUI(true);
|
||||
};
|
||||
s.start();
|
||||
|
|
@ -225,7 +228,7 @@ function initUI(){
|
|||
<body>
|
||||
<h1>LibreSpeed Example</h1>
|
||||
<div id="testWrapper">
|
||||
<button id="startStopBtn" onclick="startStop()"></button>
|
||||
<button id="startStopBtn" onclick="startStop()" aria-label="Start"></button>
|
||||
<div id="test">
|
||||
<div class="testGroup">
|
||||
<div class="testArea2">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue