chore(ui): harden surface Tab cycling

Rebased onto current main with review follow-ups folded in.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
Rudy CelekliandClaude Sonnet 5.5 committed 2026-10-14 20:15:28 -04:00
1 parent 0265ad4c19
commit 12ea0219d1
4 files changed
+67 -1

No files matched your search

+5 -1
View File
@@ -39,7 +39,11 @@ export function createSurfaceKeyboard({
),
].filter(
(node) =>
!node.hasAttribute('disabled') && node.getClientRects().length > 0,
!node.hasAttribute('disabled') &&
!node.matches?.(':disabled') &&
!(Number(node.getAttribute?.('tabindex')) < 0) &&
!node.closest?.('[inert]') &&
node.getClientRects().length > 0,
);
if (!order.length) return;
const first = order[0];