From b321ae6fab4a2050bbf3ff3bfc2b43cda7586607 Mon Sep 17 00:00:00 2001 From: "J.Bosch" Date: Sun, 21 Aug 2016 13:54:27 +0200 Subject: [PATCH 01/15] Added the select2 spinner on updating --- src/bootstrap/select-multiple.tpl.html | 1 + src/select2/select.tpl.html | 1 + src/uiSelectController.js | 3 +++ 3 files changed, 5 insertions(+) diff --git a/src/bootstrap/select-multiple.tpl.html b/src/bootstrap/select-multiple.tpl.html index bb4940535..b8b329894 100644 --- a/src/bootstrap/select-multiple.tpl.html +++ b/src/bootstrap/select-multiple.tpl.html @@ -14,6 +14,7 @@ role="combobox" aria-expanded="{{$select.open}}" aria-label="{{$select.baseTitle}}" + ng-class="{'spinner': $select.refreshing}" ondrop="return false;">
diff --git a/src/select2/select.tpl.html b/src/select2/select.tpl.html index 60629c9b0..3d536f312 100644 --- a/src/select2/select.tpl.html +++ b/src/select2/select.tpl.html @@ -8,6 +8,7 @@ ng-class="{'select2-display-none': !$select.open}">
Date: Mon, 22 Aug 2016 20:04:50 +0200 Subject: [PATCH 02/15] Added bootstrap refreshicon --- src/bootstrap/select.tpl.html | 1 + src/common.css | 46 ++++++++++++++++++++++++++++++++++- src/uiSelectController.js | 2 +- 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/select.tpl.html b/src/bootstrap/select.tpl.html index bed1e4d77..b9153b2bd 100644 --- a/src/bootstrap/select.tpl.html +++ b/src/bootstrap/select.tpl.html @@ -1,5 +1,6 @@
+
+ +
+ + + {{$item.name}} + +
+ +
+
+ +
+
+
diff --git a/src/common.css b/src/common.css index 3698f4a2e..fb08103a2 100644 --- a/src/common.css +++ b/src/common.css @@ -92,10 +92,15 @@ body > .select2-container.open { } /* Fix input width for Selectize theme */ -.selectize-control > .selectize-input > input { +.selectize-control.single > .selectize-input > input { width: 100%; } +/* Fix line break when there's at least one item selected with the Selectize theme */ +.selectize-control.multi > .selectize-input > input { + margin: 0 !important; +} + /* Fix dropdown width for Selectize theme */ .selectize-control > .selectize-dropdown { width: 100%; diff --git a/src/selectize/choices.tpl.html b/src/selectize/choices.tpl.html index 4214f9168..896025d80 100644 --- a/src/selectize/choices.tpl.html +++ b/src/selectize/choices.tpl.html @@ -1,4 +1,5 @@ -
+
diff --git a/src/selectize/match-multiple.tpl.html b/src/selectize/match-multiple.tpl.html new file mode 100644 index 000000000..49d37b2d7 --- /dev/null +++ b/src/selectize/match-multiple.tpl.html @@ -0,0 +1,11 @@ +
+ + + × + +
\ No newline at end of file diff --git a/src/selectize/select-multiple.tpl.html b/src/selectize/select-multiple.tpl.html new file mode 100644 index 000000000..b434c8ec6 --- /dev/null +++ b/src/selectize/select-multiple.tpl.html @@ -0,0 +1,18 @@ +
+
+
+ +
+
+
+
\ No newline at end of file From 8196ee5835b329b87c5c29059b2e3d470a94d1f6 Mon Sep 17 00:00:00 2001 From: Daniel Varga Date: Sun, 16 Oct 2016 20:32:27 +0200 Subject: [PATCH 06/15] Fix: Quotation mark error --- src/bootstrap/select.tpl.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/select.tpl.html b/src/bootstrap/select.tpl.html index 1c9c0d7b8..625d8dde7 100644 --- a/src/bootstrap/select.tpl.html +++ b/src/bootstrap/select.tpl.html @@ -1,6 +1,6 @@ diff --git a/src/uiSelectController.js b/src/uiSelectController.js index 7ef150625..3d12dd342 100644 --- a/src/uiSelectController.js +++ b/src/uiSelectController.js @@ -740,4 +740,16 @@ uis.controller('uiSelectCtrl', ctrl.searchInput.off('keyup keydown tagged blur paste'); angular.element($window).off('resize', onResize); }); + + $scope.$watch('$select.activeIndex', function(activeIndex) { + if (activeIndex) + $element.find('input').attr( + 'aria-activedescendant', + 'ui-select-choices-row-' + ctrl.generatedId + '-' + activeIndex); + }); + + $scope.$watch('$select.open', function(open) { + if (!open) + $element.find('input').removeAttr('aria-activedescendant'); + }); }]); From e902ffc6d9e88a38f83dbd375e47559b90c324ba Mon Sep 17 00:00:00 2001 From: Ed Clements Date: Fri, 9 Sep 2016 11:55:58 +0100 Subject: [PATCH 09/15] fix: only apply listbox role when open This is a fix for a severe error found using the Google Accessibility Developer Tool audit: Elements with ARIA roles must ensure required owned elements are present --- src/bootstrap/choices.tpl.html | 1 - src/select2/choices.tpl.html | 2 +- src/selectize/choices.tpl.html | 2 +- src/uiSelectChoicesDirective.js | 8 ++++++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/bootstrap/choices.tpl.html b/src/bootstrap/choices.tpl.html index 75c964e6a..c3f78e2e7 100644 --- a/src/bootstrap/choices.tpl.html +++ b/src/bootstrap/choices.tpl.html @@ -1,5 +1,4 @@