fix(admin): address round-2 review concerns on ImportStatusCard

- Use loop index as each key (handles duplicate filenames)
- Increase skipped filename font from text-xs to text-sm
- Add motion-safe guard to details chevron transition
- Replace text-warning with text-amber-900 to meet WCAG AA contrast

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-18 16:31:30 +02:00
committed by marcel
parent c532ad21bf
commit c932dd19d9

View File

@@ -55,10 +55,10 @@ function reasonLabel(code: string): string {
<p class="mt-1 text-xs text-green-800">{m.admin_system_import_status_done()}</p>
</div>
{#if importStatus.skipped > 0}
<details class="mb-4 rounded-sm border border-warning/40 bg-warning/10 p-4 text-warning">
<details class="mb-4 rounded-sm border border-warning/40 bg-warning/10 p-4 text-amber-900">
<summary class="flex cursor-pointer list-none items-center gap-2">
<svg
class="details-chevron h-4 w-4 shrink-0 transition-transform"
class="details-chevron h-4 w-4 shrink-0 motion-safe:transition-transform"
viewBox="0 0 16 16"
fill="none"
stroke="currentColor"
@@ -78,8 +78,10 @@ function reasonLabel(code: string): string {
</div>
</summary>
<ul class="mt-3 space-y-1">
{#each importStatus.skippedFiles as { filename, reason } (filename)}
<li class="font-mono text-xs text-ink-2">{filename}{reasonLabel(reason)}</li>
{#each importStatus.skippedFiles as skipped, i (i)}
<li class="font-mono text-sm text-ink-2">
{skipped.filename}{reasonLabel(skipped.reason)}
</li>
{/each}
</ul>
</details>