This repository was archived by the owner on Oct 2, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +28
-11
lines changed
Expand file tree Collapse file tree 4 files changed +28
-11
lines changed Original file line number Diff line number Diff line change 8484 } ;
8585 }
8686
87+ var latestId = 0 ;
8788 angular . module ( 'ui.select' , [ ] )
8889
8990 . constant ( 'uiSelectConfig' , {
9091 theme : 'bootstrap' ,
9192 searchEnabled : true ,
9293 placeholder : '' , // Empty by default, like HTML tag <select>
9394 refreshDelay : 1000 , // In milliseconds
94- closeOnSelect : true
95+ closeOnSelect : true ,
96+ generateId : function ( ) {
97+ return latestId ++ ;
98+ }
9599 } )
96100
97101 // See Rename minErr and make it accessible from outside https://github.com/angular/angular.js/issues/6913
892896
893897 var searchInput = element . querySelectorAll ( 'input.ui-select-search' ) ;
894898
899+ $select . generatedId = uiSelectConfig . generateId ( ) ;
900+ $select . ariaLabel = attrs . title ;
895901 $select . multiple = angular . isDefined ( attrs . multiple ) && (
896902 attrs . multiple === '' ||
897903 attrs . multiple . toLowerCase ( ) === 'multiple' ||
Original file line number Diff line number Diff line change 11< ul class ="ui-select-choices ui-select-choices-content select2-results ">
22 < li class ="ui-select-choices-group " ng-class ="{'select2-result-with-children': $select.choiceGrouped($group) } ">
33 < div ng-show ="$select.choiceGrouped($group) " class ="ui-select-choices-group-label select2-result-label " ng-bind-html ="$group.name "> </ div >
4- < ul ng-class ="{'select2-result-sub': $select.choiceGrouped($group), 'select2-result-single': !$select.choiceGrouped($group) } ">
5- < li class ="ui-select-choices-row " ng-class ="{'select2-highlighted': $select.isActive(this), 'select2-disabled': $select.isDisabled(this)} ">
4+ < ul role ="listbox "
5+ id ="ui-select-choices-{{ $select.generatedId }} " ng-class ="{'select2-result-sub': $select.choiceGrouped($group), 'select2-result-single': !$select.choiceGrouped($group) } ">
6+ < li role ="option " id ="ui-select-choices-row-{{ $select.generatedId }}-{{$index}} " class ="ui-select-choices-row " ng-class ="{'select2-highlighted': $select.isActive(this), 'select2-disabled': $select.isDisabled(this)} ">
67 < div class ="select2-result-label ui-select-choices-row-inner "> </ div >
78 </ li >
89 </ ul >
Original file line number Diff line number Diff line change 44 < ul class ="select2-choices ">
55 < span class ="ui-select-match "> </ span >
66 < li class ="select2-search-field ">
7- < input
8- type ="text "
9- autocomplete ="off "
10- autocorrect ="off "
11- autocapitalize ="off "
12- spellcheck ="false "
13- class ="select2-input ui-select-search "
7+ < input
8+ type ="text "
9+ autocomplete ="off "
10+ autocorrect ="off "
11+ autocapitalize ="off "
12+ spellcheck ="false "
13+ role ="combobox "
14+ aria-expanded ="true "
15+ aria-owns ="ui-select-choices-{{ $select.generatedId }} "
16+ aria-label ="{{ $select.ariaLabel }} "
17+ aria-activedescendant ="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }} "
18+ class ="select2-input ui-select-search "
1419 placeholder ="{{$select.getPlaceholder()}} "
1520 ng-disabled ="$select.disabled "
1621 ng-hide ="$select.disabled "
Original file line number Diff line number Diff line change 11< div class ="ui-select-container select2 select2-container "
22 ng-class ="{'select2-container-active select2-dropdown-open open': $select.open,
33 'select2-container-disabled': $select.disabled,
4- 'select2-container-active': $select.focus,
4+ 'select2-container-active': $select.focus,
55 'select2-allowclear': $select.allowClear && !$select.isEmpty()} ">
66 < div class ="ui-select-match "> </ div >
77 < div class ="select2-drop select2-with-searchbox select2-drop-active "
88 ng-class ="{'select2-display-none': !$select.open} ">
99 < div class ="select2-search " ng-show ="$select.searchEnabled ">
1010 < input type ="text " autocomplete ="off " autocorrect ="off " autocapitalize ="off " spellcheck ="false "
11+ role ="combobox "
12+ aria-expanded ="true "
13+ aria-owns ="ui-select-choices-{{ $select.generatedId }} "
14+ aria-label ="{{ $select.ariaLabel }} "
15+ aria-activedescendant ="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }} "
1116 class ="ui-select-search select2-input "
1217 ng-model ="$select.search ">
1318 </ div >
You can’t perform that action at this time.
0 commit comments