Skip to content

Add aria-live status messages for button actions to improve screen reader feedback (fixes issue #866) #905

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

coseeian
Copy link
Collaborator

This PR addresses issue #866.
After a button is pressed and the associated action is performed, a span container with aria-live is updated with a status message. This allows screen readers to announce feedback, ensuring that users receive confirmation when an action is completed.

@ksen0
Copy link
Member

ksen0 commented Jul 16, 2025

This is great, thank you! My only question is about the timeout that is set in announce. As far as I can tell timeouts that are set are not cleared on unmount or when announce is called repeatedly. Does it make sense to add cleanup logic to handle potential race conditions?

cc @clairep94 @davepagurek

@davepagurek
Copy link
Collaborator

I think that's right, maybe we need to keep track of the timer id, and clear the timer when we update the content + on unmount via a useEffect cleanup function?

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.

4 participants