diff --git a/src/Files.App.Controls/BreadcrumbBar/BreadcrumbBar.Properties.cs b/src/Files.App.Controls/BreadcrumbBar/BreadcrumbBar.Properties.cs index a02306d2a95c..d7586b1cd9c2 100644 --- a/src/Files.App.Controls/BreadcrumbBar/BreadcrumbBar.Properties.cs +++ b/src/Files.App.Controls/BreadcrumbBar/BreadcrumbBar.Properties.cs @@ -21,5 +21,8 @@ public partial class BreadcrumbBar : Control [GeneratedDependencyProperty] public partial string? RootItemToolTip { get; set; } + + [GeneratedDependencyProperty] + public partial string? RootItemChevronToolTip { get; set; } } } diff --git a/src/Files.App.Controls/BreadcrumbBar/BreadcrumbBar.xaml b/src/Files.App.Controls/BreadcrumbBar/BreadcrumbBar.xaml index cd45ce83ad0b..07941750a874 100644 --- a/src/Files.App.Controls/BreadcrumbBar/BreadcrumbBar.xaml +++ b/src/Files.App.Controls/BreadcrumbBar/BreadcrumbBar.xaml @@ -56,6 +56,7 @@ x:Name="PART_RootBreadcrumbBarItem" Grid.Column="0" Padding="{StaticResource BreadcrumbBarRootItemPadding}" + ChevronToolTip="{TemplateBinding RootItemChevronToolTip}" CornerRadius="{StaticResource BreadcrumbBarRootItemCornerRadius}" ItemToolTip="{TemplateBinding RootItemToolTip}"> diff --git a/src/Files.App.Controls/BreadcrumbBar/BreadcrumbBarItem.Properties.cs b/src/Files.App.Controls/BreadcrumbBar/BreadcrumbBarItem.Properties.cs index 47cae0a537a4..578ae62c67ad 100644 --- a/src/Files.App.Controls/BreadcrumbBar/BreadcrumbBarItem.Properties.cs +++ b/src/Files.App.Controls/BreadcrumbBar/BreadcrumbBarItem.Properties.cs @@ -14,10 +14,10 @@ public partial class BreadcrumbBarItem public partial bool IsLastItem { get; set; } [GeneratedDependencyProperty] - public partial string ItemToolTip { get; set; } + public partial string? ItemToolTip { get; set; } [GeneratedDependencyProperty] - public partial string ChevronToolTip { get; set; } + public partial string? ChevronToolTip { get; set; } partial void OnIsEllipsisChanged(bool newValue) { diff --git a/src/Files.App.Controls/Omnibar/Omnibar.xaml b/src/Files.App.Controls/Omnibar/Omnibar.xaml index dc84422b9673..e9b55811f684 100644 --- a/src/Files.App.Controls/Omnibar/Omnibar.xaml +++ b/src/Files.App.Controls/Omnibar/Omnibar.xaml @@ -131,6 +131,8 @@ Width="{StaticResource OmnibarModeDefaultClickAreaWidth}" Height="{StaticResource OmnibarModeDefaultHeight}" Margin="1" + AutomationProperties.AccessibilityView="Content" + AutomationProperties.Name="{Binding ModeName, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" diff --git a/src/Files.App/Data/Items/PathBoxItem.cs b/src/Files.App/Data/Items/PathBoxItem.cs index b83150c0c08a..88199efc841e 100644 --- a/src/Files.App/Data/Items/PathBoxItem.cs +++ b/src/Files.App/Data/Items/PathBoxItem.cs @@ -8,5 +8,7 @@ public sealed class PathBoxItem public string? Title { get; set; } public string? Path { get; set; } + + public string? ChevronToolTip { get; set; } } } diff --git a/src/Files.App/Strings/en-US/Resources.resw b/src/Files.App/Strings/en-US/Resources.resw index d1eb58490662..472f415026a8 100644 --- a/src/Files.App/Strings/en-US/Resources.resw +++ b/src/Files.App/Strings/en-US/Resources.resw @@ -4259,7 +4259,10 @@ Show collapsed path breadcrumbs - Show child folders + Show folders in {0} + + + Show folders in Home There are no commands containing {0} diff --git a/src/Files.App/UserControls/NavigationToolbar.xaml b/src/Files.App/UserControls/NavigationToolbar.xaml index bb76747dc890..a9f2149f6050 100644 --- a/src/Files.App/UserControls/NavigationToolbar.xaml +++ b/src/Files.App/UserControls/NavigationToolbar.xaml @@ -366,6 +366,7 @@ ItemDropDownFlyoutClosed="BreadcrumbBar_ItemDropDownFlyoutClosed" ItemDropDownFlyoutOpening="BreadcrumbBar_ItemDropDownFlyoutOpening" ItemsSource="{x:Bind ViewModel.PathComponents, Mode=OneWay}" + RootItemChevronToolTip="{helpers:ResourceString Name=BreadcrumbBarRootChevronButtonToolTip}" RootItemToolTip="{helpers:ResourceString Name=Home}"> > GetDirectoryPathComponentsWithDispla if (!string.IsNullOrEmpty(folder?.DisplayName)) item.Title = folder.DisplayName; } + + item.ChevronToolTip = string.Format(Strings.BreadcrumbBarChevronButtonToolTip.GetLocalizedResource(), item.Title); } return pathBoxItems; @@ -321,7 +323,8 @@ private static PathBoxItem GetPathItem(string component, string path) return new PathBoxItem() { Title = title, - Path = path + Path = path, + ChevronToolTip = string.Format(Strings.BreadcrumbBarChevronButtonToolTip.GetLocalizedResource(), title), }; } diff --git a/src/Files.App/Views/HomePage.xaml.cs b/src/Files.App/Views/HomePage.xaml.cs index 12e63644fb8a..3aedcb4ee160 100644 --- a/src/Files.App/Views/HomePage.xaml.cs +++ b/src/Files.App/Views/HomePage.xaml.cs @@ -69,6 +69,7 @@ protected override async void OnNavigatedTo(NavigationEventArgs e) { Title = componentLabel, Path = tag, + ChevronToolTip = string.Format(Strings.BreadcrumbBarChevronButtonToolTip.GetLocalizedResource(), componentLabel), }; AppInstance.ToolbarViewModel.PathComponents.Add(item); diff --git a/src/Files.App/Views/ReleaseNotesPage.xaml.cs b/src/Files.App/Views/ReleaseNotesPage.xaml.cs index c587062f3c37..67edb1a06d03 100644 --- a/src/Files.App/Views/ReleaseNotesPage.xaml.cs +++ b/src/Files.App/Views/ReleaseNotesPage.xaml.cs @@ -68,6 +68,7 @@ protected override async void OnNavigatedTo(NavigationEventArgs e) { Title = componentLabel, Path = tag, + ChevronToolTip = string.Format(Strings.BreadcrumbBarChevronButtonToolTip.GetLocalizedResource(), componentLabel), }; AppInstance.ToolbarViewModel.PathComponents.Add(item); diff --git a/src/Files.App/Views/Shells/BaseShellPage.cs b/src/Files.App/Views/Shells/BaseShellPage.cs index 65a60d14d6e4..6f5c7b2a3d49 100644 --- a/src/Files.App/Views/Shells/BaseShellPage.cs +++ b/src/Files.App/Views/Shells/BaseShellPage.cs @@ -481,7 +481,13 @@ public async Task UpdatePathUIToWorkingDirectoryAsync(string newWorkingDir, stri // Clear the path UI ToolbarViewModel.PathComponents.Clear(); ToolbarViewModel.IsSingleItemOverride = true; - ToolbarViewModel.PathComponents.Add(new PathBoxItem() { Path = null, Title = singleItemOverride }); + ToolbarViewModel.PathComponents.Add( + new() + { + Path = null, + Title = singleItemOverride, + ChevronToolTip = string.Format(Strings.BreadcrumbBarChevronButtonToolTip.GetLocalizedResource(), singleItemOverride), + }); } } diff --git a/tests/Files.App.UITests/Views/OmnibarPage.xaml b/tests/Files.App.UITests/Views/OmnibarPage.xaml index 4ca5f82a5a0b..1e3bae3bd0f7 100644 --- a/tests/Files.App.UITests/Views/OmnibarPage.xaml +++ b/tests/Files.App.UITests/Views/OmnibarPage.xaml @@ -52,11 +52,11 @@ - + @@ -90,7 +90,7 @@ - +