aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-04-18 09:01:45 +0000
committerFuwn <[email protected]>2026-04-18 09:01:45 +0000
commit41f1df039a7760a549b684484b534b8acaa464a8 (patch)
tree9b9077edc4a124452ad243d7748064d4f095775e
parentfix(schedule): stop duplicating first page in season pagination (diff)
downloaddue.moe-41f1df039a7760a549b684484b534b8acaa464a8.tar.xz
due.moe-41f1df039a7760a549b684484b534b8acaa464a8.zip
fix(user): pass actual description to badge preview alt text
The ParallaxImage alternativeText prop was passed as the literal string "selectedBadge.description" (quoted attribute syntax) instead of the expression, so every badge image rendered with that identifier name as its alt text. Switch to the expression form with a nullish-coalescing fallback so badges without a description render empty alt rather than the literal.
-rw-r--r--src/lib/User/BadgeWall/BadgePreview.svelte2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/User/BadgeWall/BadgePreview.svelte b/src/lib/User/BadgeWall/BadgePreview.svelte
index fd323564..e651a2aa 100644
--- a/src/lib/User/BadgeWall/BadgePreview.svelte
+++ b/src/lib/User/BadgeWall/BadgePreview.svelte
@@ -118,7 +118,7 @@ const onClick = (event: MouseEvent) => {
<a href={'#'} onclick={onClick} class="badge-container-image">
<ParallaxImage
{source}
- alternativeText="selectedBadge.description"
+ alternativeText={selectedBadge.description ?? ''}
limit={100}
duration={1500}
/>