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 {
11891189 }
11901190 return icon ;
11911191 }
1192+
1193+ export function asAriaLabel ( label : string , kind : SymbolKind ) : string {
1194+ return `${ label } Symbol: ${ SymbolKinds . toIcon ( kind ) . id . replaceAll ( 'symbol-' , '' ) } ` ;
1195+ }
11921196}
11931197
11941198export interface DocumentSymbol {
Original file line number Diff line number Diff line change @@ -7459,6 +7459,8 @@ declare namespace monaco.languages {
74597459 Deprecated = 1
74607460 }
74617461
7462+ function asAriaLabel ( label : string , kind : SymbolKind ) : string ;
7463+
74627464 export interface DocumentSymbol {
74637465 name : string ;
74647466 detail : string ;
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export class DocumentSymbolAccessibilityProvider implements IListAccessibilityPr
4949 if ( element instanceof OutlineGroup ) {
5050 return element . label ;
5151 } 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 ) ;
5353 }
5454 }
5555}
You can’t perform that action at this time.
0 commit comments