Skip to content

Commit 35ac6b9

Browse files
author
Jackson Kearl
committed
Aria label search tree based on contents
Closes microsoft#95861.
1 parent 773c398 commit 35ac6b9

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎src/vs/workbench/contrib/search/browser/searchView.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,7 @@ export class SearchView extends ViewPane {
10221022
}
10231023
this.viewModel.cancelSearch();
10241024
this.updateActions();
1025+
this.tree.ariaLabel = nls.localize('emptySearch', "Empty Search");
10251026

10261027
aria.status(nls.localize('ariaSearchResultsClearStatus', "The search results have been cleared"));
10271028
}
@@ -1557,9 +1558,12 @@ export class SearchView extends ViewPane {
15571558
this.hasSearchResultsKey.set(fileCount > 0);
15581559

15591560
const msgWasHidden = this.messagesElement.style.display === 'none';
1561+
1562+
const messageEl = this.clearMessage();
1563+
let resultMsg = this.buildResultCountMessage(this.viewModel.searchResult.count(), fileCount);
1564+
this.tree.ariaLabel = resultMsg + nls.localize('forTerm', " - Search: {0}", this.searchResult.query?.contentPattern.pattern ?? '');
1565+
15601566
if (fileCount > 0) {
1561-
const messageEl = this.clearMessage();
1562-
let resultMsg = this.buildResultCountMessage(this.viewModel.searchResult.count(), fileCount);
15631567
if (disregardExcludesAndIgnores) {
15641568
resultMsg += nls.localize('useIgnoresAndExcludesDisabled', " - exclude settings and ignore files are disabled");
15651569
}

0 commit comments

Comments
 (0)