mirror of
https://github.com/moku-project/Moku.git
synced 2026-06-13 09:19:56 -05:00
Chore: Patch all Svelte-Warnings & Add Aria-Labels
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
{#if store.toasts.length}
|
||||
<div class="toaster" aria-live="polite">
|
||||
{#each store.toasts as t (t.id)}
|
||||
<div role="alert" class="toast toast-{t.kind}" data-toast-id={t.id} onclick={() => dismiss(t.id)}>
|
||||
<button class="toast toast-{t.kind}" data-toast-id={t.id} aria-label="{t.title}{t.body ? ': ' + t.body : ''}" onclick={() => dismiss(t.id)}>
|
||||
<div class="accent-bar"></div>
|
||||
<span class="icon">
|
||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
@@ -60,7 +60,7 @@
|
||||
<p class="title">{t.title}</p>
|
||||
<p class="sub">{t.body ?? '\u00a0'}</p>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -355,7 +355,9 @@
|
||||
{#if store.previewManga}
|
||||
<div
|
||||
class="backdrop"
|
||||
role="presentation"
|
||||
role="button"
|
||||
tabindex="-1"
|
||||
aria-label="Close preview"
|
||||
onclick={(e) => { if (e.target === e.currentTarget) close(); }}
|
||||
onkeydown={(e) => { if (e.key === "Escape") close(); }}
|
||||
>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
let focused = $state(-1);
|
||||
let el = $state<HTMLDivElement | undefined>(undefined);
|
||||
let measured = $state(false);
|
||||
let pos = $state({ left: x, top: y });
|
||||
let pos = $state({ left: 0, top: 0 });
|
||||
let subOpen = $state(-1);
|
||||
let subEls = $state<(HTMLDivElement | null)[]>([]);
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
{#if hasSub}<span class="sub-arrow">›</span>{/if}
|
||||
</button>
|
||||
{#if hasSub && subOpen === i}
|
||||
<div bind:this={subEls[i]} class="menu submenu" role="menu"
|
||||
<div bind:this={subEls[i]} class="menu submenu" role="menu" tabindex="-1"
|
||||
onmouseenter={() => { subOpen = i; }}>
|
||||
{#each mi.children as child}
|
||||
{#if "separator" in child}
|
||||
@@ -204,7 +204,7 @@
|
||||
animation: scaleIn 0.08s ease both;
|
||||
transform-origin: top left;
|
||||
}
|
||||
.submenu.sub-flip {
|
||||
:global(.submenu.sub-flip) {
|
||||
left: auto;
|
||||
right: 100%;
|
||||
transform-origin: top right;
|
||||
|
||||
Reference in New Issue
Block a user