Skip to content

fix(accessibility): Add ARIA hints and fix spurious announcements in find widgets#292376

Merged
meganrogge merged 3 commits intomicrosoft:mainfrom
accesswatch:feature/accessibility-aria-polish-pr
Feb 5, 2026
Merged

fix(accessibility): Add ARIA hints and fix spurious announcements in find widgets#292376
meganrogge merged 3 commits intomicrosoft:mainfrom
accesswatch:feature/accessibility-aria-polish-pr

Conversation

@accesswatch
Copy link
Contributor

Summary

This PR adds ARIA hints and fixes spurious screen reader announcements in find/filter widgets to improve the accessibility experience.

Fixes #292375

Changes

Bug Fixes

  1. Guard search result announcements in findWidget.ts:

    • Only announce "X of Y results" when a search string is actually present
    • Prevents confusing "No results" announcements when search input is empty
  2. Check widget visibility before updating aria-label:

    • Prevents stale announcements when widget is hidden
    • Only updates accessibility attributes when widget is visible

ARIA Hint Additions

Added accessibility help hints to find widgets that inherit from SimpleFindWidget:

  • Announcement tracking: Tracks whether hint has been announced via _accessibilityHelpHintAnnounced flag
  • One-time announcement: Announces "Press Alt+F1 for accessibility help" on focus
  • Double-speak prevention: Uses 1-second reset timeout to prevent rapid re-announcements
  • Settings-aware: Only announces when accessibility.verbosity.find setting is enabled
  • Screen reader detection: Only announces when screen reader is active

Files Changed

File Change Type
src/vs/editor/contrib/find/browser/findWidget.ts Bug fixes
src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.ts ARIA hints base
src/vs/workbench/browser/parts/views/viewFilter.ts ARIA hints
src/vs/workbench/contrib/search/browser/searchWidget.ts ARIA hints
src/vs/workbench/contrib/terminalContrib/find/browser/terminalFindWidget.ts Service wiring
src/vs/workbench/contrib/webview/browser/webviewFindWidget.ts Service wiring

Testing

  1. Enable screen reader (NVDA/JAWS/VoiceOver)
  2. Open find widget (Ctrl+F)
  3. Verify hint is announced once when focusing input
  4. Close and reopen find widget - verify hint announces again
  5. Clear search input - verify no spurious "No results" announcement
  6. Type search text, verify results are announced correctly

Related

This PR improves UX polish with ARIA hint improvements and critical
bug fixes for find widget screen reader behavior.
ARIA Hint Improvements:
Added aria-description to announce 'Press Alt+F1 for accessibility help'
- simpleFindWidget.ts: Base widget for Terminal/Webview/Browser find
- searchWidget.ts: Search across files widget
- terminalFindWidget.ts: Terminal find widget
- webviewFindWidget.ts: Webview find widget
- viewFilter.ts: Tree view filters (Problems, Output, etc.)
Bug Fixes in findWidget.ts:
1. Only announce search results when search string is present
   - Prevents spurious 'No results' announcements on empty search
2. Check widget visibility before updating aria-label
   - Prevents stale announcements when dialog is hidden
Double-speak Prevention Pattern:
- Track hint announcement with flag
- Include hint in ARIA label on first reveal
- Reset to plain label after 1 second timeout
- Reset flag on widget hide/close
This is PR 3 of 3 for the Accessibility Help System.
Depends on: PR 2 (Accessibility Help Content)
Copilot AI review requested due to automatic review settings February 2, 2026 19:39
@accesswatch
Copy link
Contributor Author

@meganrogge Here is the other pr, which is mainly fixes.

@meganrogge meganrogge self-assigned this Feb 2, 2026
@meganrogge meganrogge self-requested a review February 2, 2026 20:50
@meganrogge meganrogge added this to the February 2026 milestone Feb 2, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@vs-code-engineering
Copy link

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@bpasero

Matched files:

  • src/vs/workbench/browser/parts/views/viewFilter.ts

Copy link
Collaborator

@meganrogge meganrogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

@meganrogge meganrogge merged commit a39fb79 into microsoft:main Feb 5, 2026
22 of 23 checks passed
daviddossett pushed a commit to daviddossett/vscode that referenced this pull request Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ARIA hints and fix spurious announcements in Find/Filter widgets

4 participants