Upload feature (f): demo scenarios (upload-slow/fail) + a11y (file-input label)

- upload-slow/upload-fail scenarios simulated in the adapter (XHR POST bypasses the
  HTTP interceptor); categories/status/delete already honour the global slow/error
- file-input gets a per-category accessible name (aria-label + visible button text)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
eho
2026-06-30 11:42:51 +02:00
co-authored by Claude Opus 4.8
parent bfd957a6d4
commit 57940234b2
4 changed files with 52 additions and 4 deletions
+11 -2
View File
@@ -1,6 +1,15 @@
export type Scenario = 'default' | 'slow' | 'loading' | 'empty' | 'error';
export type Scenario =
| 'default'
| 'slow'
| 'loading'
| 'empty'
| 'error'
// upload-only (the multipart POST is hand-written XHR, so it bypasses the HTTP
// interceptor — these are simulated in upload.adapter.ts instead):
| 'upload-slow'
| 'upload-fail';
const VALID: Scenario[] = ['default', 'slow', 'loading', 'empty', 'error'];
const VALID: Scenario[] = ['default', 'slow', 'loading', 'empty', 'error', 'upload-slow', 'upload-fail'];
/** Reads ?scenario= from the URL so a demo can force each async state. */
export function currentScenario(): Scenario {