[Accessibility] Foundation: Infrastructure and Wiring for Accessibility Help System#292219
[Accessibility] Foundation: Infrastructure and Wiring for Accessibility Help System#292219accesswatch wants to merge 3 commits intomicrosoft:mainfrom
Conversation
…ity Help System This PR establishes the core wiring that enables accessibility help (Alt+F1) across all VS Code find and filter experiences. Infrastructure Changes: - findController.ts: Added accessibility help trigger integration - accessibleView.ts: Extended for find/filter context support - accessibilityConfiguration.ts: New configuration options Contribution Registrations: - codeEditor.contribution.ts: Editor find/replace wiring - terminal.find.contribution.ts: Terminal find wiring - webview.contribution.ts: Webview find wiring - output.contribution.ts: Output panel filter wiring - markers.contribution.ts: Problems panel filter wiring - search.contribution.ts: Search across files wiring Documentation: - FIND_ACCESSIBILITY_HELP_PRD.md: Product requirements document This is PR 1 of 3 for the Accessibility Help System.
|
@meganrogge Can you review please/? |
There was a problem hiding this comment.
Pull request overview
This pull request establishes the foundational infrastructure for an accessibility help system (Alt+F1) across VS Code's find and filter experiences. The PR aims to enable screen reader users to discover keyboard shortcuts and navigation patterns in find dialogs.
Changes:
- Added new
accessibility.verbosity.findconfiguration setting to control help hints across all find inputs - Extended the
AccessibleViewProviderIdenum with 6 new provider IDs for different find/filter contexts - Modified
FindControllerto injectIConfigurationServiceandIAccessibilityServicefor accessibility hint support - Added contribution wiring in 6 files to register accessibility help providers
- Included comprehensive PRD document (2,272 lines) detailing design, implementation, and testing requirements
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
FIND_ACCESSIBILITY_HELP_PRD.md |
Comprehensive product requirements document - contains merge conflicts |
accessibilityConfiguration.ts |
Added Find enum value and configuration property for verbosity setting |
accessibleView.ts |
Added 6 new provider IDs for find/filter help contexts |
findController.ts |
Injected configuration and accessibility services into constructor |
codeEditor.contribution.ts |
Import for editor find accessibility help (file doesn't exist) |
terminal.find.contribution.ts |
Import and registration for terminal find help (file doesn't exist) |
webview.contribution.ts |
Import and registration for webview find help (file doesn't exist) |
search.contribution.ts |
Import and registration for search help (file doesn't exist) |
output.contribution.ts |
Import and registration for output filter help (file doesn't exist) |
markers.contribution.ts |
Import and registration for problems filter help (file doesn't exist) |
|
|
||
| // #region Accessibility Help | ||
|
|
||
| import { AccessibleViewRegistry } from '../../../../../platform/accessibility/browser/accessibleViewRegistry.js'; | ||
| import { TerminalFindAccessibilityHelp } from './terminalFindAccessibilityHelp.js'; | ||
|
|
||
| AccessibleViewRegistry.register(new TerminalFindAccessibilityHelp()); | ||
|
|
||
| // #endregion |
There was a problem hiding this comment.
The imported class 'TerminalFindAccessibilityHelp' from './terminalFindAccessibilityHelp.js' does not exist in the codebase. This will cause a module resolution error and break the build.
The file 'src/vs/workbench/contrib/terminalContrib/find/browser/terminalFindAccessibilityHelp.ts' was not found. Since this is described as an infrastructure/foundation PR, these implementation files should either be included as stubs or these imports should be removed until the actual implementations are added in subsequent PRs.
| // #region Accessibility Help | |
| import { AccessibleViewRegistry } from '../../../../../platform/accessibility/browser/accessibleViewRegistry.js'; | |
| import { TerminalFindAccessibilityHelp } from './terminalFindAccessibilityHelp.js'; | |
| AccessibleViewRegistry.register(new TerminalFindAccessibilityHelp()); | |
| // #endregion |
| import { Extensions, IConfigurationMigrationRegistry } from '../../../common/configuration.js'; | ||
| import { registerWorkbenchContribution2, WorkbenchPhase } from '../../../common/contributions.js'; | ||
| import { AccessibleViewRegistry } from '../../../../platform/accessibility/browser/accessibleViewRegistry.js'; | ||
| import { SearchAccessibilityHelp } from './searchAccessibilityHelp.js'; |
There was a problem hiding this comment.
The imported class 'SearchAccessibilityHelp' from './searchAccessibilityHelp.js' does not exist in the codebase. This will cause a module resolution error when the code is built or executed.
The registration on line 59 attempts to use this non-existent class, which will fail at runtime.
| import { OutputAccessibilityHelp } from './outputAccessibilityHelp.js'; | ||
|
|
||
| const IMPORTED_LOG_ID_PREFIX = 'importedLog.'; | ||
|
|
||
| // Register Service | ||
| registerSingleton(IOutputService, OutputService, InstantiationType.Delayed); | ||
|
|
||
| // Register Accessibility Help | ||
| AccessibleViewRegistry.register(new OutputAccessibilityHelp()); | ||
|
|
There was a problem hiding this comment.
The imported class 'OutputAccessibilityHelp' from './outputAccessibilityHelp.js' does not exist in the codebase. This will cause a module resolution error.
The registration on line 55 attempts to instantiate this non-existent class.
| import { OutputAccessibilityHelp } from './outputAccessibilityHelp.js'; | |
| const IMPORTED_LOG_ID_PREFIX = 'importedLog.'; | |
| // Register Service | |
| registerSingleton(IOutputService, OutputService, InstantiationType.Delayed); | |
| // Register Accessibility Help | |
| AccessibleViewRegistry.register(new OutputAccessibilityHelp()); | |
| const IMPORTED_LOG_ID_PREFIX = 'importedLog.'; | |
| // Register Service | |
| registerSingleton(IOutputService, OutputService, InstantiationType.Delayed); |
| import { problemsConfigurationNodeBase } from '../../../common/configuration.js'; | ||
| import { MarkerChatContextContribution } from './markersChatContext.js'; | ||
| import { AccessibleViewRegistry } from '../../../../platform/accessibility/browser/accessibleViewRegistry.js'; | ||
| import { ProblemsAccessibilityHelp } from './markersAccessibilityHelp.js'; |
There was a problem hiding this comment.
The imported class 'ProblemsAccessibilityHelp' from './markersAccessibilityHelp.js' does not exist in the codebase. This will cause a module resolution error.
The registration on line 722 attempts to instantiate this non-existent class.
| import { ProblemsAccessibilityHelp } from './markersAccessibilityHelp.js'; |
|
|
||
| private _createFindWidget() { | ||
| this._widget = this._register(new FindWidget(this._editor, this, this._state, this._contextViewService, this._keybindingService, this._contextKeyService, this._hoverService, this._findWidgetSearchHistory, this._replaceWidgetHistory)); | ||
| this._widget = this._register(new FindWidget(this._editor, this, this._state, this._contextViewService, this._keybindingService, this._contextKeyService, this._hoverService, this._findWidgetSearchHistory, this._replaceWidgetHistory, this._configurationService, this._accessibilityService)); |
There was a problem hiding this comment.
The FindWidget constructor is being passed two additional parameters (_configurationService and _accessibilityService) that it doesn't accept in its current signature.
Looking at the FindWidget constructor definition (src/vs/editor/contrib/find/browser/findWidget.ts:159-169), it only accepts 9 parameters:
- codeEditor
- controller
- state
- contextViewProvider
- keybindingService
- contextKeyService
- _hoverService
- _findWidgetSearchHistory
- _replaceWidgetHistory
However, this code is passing 11 parameters by adding _configurationService and _accessibilityService at the end. This will either cause a TypeScript compilation error or the extra parameters will be ignored.
To fix this, the FindWidget constructor signature needs to be updated to accept these two additional services before this change can work.
| import { problemsConfigurationNodeBase } from '../../../common/configuration.js'; | ||
| import { MarkerChatContextContribution } from './markersChatContext.js'; | ||
| import { AccessibleViewRegistry } from '../../../../platform/accessibility/browser/accessibleViewRegistry.js'; | ||
| import { ProblemsAccessibilityHelp } from './markersAccessibilityHelp.js'; |
There was a problem hiding this comment.
Inconsistent file naming: The import uses 'markersAccessibilityHelp.js' but the class is named 'ProblemsAccessibilityHelp'.
In VS Code's codebase, file names should generally match the exported class names (in camelCase for files, PascalCase for classes). The file should be named 'problemsAccessibilityHelp.ts' to match the class name 'ProblemsAccessibilityHelp', or the class should be renamed to 'MarkersAccessibilityHelp' to match the filename.
Note: The "Problems" panel displays "markers" internally, but from a user perspective it's called "Problems", so 'ProblemsAccessibilityHelp' is likely the better choice for consistency with user-facing terminology.
| import { ProblemsAccessibilityHelp } from './markersAccessibilityHelp.js'; | |
| import { ProblemsAccessibilityHelp } from './problemsAccessibilityHelp.js'; |
| <<<<<<< HEAD | ||
| - Press Enter while in the Find input to jump to the PREVIOUS match (scrolling UP toward older output). The match is highlighted in yellow. | ||
| - Press Shift+Enter to jump to the NEXT match (scrolling DOWN toward newer output). | ||
| - Press Escape to close the find widget. Focus moves to the terminal command line. | ||
|
|
||
| Note: This is opposite from editor find because terminal scrollback shows oldest content at the top and newest at the bottom. | ||
| ======= | ||
| **While focused IN the Find input:** | ||
| - Press Enter to jump to the next match. The match is highlighted in yellow in the terminal. | ||
| - Press Shift+Enter to jump to the previous match. | ||
| - Press Escape to close the find widget and return focus to the terminal's command line. | ||
| >>>>>>> accessibility/find-filter-help-discoverability |
There was a problem hiding this comment.
Merge conflict markers detected in the PRD document. The file contains unresolved merge conflict markers (<<<<<<< HEAD, =======, >>>>>>>) on lines 767-792 and 889-900.
These conflict markers need to be resolved before merging the PR. The conflicts appear to be in sections describing keyboard navigation and focus behavior for Editor Find and Terminal Find.
| <<<<<<< HEAD | |
| - Press Enter while in the Find input to jump to the PREVIOUS match (scrolling UP toward older output). The match is highlighted in yellow. | |
| - Press Shift+Enter to jump to the NEXT match (scrolling DOWN toward newer output). | |
| - Press Escape to close the find widget. Focus moves to the terminal command line. | |
| Note: This is opposite from editor find because terminal scrollback shows oldest content at the top and newest at the bottom. | |
| ======= | |
| **While focused IN the Find input:** | |
| - Press Enter to jump to the next match. The match is highlighted in yellow in the terminal. | |
| - Press Shift+Enter to jump to the previous match. | |
| - Press Escape to close the find widget and return focus to the terminal's command line. | |
| >>>>>>> accessibility/find-filter-help-discoverability | |
| - Press Enter while in the Find input to jump to the PREVIOUS match (scrolling UP toward older output). The match is highlighted in yellow. | |
| - Press Shift+Enter to jump to the NEXT match (scrolling DOWN toward newer output). | |
| - Press Escape to close the find widget. Focus moves to the terminal command line. | |
| Note: This is opposite from editor find because terminal scrollback shows oldest content at the top and newest at the bottom. |
| import './accessibility/accessibility.js'; | ||
| import './diffEditorHelper.js'; | ||
| import './editorFeatures.js'; | ||
| import './editorFindAccessibilityHelp.js'; |
There was a problem hiding this comment.
The imported file 'editorFindAccessibilityHelp.js' does not exist in the codebase. This import will cause a runtime error when this code is executed.
According to the PR description, this is "PR 1 of 3: Foundation & Infrastructure" that establishes "the platform wiring, configuration surface, and contribution registrations that subsequent PRs will build upon." However, importing non-existent files will break the build and prevent the code from running.
Consider either:
- Creating a stub/placeholder file for 'editorFindAccessibilityHelp.ts' that exports an empty registration (if it's meant to be a side-effect import)
- Removing this import until the actual implementation is added in PR 2
- If this is intentional, the PR description should explicitly state that this PR is not functional on its own
| import './editorFindAccessibilityHelp.js'; |
| import { IWebviewService, IWebview } from './webview.js'; | ||
| import { WebviewInput } from '../../webviewPanel/browser/webviewEditorInput.js'; | ||
| import { IEditorService } from '../../../services/editor/common/editorService.js'; | ||
| import { WebviewFindAccessibilityHelp } from './webviewFindAccessibilityHelp.js'; |
There was a problem hiding this comment.
The imported class 'WebviewFindAccessibilityHelp' from './webviewFindAccessibilityHelp.js' does not exist in the codebase. This will cause a module resolution error.
The registration on line 90 attempts to instantiate 'new WebviewFindAccessibilityHelp()' but the class is not defined anywhere. This will result in a runtime error.
|
@accesswatch we'll want to delete |
|
we're closing these in favor of a new one that merges the changes |
[Accessibility] Foundation: Infrastructure and Wiring for Accessibility Help System
Executive Summary
This PR establishes the foundational infrastructure that enables contextual accessibility help (Alt+F1) across all of VS Code's find and filter experiences. Screen reader users currently have no discoverable way to learn keyboard shortcuts and navigation patterns for find dialogs. This change introduces the platform wiring, configuration surface, and contribution registrations that subsequent PRs will build upon to deliver comprehensive accessibility help content.
Target users: Screen reader users (NVDA, JAWS, VoiceOver) and keyboard-first users who need discoverable help for find/filter functionality.
Key insight from implementation: In all find widgets (except when pressing Escape to close), focus remains in the find input when navigating between matches. This allows users to continue navigating or refine their search without having to return to the input. This behavior is now documented in the accessibility help content.
Checklist
nls.localize()for localizationnpm run compile)npm run test)What This PR Includes
1. Product Requirements Document (PRD)
File:
FIND_ACCESSIBILITY_HELP_PRD.md(+2,272 lines)Comprehensive product requirements document covering:
2. New Configuration Setting
File:
src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.tsAdded new verbosity setting for find experiences:
accessibility.verbosity.findbooleantrueWhen enabled and a screen reader is detected, find widgets will announce "Press Alt+F1 for accessibility help" on first focus.
3. Core Infrastructure Updates
File:
src/vs/editor/contrib/find/browser/findController.ts(+6 lines)IAccessibilityServicefor screen reader detectionFindWidgetconstructorFile:
src/vs/platform/accessibility/browser/accessibleView.ts(+8 lines)AccessibleViewProviderId.EditorFindHelpidentifier4. Contribution Registrations (Wiring)
These changes register the forthcoming accessibility help providers with VS Code's contribution system. Each adds a single import/registration line that wires the help system into the component.
codeEditor.contribution.tsterminal.find.contribution.tswebview.contribution.tsoutput.contribution.tsmarkers.contribution.tssearch.contribution.tsTechnical Implementation Details
Accessible View Registry Pattern
The accessibility help system uses VS Code's established
AccessibleViewRegistrypattern:Each help provider implements
IAccessibleViewImplementation:priority: Determines which provider activates when multiple matchname: Unique identifier for the providerwhen: Context key expression defining activation conditionstype:AccessibleViewType.Helpfor help contentgetProvider(): Factory returning the content providerContext Key Expressions
Help providers activate based on context keys:
CONTEXT_FIND_INPUT_FOCUSED- Editor find input has focusCONTEXT_REPLACE_INPUT_FOCUSED- Editor replace input has focusVerbosity Setting Integration
The verbosity setting follows the existing pattern for other VS Code accessibility verbosity settings:
Testing & Validation
Automated Testing
Manual Validation Steps
Verify setting registration:
Verify contribution wiring:
Verify PRD accessibility:
FIND_ACCESSIBILITY_HELP_PRD.mdin VS CodeDependencies & Related PRs
feature/accessibility-help-foundationfeature/accessibility-help-contentfeature/accessibility-aria-polishRollout Considerations
accessibility.verbosity.*pattern; no new feature flag neededRelease Note
Reviewers
Files Changed Summary
FIND_ACCESSIBILITY_HELP_PRD.mdaccessibilityConfiguration.tsfindController.tsaccessibleView.tscodeEditor.contribution.tsterminal.find.contribution.tswebview.contribution.tsoutput.contribution.tsmarkers.contribution.tssearch.contribution.ts