File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed
workbench/contrib/codeEditor/browser/outline Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1189,6 +1189,10 @@ export namespace SymbolKinds {
1189
1189
}
1190
1190
return icon ;
1191
1191
}
1192
+
1193
+ export function asAriaLabel ( label : string , kind : SymbolKind ) : string {
1194
+ return `${ label } Symbol: ${ SymbolKinds . toIcon ( kind ) . id . replaceAll ( 'symbol-' , '' ) } ` ;
1195
+ }
1192
1196
}
1193
1197
1194
1198
export interface DocumentSymbol {
Original file line number Diff line number Diff line change @@ -7459,6 +7459,8 @@ declare namespace monaco.languages {
7459
7459
Deprecated = 1
7460
7460
}
7461
7461
7462
+ function asAriaLabel ( label : string , kind : SymbolKind ) : string ;
7463
+
7462
7464
export interface DocumentSymbol {
7463
7465
name : string ;
7464
7466
detail : string ;
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export class DocumentSymbolAccessibilityProvider implements IListAccessibilityPr
49
49
if ( element instanceof OutlineGroup ) {
50
50
return element . label ;
51
51
} else {
52
- return ` ${ element . symbol . name } Symbol: ${ SymbolKinds . toIcon ( element . symbol . kind ) . id . replaceAll ( 'symbol-' , '' ) } ` ;
52
+ return SymbolKinds . asAriaLabel ( element . symbol . name , element . symbol . kind ) ;
53
53
}
54
54
}
55
55
}
You can’t perform that action at this time.
0 commit comments