Skip to content

feat(dockview-core): L5 announcements — assertive region, more events, pluggable announcer#1322

Merged
mathuo merged 3 commits into
masterfrom
feat/a11y-announcements
Jun 11, 2026
Merged

feat(dockview-core): L5 announcements — assertive region, more events, pluggable announcer#1322
mathuo merged 3 commits into
masterfrom
feat/a11y-announcements

Conversation

@mathuo

@mathuo mathuo commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Layer-5 (screen-reader announcements) for the LiveRegion module. Builds on the open/close announcer already on master.

What's added

  • Assertive region. A second visually-hidden region (role="alert", aria-live="assertive") alongside the polite one; announce(message, politeness) now routes errors/cancellations to it so they interrupt the screen reader instead of queuing behind routine status.
  • More events announced. Maximize/restore (via onDidMaximizedGroupChange) and float/dock/popout (via per-group onDidLocationChange, tracking each group's previous location so a normal grid split never misreads as a "dock"). All via the group's active panel.
  • Pluggable announcer. New option to route every AnnouncementEvent to the app's own screen-reader infrastructure; when set, dockview writes nothing to its own regions.
  • All messages flow through the existing getAnnouncement localisation hook. LiveRegionEvent.kind now covers open | close | maximize | restore | float | dock | popout.

Tests

18 LiveRegion tests (+8); 1094 total. All jsdom-testable (announcements are DOM text), incl. popout via the mock window.

Deferred (tracked)

  • Message catalog / full i18n set — intentionally after the L4 PR (feat(dockview-core): L4 focus management #1321) merges, so the catalog can also cover the docking-narration strings that live in the AccessibilityService there, in one place.
  • Debounce/coalesce — optional; no high-frequency announcement source exists yet (active-change deliberately not announced, as focus already surfaces it).
  • Per-window regions for popouts — folded with the deferred popout cross-window focus work.

🤖 Generated with Claude Code

mathuo and others added 3 commits June 11, 2026 21:23
Two steps of L5 announcements:

- **Assertive region.** Add a second visually-hidden region (role="alert",
  aria-live="assertive") alongside the polite one and honour the existing
  `announce(message, politeness)` param, so errors/cancellations can interrupt
  the screen reader instead of queuing behind routine status.
- **Pluggable announcer.** New `announcer` option routes each AnnouncementEvent
  to the app's own screen-reader infrastructure instead of dockview's regions;
  when set, dockview writes nothing to its own regions. `getAnnouncement`
  localisation still applies first.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Hook onDidMaximizedGroupChange so maximizing or restoring a group is narrated
to screen readers (sighted users see the change; SR users didn't). Announced
via the group's active panel, so it flows through the same getAnnouncement
localisation hook as open/close. Extends LiveRegionEvent.kind with
'maximize' | 'restore'.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Narrate a group moving to a floating window, back into the grid, or out to a
popout window. Tracks each group's previous location (groups are born in the
grid then transition, so the initial `-> grid` is ignored — a normal split
never reads as a "dock"). Announced via the group's active panel through the
same getAnnouncement localisation hook; extends LiveRegionEvent.kind with
'float' | 'dock' | 'popout'. Per-group subscriptions are cleaned up on group
removal.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@mathuo mathuo merged commit e49b3c3 into master Jun 11, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant