a11y: make 'Select a language' hint action keyboard-focusable (#132085) - #336387
Mahiv Ram(maram) (maram-odoo) wants to merge 2 commits into
Conversation
…oft#132085) Add tabIndex=0, role='button', and Enter/Space keydown handler to the hint action anchors in empty/untitled editor hint widget so users can tab to and activate the 'Select a language' action without the hint disappearing. Also set data-content-index on action anchors in renderFormattedText so consumers can identify which action was triggered by keyboard events. Fixes microsoft#132085
There was a problem hiding this comment.
🟡 Changes recommended
Keyboard activation passes an incompatible event, and existing renderer tests will fail.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Makes empty-editor hint actions keyboard accessible and exposes action indices for event targeting.
Changes:
- Adds focus, button semantics, and Enter/Space handling.
- Adds action-index metadata to formatted-text anchors.
File summaries
| File | Description |
|---|---|
emptyTextEditorHint.ts |
Adds keyboard interaction to hint actions. |
formattedTextRenderer.ts |
Adds action-index metadata to rendered anchors. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Wrap keyboard event with StandardKeyboardEvent so IContentActionHandler receives the expected IKeyboardEvent interface (fixes Enter/Space activation breaking before opening actions) - Update FormattedTextRenderer test assertions to account for the new data-content-index attribute on action anchors - add StandardKeyboardEvent import Co-authored-by: open-source-contributer <open-source-contributer@hermes.nousresearch.com>
|
Mahiv Ram(maram) (@maram-odoo) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Summary
[[Select a language]]and[[Generate code]]hint actions in empty/untitled editor hints keyboard-accessible by addingtabIndex=0,role="button", and Enter/Space keydown handling.data-content-indexon action anchors inrenderFormattedTextso consumers can identify which action a keyboard event targeted.Fixes #132085
Test plan
🤖 Generated with Claude Code