-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
🗣 fix: Add Various State Change Announcements #11495
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
base: dev
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This pull request enhances accessibility by adding screen reader announcements for key user interactions across multiple components. The changes integrate live region updates that notify users of important state changes, improving the experience for users relying on assistive technologies.
Changes:
- Integrated
useLiveAnnouncerhook into four components to announce state changes - Added four new localization strings to support accessibility announcements
- Implemented model display name resolution for agents and assistants to announce meaningful names instead of IDs
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| client/src/locales/en/translation.json | Added four new translation strings for announcing model selection, prompt deletion, special variable addition, and parameter reset |
| client/src/components/SidePanel/Agents/ModelPanel.tsx | Added announcement when model parameters are reset |
| client/src/components/Prompts/VariablesDropdown.tsx | Added announcement when a special variable is added to a prompt |
| client/src/components/Prompts/Groups/DashGroupItem.tsx | Added announcement when a prompt group is deleted |
| client/src/components/Chat/Menus/Endpoints/ModelSelectorContext.tsx | Added model selection announcement with display name resolution for agents and assistants |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
This pull request adds accessibility improvements by announcing key UI changes to screen readers using polite live region updates. It introduces the
useLiveAnnouncerhook in several components to provide real-time feedback for actions such as model selection, prompt group deletion, special variable addition, and model parameter resets. Additionally, new localization strings are added to support these announcements.Accessibility Announcements Integration:
useLiveAnnouncertoModelSelectorContext.tsx, and now announce the selected model's name when a model is selected, using a localized message. [1] [2] [3] [4]useLiveAnnouncerintoDashGroupItem.tsxto announce when a prompt group is deleted, with a localized deletion message. [1] [2] [3] [4]VariablesDropdown.tsxto announce when a special variable is added, using a localized message. [1] [2] [3] [4]ModelPanel.tsxto announce when model parameters are reset, providing immediate feedback to users. [1] [2] [3] [4]Localization Updates:
translation.jsonto support the above announcements, including messages for model selection, prompt deletion, special variable addition, and model parameter reset. [1] [2] [3] [4]Change Type
Testing
Confirmed announcements with NVDA Speech Viewer
Checklist