Skip to content

Commit

Permalink
Fixing A11y issues in combobox and scroll bar (#9064)
Browse files Browse the repository at this point in the history
* Fixing ally issues in combobox and scroll bar

* Fix DatePicker textbox and button ally issues
  • Loading branch information
harshit7962 authored Jun 6, 2024
1 parent 6c97dfe commit e8e3875
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@
FontSize="{TemplateBinding FontSize}"
Foreground="{TemplateBinding Foreground}"
IsReadOnly="{TemplateBinding IsReadOnly}"
Style="{StaticResource DefaultComboBoxTextBoxStyle}" />
Style="{StaticResource DefaultComboBoxTextBoxStyle}"
AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}" />
</Grid>
</Grid>
<Popup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="AutomationProperties.Name" Value="{Binding Path=(AutomationProperties.Name), Mode=OneWay, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type DatePicker}}}" />
<Setter Property="Foreground">
<Setter.Value>
<SolidColorBrush Color="{DynamicResource TextFillColorPrimary}" />
Expand Down Expand Up @@ -133,6 +134,7 @@
VerticalContentAlignment="Center"
Background="Transparent"
BorderBrush="Transparent"
AutomationProperties.Name="{Binding Path=(AutomationProperties.Name), Mode=OneWay, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type DatePicker}}}"
Cursor="Arrow">
<!-- WPF overrides paddings for button -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
Command="ScrollBar.LineUpCommand"
Content="{StaticResource CaretUpGlyph}"
Opacity="0"
AutomationProperties.Name="Scroll Up"
Style="{StaticResource ScrollBarLineButtonStyle}" />
<Track
x:Name="PART_Track"
Expand Down Expand Up @@ -168,6 +169,7 @@
Command="ScrollBar.LineDownCommand"
Content="{StaticResource CaretDownGlyph}"
Opacity="0"
AutomationProperties.Name="Scroll Down"
Style="{StaticResource ScrollBarLineButtonStyle}" />
</Grid>
<ControlTemplate.Triggers>
Expand Down Expand Up @@ -259,6 +261,7 @@
Command="ScrollBar.LineLeftCommand"
Content="{StaticResource CaretLeftGlyph}"
Opacity="0"
AutomationProperties.Name="Scroll Left"
Style="{StaticResource ScrollBarLineButtonStyle}" />
<Track
x:Name="PART_Track"
Expand Down Expand Up @@ -286,6 +289,7 @@
Command="ScrollBar.LineRightCommand"
Content="{StaticResource CaretRightGlyph}"
Opacity="0"
AutomationProperties.Name="Scroll Right"
Style="{StaticResource ScrollBarLineButtonStyle}" />
</Grid>
<ControlTemplate.Triggers>
Expand Down

0 comments on commit e8e3875

Please sign in to comment.