|
5 | 5 |
|
6 | 6 | 'use strict'; |
7 | 7 |
|
| 8 | +import { localize } from 'vs/nls'; |
8 | 9 | import { append, $, addClass, removeClass, toggleClass } from 'vs/base/browser/dom'; |
9 | 10 | import { IDisposable, dispose } from 'vs/base/common/lifecycle'; |
10 | 11 | import { Action } from 'vs/base/common/actions'; |
@@ -189,16 +190,20 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> { |
189 | 190 |
|
190 | 191 | private updateRecommendationStatus(extension: IExtension, data: ITemplateData) { |
191 | 192 | const extRecommendations = this.extensionTipsService.getAllRecommendationsWithReason(); |
| 193 | + let ariaLabel = extension.displayName + '. '; |
192 | 194 |
|
193 | 195 | if (!extRecommendations[extension.id.toLowerCase()]) { |
194 | | - data.root.setAttribute('aria-label', extension.displayName); |
195 | | - data.root.title = ''; |
196 | 196 | removeClass(data.root, 'recommended'); |
| 197 | + data.root.title = ''; |
197 | 198 | } else { |
198 | | - data.root.setAttribute('aria-label', extension.displayName + '. ' + extRecommendations[extension.id]); |
199 | | - data.root.title = extRecommendations[extension.id.toLowerCase()].reasonText; |
200 | 199 | addClass(data.root, 'recommended'); |
| 200 | + ariaLabel += extRecommendations[extension.id.toLowerCase()].reasonText + ' '; |
| 201 | + data.root.title = extRecommendations[extension.id.toLowerCase()].reasonText; |
201 | 202 | } |
| 203 | + |
| 204 | + ariaLabel += localize('viewExtensionDetailsAria', "Press enter for extension details."); |
| 205 | + data.root.setAttribute('aria-label', ariaLabel); |
| 206 | + |
202 | 207 | } |
203 | 208 |
|
204 | 209 | disposeTemplate(data: ITemplateData): void { |
|
0 commit comments