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

View file

@ -14,12 +14,15 @@ export function Button({
type = "button",
disabled,
onClick,
describedBy,
children,
}: {
variant?: ButtonVariant;
type?: "button" | "submit";
disabled?: boolean;
onClick?: (e: Event) => void;
/** Id of the element that says why the button is disabled. */
describedBy?: string;
children: ComponentChildren;
}) {
return (
@ -28,6 +31,7 @@ export function Button({
type={type}
disabled={disabled}
onClick={onClick}
aria-describedby={describedBy}
>
{children}
</button>