Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/lib/components/fallback/Decrypt.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,8 @@
},
})

// pg-js auto-unwraps `data:`-mode payloads (single-entry zip
// with `data.bin`) into DecryptDataResult.plaintext. Email
// fallback uploads are always `data:` mode, so this branch is
// the expected one. If we ever receive a multi-file result
// here, fall back to the first entry's bytes.
// Email fallback uploads are `data:` mode → plaintext;
// `files[0]` is a defensive fallback for unexpected shapes.
const plaintext =
result.plaintext ??
new Uint8Array(await result.files[0].blob.arrayBuffer())
Expand Down
5 changes: 2 additions & 3 deletions src/lib/components/filesharing/DecryptionProgress.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
let determinate = $derived(typeof percentage === 'number')
</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.

<p class="label" id="decryption-progress-label">
{$_('filesharing.decryptpanel.downloadingAndDecrypting')}
</p>
Expand All @@ -35,8 +35,7 @@
class="bar-track"
role="progressbar"
aria-labelledby="decryption-progress-label"
aria-valuemin="0"
aria-valuemax="100"
aria-busy="true"
>
<div class="bar-indeterminate"></div>
</div>
Expand Down
13 changes: 12 additions & 1 deletion src/routes/(app)/download/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,19 @@
padding: 0;
}

/* Hide the visual label inside the success banner (the banner message
above the bar conveys the same thing) but keep it accessible so the
aria-live region still announces the decrypt transition. */
.success-banner :global(.container .label) {
display: none;
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}

.banner-check {
Expand Down