Accesibility improvements

This commit is contained in:
Niels Laute
2021-08-12 14:55:20 +02:00
parent 0c36e3fb7d
commit e24e069e2b
3 changed files with 16 additions and 5 deletions

View File

@@ -125,7 +125,7 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
{
if (_setting.ActionContent.GetType() != typeof(Button))
{
// We do not want to override the default AutomationProperties.Name of a button. It's content already describes what it does.
// We do not want to override the default AutomationProperties.Name of a button. Its Content property already describes what it does.
if (!string.IsNullOrEmpty(_setting.Header))
{
AutomationProperties.SetName((UIElement)_setting.ActionContent, _setting.Header);

View File

@@ -272,6 +272,10 @@ Disabling this module or closing PowerToys will unmute the microphone and camera
<value>Remap a key</value>
<comment>Keyboard Manager remap keyboard button content</comment>
</data>
<data name="KeyboardManager_RemapKeyboardButton_Accesible.AutomationProperties.Name" xml:space="preserve">
<value>Remap a key</value>
<comment>Keyboard Manager remap keyboard button content</comment>
</data>
<data name="KeyboardManager_Keys.Header" xml:space="preserve">
<value>Keys</value>
<comment>Keyboard Manager remap keyboard header</comment>
@@ -280,6 +284,10 @@ Disabling this module or closing PowerToys will unmute the microphone and camera
<value>Remap a shortcut</value>
<comment>Keyboard Manager remap shortcuts button</comment>
</data>
<data name="KeyboardManager_RemapShortcutsButton_Accesible.AutomationProperties.Name" xml:space="preserve">
<value>Remap a shortcut</value>
<comment>Keyboard Manager remap shortcuts button</comment>
</data>
<data name="KeyboardManager_Shortcuts.Header" xml:space="preserve">
<value>Shortcuts</value>
<comment>Keyboard Manager remap keyboard header</comment>
@@ -1462,4 +1470,8 @@ From there, simply click on a Markdown file or SVG icon in the File Explorer and
<data name="More_Options_ButtonTooltip.Text" xml:space="preserve">
<value>More options</value>
</data>
<data name="To.Text" xml:space="preserve">
<value>to</value>
<comment>as in: from x to y</comment>
</data>
</root>

View File

@@ -93,7 +93,7 @@
<controls:SettingsGroup x:Uid="KeyboardManager_Keys" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.Enabled}">
<Button Style="{StaticResource SettingButtonStyle}" Command="{Binding Path=RemapKeyboardCommand}">
<Button x:Uid="KeyboardManager_RemapKeyboardButton_Accesible" Style="{StaticResource SettingButtonStyle}" Command="{Binding Path=RemapKeyboardCommand}">
<controls:Setting x:Uid="KeyboardManager_RemapKeyboardButton" Style="{StaticResource ExpanderHeaderSettingStyle}" Icon="&#xE92E;">
<controls:Setting.ActionContent>
<FontIcon Glyph="&#xE2B4;" FontFamily="{ThemeResource SymbolThemeFontFamily}" />
@@ -151,7 +151,7 @@
<controls:SettingsGroup x:Uid="KeyboardManager_Shortcuts" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.Enabled}">
<Button Style="{StaticResource SettingButtonStyle}" Command="{Binding Path=EditShortcutCommand}">
<Button x:Uid="KeyboardManager_RemapShortcutsButton_Accesible" Style="{StaticResource SettingButtonStyle}" Command="{Binding Path=EditShortcutCommand}">
<controls:Setting x:Uid="KeyboardManager_RemapShortcutsButton" Style="{StaticResource ExpanderHeaderSettingStyle}" Icon="&#xE92E;">
<controls:Setting.ActionContent>
<FontIcon Glyph="&#xE2B4;" FontFamily="{ThemeResource SymbolThemeFontFamily}" />
@@ -185,7 +185,7 @@
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
<TextBlock Text="to"
<TextBlock x:Uid="To"
Style="{StaticResource SecondaryTextStyle}"
VerticalAlignment="Center"
Margin="8,0,8,0"/>
@@ -203,7 +203,6 @@
</ItemsControl>
<TextBlock Margin="8,0,0,0" Style="{StaticResource SecondaryTextStyle}" VerticalAlignment="Center">
<Run Text="for"/>
<Run Text="{x:Bind TargetApp}" FontWeight="SemiBold"/>
</TextBlock>
</StackPanel>