-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add a Time-Based Debouncer to update Screen Readers at most once per second #3399
Conversation
…ad of once per animation frame.
…be used to update Screen Readers
…e of interoperability with RenderDebouncer
Note: this pull request DOESN'T trim any content from the Accessibility Manager's internal character buffer, as was previously intended. In practice, throttling the frequency of updates is sufficient in practice to prevent the screen reader updates from causing the crashes as before. As a precaution, I still think the internal buffer should still have a cap on the size it can grow to, but that's not addressed in this PR. Closes #3376 |
Just wanted to double check and see if there is any update here, and see whether this change is an acceptable fix for xterm.js? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the delay, approach looks good overall 👍
…meBasedDebouncer types
…in TimeBasedDebouncer
No worries on the delay - thanks for the constructive feedback! I've done my best to address the issues you brought up, and so this PR should now conform to those expectations. Let me know if there's anything else missing from this fix, thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thanks! CI failure is a flake
This change makes it so that screen readers are announced to based on the most recent update to Screen Readers, as opposed to every possible animation frame. Previously, the very frequent updates to screenreaders in conjunction with the unbounded internal character buffer for announcements caused full page crashes due to out of memory errors when screen reader refreshes weren't fast enough to keep up with fast updates to Terminals. This change ensures that Screen Readers are refreshed at most once per second, but preserves the behavior for visual Terminal refreshes by introducing a second debouncer based on the existing RenderDebouncer.
Closes #3374