Skip to content

a11y: ARIA baseline for chat-widget surface (phase 1 of #1099) - #1103

Merged
joelteply merged 3 commits into
CambrianTech:canaryfrom
RebelTechPro:feat/a11y-baseline
May 13, 2026
Merged

joelteply merged 3 commits into
CambrianTech:canaryfrom
RebelTechPro:feat/a11y-baseline

Conversation

@RebelTechPro

Copy link
Copy Markdown
Collaborator

Summary

  • Phase 1 of Accessibility baseline: ARIA labels, roles, keyboard nav, aria-live for AI status #1099 — additive ARIA only, behavior-preserving.
  • Adds landmark + live-region semantics to ChatWidget (region/log/status), the AIStatusIndicator (role=status + aria-live=polite per indicator, aria-label on dismiss button), and UserListWidget action buttons (aria-label mirroring title=, which screen readers don't reliably expose).
  • Scoped intentionally tight: no behavior changes, no listbox/option semantics on lists (phase 2), no focus-trap on modals, no theme-contrast pass. See the issue for follow-up phases.

Why these specific surfaces

A grep showed ~12 a11y attributes across all 36 widgets — almost all alt=. Chat is the highest-traffic surface and the AI status indicator is the one place the system streams state the user can't see otherwise (thinking → generating → posted). Without aria-live, screen-reader users get none of that signal.

Test plan

  • npm run build:ts → ✅ green (verified locally — TypeScript compilation succeeded)
  • Visual regression: send a message in General, verify chat looks identical to main
  • Trigger an AI response, verify status indicator still appears/dismisses as before
  • Screen reader smoke test (VoiceOver or NVDA): new message announced, AI status announced as it changes, dismiss button has a meaningful name
  • Keyboard: Tab into composer textarea, focus visible; Tab to Send button, accessible name "Send message"

Out of scope (phase 2/3, tracked under #1099)

  • role=listbox / role=option on room-list and user-list with arrow-key navigation
  • Focus trap on modals + Escape-to-close
  • Message-row aria-label (author + timestamp) on each chat message
  • Color-contrast audit across the six themes
  • <div onclick> → <button> migration for click-only divs
  • axe-core lint gate in CI

Closes nothing — keeps #1099 open as the umbrella tracking the remaining phases.

Phase 1 of CambrianTech#1099. Adds landmark roles, aria-live regions, and accessible
names to the most-used surfaces. Behavior-preserving — only attributes added.

- AIStatusIndicator: role=status + aria-live=polite on each indicator;
  aria-hidden on decorative emoji; aria-label on dismiss button names
  the persona being dismissed.
- ChatWidget renderTemplate: region landmark on the chat container,
  role=log + aria-live=polite + aria-relevant=additions on the message
  transcript, role=status on the AI activity and typing indicator
  containers.
- ChatWidget renderFooter: role=group + aria-label on the composer,
  aria-label on textarea and send button, aria-label on attachment
  preview region.
- UserListWidget: aria-label on the call/favorite/action buttons
  (mirrors the title attribute; titles are unreliable as accessible
  names). SVG icon marked aria-hidden + focusable=false.

Out of scope (follow-ups in CambrianTech#1099 phase 2/3): listbox/option semantics
for room/user lists, focus-trap on modals, color-contrast pass across
themes, message-row aria-labels (author + timestamp).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@joelteply
joelteply changed the base branch from main to canary May 13, 2026 16:53
@joelteply
joelteply marked this pull request as ready for review May 13, 2026 17:10
@joelteply
joelteply merged commit f8ddd7d into CambrianTech:canary May 13, 2026
2 of 3 checks passed
joelteply added a commit that referenced this pull request May 14, 2026
Builds on phase 1 (PR #1103). Behavior-preserving — adds ARIA
listbox/option semantics + keyboard navigation to the room and user
lists, plus accessible labels on chat message rows so screen readers
can navigate transcript message-by-message.

ReactiveListWidget — base class additions:
  - role="listbox" + aria-label (from listTitle) on the default
    container in `render()`. Subclasses that override render() add
    role=listbox locally (see RoomList/UserList below).
  - getRenderFunction sets role="option" + tabindex=0 + aria-label
    (via new virtual `getItemLabel()`) + aria-selected on every
    .list-item wrapper.
  - Enter / Space on a focused item activates it (mirrors click).
  - New `onListKeydown` handler attached in firstUpdated():
    ArrowDown / ArrowUp move focus between siblings, Home / End jump
    to first/last. Scoped to the container so it doesn't interfere
    with chat composer or other keyboard handling.

RoomListWidget:
  - role=listbox + aria-label="Rooms and direct messages" on the
    container in its render() override.
  - Overrides getItemLabel(): for rooms → "Room {name} — {topic}";
    for DMs → "Direct message with {name}" or "Group DM: {name},
    {count} members".

UserListWidget:
  - role=listbox + aria-label="Users and personas" on the container.
  - Overrides getItemLabel(): "{name}, {persona|agent|user}, {status}"
    so a screen reader hears the kind and presence state.

ChatWidget — getRenderFunction:
  - role="article" + aria-label on each .message-row (sender name +
    timestamp + " sending" if optimistic). Combined with phase 1's
    role=log + aria-live=polite on the messages-container, the chat
    transcript is now navigable per-message via screen reader rotor.

Out of scope (phase 3 follow-ups):
  - Dynamic aria-selected updates when the active room/user changes
    after initial render (current value is set at item-creation time
    only — limitation noted in PR description).
  - Roving tabindex (currently every item is tabindex=0).
  - Color-contrast audit across themes.
  - <div onclick> → <button> migration.
  - axe-core lint gate.

`npm run build:ts` is green. Not visually validated locally —
keyboard + screen-reader walkthrough is in the PR test plan.

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
joelteply added a commit that referenced this pull request Jun 2, 2026
`Airc::join(name)` calls `ChannelName::new(name)` which DERIVES a
fresh channel UUID from the name string. Passing the UUID we got
from `discover_default_channel()` as the "name" created a brand-
new parallel channel — Paige's subscribe registered on 5d33e2a7
while `airc msg` published to 11c1a7ac. Two channels, zero
fan-out overlap, silent forever.

Pinpointed via the daemon-side instrumentation in airc PR #1103
(card 800ce5bd) — one probe, one log line, the entire chat-carry
stall localised. Fix: join the room by its NAME (default
'continuum', overridable via CONTINUUM_ROOM).

Verified end-to-end: Paige receives the probe via
`Airc::subscribe()`, RAG surfaces 16 items, heuristic adapter
generates a response, `airc.say()` posts the reply, daemon log
confirms `subscribers_before=1 matched=1 sent_ok=1` for both the
probe and Paige's reply.

Bumps airc pin to f6ed190 (PR #1102 HEAD) for the loud-subscribe
diagnostics.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants