support keyboard accessibility (#150749)

This commit is contained in:
Sandeep Somavarapu 2022-05-30 22:42:09 +02:00 committed by GitHub
parent e35082f943
commit 1c2ba17092
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -960,7 +960,7 @@ export class ExtensionEditor extends EditorPane {
append(categoriesContainer, $('.additional-details-title', undefined, localize('categories', "Categories")));
const categoriesElement = append(categoriesContainer, $('.categories'));
for (const category of extension.categories) {
this.transientDisposables.add(this.onClick(append(categoriesElement, $('span.category', undefined, category)), () => {
this.transientDisposables.add(this.onClick(append(categoriesElement, $('span.category', { tabindex: '0' }, category)), () => {
this.paneCompositeService.openPaneComposite(VIEWLET_ID, ViewContainerLocation.Sidebar, true)
.then(viewlet => viewlet?.getViewPaneContainer() as IExtensionsViewPaneContainer)
.then(viewlet => viewlet.search(`@category:"${category}"`));
@ -988,7 +988,7 @@ export class ExtensionEditor extends EditorPane {
append(extensionResourcesContainer, $('.additional-details-title', undefined, localize('resources', "Extension Resources")));
const resourcesElement = append(extensionResourcesContainer, $('.resources'));
for (const [label, uri] of resources) {
this.transientDisposables.add(this.onClick(append(resourcesElement, $('a.resource', { title: uri.toString() }, label)), () => this.openerService.open(uri)));
this.transientDisposables.add(this.onClick(append(resourcesElement, $('a.resource', { title: uri.toString(), tabindex: '0' }, label)), () => this.openerService.open(uri)));
}
if (extension.publisherSponsorLink) {
const extensionSponsorContainer = append(resourcesElement, $('.extension-sponsor-container'));