diff --git a/WinUIGallery/Samples/ControlPages/Accessibility/AccessibilityKeyboardPage.xaml b/WinUIGallery/Samples/ControlPages/Accessibility/AccessibilityKeyboardPage.xaml
index 822bba263..725cb978e 100644
--- a/WinUIGallery/Samples/ControlPages/Accessibility/AccessibilityKeyboardPage.xaml
+++ b/WinUIGallery/Samples/ControlPages/Accessibility/AccessibilityKeyboardPage.xaml
@@ -220,25 +220,22 @@
in addition to tab navigation, depending on the situation.
- Groups of controls that support arrow key navigation typically support Home/End and PgUp/PgDn, too.
+ Groups of controls that support arrow key navigation typically support Home/End and PgUp/PgDn, too.
-
- See
- Keyboard interactions#Navigation
-
- ,
- Keyboard interactions#Home and End keys
-
- ,
- Keyboard interactions#Page up and Page down keys
-
- ,
- and
- Keyboard interactions#Control group
-
- .
+
+
+
+
+
+
+
+
@@ -44,7 +46,8 @@
+ HorizontalAlignment="Stretch"
+ AutomationProperties.Name="Map" />
diff --git a/WinUIGallery/Samples/ControlPages/MapControlPage.xaml.cs b/WinUIGallery/Samples/ControlPages/MapControlPage.xaml.cs
index b7cafd434..716e3afbc 100644
--- a/WinUIGallery/Samples/ControlPages/MapControlPage.xaml.cs
+++ b/WinUIGallery/Samples/ControlPages/MapControlPage.xaml.cs
@@ -15,6 +15,30 @@ public MapControlPage()
this.InitializeComponent();
this.Loaded += MapControlPage_Loaded;
+ this.Unloaded += MapControlPage_Unloaded;
+ }
+
+ private void MapControlPage_Unloaded(object sender, RoutedEventArgs e)
+ {
+ // MapControl is internally backed by a WebView2 hosting Azure Maps.
+ // When the page is navigated away from, the WebView2's UIA tree
+ // (a Pane containing a Chromium RootWebArea with a long
+ // data:text/html;base64 Name) can outlive the page and contaminate
+ // subsequent Axe.Windows accessibility scans across the process.
+ // Explicitly tearing down the MapControl on Unloaded forces the
+ // framework to dispose the embedded WebView2 and remove its UIA
+ // subtree from the process tree.
+ this.Loaded -= MapControlPage_Loaded;
+ this.Unloaded -= MapControlPage_Unloaded;
+
+ if (map1 is not null)
+ {
+ map1.Layers.Clear();
+ if (map1.Parent is Panel parent)
+ {
+ parent.Children.Remove(map1);
+ }
+ }
}
private void MapControlPage_Loaded(object sender, RoutedEventArgs e)
diff --git a/WinUIGallery/Samples/ControlPages/StoragePickersPage.xaml b/WinUIGallery/Samples/ControlPages/StoragePickersPage.xaml
index f123a7e74..e69d4e57b 100644
--- a/WinUIGallery/Samples/ControlPages/StoragePickersPage.xaml
+++ b/WinUIGallery/Samples/ControlPages/StoragePickersPage.xaml
@@ -196,7 +196,7 @@ private async void PickMultipleFilesButton_Click(object sender, RoutedEventArgs
-