-
Notifications
You must be signed in to change notification settings - Fork 129
Accessibility improvements to FeatureForm #698
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
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 the FeatureForm UI control by ensuring proper automation properties are set for screen readers and assistive technologies. The changes add Name and Description/HelpText properties to form input elements to provide better context for users with disabilities.
Key changes:
- Added AutomationProperties.Name bindings to form input controls for screen reader identification
- Added AutomationProperties.HelpText/Description bindings to provide additional context
- Implemented platform-specific accessibility improvements across WPF, WinUI, and MAUI
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| RadioButtonsFormInputView.Windows.cs | Added WPF-specific automation name property for radio button items |
| FieldFormElementView.Maui.cs | Added semantic properties for description and hint in MAUI implementation |
| FeatureForm.Theme.xaml | Added automation properties to WinUI ContentControl template |
| FeatureFormView.Theme.xaml | Added automation properties to WPF ComboBox items and TextBox controls |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| <TextBlock Text="{Binding Label}" Style="{StaticResource FeatureFormViewTitleStyle}"/> | ||
| <ContentControl Margin="0,3" Foreground="Gray" Content="{Binding}" x:Name="FieldInput" KeyboardNavigation.IsTabStop="False"> | ||
| <ContentControl Margin="0,3" Foreground="Gray" Content="{Binding}" x:Name="FieldInput" KeyboardNavigation.IsTabStop="False" | ||
| > |
Copilot
AI
Sep 16, 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.
The ContentControl element appears incomplete. The opening tag has a dangling '>' on line 269 without any automation properties being added, unlike the similar ContentControl in the WinUI theme file which properly adds AutomationProperties.Name and AutomationProperties.HelpText.
| > | |
| AutomationProperties.Name="{Binding Label}" | |
| AutomationProperties.HelpText="{Binding Hint}"> |
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.
Definitely an improvement over the previous version to have Automation Name and Help Text set
- Left few comments to address missing implementations to be consistent in all platforms
- Can also set Automation Name and Help Text for ComboBox
- In WPF, observed that
RadioButtonis listed asdataitemwhich could be interpreted by the user as a regular ListViewItem
- Automation Properties to be added or control to be hidden for
FieldFormElement,TextFormElement,FeatureForm(probably at SDK?)
| <Setter.Value> | ||
| <ControlTemplate TargetType="{x:Type primitives:ComboBoxFormInputView}"> | ||
| <ComboBox x:Name="Selector" IsEnabled="{TemplateBinding IsEnabled}" /> | ||
| <ComboBox x:Name="Selector" IsEnabled="{TemplateBinding IsEnabled}" > |
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.
Automation Name can also be set for the comboBox, like
AutomationProperties.Name="{Binding Element.Label, RelativeSource={RelativeSource AncestorType=primitives:ComboBoxFormInputView}}"
Could be implemented similarly for other platforms
| #if WPF | ||
| System.Windows.Automation.AutomationProperties.SetName(radio, cv.Name); | ||
| #endif |
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.
Missing implementation for WinUI
| #if WPF | |
| System.Windows.Automation.AutomationProperties.SetName(radio, cv.Name); | |
| #endif | |
| #if WPF | |
| System.Windows.Automation.AutomationProperties.SetName(radio, cv.Name); | |
| #elif WINUI | |
| Microsoft.UI.Xaml.Automation.AutomationProperties.SetName(radio, cv.Name); | |
| #endif |
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.
AutomationName and HelpText to be set on TextInput TextBox in L#162 similar to WPF as
AutomationProperties.Name="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Element.Label}" AutomationProperties.HelpText="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Element.Description}"
To implemented for MaUI as well
Ensures the name properties are assigned on FeatureForm elements.