Repository navigation
fix(z-index): drop tabIndex from z-index portal groups to stop pointer focus rings - #7805
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. Walkthrough
ChangesZ-index portal focusability
Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The change removes unwanted portal focusability and updates tests to verify the intended behavior; it is ready to merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Bundle ReportChanges will increase total bundle size by 10 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: recharts/bundle-umdAssets Changed:
view changes for bundle: recharts/bundle-cjsAssets Changed:
view changes for bundle: recharts/bundle-es6Assets Changed:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7805 +/- ##
=======================================
Coverage 88.42% 88.42%
=======================================
Files 638 638
Lines 15431 15431
Branches 4044 4044
=======================================
Hits 13645 13645
Misses 1591 1591
Partials 195 195 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Record pnpm/pnpm#14863 and recharts/recharts#7805 as merged, add publications.json plus the Sync merged OSS workflow so README, resume, LinkedIn, profile fragment, About, and resume artifacts stay in lockstep.
|
Thanks for merging, @PavelVanecek. Removing the attribute and locking the behaviour with a test was a small change with a very specific cause. |
Fixes #7799.
tabindex="-1"on the z-index layer<g>elements makes them pointer-focusable. Clicking anywhere in a chart focuses the nearest layer group, and any app with a global:focus-visiblerule then paints a focus ring on it. In WebKit an outline on an SVG element traces its geometry, which looks like a selected bar or ReferenceArea.This removes the
tabIndex={-1}prop fromZIndexSvgPortal. A bare SVG<g>is neither tabbable nor pointer-focusable, so the intent documented in PR #6687 (preventing extraneous focusable surfaces) still holds without the attribute.Tests: the AllZIndexPortals spec now selects layer groups by their
recharts-zIndex-layer_class instead of by tabindex, and adds an assertion that no rendered layer group carries atabindexattribute. That assertion fails on main and passes with this change.Note: the issue cites
ZIndexPortal.js; the actual file issrc/zIndex/ZIndexPortal.tsx.Summary by CodeRabbit
tabindexattribute, while remaining non-tabbable and non-pointer-focusable.tabindexattribute.