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
4 changed files with 218 additions and 17 deletions

View file

@ -149,6 +149,7 @@ export function AgentGroupPage({
<>
<Badge
value={<ExpandIcon />}
ariaLabel={`open ${key}'s terminal on its own`}
title={`maximize: open ${key}'s terminal on its own`}
onClick={() =>
open({
@ -159,6 +160,7 @@ export function AgentGroupPage({
/>
<Badge
value={<CloseIcon />}
ariaLabel={`take ${key} out of this group`}
title={`close: take ${key} out of this group`}
onClick={() =>
groups.update(id, (r) => removeAgent(r, key) ?? r)

View file

@ -159,7 +159,10 @@ export function NotificationRouter() {
onChange={(checked) => setBuiltin(flow.id, checked)}
/>
<ActionRow class="notify-flow-actions">
<Button onClick={() => draftFrom(flow.id)}>
<Button
onClick={() => draftFrom(flow.id)}
ariaLabel={`duplicate to edit ${flow.name}`}
>
duplicate to edit
</Button>
</ActionRow>
@ -188,7 +191,12 @@ export function NotificationRouter() {
onChange={(checked) => setBuiltin(af.key, checked)}
/>
<ActionRow class="notify-flow-actions">
<Button onClick={() => draftFrom(af.key)}>duplicate</Button>
<Button
onClick={() => draftFrom(af.key)}
ariaLabel={`duplicate ${af.key}`}
>
duplicate
</Button>
</ActionRow>
</div>
<div class="notify-flow-agents">
@ -232,13 +240,19 @@ export function NotificationRouter() {
</span>
<ActionRow class="notify-flow-actions">
<Button
ariaLabel={`edit ${flow.name}`}
onClick={() =>
navigate(`/notifications/${encodeURIComponent(flow.id)}`)
}
>
edit
</Button>
<Button onClick={() => draftFrom(flow.id)}>duplicate</Button>
<Button
onClick={() => draftFrom(flow.id)}
ariaLabel={`duplicate ${flow.name}`}
>
duplicate
</Button>
</ActionRow>
</div>
<FlowGraph flow={flow} hits={hitsOf(shown, flow.id)} />

View file

@ -77,7 +77,11 @@ export function ScheduleCard({
)}
</div>
<ActionRow align="end" class="ui-schedule-card-actions">
<Button onClick={onEdit} disabled={pending}>
<Button
onClick={onEdit}
disabled={pending}
ariaLabel={`edit ${schedule.name}`}
>
edit
</Button>
<span
@ -89,14 +93,26 @@ export function ScheduleCard({
: "fires it now: its start moves to this moment, so it repeats from now on"
}
>
<Button onClick={onFireNow} disabled={pending || schedule.paused}>
<Button
onClick={onFireNow}
disabled={pending || schedule.paused}
ariaLabel={`fire now ${schedule.name}`}
>
fire now
</Button>
</span>
<Button onClick={onTogglePaused} disabled={pending}>
<Button
onClick={onTogglePaused}
disabled={pending}
ariaLabel={`${schedule.paused ? "resume" : "pause"} ${schedule.name}`}
>
{schedule.paused ? "resume" : "pause"}
</Button>
<Button onClick={onRemove} disabled={pending}>
<Button
onClick={onRemove}
disabled={pending}
ariaLabel={`remove ${schedule.name}`}
>
remove
</Button>
</ActionRow>

View file

@ -91,7 +91,11 @@ function DomainSection({
{swarmWide.map((e) => (
<li key={e.domain}>
<code>{e.domain}</code>
<Button disabled={busy} onClick={() => void remove(e)}>
<Button
disabled={busy}
ariaLabel={`remove ${e.domain}`}
onClick={() => void remove(e)}
>
remove
</Button>
</li>