File tree Expand file tree Collapse file tree
src/@batch-flask/ui/select/select-dropdown Expand file tree Collapse file tree Original file line number Diff line number Diff line change 374374 "resourcefile-picker.cloudFileDialog.title": "Pick file(s) from storage account",
375375 "select-dropdown.noMatch": "No match",
376376 "select-dropdown.noOptions": "No options available",
377+ "select-dropdown.selected": "Selected",
377378 "select-dropdown.showItems": "Showing {num} items",
379+ "select-dropdown.unselectAll": "Unselect all",
380+ "select-dropdown.unselected": "Unselected",
378381 "server-error.debug-button-label": "Toggle troubleshooting info",
379382 "settings.advancedSettings": "Advanced settings",
380383 "settings.gallerySettings": "Gallery settings",
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ export class SelectDropdownComponent {
121121 fixedOptions = [ {
122122 id : unselectAllOptionId ,
123123 value : unselectAllOptionId ,
124- label : "Unselect all" ,
124+ label : this . i18n . t ( "select-dropdown.unselectAll" ) ,
125125 cssClass : "unselect-all-option"
126126 } ] ;
127127 }
@@ -142,4 +142,14 @@ export class SelectDropdownComponent {
142142 ) ;
143143 }
144144 }
145+
146+ public optionAriaLabel ( option : SelectOptionComponent | any ) : string | null {
147+ if ( ! ( option instanceof SelectOptionComponent ) || option . disabled ) {
148+ return null ;
149+ }
150+ const selectLabel = this . selected . has ( option . value )
151+ ? this . i18n . t ( "select-dropdown.selected" )
152+ : this . i18n . t ( "select-dropdown.unselected" ) ;
153+ return `${ option . label } , ${ selectLabel } ` ;
154+ }
145155}
Original file line number Diff line number Diff line change 66 [class.disabled] ="option.disabled "
77 [attr.aria-disabled] ="option.disabled "
88 [attr.aria-selected] ="selected.has(option.value) "
9+ [attr.aria-label] ="optionAriaLabel(option) "
910 (mousedown) ="handleClickOption($event, option) ">
1011
11- < div class ="checkbox " *ngIf ="multiple " aria-hidden =" true " >
12+ < div class ="checkbox " *ngIf ="multiple ">
1213 < i class ="fa fa-check " *ngIf ="selected.has(option.value) " aria-hidden ="true "> </ i >
1314 </ div >
14- < div class ="option-content ">
15+ < div class ="option-content " aria-hidden =" true " >
1516 < ng-container *ngIf ="select.optionTemplate ">
1617 < ng-template [ngTemplateOutlet] ="select.optionTemplate " [ngTemplateOutletContext] ="{$implicit: option.item} "> </ ng-template >
1718 </ ng-container >
Original file line number Diff line number Diff line change @@ -2,3 +2,6 @@ select-dropdown:
22 noMatch : No match
33 noOptions : No options available
44 showItems : Showing {num} items
5+ unselectAll : Unselect all
6+ selected : Selected
7+ unselected : Unselected
You can’t perform that action at this time.
0 commit comments