From 5c38e96493c9e1e6b04ff2e1683f17a015c650a4 Mon Sep 17 00:00:00 2001 From: Reza Bakhshi Laktasaraei <74649066+rezabakhshilaktasaraei@users.noreply.github.com> Date: Fri, 25 Apr 2025 10:45:58 +0330 Subject: [PATCH 1/6] Fix Tab navigation in ToolBar by setting KeyboardNavigation to Continue --- v2rayN/v2rayN/Views/MainWindow.xaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml b/v2rayN/v2rayN/Views/MainWindow.xaml index 6c233ef4..a33e919a 100644 --- a/v2rayN/v2rayN/Views/MainWindow.xaml +++ b/v2rayN/v2rayN/Views/MainWindow.xaml @@ -40,7 +40,8 @@ HorizontalAlignment="Center" VerticalAlignment="Center" ClipToBounds="True" - Style="{StaticResource MaterialDesignToolBar}"> + Style="{StaticResource MaterialDesignToolBar}" + KeyboardNavigation.TabNavigation="Continue"> From b62cfd9d4bd7b0ab3ebcce7ee2a3567284fd001a Mon Sep 17 00:00:00 2001 From: Reza Bakhshi Laktasaraei <74649066+rezabakhshilaktasaraei@users.noreply.github.com> Date: Sun, 27 Apr 2025 03:35:52 +0330 Subject: [PATCH 2/6] Improve accessibility for ComboBoxes in StatusBarView.xaml Added ItemContainerStyle to cmbRoutings2 and cmbRoutings to bind AutomationProperties.Name to Remarks, ensuring screen readers announce the correct values instead of the default object type. --- v2rayN/v2rayN/Views/StatusBarView.xaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/v2rayN/v2rayN/Views/StatusBarView.xaml b/v2rayN/v2rayN/Views/StatusBarView.xaml index 2cb2c18b..b0e7e62d 100644 --- a/v2rayN/v2rayN/Views/StatusBarView.xaml +++ b/v2rayN/v2rayN/Views/StatusBarView.xaml @@ -91,7 +91,13 @@ DisplayMemberPath="Remarks" FontSize="{DynamicResource StdFontSize}" Style="{StaticResource MaterialDesignFloatingHintComboBox}" - AutomationProperties.Name="{x:Static resx:ResUI.menuRouting}"/> + AutomationProperties.Name="{x:Static resx:ResUI.menuRouting}"> + + + + @@ -173,7 +179,13 @@ DisplayMemberPath="Remarks" FontSize="{DynamicResource StdFontSize}" Style="{StaticResource MaterialDesignFilledComboBox}" - AutomationProperties.Name="{x:Static resx:ResUI.menuRouting}"/> + AutomationProperties.Name="{x:Static resx:ResUI.menuRouting}"> + + + + From dafc765a82127a64940348e1218e5719d5f06b18 Mon Sep 17 00:00:00 2001 From: Reza Bakhshi Laktasaraei <74649066+rezabakhshilaktasaraei@users.noreply.github.com> Date: Sun, 27 Apr 2025 08:28:32 +0330 Subject: [PATCH 3/6] Improve accessibility for cmbServers in StatusBarView.xaml Added ItemContainerStyle to cmbServers to bind AutomationProperties.Name to Text, ensuring screen readers announce the correct values instead of the default object type. --- v2rayN/v2rayN/Views/StatusBarView.xaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/v2rayN/v2rayN/Views/StatusBarView.xaml b/v2rayN/v2rayN/Views/StatusBarView.xaml index b0e7e62d..1a0627ed 100644 --- a/v2rayN/v2rayN/Views/StatusBarView.xaml +++ b/v2rayN/v2rayN/Views/StatusBarView.xaml @@ -199,7 +199,13 @@ DisplayMemberPath="Text" FontSize="{DynamicResource StdFontSize}" Style="{StaticResource MaterialDesignFilledComboBox}" - AutomationProperties.Name="{x:Static resx:ResUI.menuServers}"/> + AutomationProperties.Name="{x:Static resx:ResUI.menuServers}"> + + + + From 9cc3122bdaabc1f0980d4117370a7e08211de906 Mon Sep 17 00:00:00 2001 From: Reza Bakhshi Laktasaraei <74649066+rezabakhshilaktasaraei@users.noreply.github.com> Date: Sun, 27 Apr 2025 19:26:23 +0330 Subject: [PATCH 4/6] Update package versions and fix accessibility in ProfilesView.xaml - Updated package versions in Directory.Packages.props: - Semi.Avalonia and Semi.Avalonia.DataGrid from 11.2.1.6 to 11.2.1.7. - ZXing.Net.Bindings.SkiaSharp from 0.16.14 to 0.16.21. - Fixed MC3024 error in ProfilesView.xaml by creating AccessibleMyChipListBoxItem style: - Added AccessibleMyChipListBoxItem style based on MyChipListBoxItem to set AutomationProperties.Name. - Replaced ItemContainerStyle with AccessibleMyChipListBoxItem to preserve original appearance. - Updated AutomationProperties.Name to use resx:ResUI.menuSubscription for better localization. - Removed duplicate AutomationProperties.Name from TextBlock as it's now handled by the style. --- v2rayN/Directory.Packages.props | 6 +++--- v2rayN/v2rayN/Views/ProfilesView.xaml | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/v2rayN/Directory.Packages.props b/v2rayN/Directory.Packages.props index b269cbe7..519eb7e7 100644 --- a/v2rayN/Directory.Packages.props +++ b/v2rayN/Directory.Packages.props @@ -18,13 +18,13 @@ - - + + - + \ No newline at end of file diff --git a/v2rayN/v2rayN/Views/ProfilesView.xaml b/v2rayN/v2rayN/Views/ProfilesView.xaml index 6fcdc208..62dd2781 100644 --- a/v2rayN/v2rayN/Views/ProfilesView.xaml +++ b/v2rayN/v2rayN/Views/ProfilesView.xaml @@ -18,6 +18,9 @@ + @@ -26,8 +29,9 @@ x:Name="lstGroup" MaxHeight="200" FontSize="{DynamicResource StdFontSize}" - ItemContainerStyle="{StaticResource MyChipListBoxItem}" - Style="{StaticResource MaterialDesignChoiceChipPrimaryOutlineListBox}"> + ItemContainerStyle="{StaticResource AccessibleMyChipListBoxItem}" + Style="{StaticResource MaterialDesignChoiceChipPrimaryOutlineListBox}" + AutomationProperties.Name="{x:Static resx:ResUI.menuSubscription}"> From cdde1fca09e96e1d409c76a6791a6bf3089ed6a0 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Mon, 28 Apr 2025 15:25:31 +0800 Subject: [PATCH 5/6] Update Directory.Packages.props --- v2rayN/Directory.Packages.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2rayN/Directory.Packages.props b/v2rayN/Directory.Packages.props index 519eb7e7..d96899fb 100644 --- a/v2rayN/Directory.Packages.props +++ b/v2rayN/Directory.Packages.props @@ -25,6 +25,6 @@ - + - \ No newline at end of file + From a055108a53a01dd947f6210aff2ae788361cd51b Mon Sep 17 00:00:00 2001 From: Reza Bakhshi Laktasaraei <74649066+rezabakhshilaktasaraei@users.noreply.github.com> Date: Tue, 29 Apr 2025 07:06:23 +0330 Subject: [PATCH 6/6] Refactor ListBox in ProfilesView to use custom ItemContainerStyle - Removed unused AccessibleMyChipListBoxItem style from UserControl.Resources. - Added a new ItemContainerStyle directly to the ListBox (lstGroup) with the following changes: - Set Focusable to False to prevent tab focus. - Set AutomationProperties.Name to Remarks for better accessibility. - Used a custom ControlTemplate with a RadioButton for item selection. This improves maintainability and ensures consistent accessibility behavior. --- v2rayN/v2rayN/Views/ProfilesView.xaml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/v2rayN/v2rayN/Views/ProfilesView.xaml b/v2rayN/v2rayN/Views/ProfilesView.xaml index 18431152..38b80a1f 100644 --- a/v2rayN/v2rayN/Views/ProfilesView.xaml +++ b/v2rayN/v2rayN/Views/ProfilesView.xaml @@ -18,9 +18,6 @@ - @@ -29,7 +26,6 @@ x:Name="lstGroup" MaxHeight="200" FontSize="{DynamicResource StdFontSize}" - ItemContainerStyle="{StaticResource AccessibleMyChipListBoxItem}" Style="{StaticResource MaterialDesignChoiceChipPrimaryOutlineListBox}" AutomationProperties.Name="{x:Static resx:ResUI.menuSubscription}"> @@ -37,6 +33,29 @@ + + +