@skippr/live-agent-sdk 0.62.0 → 0.63.0
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/esm/lib-exports.js +11 -1
- package/dist/skippr-sdk.js +43 -43
- package/package.json +1 -1
package/dist/esm/lib-exports.js
CHANGED
|
@@ -1836,6 +1836,16 @@ function isInteractive(element, role) {
|
|
|
1836
1836
|
return true;
|
|
1837
1837
|
return false;
|
|
1838
1838
|
}
|
|
1839
|
+
function isCursorClickable(element, rect) {
|
|
1840
|
+
if (!intersectsViewport(rect, window.innerWidth, window.innerHeight))
|
|
1841
|
+
return false;
|
|
1842
|
+
if (window.getComputedStyle(element).cursor !== "pointer")
|
|
1843
|
+
return false;
|
|
1844
|
+
const parent = element.parentElement;
|
|
1845
|
+
if (parent && window.getComputedStyle(parent).cursor === "pointer")
|
|
1846
|
+
return false;
|
|
1847
|
+
return true;
|
|
1848
|
+
}
|
|
1839
1849
|
function isBlindRegion(role) {
|
|
1840
1850
|
return role === "video" || role === "iframe" || role === "canvas" || role === "audio" || role === "embed" || role === "object";
|
|
1841
1851
|
}
|
|
@@ -2117,7 +2127,7 @@ function walkAndCollect(element, depth, entries) {
|
|
|
2117
2127
|
if (shouldSkipSubtree(element))
|
|
2118
2128
|
return;
|
|
2119
2129
|
const rect = element.getBoundingClientRect();
|
|
2120
|
-
const role = inferRole(element);
|
|
2130
|
+
const role = inferRole(element) ?? (isCursorClickable(element, rect) ? "button" : null);
|
|
2121
2131
|
const isVisibleAndEmittable = role !== null && isVisible(element, rect) && shouldEmitElement(element, role);
|
|
2122
2132
|
let childDepth = depth;
|
|
2123
2133
|
if (isVisibleAndEmittable && role) {
|