Skip to content

Commit

Permalink
Ensure placeholder is announced (#176080)
Browse files Browse the repository at this point in the history
This basically puts focus back in input
Fixes #166920
  • Loading branch information
TylerLeonhardt authored Mar 3, 2023
1 parent 764bcce commit 2db42ea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vs/platform/quickinput/browser/quickInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ class QuickPick<T extends IQuickPickItem> extends QuickInput implements IQuickPi
private _sortByLabel = true;
private _autoFocusOnList = true;
private _keepScrollPosition = false;
private _itemActivation = this.ui.isScreenReaderOptimized() ? ItemActivation.NONE /* https://github.com/microsoft/vscode/issues/57501 */ : ItemActivation.FIRST;
private _itemActivation = ItemActivation.FIRST;
private _activeItems: T[] = [];
private activeItemsUpdated = false;
private activeItemsToConfirm: T[] | null = [];
Expand Down Expand Up @@ -1054,6 +1054,10 @@ class QuickPick<T extends IQuickPickItem> extends QuickInput implements IQuickPi
this.ui.checkAll.checked = this.ui.list.getAllVisibleChecked();
this.ui.visibleCount.setCount(this.ui.list.getVisibleCount());
this.ui.count.setCount(this.ui.list.getCheckedCount());
// Ensure no item is focused when using a screenreader when items update (#57501 & #166920)
if (this.ui.isScreenReaderOptimized() && ariaLabel) {
this._itemActivation = ItemActivation.NONE;
}
switch (this._itemActivation) {
case ItemActivation.NONE:
this._itemActivation = ItemActivation.FIRST; // only valid once, then unset
Expand Down

0 comments on commit 2db42ea

Please sign in to comment.