fix(frontend): clear svelte-check a11y and reactivity warnings
- TagBadge: derive color/style so they track a changing tag prop. - FilterBar: seed tokens from the value prop via untrack (the effect keeps it in sync), silencing state_referenced_locally. - FileCard: give the interactive card role="button". - admin user toggles: add aria-labels to the switch buttons. svelte-check is now clean (0 errors, 0 warnings). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -107,6 +107,7 @@
|
||||
class:on={isAdmin}
|
||||
role="switch"
|
||||
aria-checked={isAdmin}
|
||||
aria-label="Admin"
|
||||
onclick={() => (isAdmin = !isAdmin)}><span class="thumb"></span></button
|
||||
>
|
||||
</div>
|
||||
@@ -121,6 +122,7 @@
|
||||
class:on={canCreate}
|
||||
role="switch"
|
||||
aria-checked={canCreate}
|
||||
aria-label="Can create"
|
||||
onclick={() => (canCreate = !canCreate)}><span class="thumb"></span></button
|
||||
>
|
||||
</div>
|
||||
@@ -140,6 +142,7 @@
|
||||
class:danger={isBlocked}
|
||||
role="switch"
|
||||
aria-checked={isBlocked}
|
||||
aria-label="Blocked"
|
||||
onclick={() => (isBlocked = !isBlocked)}><span class="thumb"></span></button
|
||||
>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user