Skip to content

a11y(downloads): native progressbar semantics + status announcements (#2342) - #2362

Merged
fl0rianr merged 1 commit into
kpoin/ui-testingfrom
feat/gui3-download-a11y
Jun 23, 2026
Merged

fl0rianr merged 1 commit into
kpoin/ui-testingfrom
feat/gui3-download-a11y

Conversation

@kpoineal

Copy link
Copy Markdown
Collaborator

Summary

Fixes download progress in DownloadManager.tsx which was visual-only — only an �ria-label="NN%" on a plain

, which is insufficient for screen readers.

What changed

prototype/ui-redesign/src/components/DownloadManager.tsx (~line 283 / ~line 252):

  1. Progress bar — replaced the bare

    with a proper
    ole="progressbar" element carrying �ria-valuenow, �ria-valuemin={0}, �ria-valuemax={100}, and an �ria-label that includes the model name (e.g. "Downloading Llama-3.1-8B: 42%"). The visual percentage text gets �ria-hidden="true" to prevent double-reading.

  2. Status live region — added an always-present
    ole="status" aria-live="polite" aria-atomic="true" sr-only live region inside the panel. It announces status transitions only (start / complete / error / cancelled / paused / resumed) — never on every percentage tick. Clears when the panel closes to prevent stale announcements on reopen.

prototype/ui-redesign/tests/a11y.spec.ts — 4 new tests (A35–A38):

  • A35:
    ole="progressbar" is present on the active download row
  • A36: �ria-valuenow matches percent; �ria-valuemin=0; �ria-valuemax=100
  • A37: �ria-label includes the model name
  • A38: sr-only status live region is present when the panel is open

prototype/ui-redesign/ACCESSIBILITY.md — updated #2342 entry, test count table 34→38.

Note on prior work

fl0rianr's earlier �ria-label="NN%" was a good first step and showed the right intent. This PR extends it to the full ARIA progressbar pattern required by WCAG 4.1.2 and expected by NVDA/JAWS/VoiceOver.

Test result

54 passed, 7 skipped, 0 failed
(baseline was 50 passed / 7 skipped; +4 new a11y tests)

Closes #2342

A human reviewer should check the live-region announcement timing feels natural with an actual screen reader before merging.

@github-actions github-actions Bot added web ui enhancement New feature or request labels Jun 22, 2026
@kpoineal

Copy link
Copy Markdown
Collaborator Author

Internal review: LGTM (advisory — human approval required)

Authored by Mattingly; reviewed by Lovell.

  • DownloadManager.tsx ~line 326 — progressbar (a11y: Download progress is visual only #2342): role="progressbar" with aria-valuenow/aria-valuemin=0/aria-valuemax=100 and a model-name-qualified aria-label is the correct native ARIA pattern. Visual percentage <span> gets aria-hidden="true" — avoids double-reading. ✅
  • Status live region: Always-present role="status" aria-live="polite" aria-atomic="true" .sr-only fires only on status transitions (start/complete/error/cancel/pause/resume), never on every percentage tick. prevStatusRef initialization skips spurious on-mount announcement. Cleared on isVisible=false to prevent stale re-reads on reopen. This is the correct implementation of the "announce transitions, not frames" requirement. ✅
  • Tests A35–A38: A36 (exact aria-valuenow=42, aria-valuemin=0, aria-valuemax=100) is a strong structural assertion. A37 (model name in label). A38 verifies the live region is attached inside the panel. Per the documented test limitation, live region announcement content is not testable in Playwright without an AT driver — acceptable.
  • DownloadStatus type now imported — diff confirms the import was added. ✅
  • No behavior or visual regressions detected.

@kpoineal

Copy link
Copy Markdown
Collaborator Author

Rebased onto merged base a8718a7. Conflicts resolved in ests/a11y.spec.ts (branch's new tests renumbered to A59–A62) and ACCESSIBILITY.md (union merge). Final suite: 65 passed / 7 skipped / 0 failed. — Mattingly

@kpoineal
kpoineal force-pushed the feat/gui3-download-a11y branch 2 times, most recently from 580c689 to c55b766 Compare June 23, 2026 15:01
@kpoineal

Copy link
Copy Markdown
Collaborator Author

Rebase round 2 — rebased onto \kpoin/ui-testing\ @ e0d1c92 (#2360 backend merged)

Conflicts resolved in \ ests/a11y.spec.ts\ and \ACCESSIBILITY.md\ by keeping both sides (base's A35–A45 presets + A51–A58 backend AND this branch's A59–A62 download tests). No renumbering needed — ranges already disjoint.

Final suite: 73 passed / 7 skipped / 0 failed

— Mattingly

…announcements

Closes #2342

- DownloadManager.tsx: replace bare aria-label="NN%" div with proper
  role="progressbar" + aria-valuenow / aria-valuemin=0 / aria-valuemax=100.
  aria-label now includes the model name e.g. "Downloading Llama-3.1-8B: 42%".
  Visual percent span gets aria-hidden="true" to prevent double-reading.
- Added always-present sr-only role="status" aria-live="polite" aria-atomic="true"
  live region inside the panel. Announces status transitions (start / complete /
  error / cancelled / paused / resumed) -- never fires on every percentage tick.
  Clears when the panel closes to prevent stale announcements on reopen.
- Tests A35-A38 added (4 new): role=progressbar present, valuenow/min/max correct,
  model name in label, sr-only live region exists.
- ACCESSIBILITY.md updated: #2342 entry, test count 34->38 in table.

Test result: 54 passed, 7 skipped, 0 failed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@kpoineal
kpoineal force-pushed the feat/gui3-download-a11y branch from c55b766 to 4ed6f6c Compare June 23, 2026 15:48
@kpoineal

Copy link
Copy Markdown
Collaborator Author

Rebase round 3 complete — rebased onto \kpoin/ui-testing\ @ 7eb0c6c (post #2359 models merge).

Conflicts resolved by keeping both sides:

  • \ ests/a11y.spec.ts: retained base A35–A58 (presets/models/backend) and this branch's A59–A62 (download progress bar). No renumbering.
  • \ACCESSIBILITY.md: union-merged both sides' table rows and last-updated line.

Full suite result: 78 passed / 7 skipped / 0 failed. Branch force-pushed to \origin/feat/gui3-download-a11y.

— Mattingly

@fl0rianr fl0rianr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fl0rianr
fl0rianr merged commit 1c3bb93 into kpoin/ui-testing Jun 23, 2026
17 checks passed
@fl0rianr
fl0rianr deleted the feat/gui3-download-a11y branch June 23, 2026 16:04
fl0rianr pushed a commit that referenced this pull request Jul 17, 2026
…announcements (#2362)

Closes #2342

- DownloadManager.tsx: replace bare aria-label="NN%" div with proper
  role="progressbar" + aria-valuenow / aria-valuemin=0 / aria-valuemax=100.
  aria-label now includes the model name e.g. "Downloading Llama-3.1-8B: 42%".
  Visual percent span gets aria-hidden="true" to prevent double-reading.
- Added always-present sr-only role="status" aria-live="polite" aria-atomic="true"
  live region inside the panel. Announces status transitions (start / complete /
  error / cancelled / paused / resumed) -- never fires on every percentage tick.
  Clears when the panel closes to prevent stale announcements on reopen.
- Tests A35-A38 added (4 new): role=progressbar present, valuenow/min/max correct,
  model name in label, sr-only live region exists.
- ACCESSIBILITY.md updated: #2342 entry, test count 34->38 in table.

Test result: 54 passed, 7 skipped, 0 failed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request web ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants