瀏覽代碼

避免tabindex为-1的元素干扰读屏

任一存 3 年之前
父節點
當前提交
86559b2389
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      web/src/utils.js

+ 1 - 1
web/src/utils.js

@@ -185,7 +185,7 @@ function __focusNextFocusableNode(treeWalker) {
     }
     if (nextNode.focus) {
       nextNode.focus()
-      if (document.activeElement === nextNode) {
+      if (document.activeElement === nextNode && nextNode.tabIndex !== -1) {
         return true
       }
     }