Repository navigation
Conversation
|
@Aminark is attempting to deploy a commit to the afc163's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
更新链接焦点判断并验证 src/Dom/focus.ts, tests/focus.test.tsx |
焦点判断改为检查链接是否具有 href 属性。新增测试覆盖空 href 链接的默认焦点列表、负 tabIndex 列表和实际焦点设置。 |
Priority:
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix
Merge Risk: 
Minimal · up to 61b00
-
No actionable merge-blocking risk remains.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
标题“fix: include links with an empty href in focus list”描述了本 PR 的主要变更:焦点列表现在包含 href 为空的链接。raw_summary 显示 src/Dom/focus.ts 将 focusable 的判断从读取 href 值改为 hasAttribute('href'),并新增测试覆盖空 href 链接。pr_objectives 也指出 getFocusNodeList 之前因检查属性值的真假而跳过 <a href="">,本 PR 改为检查属性是否存在。标题与变更内容一致,且具体。
-
-
Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
小兔看见空链接,
也能轻轻跳进焦点里。
列表记下它的位置,
负索引时另有记录。
测试收好小树枝,
小兔蹦蹦回家去。
Comment @coderabbitai help to get the list of available commands.
An
<a href="">is focusable, butgetFocusNodeListskips it because it checks whether the attribute value is truthy. This also leaves the link out of focus-lock navigation.Check for the attribute instead. The regression test covers an empty href, an anchor without href, and
tabindex="-1"with and withoutincludeNegative.All 32 suites pass (229 tests, 1 existing skip); the new test fails before the fix. TypeScript, lint (13 existing warnings), formatting, and the package build pass.
Summary by CodeRabbit
href链接的焦点处理,使其能正确出现在焦点列表中,并可按tabIndex设置筛选。