Skip to content

Commit b7a7dd0

Browse files
committed
Fixes results count in accessible text
Only counts the selectable items in the list. (filter out selected item)
1 parent eb0b9ff commit b7a7dd0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,7 @@ the specific language governing permissions and limitations under the Apache Lic
17141714
self.liveRegion.text(results.text());
17151715
}
17161716
else {
1717-
self.liveRegion.text(self.opts.formatMatches(results.find('.select2-result-selectable').length));
1717+
self.liveRegion.text(self.opts.formatMatches(results.find('.select2-result-selectable:not(".select2-selected")').length));
17181718
}
17191719
}
17201720

0 commit comments

Comments
 (0)