forge-select 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +11 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.global.js +1 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1943,13 +1943,19 @@ var ForgeSelect = class {
|
|
|
1943
1943
|
}
|
|
1944
1944
|
return false;
|
|
1945
1945
|
}
|
|
1946
|
+
/**
|
|
1947
|
+
* Reads the id off the row the render pass just marked, rather than rebuilding
|
|
1948
|
+
* it from the highlight index. Virtual scrolling drops off-window rows, so an
|
|
1949
|
+
* index-derived id can name an element that no longer exists, and
|
|
1950
|
+
* aria-activedescendant must resolve to a real one — a dangling reference
|
|
1951
|
+
* reads to assistive tech as no active option at all. Keyboard navigation
|
|
1952
|
+
* scrolls the highlight back into view, which restores the reference.
|
|
1953
|
+
*/
|
|
1946
1954
|
updateActiveDescendant() {
|
|
1947
1955
|
const target = this.searchInput ?? this.control;
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
target.removeAttribute("aria-activedescendant");
|
|
1952
|
-
}
|
|
1956
|
+
const highlighted = this.list.querySelector(".forge-select__option--highlighted");
|
|
1957
|
+
if (highlighted) target.setAttribute("aria-activedescendant", highlighted.id);
|
|
1958
|
+
else target.removeAttribute("aria-activedescendant");
|
|
1953
1959
|
}
|
|
1954
1960
|
// ---------------------------------------------------------------- remote data
|
|
1955
1961
|
scheduleRemoteLoad(query, delay) {
|