feat(dockview-core): L5 announcements — assertive region, more events, pluggable announcer#1322
Merged
Conversation
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>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Layer-5 (screen-reader announcements) for the LiveRegion module. Builds on the open/close announcer already on master.
What's added
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.onDidMaximizedGroupChange) and float/dock/popout (via per-grouponDidLocationChange, tracking each group's previous location so a normal grid split never misreads as a "dock"). All via the group's active panel.announcer. New option to route everyAnnouncementEventto the app's own screen-reader infrastructure; when set, dockview writes nothing to its own regions.getAnnouncementlocalisation hook.LiveRegionEvent.kindnow coversopen | 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)
🤖 Generated with Claude Code