mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-17 19:49:40 +02:00
fix: resolve all 40 Svelte dev warnings for clean startup
- Add $state() to 4 reactive variables (guestMode, emailInput, passwordInput, searchInputElement) - Replace 3 deprecated <svelte:component> with direct component references - Fix 8 a11y issues: add ARIA roles, tabindex, keyboard handlers to click-handler divs - Remove 22 unused CSS selectors across 8 shared-ui components Zero warnings on dev startup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2bd8f0babf
commit
c21793baaf
20 changed files with 55 additions and 133 deletions
|
|
@ -203,16 +203,21 @@
|
|||
<svelte:window onkeydown={handleKeydown} />
|
||||
|
||||
{#if visible}
|
||||
<!-- svelte-ignore a11y_click_events_have_key_events a11y_no_static_element_interactions -->
|
||||
<div
|
||||
class="fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4"
|
||||
onclick={handleBackdropClick}
|
||||
onkeydown={(e) => {
|
||||
if (e.key === 'Escape') handleBackdropClick();
|
||||
}}
|
||||
role="presentation"
|
||||
tabindex="-1"
|
||||
>
|
||||
<div
|
||||
class="bg-card border-border relative mx-4 w-full max-w-md rounded-xl border p-6 shadow-2xl"
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-labelledby="auth-gate-title"
|
||||
tabindex="-1"
|
||||
onclick={(e) => e.stopPropagation()}
|
||||
use:trapFocus
|
||||
>
|
||||
|
|
@ -230,7 +235,8 @@
|
|||
<div
|
||||
class="bg-primary/10 mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full"
|
||||
>
|
||||
<svelte:component this={ActionIcon()} size={32} class="text-primary" />
|
||||
{@const Icon = ActionIcon()}
|
||||
<Icon size={32} class="text-primary" />
|
||||
</div>
|
||||
|
||||
<!-- Title -->
|
||||
|
|
|
|||
|
|
@ -238,10 +238,12 @@
|
|||
|
||||
{#if visible && appInfo}
|
||||
<!-- Modal Backdrop -->
|
||||
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
||||
<div
|
||||
class="modal-backdrop"
|
||||
onclick={handleBackdropClick}
|
||||
onkeydown={(e) => {
|
||||
if (e.key === 'Escape') handleBackdropClick();
|
||||
}}
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-labelledby="welcome-title"
|
||||
|
|
|
|||
|
|
@ -172,8 +172,8 @@
|
|||
let rememberMe = $state(false);
|
||||
let showSuccess = $state(false);
|
||||
let shakeError = $state(false);
|
||||
let emailInput: HTMLInputElement;
|
||||
let passwordInput: HTMLInputElement;
|
||||
let emailInput = $state<HTMLInputElement | undefined>(undefined);
|
||||
let passwordInput = $state<HTMLInputElement | undefined>(undefined);
|
||||
let successAnnouncement = $state('');
|
||||
let showVerifiedBanner = $state(verified);
|
||||
let showEmailNotVerified = $state(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue