Skip to content

Commit 1fb7718

Browse files
authored
Increment version to 1.1.3 (#452)
* Increment version to 1.1.3 * Increment version to 1.1.3 with updates
1 parent b48949c commit 1fb7718

9 files changed

Lines changed: 67 additions & 11 deletions

dist-archive/virtual-select-1.1.3.min.css

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist-archive/virtual-select-1.1.3.min.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/virtual-select.js

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Virtual Select v1.1.2
2+
* Virtual Select v1.1.3
33
* https://sa-si-dev.github.io/virtual-select
44
* Licensed under MIT (https://github.com/sa-si-dev/virtual-select/blob/master/LICENSE)
55
*//******/ (function() { // webpackBootstrap
@@ -808,7 +808,7 @@ var VirtualSelect = /*#__PURE__*/function () {
808808
}
809809

810810
// eslint-disable-next-line no-trailing-spaces
811-
var html = "<div id=\"vscomp-dropbox-container-".concat(this.uniqueId, "\" role=\"listbox\" class=\"").concat(dropboxContainerClasses, "\">\n <div class=\"vscomp-dropbox-container-top\" aria-hidden=\"true\" tabindex=\"-1\">&nbsp;</div>\n <div class=\"").concat(dropboxClasses, "\">\n <div class=\"vscomp-search-wrapper\"></div>\n\n <div class=\"vscomp-options-container\">\n <div class=\"vscomp-options-loader\"></div>\n\n <div class=\"vscomp-options-list\">\n <div class=\"vscomp-options\"></div>\n </div>\n </div>\n\n <div class=\"vscomp-options-bottom-freezer\"></div>\n <div class=\"vscomp-no-options\">").concat(this.noOptionsText, "</div>\n <div class=\"vscomp-no-search-results\">").concat(this.noSearchResultsText, "</div>\n\n <span class=\"vscomp-dropbox-close-button\"><i class=\"vscomp-clear-icon\"></i></span>\n </div>\n <div class=\"vscomp-dropbox-container-bottom\" aria-hidden=\"true\" tabindex=\"-1\">&nbsp;</div>\n </div>");
811+
var html = "<div id=\"vscomp-dropbox-container-".concat(this.uniqueId, "\" class=\"").concat(dropboxContainerClasses, "\">\n <div class=\"vscomp-dropbox-container-top\" aria-hidden=\"true\" tabindex=\"-1\">&nbsp;</div>\n <div class=\"").concat(dropboxClasses, "\">\n <div class=\"vscomp-search-wrapper\"></div>\n\n <div class=\"vscomp-options-container\" role=\"listbox\" aria-labelledby=\"vscomp-ele-wrapper-").concat(this.uniqueId, "\" >\n <div class=\"vscomp-options-loader\"></div>\n\n <div class=\"vscomp-options-list\">\n <div class=\"vscomp-options\"></div>\n </div>\n </div>\n\n <div class=\"vscomp-options-bottom-freezer\"></div>\n <div class=\"vscomp-no-options\">").concat(this.noOptionsText, "</div>\n <div class=\"vscomp-no-search-results\">").concat(this.noSearchResultsText, "</div>\n\n <span class=\"vscomp-dropbox-close-button\"><i class=\"vscomp-clear-icon\"></i></span>\n </div>\n <div class=\"vscomp-dropbox-container-bottom\" aria-hidden=\"true\" tabindex=\"-1\">&nbsp;</div>\n </div>");
812812
if ($wrapper) {
813813
var $dropboxWrapper = document.createElement('div');
814814
this.$dropboxWrapper = $dropboxWrapper;
@@ -2329,13 +2329,28 @@ var VirtualSelect = /*#__PURE__*/function () {
23292329
this.visibleOptionsCount = visibleOptionsCount;
23302330
this.afterSetVisibleOptionsCount();
23312331
}
2332+
2333+
/**
2334+
* Calculates ARIA metadata (aria-setsize and aria-posinset) for virtualized listbox accessibility.
2335+
* This method iterates through ALL filtered options (not just rendered ones) to calculate
2336+
* the correct position in the full filtered set. This ensures screen readers announce
2337+
* correct positions even when only a subset of options is rendered (e.g., "Option 50, 50 of 10001").
2338+
*
2339+
* Example: With 10,001 filtered options showing only 5 at a time:
2340+
* - All 10,001 options get filteredIndex values: 1, 2, 3, ..., 10001
2341+
* - ariaSetSize = 10001
2342+
* - When options 50-54 are rendered, they have filteredIndex: 50, 51, 52, 53, 54
2343+
* - Screen reader announces: "Option 50, 50 of 10001"
2344+
*/
23322345
}, {
23332346
key: "calculateAriaMetadata",
23342347
value: function calculateAriaMetadata() {
23352348
var _this10 = this;
23362349
var ariaSetSize = 0;
23372350
var filteredPosition = 0;
23382351
var optionsSource = this.sortedOptions && this.sortedOptions.length ? this.sortedOptions : this.options;
2352+
2353+
// Iterate through ALL options (not just rendered ones) to calculate positions in the full filtered set
23392354
optionsSource.forEach(function (d) {
23402355
if (d.isCurrentNew) {
23412356
// eslint-disable-next-line no-param-reassign
@@ -2971,6 +2986,8 @@ var VirtualSelect = /*#__PURE__*/function () {
29712986
DomUtils.dispatchEvent(this.$ele, 'beforeClose');
29722987
DomUtils.setAria(this.$wrapper, 'expanded', false);
29732988
DomUtils.setAria(this.$wrapper, 'activedescendant', '');
2989+
// Also clear aria-activedescendant on the listbox container
2990+
DomUtils.setAria(this.$dropboxContainer, 'activedescendant', '');
29742991
}
29752992
if (this.dropboxPopover && !isSilent) {
29762993
this.dropboxPopover.hide();
@@ -3764,6 +3781,8 @@ var VirtualSelect = /*#__PURE__*/function () {
37643781
}
37653782
if (isFocused) {
37663783
DomUtils.setAria(this.$wrapper, 'activedescendant', $ele.id);
3784+
// Also set aria-activedescendant on the listbox container for better screen reader support
3785+
DomUtils.setAria(this.$dropboxContainer, 'activedescendant', $ele.id);
37673786
}
37683787
}
37693788

dist/virtual-select.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/virtual-select.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)