-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix VoiceOver doesnot announces the State of the ComboBox #32286
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: main
Are you sure you want to change the base?
Conversation
| { | ||
| if (value) | ||
| { | ||
| SemanticScreenReader.Announce("State Expanded"); |
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.
The current announcements "State Expanded" and "State Collapsed" lack context about what was expanded/collapsed.
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.
Hi @jsuarezruiz,I’ve updated the SemanticScreenReader with the responsible category. Please review the changes and let me know if you have any feedback or concerns.
| { | ||
| if (value) | ||
| { | ||
| SemanticScreenReader.Announce("State Expanded"); |
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.
Hard-coded English strings "State Expanded" won't be localized for non-English users. Could include localized resources?
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.
@jsuarezruiz, I checked through the MAUI project templates, and it looks like all existing uses of SemanticProperties and SemanticScreenReader use English text directly, without localisation resources. I’ve followed that same approach here to stay consistent with the current template pattern.
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 PR improves accessibility for Picker controls in the MAUI mobile template by implementing dynamic screen reader announcements for picker state changes. Instead of using static semantic properties, the changes track picker expansion state through bound properties and announce state changes programmatically.
Key changes:
- Replaced static SemanticProperties attributes with programmatic SemanticScreenReader.Announce calls
- Added IsOpen bindings to Picker controls to track their expanded/collapsed state
- Implemented property change handlers to announce picker state changes to screen readers
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| TaskDetailPage.xaml | Updated Project picker with consolidated semantic description and IsOpen binding; removed redundant semantic properties |
| ProjectDetailPage.xaml | Updated Category picker with consolidated semantic description and IsOpen binding; removed redundant semantic properties |
| TaskDetailPageModel.cs | Added IsProjectPickerExpanded property and OnIsProjectPickerExpandedChanged handler to announce picker state changes |
| ProjectDetailPageModel.cs | Added IsCategoryPickerExpanded property and OnIsCategoryPickerExpandedChanged handler to announce picker state changes |
| OnPropertyChanged(nameof(HasCompletedTasks)); | ||
| } | ||
|
|
||
| partial void OnIsCategoryPickerExpandedChanged(bool value) |
Copilot
AI
Oct 30, 2025
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.
Extra space between 'void' and 'OnIsCategoryPickerExpandedChanged'. Should be single space for consistency with the similar method in TaskDetailPageModel.cs.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| { | ||
| if (value) | ||
| { | ||
| SemanticScreenReader.Announce("Project ComboBox, State Expanded"); |
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.
Should/could be a localized text?
Issue Description:
VoiceOver does not read the ComboBox State correctly, In the sample, the ComboBox behavior is implemented using SfTextInputLayout with a Picker. However, I have already implemented the semantic properties for picker , it was overriden by SfTextInputLayout, the expectation is for VoiceOver to recognise and announce it as a ComboBox state.
Description of change :
Update SemanticProperties using property changed on IsOpen property in picker to achieve the expected output.
Issues Fixed
Fixes #30899
Tested the behaviour in the following platforms