Skip to content

Commit 33d9805

Browse files
If there's just a title, let that be the aria label (microsoft#266049)
Fixes microsoft#245220
1 parent bdd60ed commit 33d9805

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/vs/platform/quickinput/browser/quickInput.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,10 +1056,15 @@ export class QuickPick<T extends IQuickPickItem, O extends { useSeparators: bool
10561056
let ariaLabel = this.ariaLabel;
10571057
// Only set aria label to the input box placeholder if we actually have an input box.
10581058
if (!ariaLabel && visibilities.inputBox) {
1059-
ariaLabel = this.placeholder || QuickPick.DEFAULT_ARIA_LABEL;
1059+
ariaLabel = this.placeholder;
10601060
// If we have a title, include it in the aria label.
10611061
if (this.title) {
1062-
ariaLabel += ` - ${this.title}`;
1062+
ariaLabel = ariaLabel
1063+
? `${ariaLabel} - ${this.title}`
1064+
: this.title;
1065+
}
1066+
if (!ariaLabel) {
1067+
ariaLabel = QuickPick.DEFAULT_ARIA_LABEL;
10631068
}
10641069
}
10651070
if (this.ui.list.ariaLabel !== ariaLabel) {

0 commit comments

Comments
 (0)