Fix keyboard tooltip accessibility in query results toolbar (A11y WCAG 2.1.1) #20344
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes keyboard accessibility issue where tooltips were not visible when navigating with keyboard (Tab or arrow keys) to toolbar icons in the query results panel. This addresses the extension-specific UI components mentioned in #1231.
Problem
Users navigating the query results toolbar with keyboard could not see tooltips that provide essential information about button functions. Tooltips only appeared on mouse hover, creating an accessibility barrier for keyboard-only users and violating WCAG 2.1.1 (Keyboard) requirements.
Affected buttons:
Solution
Updated the
CommandBarcomponent to use Fluent UI v9 best practices for accessible tooltips:Before:
After:
Technical Changes
Tooltip Relationship: Changed from
"label"to"description"relationship="label"provides accessible name but may not show visually on focusrelationship="description"providesaria-describedbyAND ensures visual tooltip display on keyboard focusAccessibility Attributes: Replaced
titlewitharia-labelMaximize/Restore Button: Fixed tooltip content to dynamically reflect current state
Testing
Accessibility Compliance
This change ensures compliance with:
Issue Context
The original issue (#1231) reported tooltip accessibility problems in multiple areas. Per maintainer comments, the "split editor right" icon and execute button are VSCode core UI elements tracked in upstream issues (microsoft/vscode#52016, microsoft/vscode#132344). This PR specifically addresses the extension-owned query results toolbar, ensuring our UI components provide proper keyboard accessibility.
Files Changed
src/reactviews/pages/QueryResult/commandBar.tsx(36 lines changed: 22 additions, 14 deletions)Closes #1231
Original prompt
Fixes #17202
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.