mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Merge pull request #153140 from microsoft/merogge/find-aria
improve function name
This commit is contained in:
@@ -338,13 +338,13 @@ export abstract class SimpleFindWidget extends Widget {
|
||||
} else if (count?.resultCount) {
|
||||
label = strings.format(NLS_MATCHES_LOCATION, count.resultIndex + 1, count?.resultCount);
|
||||
}
|
||||
alertFn(this._getAriaLabel(label, this.inputValue));
|
||||
alertFn(this._announceSearchResults(label, this.inputValue));
|
||||
this._matchesCount.appendChild(document.createTextNode(label));
|
||||
this._findInput?.domNode.insertAdjacentElement('afterend', this._matchesCount);
|
||||
this._foundMatch = !!count && count.resultCount > 0;
|
||||
}
|
||||
|
||||
private _getAriaLabel(label: string, searchString?: string): string {
|
||||
private _announceSearchResults(label: string, searchString?: string): string {
|
||||
if (!searchString) {
|
||||
return nls.localize('ariaSearchNoInput', "Enter search input");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user