[PR #6290] When the tab receives focus, immediately move focus to the active control #26626

Open
opened 2026-01-31 09:17:12 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/6290

State: closed
Merged: No


I'm mostly just putting the PR out there for comments. I'm worried that this might have horrifying unintentional side-effects for accessibility, which I'm not loving.

This PR makes the Tab immediately toss focus to the active control, whenever the Tab receives focus, for any reason.

  • Left-click on the tab to focus the window? Focus the control. #3609
  • Close the color picker? Focus the control.
  • Hit esc to dismiss the menuflyout from the New Tab menu, the tab context menu? Focus the control. #5750
  • Hit esc to dismiss the tab rename? Focus the control.

@carlos-zamora will this horribly break accessibility?

My other theory here is to pre-emptively prevent the tab from receiving focus. That would probably involve

  • Focusing the control when a tab is left clicked
  • Manually passing focus to the control when any flyout is closed
  • Manually passing focus to the control when the color picker is closed
  • Manually passing focus to the control when the tab renamer is dismissed
  • Manually passing focus to the control when the command palette is closed
  • Manually passing focus to the control when <any future UI> is closed

So that might not scale as well, but that might be the more correct solution.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/6290 **State:** closed **Merged:** No --- I'm mostly just putting the PR out there for comments. I'm worried that this might have horrifying unintentional side-effects for accessibility, which I'm not loving. This PR makes the `Tab` immediately toss focus to the active control, whenever the `Tab` receives focus, for any reason. * Left-click on the tab to focus the window? Focus the control. #3609 * Close the color picker? Focus the control. * Hit esc to dismiss the menuflyout from the New Tab menu, the tab context menu? Focus the control. #5750 * Hit esc to dismiss the tab rename? Focus the control. @carlos-zamora will this horribly break accessibility? My other theory here is to pre-emptively prevent the tab from receiving focus. That would probably involve * Focusing the control when a tab is left clicked * Manually passing focus to the control when any flyout is closed * Manually passing focus to the control when the color picker is closed * Manually passing focus to the control when the tab renamer is dismissed * Manually passing focus to the control when the command palette is closed * Manually passing focus to the control when \<any future UI> is closed So that might not scale as well, but that might be the more _correct_ solution. * [x] I work here * [ ] This is UI so it doesn't have tests * [x] Closes #3609 * [x] Closes #5750
claunia added the pull-request label 2026-01-31 09:17:12 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26626