From 666c874998f8814c8fa4500db25cdc060dffcd5f Mon Sep 17 00:00:00 2001 From: Reza Bakhshi Laktasaraei <74649066+rezabakhshilaktasaraei@users.noreply.github.com> Date: Fri, 11 Apr 2025 04:58:34 +0330 Subject: [PATCH] Add accessibility labels to improve screen reader support (#7105) * Add accessibility with AutomationProperties.Name to menus * Add accessibility labels to StatusBarView using ResUI resources * Add accessibility labels to ProfilesView using ResUI resources --- v2rayN/v2rayN/Views/MainWindow.xaml | 24 +++++++++++++------- v2rayN/v2rayN/Views/ProfilesView.xaml | 12 ++++++---- v2rayN/v2rayN/Views/StatusBarView.xaml | 31 +++++++++++++++++--------- 3 files changed, 44 insertions(+), 23 deletions(-) diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml b/v2rayN/v2rayN/Views/MainWindow.xaml index 9fb2a3ae..2537983e 100644 --- a/v2rayN/v2rayN/Views/MainWindow.xaml +++ b/v2rayN/v2rayN/Views/MainWindow.xaml @@ -42,7 +42,8 @@ ClipToBounds="True" Style="{StaticResource MaterialDesignToolBar}"> - + - + - + - + - + - + - + - + + ToolTip="{x:Static resx:ResUI.menuSubEdit}" + AutomationProperties.Name="{x:Static resx:ResUI.menuSubEdit}"> @@ -60,7 +62,8 @@ Height="30" Margin="{StaticResource MarginLeftRight8}" Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}" - ToolTip="{x:Static resx:ResUI.menuProfileAutofitColumnWidth}"> + ToolTip="{x:Static resx:ResUI.menuProfileAutofitColumnWidth}" + AutomationProperties.Name="{x:Static resx:ResUI.menuProfileAutofitColumnWidth}"> + Style="{StaticResource DefTextBox}" + AutomationProperties.Name="{x:Static resx:ResUI.MsgServerTitle}" /> + VerticalAlignment="Center" AutomationProperties.Name="{x:Static resx:ResUI.TbEnableTunAs}" /> + Style="{StaticResource MaterialDesignFloatingHintComboBox}" + AutomationProperties.Name="{x:Static resx:ResUI.menuSystemproxy}"> @@ -89,7 +90,8 @@ materialDesign:HintAssist.Hint="{x:Static resx:ResUI.menuRouting}" DisplayMemberPath="Remarks" FontSize="{DynamicResource StdFontSize}" - Style="{StaticResource MaterialDesignFloatingHintComboBox}" /> + Style="{StaticResource MaterialDesignFloatingHintComboBox}" + AutomationProperties.Name="{x:Static resx:ResUI.menuRouting}"/> @@ -107,7 +109,8 @@ ToolTipText="v2rayN"> - + - + - + - + - + + Style="{StaticResource MaterialDesignFilledComboBox}" + AutomationProperties.Name="{x:Static resx:ResUI.menuRouting}"/> - + + Style="{StaticResource MaterialDesignFilledComboBox}" + AutomationProperties.Name="{x:Static resx:ResUI.menuServers}"/>