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

[A11y] Fix Screen Reader Issue for Status Messages #1100

Merged

Conversation

sanxsth
Copy link
Contributor

@sanxsth sanxsth commented Jan 28, 2025

This PR fixes an accessibility issue in the PowerPages copilot chat:

copilot.js: Right now, we are creating the status message div ('thinking') and adding it to the DOM. The screen reader won't read the status since the DOM node is being initialized with the message during the time of creation. Only future updates to the content will be read. Therefore, we are adding an empty div first and then setting the content in the next event loop so that the screen reader detects the change and reads out loud.

Note: Tested on web and desktop versions

@sanxsth sanxsth requested review from a team as code owners January 28, 2025 12:39
@sanxsth sanxsth merged commit 406b20e into main Jan 29, 2025
6 checks passed
@sanxsth sanxsth deleted the users/ssatheesh/fix_screen_reader_issue_in_copilot_chat branch January 29, 2025 09:00
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.

3 participants