From 6ee6fb17065bee603147d88f2a0f700e10cebb49 Mon Sep 17 00:00:00 2001
From: Reza Bakhshi Laktasaraei
<74649066+rezabakhshilaktasaraei@users.noreply.github.com>
Date: Mon, 28 Apr 2025 10:55:57 +0330
Subject: [PATCH] Improve Accessibility in StatusBarView and ProfilesView,
Update Package Versions (#7199)
* Fix Tab navigation in ToolBar by setting KeyboardNavigation to Continue
* 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.
* 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.
* 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.
* Update Directory.Packages.props
---------
Co-authored-by: 2dust <31833384+2dust@users.noreply.github.com>
---
v2rayN/Directory.Packages.props | 2 +-
v2rayN/v2rayN/Views/ProfilesView.xaml | 8 ++++++--
v2rayN/v2rayN/Views/StatusBarView.xaml | 24 +++++++++++++++++++++---
3 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/v2rayN/Directory.Packages.props b/v2rayN/Directory.Packages.props
index 5777d1bb..d96899fb 100644
--- a/v2rayN/Directory.Packages.props
+++ b/v2rayN/Directory.Packages.props
@@ -27,4 +27,4 @@
-
\ No newline at end of file
+
diff --git a/v2rayN/v2rayN/Views/ProfilesView.xaml b/v2rayN/v2rayN/Views/ProfilesView.xaml
index 871572c1..18431152 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}">
diff --git a/v2rayN/v2rayN/Views/StatusBarView.xaml b/v2rayN/v2rayN/Views/StatusBarView.xaml
index d337c4cd..61c6c105 100644
--- a/v2rayN/v2rayN/Views/StatusBarView.xaml
+++ b/v2rayN/v2rayN/Views/StatusBarView.xaml
@@ -92,7 +92,13 @@
AutomationProperties.Name="{x:Static resx:ResUI.menuRouting}"
DisplayMemberPath="Remarks"
FontSize="{DynamicResource StdFontSize}"
- Style="{StaticResource MaterialDesignFloatingHintComboBox}" />
+ Style="{StaticResource MaterialDesignFloatingHintComboBox}">
+
+
+
+
@@ -184,7 +190,13 @@
AutomationProperties.Name="{x:Static resx:ResUI.menuRouting}"
DisplayMemberPath="Remarks"
FontSize="{DynamicResource StdFontSize}"
- Style="{StaticResource MaterialDesignFilledComboBox}" />
+ Style="{StaticResource MaterialDesignFilledComboBox}">
+
+
+
+
@@ -198,7 +210,13 @@
AutomationProperties.Name="{x:Static resx:ResUI.menuServers}"
DisplayMemberPath="Text"
FontSize="{DynamicResource StdFontSize}"
- Style="{StaticResource MaterialDesignFilledComboBox}" />
+ Style="{StaticResource MaterialDesignFilledComboBox}">
+
+
+
+