diff --git a/pester/xaml.Tests.ps1 b/pester/xaml.Tests.ps1 index c351dadc..12eea9d8 100644 --- a/pester/xaml.Tests.ps1 +++ b/pester/xaml.Tests.ps1 @@ -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"))" }) diff --git a/xaml/inputXML.xaml b/xaml/inputXML.xaml index 2eec2796..e53e3bd5 100644 --- a/xaml/inputXML.xaml +++ b/xaml/inputXML.xaml @@ -1629,6 +1629,7 @@ Background="Transparent" HorizontalAlignment="Right" VerticalAlignment="Center" Panel.ZIndex="1" + AutomationProperties.Name="Previous Step" ToolTip="Back to the previous step">