From 2c30a87b4c23d137cf5ba02162cd7ab76e1a8750 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 16:31:38 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20tooltip=20and?= =?UTF-8?q?=20a11y=20label=20to=20remove=20deployment=20button?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 💡 What: Added a `ToolTip` and `AutomationProperties.Name` to the icon-only "-" button in the Deployment IDs list. 🎯 Why: The button previously lacked context for screen reader users and had no visual tooltip for sighted users. ♿ Accessibility: Used `AutomationProperties.Name` (WPF equivalent of ARIA label) to ensure screen readers announce "Remove Deployment ID". Added localization for English and Persian. Co-authored-by: maattyi <228237318+maattyi@users.noreply.github.com> --- .Jules/palette.md | 3 +++ gui/Services/Localization.cs | 2 ++ gui/Views/MainWindow.xaml | 4 +++- tests/__init__.py | 0 4 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .Jules/palette.md create mode 100644 tests/__init__.py diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 0000000..a1bcac1 --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,3 @@ +## 2024-05-01 - Add Screen Reader Support to Dynamic List Buttons +**Learning:** In WPF (XAML) apps like this one, icon-only buttons inside `ItemsControl` (like dynamic lists of deployment IDs) often lack context for screen readers. Using `AutomationProperties.Name` is the standard a11y approach here, equivalent to `aria-label` in web dev. +**Action:** Always check dynamically generated lists for icon-only action buttons (e.g., delete/remove `-` buttons) and ensure they have `ToolTip` and `AutomationProperties.Name` bound to localized strings. \ No newline at end of file diff --git a/gui/Services/Localization.cs b/gui/Services/Localization.cs index 7cbc733..4920cd1 100644 --- a/gui/Services/Localization.cs +++ b/gui/Services/Localization.cs @@ -98,6 +98,7 @@ public string Lang ["language"] = "Language", ["deployment_ids"] = "Deployment IDs", ["add_deployment"] = "+ Add Deployment ID", + ["remove_deployment"] = "Remove Deployment ID", ["presets"] = "Connection presets", ["preset_stealth"] = "Slow but stealthy", ["preset_balanced"] = "Balanced", @@ -174,6 +175,7 @@ public string Lang ["language"] = "زبان", ["deployment_ids"] = "شناسه‌های Deployment", ["add_deployment"] = "+ افزودن شناسه Deployment", + ["remove_deployment"] = "حذف شناسه Deployment", ["presets"] = "پیش‌تنظیم‌های اتصال", ["preset_stealth"] = "کند ولی مخفی‌تر", ["preset_balanced"] = "متعادل", diff --git a/gui/Views/MainWindow.xaml b/gui/Views/MainWindow.xaml index 616daf8..d9b6c10 100644 --- a/gui/Views/MainWindow.xaml +++ b/gui/Views/MainWindow.xaml @@ -359,7 +359,9 @@ Padding="0" Width="30" Height="30" Margin="6,0,0,0" Command="{Binding DataContext.RemoveDeploymentCmd, RelativeSource={RelativeSource AncestorType=Window}}" - CommandParameter="{Binding}"/> + CommandParameter="{Binding}" + ToolTip="{Binding DataContext.Loc[remove_deployment], RelativeSource={RelativeSource AncestorType=Window}}" + AutomationProperties.Name="{Binding DataContext.Loc[remove_deployment], RelativeSource={RelativeSource AncestorType=Window}}"/> diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29