Skip to content

Commit

Permalink
update extensions aria label to contain version and publisher display…
Browse files Browse the repository at this point in the history
… name

fixes microsoft#102224
  • Loading branch information
isidorn committed Jul 28, 2020
1 parent a3794d4 commit 55e09d6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions test/automation/src/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
}
Expand Down

0 comments on commit 55e09d6

Please sign in to comment.