Skip to content

Conversation

@dotMorten
Copy link
Member

@dotMorten dotMorten commented Sep 16, 2025

Ensures the name properties are assigned on FeatureForm elements.

@dotMorten dotMorten self-assigned this Sep 16, 2025
@dotMorten dotMorten requested a review from Copilot September 16, 2025 15:47
Copy link

Copilot AI left a 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"
>
Copy link

Copilot AI Sep 16, 2025

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.

Suggested change
>
AutomationProperties.Name="{Binding Label}"
AutomationProperties.HelpText="{Binding Hint}">

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@SamhithaBurugupalli SamhithaBurugupalli left a 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
image
  • In WPF, observed that RadioButton is listed as dataitem which could be interpreted by the user as a regular ListViewItem
image
  • Automation Properties to be added or control to be hidden for FieldFormElement, TextFormElement, FeatureForm (probably at SDK?)
image image

<Setter.Value>
<ControlTemplate TargetType="{x:Type primitives:ComboBoxFormInputView}">
<ComboBox x:Name="Selector" IsEnabled="{TemplateBinding IsEnabled}" />
<ComboBox x:Name="Selector" IsEnabled="{TemplateBinding IsEnabled}" >
Copy link
Contributor

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

Comment on lines +94 to +96
#if WPF
System.Windows.Automation.AutomationProperties.SetName(radio, cv.Name);
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing implementation for WinUI

Suggested change
#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

Copy link
Contributor

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

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