Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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 |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
React Doctor found 2 new issues in 1 file · 2 warnings · score 81 / 100 (Needs work) · 5 fixed · vs 2 warnings
Reviewed by React Doctor for commit |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #728 +/- ##
==========================================
+ Coverage 99.69% 99.72% +0.02%
==========================================
Files 4 5 +1
Lines 332 364 +32
Branches 153 169 +16
==========================================
+ Hits 331 363 +32
Misses 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
❌ Deploy failed
📋 Build log (last lines)🤖 Powered by surge-preview |
|||||||||
| } | ||
|
|
||
| /** Keep the list item structural when itemRender supplies a native control. */ | ||
| const PaginationItem: React.FC<PaginationItemProps> = ({ |
There was a problem hiding this comment.
React Doctor · react-doctor/no-high-complexity-react-function (warning)
PaginationItem has cyclomatic complexity 16, cognitive complexity 15, and maximum nesting depth 2, so its React logic is hard to understand and change. Extract independent branches into components or hooks.
Fix → Extract independent render branches and state logic into focused components or hooks until the control flow is easy to follow.
| // Arbitrary components need not forward DOM props. Preserve their existing | ||
| // content and delegated interaction instead of wrapping interactive nodes. | ||
| return ( | ||
| <li |
There was a problem hiding this comment.
React Doctor · react-doctor/no-noninteractive-element-interactions (warning)
Keyboard & screen reader users can't trigger this <li> because it isn't interactive, so use a button or link or add an interactive role.
Fix → Put interactions on a button or link, or add an interactive role.

Problem
The pagination upgrade in ant-design/ant-design#58604 exposes axe
aria-allowed-roleandlistfailures: interactivelielements override their list-item role withrole="button". Removing those roles alone, as proposed in #727, leaves the default focus targets without control semantics.Solution
Keep
ul/lias the list structure and move focus, labels, current-page state, click handling, and activation to the existing inner controls. Reuse native buttons and anchors returned by icons oritemRender; never add an interactive wrapper around custom content. Default page and jump anchors withouthrefexpose button semantics and retain Enter/Space support, preserving the existing tags and CSS contract used by antd. Native buttons use browser keyboard activation, avoiding duplicate callbacks. Links withhrefretain link semantics and disabled links cannot navigate.Opaque custom content retains its existing delegated interaction, with the invalid
lirole removed. Its author remains responsible for accessible control semantics; the implementation does not assume custom components forward DOM props. Document this boundary and update the bundled focus styles for child focus. Update the quick-jumper blur guard to recognize descendants of page items, so focusing a page control does not submit a pending quick-jump value before the click.ARIA-in-HTML permits button roles on these anchors while the outer list items retain their implicit role: https://www.w3.org/TR/html-aria/.
Validation
git diff --checkpass.aria-allowed-roleandlistviolations.886c3dc6c59c1b27b20be941f5043a8cd38cfa48, map the pagination import to this source: all four enabled pagination/list/table/transfer accessibility suites pass (83 tests). The config-provider suite is skipped by its existing configuration.The companion antd change ant-design/ant-design#59573 extends its focus styles to the inner controls. This PR is an alternative to #727, not a change to that branch.