Repository navigation
fix(ag-grid-table): restore pager focus and update TreeTable tests for antd 6.7.0 - #46669
Merged
hainenber merged 2 commits intoNov 28, 2026
Merged
Conversation
…r antd 6.7.0 antd 6.7.0 (apache#46269) pulls @rc-component/pagination 1.7.0, which moves keyboard focus from the pager list item to the link or button inside it. TreeTablePager (apache#46490) still called focus() on the list item, so focus was no longer restored to the current page when the control in use turned disabled. Target the focusable control instead, and update the tests for the new accessible names, tab stops and Space activation.
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #46669 +/- ##
==========================================
+ Coverage 86.23% 86.42% +0.19%
==========================================
Files 3146 3183 +37
Lines 220018 222606 +2588
Branches 52110 52996 +886
==========================================
+ Hits 189725 192385 +2660
+ Misses 26823 26751 -72
Partials 3470 3470
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
9 tasks
hainenber
requested changes
Nov 28, 2026
hainenber
approved these changes
Nov 28, 2026
hainenber
left a comment
Contributor
There was a problem hiding this comment.
LGTM for now. Merge to unblock mainline's CI but just in case the fix here breaks author's vision, you might need to follow up with him at @DamianPendrak
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
sharded-frontend-tests (2),(3)and(8)currently fail onmaster, and on PRs that include the latestmasterand run the frontend tests: 8 tests underplugins/plugin-chart-ag-grid-table/src/TreeTable/.Two PRs crossed:
@rc-component/pagination1.7.0.TreeTableand its pager, with tests written against the previous pager DOM.In
@rc-component/pagination1.7.0 the focusable control is no longer the<li>but the link or button inside it.This is also a real bug, not only outdated tests.
TreeTablePagerrestores focus to the current page when the control in use goes away or turns disabled (for example "Next" on the last page). It did that withfocus()on.ant-pagination-item-active, which is the<li>. That element is no longer focusable, so focus was not restored. The selector now targets the focusable control inside the item.Test updates, following the new pager:
Page 2,Next Page, …) instead of thetitleof the<li>.tabindex="-1"instead of notabindex.focus()on the<li>no longer did anything. I updated it to assert that Space changes the page once, and updated the component comment. If Enter-only is still wanted for this pager, I can change the component instead.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A (keyboard focus behavior, covered by tests)
TESTING INSTRUCTIONS
cd superset-frontend && npm run test -- plugins/plugin-chart-ag-grid-table/src/TreeTableLocal results:
master: the CI failures reproduce (for example 5 of 14 inTreeTablePager.test.tsx).I verified this in Jest only, not in a browser.
ADDITIONAL INFORMATION