From b7a7dd064e5e1c05f1390a66e196e1ebb79b15fa Mon Sep 17 00:00:00 2001 From: "Kay.L" Date: Thu, 9 Oct 2014 13:36:00 +0800 Subject: [PATCH] Fixes results count in accessible text Only counts the selectable items in the list. (filter out selected item) --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 4d2b4e24..2ae9aabe 100644 --- a/select2.js +++ b/select2.js @@ -1714,7 +1714,7 @@ the specific language governing permissions and limitations under the Apache Lic self.liveRegion.text(results.text()); } else { - self.liveRegion.text(self.opts.formatMatches(results.find('.select2-result-selectable').length)); + self.liveRegion.text(self.opts.formatMatches(results.find('.select2-result-selectable:not(".select2-selected")').length)); } }