Repository navigation
fix: set correct tabIndex for next button in simple mode - #729
feritcemkahraman wants to merge 1 commit into
Conversation
|
@feritcemkahraman 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. 🎉 ℹ️ Recent review info
Walkthrough简单模式下,Next 控件的键盘焦点条件改为依据是否存在下一页。新增测试验证第一页和第三页的前后翻页按钮 Changes简单分页焦点
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
Summary
In
simplepagination mode, the Next button'stabIndexwas evaluated asnextTabIndex = hasPrev ? 0 : null.This inverted the keyboard accessibility behavior:
hasPrevis false, buthasNextis true and enabled),tabIndexwas set tonull, preventing keyboard navigation into the enabled Next button.hasPrevis true, buthasNextis false and disabled),tabIndexwas set to0, causing the disabled Next button to be keyboard focusable.Fix
Evaluate
nextTabIndexconsistently withnextDisabled ? null : 0in bothsimpleand standard pagination modes, ensuring enabled buttons receivetabIndex={0}and disabled buttons omittabIndex.Verification
pnpm test).pnpm lint).npx father build).Summary by CodeRabbit
Bug Fixes
Tests