Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion examples/example-multipleServers-full.html
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@
color:#6060AA;
background-color:rgba(0,0,0,0);
border:0.15em solid #6060FF;
padding:0;
font:inherit;
border-radius:0.3em;
transition:all 0.3s;
box-sizing:border-box;
Expand Down Expand Up @@ -402,7 +404,7 @@ <h1>LibreSpeed Example</h1>
<p id="message"><span class="loadCircle"></span>Selecting a server...</p>
</div>
<div id="testWrapper" class="hidden">
<div id="startStopBtn" onclick="startStop()"></div><br/>
<button id="startStopBtn" onclick="startStop()"></button><br/>
<a class="privacy" href="#" onclick="I('privacyPolicy').style.display=''">Privacy</a>
<div id="serverArea">
Server: <select id="server" onchange="s.setSelectedServer(SPEEDTEST_SERVERS[this.value])"></select>
Expand Down
4 changes: 3 additions & 1 deletion examples/example-multipleServers-pretty.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@
color:#6060AA;
background-color:rgba(0,0,0,0);
border:0.15em solid #6060FF;
padding:0;
font:inherit;
border-radius:0.3em;
transition:all 0.3s;
box-sizing:border-box;
Expand Down Expand Up @@ -205,7 +207,7 @@
</head>
<body>
<h1>LibreSpeed Example</h1>
<div id="startStopBtn" onclick="startStop()"></div>
<button id="startStopBtn" onclick="startStop()"></button>
<div id="serverId">Selecting server...</div>
<div id="test">
<div class="testGroup">
Expand Down
4 changes: 3 additions & 1 deletion examples/example-singleServer-customSettings.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
color:#6060AA;
background-color:rgba(0,0,0,0);
border:0.15em solid #6060FF;
padding:0;
font:inherit;
border-radius:0.3em;
transition:all 0.3s;
box-sizing:border-box;
Expand Down Expand Up @@ -151,7 +153,7 @@
</head>
<body>
<h1>LibreSpeed Example</h1>
<div id="startStopBtn" onclick="startStop()"></div>
<button id="startStopBtn" onclick="startStop()"></button>
<div id="test">
<div class="testGroup">
<div class="testArea">
Expand Down
4 changes: 3 additions & 1 deletion examples/example-singleServer-gauges.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@
color:#6060AA;
background-color:rgba(0,0,0,0);
border:0.15em solid #6060FF;
padding:0;
font:inherit;
border-radius:0.3em;
transition:all 0.3s;
box-sizing:border-box;
Expand Down Expand Up @@ -223,7 +225,7 @@
<body>
<h1>LibreSpeed Example</h1>
<div id="testWrapper">
<div id="startStopBtn" onclick="startStop()"></div>
<button id="startStopBtn" onclick="startStop()"></button>
<div id="test">
<div class="testGroup">
<div class="testArea2">
Expand Down
4 changes: 3 additions & 1 deletion examples/example-singleServer-modern.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
color:#fff;
background-color:#007bff;
border:none;
padding:0;
font:inherit;
border-radius:0.3em;
transition:all 0.3s;
box-sizing:border-box;
Expand Down Expand Up @@ -188,7 +190,7 @@
</head>
<body>
<h1>LibreSpeed</h1>
<div id="startStopBtn" onclick="startStop()"></div>
<button id="startStopBtn" onclick="startStop()"></button>
<div id="test">
<div class="testGroup">
<div class="testArea">
Expand Down
4 changes: 3 additions & 1 deletion examples/example-singleServer-pretty.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
color:#6060AA;
background-color:rgba(0,0,0,0);
border:0.15em solid #6060FF;
padding:0;
font:inherit;
border-radius:0.3em;
transition:all 0.3s;
box-sizing:border-box;
Expand Down Expand Up @@ -154,7 +156,7 @@
</head>
<body>
<h1>LibreSpeed Example</h1>
<div id="startStopBtn" onclick="startStop()"></div>
<button id="startStopBtn" onclick="startStop()"></button>
<div id="test">
<div class="testGroup">
<div class="testArea">
Expand Down
4 changes: 3 additions & 1 deletion examples/example-singleServer-progressBar.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
color:#6060AA;
background-color:rgba(0,0,0,0);
border:0.15em solid #6060FF;
padding:0;
font:inherit;
border-radius:0.3em;
transition:all 0.3s;
box-sizing:border-box;
Expand Down Expand Up @@ -173,7 +175,7 @@
</head>
<body>
<h1>LibreSpeed Example</h1>
<div id="startStopBtn" onclick="startStop()"></div>
<button id="startStopBtn" onclick="startStop()"></button>
<div id="test">
<div id="progressBar"><div id="progress"></div></div>
<div class="testGroup">
Expand Down
4 changes: 3 additions & 1 deletion index-classic.html
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@
color: #6060AA;
background-color: rgba(0, 0, 0, 0);
border: 0.15em solid #6060FF;
padding: 0;
font: inherit;
border-radius: 0.3em;
transition: all 0.3s;
box-sizing: border-box;
Expand Down Expand Up @@ -490,7 +492,7 @@ <h1>LibreSpeed</h1>
<p id="message"><span class="loadCircle"></span>Selecting a server...</p>
</div>
<div id="testWrapper" class="hidden">
<div id="startStopBtn" onclick="startStop()"></div><br />
<button id="startStopBtn" onclick="startStop()"></button><br />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Button lacks accessible name 🐞 Bug ≡ Correctness

The new <button id="startStopBtn"> elements are empty and rely on CSS #startStopBtn:before /
.running:before to render “Start/Abort”, which does not provide an accessible name to assistive
technologies. Screen readers will announce an unnamed button, and the control’s state (Start vs
Abort) is not exposed via an accessible label across index-classic.html and all updated example
pages.
Agent Prompt
## Issue description
`#startStopBtn` is now a real `<button>`, but it has no accessible name because the visible “Start/Abort” text is injected via CSS `:before`. Screen readers will announce an unnamed button and won’t know whether it starts or aborts the test.

## Issue Context
Across `index-classic.html` and the example pages, the label is currently implemented via:
- `#startStopBtn:before { content: "Start" }`
- `#startStopBtn.running:before { content: "Abort" }`

JavaScript toggles the `running` class but never updates any accessible label/state.

## Fix approach
Prefer one of these:
1) **Recommended:** Put real text in the button and update it from JS (and remove/ignore the CSS `:before` content), OR
2) Keep the CSS visual label but add and maintain **`aria-label`** (and optionally `aria-pressed`) in JS whenever `running` is toggled.

### Minimal change (works with existing CSS)
- In HTML, initialize:
  - `aria-label="Start"` (and optionally `aria-pressed="false"`)
- In JS, whenever setting `className = "running"`:
  - set `aria-label` to `"Abort"` (and `aria-pressed="true"`)
- Whenever clearing `className` (abort/end):
  - set `aria-label` to `"Start"` (and `aria-pressed="false"`)

## Fix Focus Areas
- index-classic.html[132-167]
- index-classic.html[277-283]
- index-classic.html[494-496]
- examples/example-multipleServers-full.html[123-160]
- examples/example-multipleServers-full.html[407-408]
- examples/example-multipleServers-pretty.html[33-87]
- examples/example-multipleServers-pretty.html[210-210]
- examples/example-singleServer-customSettings.html[19-39]
- examples/example-singleServer-customSettings.html[156-156]
- examples/example-singleServer-gauges.html[55-76]
- examples/example-singleServer-gauges.html[228-228]
- examples/example-singleServer-modern.html[17-65]
- examples/example-singleServer-modern.html[193-193]
- examples/example-singleServer-pretty.html[20-36]
- examples/example-singleServer-pretty.html[159-160]
- examples/example-singleServer-progressBar.html[11-38]
- examples/example-singleServer-progressBar.html[178-178]ক্রান্ত

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

<a class="privacy" href="#" onclick="I('privacyPolicy').style.display=''">Privacy</a>
<div id="serverArea">
Server: <select id="server" onchange="s.setSelectedServer(SPEEDTEST_SERVERS[this.value])"></select>
Expand Down
Loading