Skip to content

fix: writing assistant live region scope#19

Closed
web3blind wants to merge 1 commit into
AetherAssembly:mainfrom
web3blind:fix/writing-assistant-live-region
Closed

fix: writing assistant live region scope#19
web3blind wants to merge 1 commit into
AetherAssembly:mainfrom
web3blind:fix/writing-assistant-live-region

Conversation

@web3blind

Copy link
Copy Markdown

Summary

  • Remove aria-live="polite" from the entire writing assistant panel.
  • Scope polite live announcements to the suggestions container only.
  • Add a small regression test for the live-region markup.

Accessibility impact

The panel updates while users type. Making the whole panel a live region can cause screen readers to announce unrelated changes such as tone, stats, and server status repeatedly. This keeps announcements focused on writing suggestions instead of every panel update.

Fixes #14.

Tests

  • npm test

@Aster1630

Copy link
Copy Markdown
Collaborator

The core change here is exactly right — scoping aria-live to #mt-suggestions instead of the whole panel will cut down on the noise a lot. The test approach (reading the source file and asserting on the HTML string) is lightweight and fits the existing pattern in this test suite well.

One thing worth considering before this merges: the Grammar & Spelling section (#mt-lt-issues and #mt-lt-state) also updates dynamically — when a server check completes, the issues list gets rewritten and the status message ("Checking grammar…", "Server unavailable", etc.) changes. Neither of those elements has a live region right now. For a keyboard/screen reader user who triggered the analysis, they'll get the suggestions announced but hear nothing when the grammar check resolves.

Probably the right move is aria-live="polite" on #mt-lt-issues or its wrapper #mt-lt-section, and a separate aria-live="assertive" (or at least polite) on #mt-lt-state for status messages — though polite is probably fine for both given the context. Whether that should be part of this PR or a follow-up is up to you, but it'd be worth an issue if it isn't tackled here since fixing half the live region problem is still a real improvement.

The change itself looks good to me — happy to see this land.

@Aster1630 Aster1630 changed the title Fix writing assistant live region scope fix: writing assistant live region scope May 18, 2026
@Aster1630

Copy link
Copy Markdown
Collaborator

intregrated with PR #19

@Aster1630 Aster1630 closed this May 18, 2026
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.

[Bug] aria-live="polite" on entire tone panel causes excessive screen reader announcements

2 participants