diff --git a/index.html b/index.html index 4eb9d48..c341616 100644 --- a/index.html +++ b/index.html @@ -1186,7 +1186,9 @@ function getFocusableElements(container) { const elements = container.querySelectorAll('button, input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])'); return Array.from(elements).filter(el => { - return el.offsetParent !== null && !el.disabled; + if (el.disabled) return false; + const style = window.getComputedStyle(el); + return style.display !== 'none' && style.visibility !== 'hidden'; }); }