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