🎨 Palette: Bind search box accessible name to dynamic placeholder#382
Conversation
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, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughThe PR documents a new accessibility rule requiring that when search placeholder text is bound to a dynamic view-model property, the screen-reader accessibility label ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
visual-studio-extension/DeepLensVisualStudio/DeepLensVisualStudio/ToolWindows/SearchControl.xaml (1)
217-218: Move verbose placeholder text fromAutomationProperties.NametoAutomationProperties.HelpText.The current binding of
SearchPlaceholder(example-laden strings like"Classes: Try 'UserService', 'IConfig', or 'AuthError'...") toAutomationProperties.Namecreates an accessibility issue. Screen readers announceNameas the control's semantic identifier/purpose; using it for verbose hint text misleads screen readers into announcing the full suggestion string as a static label, which is noisy and doesn't match its intended use per UI Automation guidance.A better mapping:
AutomationProperties.Name→ concise scope label (e.g.,"Search"or"Search classes")AutomationProperties.HelpText→SearchPlaceholder(the contextual hint with examples)♻️ Suggested change
- AutomationProperties.Name="{Binding SearchPlaceholder}" + AutomationProperties.Name="Search" + AutomationProperties.HelpText="{Binding SearchPlaceholder}" ToolTip="{Binding SearchPlaceholder}" />This preserves the accessibility intent while properly separating the control's identifier from its supplemental hint.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@visual-studio-extension/DeepLensVisualStudio/DeepLensVisualStudio/ToolWindows/SearchControl.xaml` around lines 217 - 218, The SearchPlaceholder binding is currently assigned to AutomationProperties.Name, which causes verbose hint text to be announced as the control's label; change the XAML so AutomationProperties.Name is a concise label (e.g., "Search" or "Search classes") and move the detailed SearchPlaceholder binding to AutomationProperties.HelpText instead (update the element that currently sets AutomationProperties.Name="{Binding SearchPlaceholder}" to set AutomationProperties.Name to a short literal or a new concise binding and set AutomationProperties.HelpText="{Binding SearchPlaceholder}"); ensure the control still has ToolTip="{Binding SearchPlaceholder}" if desired.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@visual-studio-extension/DeepLensVisualStudio/DeepLensVisualStudio/ToolWindows/SearchControl.xaml`:
- Around line 217-218: The SearchPlaceholder binding is currently assigned to
AutomationProperties.Name, which causes verbose hint text to be announced as the
control's label; change the XAML so AutomationProperties.Name is a concise label
(e.g., "Search" or "Search classes") and move the detailed SearchPlaceholder
binding to AutomationProperties.HelpText instead (update the element that
currently sets AutomationProperties.Name="{Binding SearchPlaceholder}" to set
AutomationProperties.Name to a short literal or a new concise binding and set
AutomationProperties.HelpText="{Binding SearchPlaceholder}"); ensure the control
still has ToolTip="{Binding SearchPlaceholder}" if desired.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 32322878-7796-4223-a81d-578c17739b5f
📒 Files selected for processing (2)
.Jules/palette.mdvisual-studio-extension/DeepLensVisualStudio/DeepLensVisualStudio/ToolWindows/SearchControl.xaml
💡 What
Updated the Visual Studio extension's Search
TextBoxto bind its accessibility name (AutomationProperties.Name) to the dynamicSearchPlaceholderproperty instead of using a hardcoded "Search query" string.🎯 Why
Previously, sighted users would see a helpful, context-aware watermark when changing search scopes, but screen reader users would only hear "Search query" no matter what scope was selected. This change ensures that screen reader users receive the exact same contextual guidance as sighted users.
📸 Before/After
♿ Accessibility
AutomationProperties.Namebinding to cleanly map the ViewModel property to the UI Automation tree.PR created automatically by Jules for task 18071346495318388443 started by @AhmmedSamier
Summary by CodeRabbit
Bug Fixes
Documentation