mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 03:37:59 +01:00
[FZEditor] Improve narrator support on Grid Editor (#17532)
* [FZEditor]Add narrator info to thumb buttons * [FZEditor]Narrator information about the zones * [FZEditor]Allow text to be focused for narrator * Address PR feedback
This commit is contained in:
@@ -37,7 +37,8 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
<StackPanel Margin="16">
|
<StackPanel Margin="16">
|
||||||
<StackPanel Margin="0,8,0,0">
|
<StackPanel Margin="0,8,0,0">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
|
Focusable="True"
|
||||||
TextWrapping="Wrap">
|
TextWrapping="Wrap">
|
||||||
<Run
|
<Run
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
@@ -46,6 +47,7 @@
|
|||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,8,0,0"
|
Margin="0,8,0,0"
|
||||||
|
Focusable="True"
|
||||||
TextWrapping="Wrap">
|
TextWrapping="Wrap">
|
||||||
<Run
|
<Run
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
@@ -54,6 +56,7 @@
|
|||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,8,0,0"
|
Margin="0,8,0,0"
|
||||||
|
Focusable="True"
|
||||||
TextWrapping="Wrap">
|
TextWrapping="Wrap">
|
||||||
<Run
|
<Run
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
|
|||||||
@@ -4,8 +4,10 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:FancyZonesEditor"
|
xmlns:local="clr-namespace:FancyZonesEditor"
|
||||||
|
xmlns:props="clr-namespace:FancyZonesEditor.Properties"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Focusable="True"
|
Focusable="True"
|
||||||
|
AutomationProperties.Name="{x:Static props:Resources.Resizer_Thumb_Announce}"
|
||||||
d:DesignHeight="300" d:DesignWidth="300">
|
d:DesignHeight="300" d:DesignWidth="300">
|
||||||
<Thumb.Template>
|
<Thumb.Template>
|
||||||
<ControlTemplate>
|
<ControlTemplate>
|
||||||
|
|||||||
@@ -112,6 +112,13 @@ namespace FancyZonesEditor
|
|||||||
// using current culture as this is end user facing
|
// using current culture as this is end user facing
|
||||||
WidthLabel.Text = Math.Round(ActualWidth).ToString(CultureInfo.CurrentCulture);
|
WidthLabel.Text = Math.Round(ActualWidth).ToString(CultureInfo.CurrentCulture);
|
||||||
HeightLabel.Text = Math.Round(ActualHeight).ToString(CultureInfo.CurrentCulture);
|
HeightLabel.Text = Math.Round(ActualHeight).ToString(CultureInfo.CurrentCulture);
|
||||||
|
System.Windows.Automation.AutomationProperties.SetName(
|
||||||
|
this,
|
||||||
|
#pragma warning disable SA1118 // Parameter should not span multiple lines
|
||||||
|
Properties.Resources.Zone_Name + " " + (_zone.Index + 1).ToString(CultureInfo.CurrentCulture) + ". " +
|
||||||
|
Properties.Resources.Width_Name + ": " + WidthLabel.Text + ", " +
|
||||||
|
Properties.Resources.Height_Name + ": " + HeightLabel.Text);
|
||||||
|
#pragma warning restore SA1118 // Parameter should not span multiple lines
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateShiftState(bool shiftState)
|
public void UpdateShiftState(bool shiftState)
|
||||||
|
|||||||
@@ -239,7 +239,47 @@ namespace FancyZonesEditor.Properties {
|
|||||||
return ResourceManager.GetString("Delete_Layout_Dialog_Announce", resourceCulture);
|
return ResourceManager.GetString("Delete_Layout_Dialog_Announce", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string for representing the names of a single zone.
|
||||||
|
/// </summary>
|
||||||
|
public static string Zone_Name {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return ResourceManager.GetString("Zone_Name", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string for representing the name of the width dimension.
|
||||||
|
/// </summary>
|
||||||
|
public static string Width_Name {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return ResourceManager.GetString("Width_Name", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string for representing the name of the height dimension.
|
||||||
|
/// </summary>
|
||||||
|
public static string Height_Name {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return ResourceManager.GetString("Height_Name", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string for explaining how to use the thumbs to resize zone.
|
||||||
|
/// </summary>
|
||||||
|
public static string Resizer_Thumb_Announce {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return ResourceManager.GetString("Resizer_Thumb_Announce", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Delete zone.
|
/// Looks up a localized string similar to Delete zone.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -288,6 +288,22 @@
|
|||||||
<data name="Delete_Layout_Dialog_Announce" xml:space="preserve">
|
<data name="Delete_Layout_Dialog_Announce" xml:space="preserve">
|
||||||
<value>Delete layout dialog.</value>
|
<value>Delete layout dialog.</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Zone_Name" xml:space="preserve">
|
||||||
|
<value>Zone</value>
|
||||||
|
<comment>The name of the zones.</comment>
|
||||||
|
</data>
|
||||||
|
<data name="Width_Name" xml:space="preserve">
|
||||||
|
<value>Width</value>
|
||||||
|
<comment>The name of dimension called width.</comment>
|
||||||
|
</data>
|
||||||
|
<data name="Height_Name" xml:space="preserve">
|
||||||
|
<value>Height</value>
|
||||||
|
<comment>The name of dimension called height.</comment>
|
||||||
|
</data>
|
||||||
|
<data name="Resizer_Thumb_Announce" xml:space="preserve">
|
||||||
|
<value>Use the arrow keys to resize, delete key to remove.</value>
|
||||||
|
<comment>Keys and key means the keyboard keys.</comment>
|
||||||
|
</data>
|
||||||
<data name="Are_You_Sure" xml:space="preserve">
|
<data name="Are_You_Sure" xml:space="preserve">
|
||||||
<value>Are you sure?</value>
|
<value>Are you sure?</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
Reference in New Issue
Block a user