-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -89,7 +89,14 @@ | |||||||
| <Setter Property="Template"> | ||||||||
| <Setter.Value> | ||||||||
| <ControlTemplate TargetType="{x:Type primitives:ComboBoxFormInputView}"> | ||||||||
| <ComboBox x:Name="Selector" IsEnabled="{TemplateBinding IsEnabled}" /> | ||||||||
| <ComboBox x:Name="Selector" IsEnabled="{TemplateBinding IsEnabled}" > | ||||||||
| <ComboBox.ItemContainerStyle> | ||||||||
| <Style TargetType="ComboBoxItem"> | ||||||||
| <Setter Property="AutomationProperties.Name" Value="{Binding Name}" /> | ||||||||
| <Setter Property="AutomationProperties.HelpText" Value="{Binding Description}" /> | ||||||||
| </Style> | ||||||||
| </ComboBox.ItemContainerStyle> | ||||||||
| </ComboBox> | ||||||||
| </ControlTemplate> | ||||||||
| </Setter.Value> | ||||||||
| </Setter> | ||||||||
|
|
@@ -166,7 +173,8 @@ | |||||||
| <ColumnDefinition Width="Auto" /> | ||||||||
| <ColumnDefinition Width="Auto" /> | ||||||||
| </Grid.ColumnDefinitions> | ||||||||
| <TextBox x:Name="TextInput" MaxLines="{TemplateBinding MaxLines}" MinLines="{TemplateBinding MinLines}" BorderThickness="0" /> | ||||||||
| <TextBox x:Name="TextInput" MaxLines="{TemplateBinding MaxLines}" MinLines="{TemplateBinding MinLines}" BorderThickness="0" | ||||||||
| AutomationProperties.Name="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Element.Label}" AutomationProperties.HelpText="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Element.Description}" /> | ||||||||
| <TextBlock Text="!" Background="Transparent" Width="10" Foreground="Red" Visibility="Collapsed" HorizontalAlignment="Right" VerticalAlignment="Center" x:Name="ErrorInfo" Grid.Column="1" /> | ||||||||
| <Button Content="" FontFamily="Segoe MDL2 Assets" Background="Transparent" Grid.Column="2" | ||||||||
| Padding="8" Margin="-8,-8,-5,-7" BorderThickness="0" Visibility="Collapsed" HorizontalAlignment="Right" VerticalAlignment="Center" x:Name="BarcodeButton" /> | ||||||||
|
|
@@ -257,7 +265,8 @@ | |||||||
| <ControlTemplate TargetType="{x:Type primitives:FieldFormElementView}"> | ||||||||
| <StackPanel> | ||||||||
| <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" | ||||||||
| > | ||||||||
|
||||||||
| > | |
| AutomationProperties.Name="{Binding Label}" | |
| AutomationProperties.HelpText="{Binding Hint}"> |
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
To implemented for MaUI as well |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -91,6 +91,9 @@ protected override void PrepareContainerForItemOverride(DependencyObject element | |||||||||||||||||
| { | ||||||||||||||||||
| if (object.Equals(cv.Code, Element?.Value)) | ||||||||||||||||||
| isChecked = true; | ||||||||||||||||||
| #if WPF | ||||||||||||||||||
| System.Windows.Automation.AutomationProperties.SetName(radio, cv.Name); | ||||||||||||||||||
| #endif | ||||||||||||||||||
|
Comment on lines
+94
to
+96
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing implementation for WinUI
Suggested change
|
||||||||||||||||||
| } | ||||||||||||||||||
| else if(item is RadioButtonNullValue && Element?.Value is null) | ||||||||||||||||||
| { | ||||||||||||||||||
|
|
||||||||||||||||||
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