[Settings][Dashboard] Accessibility fixes (#36280)

* make narrator announce buttons/toggles

* add toggles module name
This commit is contained in:
Davide Giacometti
2024-12-11 12:09:38 +01:00
committed by GitHub
parent 7a39f2fd46
commit ce0e00fa3b
2 changed files with 10 additions and 0 deletions

View File

@@ -325,6 +325,7 @@
Padding="0"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
AutomationProperties.Name="{x:Bind Label}"
Background="Transparent"
BorderThickness="0"
Click="DashboardListItemClick"
@@ -370,9 +371,11 @@
</ToolTipService.ToolTip>
</FontIcon>
<ToggleSwitch
x:Uid="Enable_Module"
Grid.Column="3"
Margin="0,-2,0,0"
HorizontalAlignment="Right"
AutomationProperties.HelpText="{x:Bind Label}"
IsEnabled="{x:Bind IsLocked, Converter={StaticResource BoolNegationConverter}, ConverterParameter=True, Mode=OneWay}"
IsOn="{x:Bind IsEnabled, Mode=TwoWay}"
OffContent=""
@@ -383,6 +386,7 @@
<ItemsControl
Grid.Row="1"
Margin="16,8,16,16"
IsTabStop="False"
ItemTemplateSelector="{StaticResource ModuleItemTemplateSelector}"
ItemsSource="{x:Bind DashboardModuleItems, Mode=OneWay}"
Visibility="{x:Bind IsEnabled, Converter={StaticResource BoolToVisibilityConverter}, Mode=OneWay}">
@@ -416,6 +420,7 @@
Padding="0"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
AutomationProperties.Name="{x:Bind Label}"
Background="Transparent"
BorderThickness="0"
Click="DashboardListItemClick"
@@ -458,9 +463,11 @@
</ToolTipService.ToolTip>
</FontIcon>
<ToggleSwitch
x:Uid="Enable_Module"
Grid.Column="3"
Margin="0,-2,0,0"
HorizontalAlignment="Right"
AutomationProperties.HelpText="{x:Bind Label}"
IsEnabled="{x:Bind IsLocked, Converter={StaticResource BoolNegationConverter}, ConverterParameter=True, Mode=OneWay}"
IsOn="{x:Bind IsEnabled, Mode=TwoWay}"
OffContent=""

View File

@@ -4692,4 +4692,7 @@ Activate by holding the key for the character you want to add an accent to, then
<data name="Shell_TopLevelSystemTools.Content" xml:space="preserve">
<value>System Tools</value>
</data>
<data name="Enable_Module.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
<value>Enable module</value>
</data>
</root>