Skip to content

Comments

fix(a11y): prevent double screen reader announcements#32

Merged
daiverd merged 2 commits intomasterfrom
fix/a11y-double-announcements
Feb 22, 2026
Merged

fix(a11y): prevent double screen reader announcements#32
daiverd merged 2 commits intomasterfrom
fix/a11y-double-announcements

Conversation

@daiverd
Copy link
Contributor

@daiverd daiverd commented Feb 22, 2026

Summary

  • Remove role="log" from output container (has implicit aria-live="polite" per WAI-ARIA spec, causing duplicate announcements alongside explicit announce() calls)
  • Move announceOutputLine() from inside setState updater to callback (React StrictMode double-invokes updaters, causing duplicate arrow key navigation announcements)

Test plan

  • Verify messages are announced once (not twice) when received
  • Verify arrow key navigation announces current line once (not twice)
  • Verify Home/End navigation still works
  • Run test suite: npm test

David Sexton added 2 commits February 21, 2026 21:45
Remove role="log" which has implicit aria-live="polite" per WAI-ARIA
spec. Messages are announced via explicit announce() calls, so the
implicit live region caused duplicates.
Move announceOutputLine() call from inside setState updater to the
callback. React StrictMode double-invokes updater functions to detect
impure reducers, causing duplicate announcements.
@daiverd daiverd merged commit 95124ad into master Feb 22, 2026
1 check passed
github-actions bot pushed a commit that referenced this pull request Feb 22, 2026
fix(a11y): prevent double screen reader announcements 95124ad
@daiverd daiverd deleted the fix/a11y-double-announcements branch February 22, 2026 06:04
ctoth pushed a commit that referenced this pull request Feb 22, 2026
fix(a11y): prevent double screen reader announcements
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