Skip to content

Commit 5e097f9

Browse files
fix(filesharing): announce decrypt progress to AT, trim removal comment
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
1 parent 52bfed7 commit 5e097f9

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

src/lib/components/fallback/Decrypt.svelte

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,8 @@
104104
},
105105
})
106106
107-
// pg-js auto-unwraps `data:`-mode payloads (single-entry zip
108-
// with `data.bin`) into DecryptDataResult.plaintext. Email
109-
// fallback uploads are always `data:` mode, so this branch is
110-
// the expected one. If we ever receive a multi-file result
111-
// here, fall back to the first entry's bytes.
107+
// Email fallback uploads are `data:` mode → plaintext;
108+
// `files[0]` is a defensive fallback for unexpected shapes.
112109
const plaintext =
113110
result.plaintext ??
114111
new Uint8Array(await result.files[0].blob.arrayBuffer())

src/lib/components/filesharing/DecryptionProgress.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
let determinate = $derived(typeof percentage === 'number')
1111
</script>
1212

13-
<div class="container">
13+
<div class="container" role="status" aria-live="polite">
1414
<p class="label" id="decryption-progress-label">
1515
{$_('filesharing.decryptpanel.downloadingAndDecrypting')}
1616
</p>
@@ -35,8 +35,7 @@
3535
class="bar-track"
3636
role="progressbar"
3737
aria-labelledby="decryption-progress-label"
38-
aria-valuemin="0"
39-
aria-valuemax="100"
38+
aria-busy="true"
4039
>
4140
<div class="bar-indeterminate"></div>
4241
</div>

0 commit comments

Comments
 (0)