Skip to content

fix(ADA-2958): Add character counter announcement - #189

Merged
valentinStoicaK merged 3 commits into
masterfrom
ADA-2958-Text-to-speech-doesnt-recognize-the-character-count-on-open-ended-questions
Feb 6, 2026
Merged

fix(ADA-2958): Add character counter announcement#189
valentinStoicaK merged 3 commits into
masterfrom
ADA-2958-Text-to-speech-doesnt-recognize-the-character-count-on-open-ended-questions

Conversation

@valentinStoicaK

Copy link
Copy Markdown
Contributor

This solves https://kaltura.atlassian.net/browse/ADA-2958.
SetTimeout it is used to avoid announcing on every keystroke. The message is announced only after user pauses typing.
The alternative would be to announce the counter every 10-20 characters, but product requested this behavior.

);
lastAnnouncedCountRef.current = characterCount;
}
}, 800);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use higher time like 1/2000ms.

@SivanA-Kaltura thought maybe you familiar with an appropriate solution that won't require setTimeout and can share :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@roeedean can you please explain why I should use a higher time? Testing the behavior seems like enough. 2 seconds might be too much, giving the impression the announcement is delayed. Thanks

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced the setTimeout with debounce as suggested. For the time, I am waiting Julien's input.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per product, the time should be 1500ms

@valentinStoicaK
valentinStoicaK merged commit a2aa709 into master Feb 6, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants