File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ export class Chip implements ChipInterface {
339339 < button
340340 class = "trailing-button remove-button"
341341 tabIndex = { - 1 }
342- aria-label = { this . removeChipLabel }
342+ aria-label = { this . removeChipLabel ( ) }
343343 aria-controls = { 'chip-' + this . identifier }
344344 innerHTML = { svgData }
345345 onClick = { this . handleRemoveClick }
@@ -368,7 +368,7 @@ export class Chip implements ChipInterface {
368368 slot = "trigger"
369369 disabled = { this . disabled }
370370 class = "trailing-button"
371- aria-label = { this . actionMenuLabel }
371+ aria-label = { this . actionMenuLabel ( ) }
372372 innerHTML = { svgData }
373373 />
374374 </ limel-menu >
@@ -420,11 +420,15 @@ export class Chip implements ChipInterface {
420420 } ;
421421
422422 private removeChipLabel = ( ) : string => {
423- return translate . get ( 'remove' , this . language ) + ' ' + this . text ;
423+ return ` ${ this . getTranslation ( 'remove' ) } ${ this . text } ` ;
424424 } ;
425425
426426 private actionMenuLabel = ( ) : string => {
427- return translate . get ( 'file-viewer.more-actions' , this . language ) ;
427+ return this . getTranslation ( 'file-viewer.more-actions' ) ;
428+ } ;
429+
430+ private getTranslation = ( key : string ) => {
431+ return translate . get ( key , this . language ) ;
428432 } ;
429433
430434 private renderSpinner ( ) {
You can’t perform that action at this time.
0 commit comments