mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-10-25 08:10:55 +00:00
Add accessible names to Win11 Creator wizard controls (#5152)
The Win11 Creator wizard (#4925) was merged after the top-bar naming pass in #4992/#4993. Its glyph-only Back/Forward buttons report the Segoe MDL2 private-use character as their UI Automation name, and the ISO path box, the edition and USB combo boxes and the status log have an empty name because their visible labels are separate TextBlocks. Add AutomationProperties.Name to all six: "Previous Step" and "Next Step" for the arrows, and the visible label text for the other four. Cover them with a XAML test. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Chris Titus <contact@christitus.com>
This commit is contained in:
2 files changed
+22
No files matched your search
@@ -274,6 +274,22 @@ Describe "XAML document" {
|
||||
}
|
||||
}
|
||||
|
||||
It "names the Win11 Creator wizard controls for screen readers" {
|
||||
$expectedNames = @{
|
||||
WPFWin11ISOBackButton = "Previous Step"
|
||||
WPFWin11ISOForwardButton = "Next Step"
|
||||
WPFWin11ISOPath = "ISO file"
|
||||
WPFWin11ISOEditionComboBox = "Windows edition"
|
||||
WPFWin11ISOUSBDriveComboBox = "USB drive"
|
||||
WPFWin11ISOStatusLog = "Status Log"
|
||||
}
|
||||
|
||||
foreach ($controlName in $expectedNames.Keys) {
|
||||
$control = $script:xaml.SelectSingleNode("//*[@Name='$controlName']")
|
||||
$control.GetAttribute("AutomationProperties.Name") | Should -Be $expectedNames[$controlName]
|
||||
}
|
||||
}
|
||||
|
||||
It "defines core tabs in the expected order" {
|
||||
$tabItems = @($script:xaml.SelectNodes('//*[local-name()="TabControl"][@Name="WPFTabNav"]/*[local-name()="TabItem"]'))
|
||||
$actualTabs = @($tabItems | ForEach-Object { "$($_.GetAttribute("Name")):$($_.GetAttribute("Header"))" })
|
||||
|
||||
@@ -1629,6 +1629,7 @@
|
||||
Background="Transparent"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Panel.ZIndex="1"
|
||||
AutomationProperties.Name="Previous Step"
|
||||
ToolTip="Back to the previous step">
|
||||
<Button.Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource HoverButtonStyle}">
|
||||
@@ -1651,6 +1652,7 @@
|
||||
Background="Transparent"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center"
|
||||
Panel.ZIndex="1"
|
||||
AutomationProperties.Name="Next Step"
|
||||
ToolTip="Forward to the next step">
|
||||
<Button.Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource HoverButtonStyle}">
|
||||
@@ -1872,6 +1874,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox Grid.Column="0"
|
||||
Name="WPFWin11ISOPath"
|
||||
AutomationProperties.Name="ISO file"
|
||||
IsReadOnly="True"
|
||||
VerticalAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
@@ -1954,6 +1957,7 @@
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource Win11StepLabel}" Text="Windows edition"/>
|
||||
<ComboBox Name="WPFWin11ISOEditionComboBox"
|
||||
AutomationProperties.Name="Windows edition"
|
||||
FontSize="{DynamicResource FontSize}"
|
||||
Foreground="{DynamicResource MainForegroundColor}"
|
||||
Background="{DynamicResource MainBackgroundColor}"
|
||||
@@ -2051,6 +2055,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<ComboBox Grid.Column="0"
|
||||
Name="WPFWin11ISOUSBDriveComboBox"
|
||||
AutomationProperties.Name="USB drive"
|
||||
Foreground="{DynamicResource MainForegroundColor}"
|
||||
Background="{DynamicResource MainBackgroundColor}"
|
||||
VerticalAlignment="Center"
|
||||
@@ -2178,6 +2183,7 @@
|
||||
text wraps, and its drop shadow lands on the glyphs with no background
|
||||
here to sit under. -->
|
||||
<TextBox Name="WPFWin11ISOStatusLog"
|
||||
AutomationProperties.Name="Status Log"
|
||||
IsReadOnly="True"
|
||||
TextWrapping="Wrap"
|
||||
TextAlignment="Left"
|
||||
|
||||
Reference in new issue
Block a user