diff --git a/ui/src/components/PdConsoleDrawer.tsx b/ui/src/components/PdConsoleDrawer.tsx index 70df5a3..a7f8ac7 100644 --- a/ui/src/components/PdConsoleDrawer.tsx +++ b/ui/src/components/PdConsoleDrawer.tsx @@ -64,8 +64,11 @@ export function PdConsoleDrawer({ lines, open, onClose, done, total }: PdConsole >
{t('plan.console')} - {/* The live region UI-SPEC §8 asks for. Polite, so it does not interrupt. */} - + {/* **Not a live region.** It was one, and so is the screen that opens this drawer — both + announcing the same `done/total`, so a reader heard every step twice. §8 asks for one + announcement of execution progress, and the screen owns it because the drawer may be + closed while a run is going. Still rendered, still read on demand. */} + {total > 0 ? t('plan.progress', { done, total }) : ''}
) : null} - {snapshotsLoading === 'loading' ? ( -

- {t('snapshots.loading')} -

- ) : null} + {/* **One live region for the screen**, not one per loading state. Two polite regions on the + same screen serialize in an order neither of them controls, so a reader can hear the + older message after the newer one. This one covers both waits; the snapshot list and a + diff are never loading at the same moment, because a diff needs a selection from the + list. */} +

+ {snapshotsLoading === 'loading' ? t('snapshots.loading') : null} + {diffLoading === 'loading' ? t('snapshots.diffing') : null} +

{snapshotsLoading === 'ready' && snapshots.length === 0 ? ( @@ -105,11 +109,7 @@ export function PdEnvDetail() { {selectedSnapshot !== null && usable ? (
- {diffLoading === 'loading' ? ( -

- {t('snapshots.diffing')} -

- ) : null} + {diff !== null ? ( <>