Skip to content

fix(decrypt): a11y for DecryptionProgress + keep label announceable in banner#250

Merged
rubenhensen merged 3 commits into
mainfrom
decrypt-progress-a11y
Jun 4, 2026
Merged

fix(decrypt): a11y for DecryptionProgress + keep label announceable in banner#250
rubenhensen merged 3 commits into
mainfrom
decrypt-progress-a11y

Conversation

@rubenhensen

Copy link
Copy Markdown
Contributor

Summary

Combines the a11y improvements originally proposed in #242 with the visually-hidden adjustment needed after the success-banner refactor that landed in #249.

  • WCAG 2.2 AA (4.1.3 Status Messages): DecryptionProgress now announces the Yivi → Decrypting transition via role="status" aria-live="polite".
  • Indeterminate progressbar: drop aria-valuemin/aria-valuemax (only meaningful with aria-valuenow) and add aria-busy="true".
  • Removal-context comment: trim the 5-line block above the result.plaintext ?? files[0] fallback to a single-line invariant.
  • Banner label: swap display: none on the in-banner .label for visually-hidden CSS so the new aria-live region still announces when the banner is the visual container.

Closes #138. Supersedes #242 (#242 predates the banner refactor and would now hide the live region).

Test plan

  • npx svelte-check --threshold warning (0 errors, 0 warnings)
  • VoiceOver/NVDA announces "Downloading and decrypting locally…" when decrypt state flips
  • Indeterminate bar renders correctly without min/max

dobby-coder Bot and others added 2 commits June 4, 2026 13:38
Follow-up to #241.

- Wrap DecryptionProgress in `role="status" aria-live="polite"` so the
  Yivi → Decrypting transition is announced to assistive tech (WCAG
  4.1.3 Status Messages).
- Indeterminate progressbar: drop `aria-valuemin`/`aria-valuemax`
  (only meaningful alongside `aria-valuenow`) and add
  `aria-busy="true"`.
- Trim the multi-line removal-context comment in fallback/Decrypt.svelte
  to a single line stating the current invariant.

Closes #138
… banner

Switch from display:none to visually-hidden (clip) so the aria-live
status region added in #242 still announces the Yivi → Decrypting
transition while the banner message owns the visual messaging.
@dobby-coder

dobby-coder Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Dobby has received the request! Routing to the right specialist now...

@dobby-coder dobby-coder Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code review

Small, focused a11y fix: adds role="status"/aria-live="polite" to DecryptionProgress, swaps aria-valuemin/max for aria-busy on the indeterminate bar, and replaces display:none with visually-hidden CSS on the banner label so the live region remains announceable. svelte-check passes 0/0.

</script>

<div class="container">
<div class="container" role="status" aria-live="polite">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[Code review] role="status" has an implicit aria-atomic="true", so on the determinate branch the whole region is re-announced each time decryptPct ticks an integer. Progress is already conveyed via the inner role="progressbar" + aria-valuenow — consider scoping the live region to the label or marking .percent with aria-live="off" to reduce chatter. Not a blocker.

…debug sandbox

- DecryptionProgress: move role=status onto the .label only, drop the
  container-level live region and the aria-busy on the indeterminate
  progressbar. Prevents per-tick percentage spam in determinate mode and
  removes the widget-inside-live-region anti-pattern.
- download/+page.svelte: revert the in-banner label to display:none, and
  promote the banner-row <p> to role=status so both Decrypting and Done
  transitions are announced from one place. Capture caught errors and
  render a ReportErrorButton under ServerError.
- ReportErrorButton: small reusable inline reporter that reuses
  filesharing.crash.* i18n keys and the existing Glitchtip-backed
  reportError() client. Self-hides without a DSN.
- debug/download-flow: dev-only sandbox that drives the full state
  machine by hand — auto-play scenarios, manual percentage slider,
  retry-status toggle, and a preview of the ServerError report button.
@rubenhensen

Copy link
Copy Markdown
Contributor Author

/dobby review

@dobby-coder

dobby-coder Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Dobby has received the request! Routing to the right specialist now...

@dobby-coder dobby-coder Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code review

Stage 1 approved: prior aria-atomic concern is cleanly resolved — role="status" scoped to the .label only, no aria-busy on the indeterminate progressbar, banner uses its own role="status" <p>. Build + svelte-check clean.

Rule compliance

[Rule: promised-vs-delivered] PR body lists two changes that aren't in the diff:

  • DecryptionProgress.svelte: "add aria-busy="true"" — not present (Stage 1 notes this was intentionally dropped).
  • download/+page.svelte banner: "swap display: none on the in-banner .label for visually-hidden CSS" — selector at download/+page.svelte:629-630 still has display: none.

The implemented behavior is fine; please update the PR description so it matches what's shipping.

@rubenhensen rubenhensen merged commit 277712b into main Jun 4, 2026
7 checks passed
@rubenhensen rubenhensen deleted the decrypt-progress-a11y branch June 4, 2026 12:24
dobby-coder Bot added a commit that referenced this pull request Jun 19, 2026
Resolve conflict in DecryptionProgress.svelte. Main (#250) already added
status-message a11y by putting role="status" on the label paragraph; kept
that to avoid a duplicate live region on the container. Kept this branch's
aria-busy="true" on the indeterminate progressbar.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

We need a progress bar for downloading and decrypting.

1 participant