Watch
0
0
Fork
You've already forked hyperhive
0

swarm ui: landmarks, a skip link, a page heading, named repeated buttons and a log role on the terminal

The shell now has a main landmark that takes the focus when a page opens, a skip link as the first Tab stop, a labelled nav, aria-current on the active tab, and a hidden h1 with the page's name (no page drew one). The tab close button and tab link get a visible focus ring and a larger target. Repeated edit, remove, delete, fire now, pause, duplicate buttons and the icon-only terminal, expand and close badges get a name that says what they act on (Button gains ariaLabel). A badge can be pressed (aria-pressed), used for the internet modes and the SSH target form, whose fake tablist is now a labelled group. The terminal is a focusable role=log with live announcements off, and a latest badge scrolls back to the newest row once the operator has scrolled up and the terminal has stopped following.
This commit is contained in:
iris 2026-11-19 18:49:10 +01:00 • committed by mara
commit c9e6cd2e61

View file

@ -17,6 +17,7 @@ export function Button({
busy = false,
onClick,
describedBy,
ariaLabel,
children,
}: {
variant?: ButtonVariant;
@ -29,6 +30,9 @@ export function Button({
onClick?: (e: Event) => void;
/** Id of the element that says why the button is disabled. */
describedBy?: string;
/** A name that says what the button acts on, where its visible text repeats
* across a list ("remove", "edit"). It should start with the visible text. */
ariaLabel?: string;
children: ComponentChildren;
}) {
return (
@ -39,6 +43,7 @@ export function Button({
aria-busy={busy || undefined}
onClick={onClick}
aria-describedby={describedBy}
aria-label={ariaLabel}
>
<span class="ui-button-label">{children}</span>
{busy ? (