Skip to content

Commit eac7a68

Browse files
feat(a11y): add aria-live region to editor save status indicator (#1138)
Add a screen-reader-only role="status" span inside the editor save status container. Only terminal states (Saved, Save failed) are rendered in the live region to avoid noisy announcements from transient Saving... updates on every keystroke. Follows the existing RowCountAnnouncer pattern for live regions. Co-authored-by: Ona <no-reply@ona.com>
1 parent 891bd74 commit eac7a68

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

.agents/quality.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ Tracks code quality per domain. Updated by automations as a side effect of featu
3333

3434
| Category | Files | Tests |
3535
|---|---|---|
36-
| Unit/Integration (Vitest) | 144 | 1953 |
36+
| Unit/Integration (Vitest) | 144 | 1962 |
3737
| E2E (Playwright) | 85 | 415 |
38-
| **Total** | **229** | **2368** |
38+
| **Total** | **229** | **2377** |
3939

4040
### Test files by domain
4141

@@ -163,5 +163,6 @@ Tracks code quality per domain. Updated by automations as a side effect of featu
163163
| 2026-05-18 | Mobile header page title (#1136). Added `mobile-header-title.tsx` component and 1 new E2E spec: `e2e/mobile-header-title.spec.ts` (5 tests) — workspace name on home, title update on navigation, Settings on settings page, hidden on desktop, truncation styles. Added Storybook stories for MobileHeaderTitle (5 stories) and MobileLongTitle story in AppShell. Test totals: 144 Vitest files (1953 tests), 84 E2E specs (412 tests). |
164164
| 2026-05-18 | Fixed 11 E2E test failures (#1142). Fixed account-deletion tests (hydration timing with retry pattern), database-bulk-select tests (optimistic row ID race condition, aria-checked assertions), database-column-reorder tests (checkbox column offset in getColumnOrder), database-csv-export tests (gridcell count mismatch from checkbox column). Added `data-row-id` attribute to table rows for temp-ID detection. Fixed DeleteAccountSection component to avoid AlertDialogTrigger + controlled open pattern. Updated visual regression baselines. Test totals unchanged: 144 Vitest files (1953 tests), 84 E2E specs (412 tests). |
165165
| 2026-05-18 | Title Enter/Tab focuses editor (#1137). Added `onAdvance` callback to `PageTitle`, wired in `PageViewClient` to focus Lexical editor on Enter/Tab. Added 1 new E2E spec: `e2e/title-advance.spec.ts` (3 tests). Added `WithAdvance` Storybook story and visual regression baseline. Test totals: 144 Vitest files (1953 tests), 85 E2E specs (415 tests). |
166+
| 2026-05-18 | Add aria-live region to editor save status indicator (#1138). Added sr-only `role="status"` span to editor save status div so screen readers announce terminal states (Saved, Save failed) without noisy Saving... announcements. No new test files. Test totals: 144 Vitest files (1962 tests), 85 E2E specs (415 tests). |
166167

167168

src/components/editor/editor.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,12 +438,19 @@ export function Editor({ pageId, workspaceId, initialContent, editorRef, readOnl
438438
{editorRef && <EditorRefPlugin editorRef={editorRef} />}
439439
</LexicalComposer>
440440
{!readOnly && (
441-
<div className="mt-2 h-5 text-xs text-muted-foreground" data-testid="editor-save-status">
441+
<div
442+
className="mt-2 h-5 text-xs text-muted-foreground"
443+
data-testid="editor-save-status"
444+
>
442445
{saveStatus === "saving" && "Saving..."}
443446
{saveStatus === "saved" && "Saved"}
444447
{saveStatus === "error" && (
445448
<span className="text-destructive">Save failed</span>
446449
)}
450+
<span className="sr-only" role="status" data-testid="editor-save-status-live">
451+
{saveStatus === "saved" && "Saved"}
452+
{saveStatus === "error" && "Save failed"}
453+
</span>
447454
</div>
448455
)}
449456
{readOnly && (

0 commit comments

Comments
 (0)