mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Ensure placeholder is announced (#176080)
This basically puts focus back in input Fixes #166920
This commit is contained in:
committed by
GitHub
parent
764bcce691
commit
2db42ea3c3
@@ -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 = [];
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user