From 2d5915de631a1e2ad8336771db0eda66479e596f Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 23:37:54 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Bind=20search=20box?= =?UTF-8?q?=20accessible=20name=20to=20dynamic=20placeholder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updates the Visual Studio extension Search TextBox to use the dynamic `SearchPlaceholder` property for its `AutomationProperties.Name` instead of a static "Search query" string, ensuring screen readers receive the same contextual guidance as sighted users. Co-authored-by: AhmmedSamier <17784876+AhmmedSamier@users.noreply.github.com> --- .Jules/palette.md | 3 +++ .../DeepLensVisualStudio/ToolWindows/SearchControl.xaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.Jules/palette.md b/.Jules/palette.md index 2f231bf7..d71f9d40 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -4,3 +4,6 @@ ## 2024-05-24 - Dynamic Contextual Search Placeholders **Learning:** Hardcoded placeholders in a unified search bar fail to guide users when they switch specific context filters. Providing context-aware search query suggestions directly inside the empty `TextBox` watermark drastically improves feature discoverability. **Action:** When a UI component manages multiple scopes or filters, bind its empty state watermark/placeholder to a dynamic property that reacts to the selected filter state, rather than using a generic static string. +## 2024-05-24 - Dynamic Contextual Search Placeholders Accessibility +**Learning:** We recently made the `TextBox` watermark/placeholder dynamic. However, if the screen-reader specific `AutomationProperties.Name` remains hardcoded (e.g., "Search query"), visually impaired users do not benefit from the contextual hints provided by the new dynamic placeholder. +**Action:** When binding a visual placeholder (`TextBlock.Text` or `TextBox.ToolTip`) to a dynamic view-model property, always ensure that corresponding accessibility attributes like `AutomationProperties.Name` are bound to the exact same dynamic property. diff --git a/visual-studio-extension/DeepLensVisualStudio/DeepLensVisualStudio/ToolWindows/SearchControl.xaml b/visual-studio-extension/DeepLensVisualStudio/DeepLensVisualStudio/ToolWindows/SearchControl.xaml index a9089b00..88204aae 100644 --- a/visual-studio-extension/DeepLensVisualStudio/DeepLensVisualStudio/ToolWindows/SearchControl.xaml +++ b/visual-studio-extension/DeepLensVisualStudio/DeepLensVisualStudio/ToolWindows/SearchControl.xaml @@ -214,7 +214,7 @@ FontSize="14" Foreground="{DynamicResource {x:Static vsshell:VsBrushes.ToolWindowTextKey}}" Text="{Binding SearchQuery, UpdateSourceTrigger=PropertyChanged}" - AutomationProperties.Name="Search query" + AutomationProperties.Name="{Binding SearchPlaceholder}" ToolTip="{Binding SearchPlaceholder}" />