-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: focus and onClick issue on HeaderMenuItem #19495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for v11-carbon-react ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #19495 +/- ##
=======================================
Coverage 84.48% 84.48%
=======================================
Files 373 373
Lines 14735 14736 +1
Branches 4838 4891 +53
=======================================
+ Hits 12449 12450 +1
+ Misses 2139 2138 -1
- Partials 147 148 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On #19436 (comment), do we know why the default was deleted?
Hey @adamalston |
Sounds good. Since that was just one change in #18207 — a pull request with over 2,500 lines of changes — should someone go through it to confirm there were no other unintentional changes? Maybe that’s unnecessary, but it doesn’t hurt to ask. |
@adamalston I looked through it again and didn't see anything of note. It's possible the tabindex change was output from one of the codemods for react 19 or the related typescript updates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💯
Hey there! v11.84.0 was just released that references this issue/PR. |
Closes #19436
Closes #19401
Added back the TabIndex default value to 0 if not passed
Changelog
New
Added test cases and story for testing/reviewing
Changed
sets default value to 0 inside the function body
const resolvedTabIndex = tabIndex ?? 0;
Testing / Reviewing
ci should pass
verify that HeaderMenuItem is focusable via keyboard navigation and onClick is called (verify in console )
PR Checklist
As the author of this PR, before marking ready for review, confirm you:
More details can be found in the pull request guide