Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔊 refactor: Optimize Aria-Live Announcements for macOS VoiceOver #3851

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

danny-avila
Copy link
Owner

Summary

I refactored the aria-live announcements to improve compatibility with macOS VoiceOver, enhancing the accessibility of LibreChat for screen reader users.

  • Simplified the LiveAnnouncer component by removing chunking and queueing mechanisms.
  • Separated live regions into "status" and "log" areas for clearer announcements.
  • Implemented a status region for short, process-related announcements.
  • Created a log region for complete messages.
  • Introduced a simple delay between status updates to prevent overriding.
  • Added periodic status updates for long-running AI responses (~7 seconds)
  • Updated localization strings to support new announcement types.
  • Modified the SSE event handlers to use the new announcement system.

Change Type

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Testing

I tested the changes with both NVDA and VoiceOver screen readers. The new implementation provides a more consistent and interruption-free experience, especially for macOS VoiceOver users.

Test Configuration:

  • Test with NVDA on Windows
  • Test with VoiceOver on macOS
  • Verify announcements for different chat scenarios (short responses, long responses, streaming responses)

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes

@danny-avila danny-avila added the a11y Accessibility label Aug 30, 2024
@danny-avila danny-avila merged commit dc40e57 into main Aug 30, 2024
1 check passed
@danny-avila danny-avila deleted the fix/voiceover branch August 30, 2024 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Accessibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant