Skip to content

Commit 2eb81bd

Browse files
author
isidor
committed
1 parent 47ed486 commit 2eb81bd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/vs/workbench/contrib/files/browser/views/explorerViewer.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,12 @@ export class CompressedNavigationController implements ICompressedNavigationCont
163163

164164
private updateLabels(templateData: IFileTemplateData): void {
165165
this._labels = Array.from(templateData.container.querySelectorAll('.label-name')) as HTMLElement[];
166-
166+
let parents = '';
167167
for (let i = 0; i < this.labels.length; i++) {
168-
this.labels[i].setAttribute('aria-label', this.items[i].name);
168+
const ariaLabel = parents.length ? `${this.items[i].name}, compact, ${parents}` : this.items[i].name;
169+
this.labels[i].setAttribute('aria-label', ariaLabel);
169170
this.labels[i].setAttribute('aria-level', `${this.depth + i}`);
171+
parents = parents.length ? `${this.items[i].name} ${parents}` : this.items[i].name;
170172
}
171173
this.updateCollapsed(this.collapsed);
172174

0 commit comments

Comments
 (0)