Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui try-out: stable live region, reasons for disabled buttons

The running line is a live region whose text changed every second, so a
screen reader announced the counter again each time. The sentence is now
stable and the elapsed seconds sit outside it.

The run and open-a-PR buttons point at the hint that says why they are
off, and add-a-classification says why it is off at the cap.
This commit is contained in:
iris 2026-10-21 21:30:01 +02:00 • committed by mara
commit e03bd4caa4
5 changed files with 53 additions and 11 deletions

View file

@ -5,6 +5,8 @@
import assert from "node:assert/strict";
import { test } from "node:test";
import {
MAX_CLASSIFICATIONS,
addProblem,
draftFromRule,
draftProblem,
duplicateName,
@ -17,6 +19,12 @@ import {
toBody,
} from "../src/pages/review-tryout/TryOutTypes.ts";
test("a row is offered until the endpoint's cap is reached", () => {
assert.equal(addProblem(1), null);
assert.equal(addProblem(MAX_CLASSIFICATIONS - 1), null);
assert.match(addProblem(MAX_CLASSIFICATIONS), /at most 10 classifications/);
});
// A row ready to send, with `over` replacing any of its fields.
function row(over = {}) {
return {