[Settings] a11y fixes (#14667)

* Update FancyZonesPreviewControl.xaml

* Update ImageResizerPage.xaml

* Uid updates

* Update GeneralPage.xaml

* Correct IsTabStop

* Setting focus to page
This commit is contained in:
Niels Laute 2021-11-30 14:43:04 +01:00 committed by GitHub
parent 319d722a59
commit 974bf4708c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 20 additions and 8 deletions

View File

@ -24,6 +24,7 @@
<Setter Property="Margin" Value="0,0,0,2" />
<Setter Property="Padding" Value="0,0,0,0" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="IsTabStop" Value="False"/>
</Style>
<Style TargetType="controls:CheckBoxWithDescriptionControl" BasedOn="{StaticResource DefaultCheckBoxStyle}" />

View File

@ -39,7 +39,7 @@
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Opacity="0.8" Grid.ColumnSpan="2" Grid.RowSpan="3" CornerRadius="2" >
<Image Source="{x:Bind WallpaperPath, Mode=OneWay}" Stretch="UniformToFill"/>
<Image Source="{x:Bind WallpaperPath, Mode=OneWay}" Stretch="UniformToFill" AutomationProperties.AccessibilityView="Raw"/>
</Border>
<Grid Background="{ThemeResource SystemControlAcrylicElementBrush}" Grid.Row="2" Grid.ColumnSpan="2"/>

View File

@ -5,6 +5,7 @@
xmlns:local="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Loaded="UserControl_Loaded"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters" xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
mc:Ignorable="d">
@ -59,7 +60,7 @@
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
TextWrapping="Wrap"/>
<ItemsControl ItemsSource="{x:Bind PrimaryLinks}" IsTabStop="False" Margin="0,8,0,0">
<ItemsControl x:Name="PrimaryLinksControl" ItemsSource="{x:Bind PrimaryLinks}" IsTabStop="False" Margin="0,8,0,0">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="local:PageLink">
<HyperlinkButton NavigateUri="{x:Bind Link}" Style="{StaticResource TextButtonStyle}">

View File

@ -71,5 +71,10 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
public static readonly DependencyProperty SecondaryLinksHeaderProperty = DependencyProperty.Register("SecondaryLinksHeader", typeof(string), typeof(SettingsPageControl), new PropertyMetadata(default(string)));
public static readonly DependencyProperty SecondaryLinksProperty = DependencyProperty.Register("SecondaryLinks", typeof(ObservableCollection<PageLink>), typeof(SettingsPageControl), new PropertyMetadata(new ObservableCollection<PageLink>()));
public static readonly DependencyProperty ModuleContentProperty = DependencyProperty.Register("ModuleContent", typeof(object), typeof(SettingsPageControl), new PropertyMetadata(new Grid()));
private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
PrimaryLinksControl.Focus(FocusState.Programmatic);
}
}
}

View File

@ -1543,6 +1543,9 @@ From there, simply click on a Markdown file, PDF file or SVG icon in the File Ex
</data>
<data name="EditButton.AutomationProperties.Name" xml:space="preserve">
<value>Edit</value>
</data>
<data name="ImageResizer_EditSize.AutomationProperties.Name" xml:space="preserve">
<value>Edit size</value>
</data>
<data name="No" xml:space="preserve">
<value>No</value>

View File

@ -162,9 +162,11 @@
<controls:Setting x:Uid="GeneralPage_ToggleSwitch_AutoDownloadUpdates"
Margin="0,-6,0,0"
IsEnabled="{Binding AutoUpdatesEnabled}"
Visibility="{Binding Mode=OneWay, Path=IsAdmin, Converter={StaticResource VisibleIfTrueConverter}}">
<ToggleSwitch IsOn="{Binding Mode=TwoWay, Path=AutoDownloadUpdates}"
IsEnabled="{Binding AutoUpdatesEnabled}" />
<controls:Setting.ActionContent>
<ToggleSwitch IsOn="{Binding Mode=TwoWay, Path=AutoDownloadUpdates}" />
</controls:Setting.ActionContent>
</controls:Setting>
</controls:SettingsGroup>

View File

@ -86,8 +86,8 @@
<TextBlock x:Uid="EditTooltip"/>
</ToolTipService.ToolTip>
<Button.Flyout>
<Flyout>
<StackPanel Spacing="16" Margin="0,12,0,0">
<Flyout x:Uid="ImageResizer_EditSize">
<StackPanel Spacing="16" Margin="0,12,0,0">
<TextBox
x:Uid="ImageResizer_Name"
Text="{x:Bind Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"

View File

@ -222,12 +222,12 @@
</controls:Setting.ActionContent>
</controls:Setting>
<muxc:InfoBar Severity="Error" x:Uid="Run_NotAccessibleWarning"
IsTabStop="True"
IsTabStop="{x:Bind ShowNotAccessibleWarning}"
IsOpen="{x:Bind ShowNotAccessibleWarning}"
IsClosable="False" />
<muxc:InfoBar Severity="Error"
x:Uid="Run_NotAllowedActionKeyword"
IsTabStop="True"
IsTabStop="{x:Bind ShowNotAllowedKeywordWarning}"
IsOpen="{x:Bind ShowNotAllowedKeywordWarning}"
IsClosable="False" />
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />