mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
update extensions aria label to contain version and publisher display name
fixes #102224
This commit is contained in:
parent
a3794d4dbd
commit
55e09d6bf8
|
@ -271,7 +271,8 @@ export class ExtensionsTree extends WorkbenchAsyncDataTree<IExtensionData, IExte
|
|||
overrideStyles,
|
||||
accessibilityProvider: <IListAccessibilityProvider<IExtensionData>>{
|
||||
getAriaLabel(extensionData: IExtensionData): string {
|
||||
return localize('extension-arialabel', "{0}. Press enter for extension details.", extensionData.extension.displayName);
|
||||
const extension = extensionData.extension;
|
||||
return localize('extension-arialabel', "{0}, {1}, {2}, press enter for extension details.", extension.displayName, extension.version, extension.publisherDisplayName);
|
||||
},
|
||||
getWidgetAriaLabel(): string {
|
||||
return localize('extensions', "Extensions");
|
||||
|
|
|
@ -139,7 +139,7 @@ export class ExtensionsListView extends ViewPane {
|
|||
horizontalScrolling: false,
|
||||
accessibilityProvider: <IListAccessibilityProvider<IExtension | null>>{
|
||||
getAriaLabel(extension: IExtension | null): string {
|
||||
return extension ? localize('extension-arialabel', "{0}. Press enter for extension details.", extension.displayName) : '';
|
||||
return extension ? localize('extension-arialabel', "{0}, {1}, {2}, press enter for extension details.", extension.displayName, extension.version, extension.publisherDisplayName) : '';
|
||||
},
|
||||
getWidgetAriaLabel(): string {
|
||||
return localize('extensions', "Extensions");
|
||||
|
|
|
@ -34,9 +34,9 @@ export class Extensions extends Viewlet {
|
|||
await this.code.waitForTypeInEditor(SEARCH_BOX, `@id:${id}`);
|
||||
}
|
||||
|
||||
async installExtension(id: string, name: string): Promise<void> {
|
||||
async installExtension(id: string, name: string, version: string, publisherDisplayName: string): Promise<void> {
|
||||
await this.searchForExtension(id);
|
||||
const ariaLabel = `${name}. Press enter for extension details.`;
|
||||
const ariaLabel = `${name}, ${version}, ${publisherDisplayName}, press enter for extension details.`;
|
||||
await this.code.waitAndClick(`div.extensions-viewlet[id="workbench.view.extensions"] .monaco-list-row[aria-label="${ariaLabel}"] .extension-list-item li[class='action-item'] .extension-action.install`);
|
||||
await this.code.waitForElement(`.extension-editor .monaco-action-bar .action-item:not(.disabled) .extension-action.uninstall`);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue