Skip to content
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

fix(16991): fix keyboard navigation's focus lock issue in DatePicker #17154

Merged

Conversation

2nikhiltom
Copy link
Contributor

Closes #16991

This PR fixes keyboard navigation issue with DatePicker: Now focus moves out of datePicker to the next focusable element in the DOM on Tab key press

Changelog

Adds to useEffect to remove the focus from calendar on Tab key

It checks if the pressed key is 'Tab' (without Shift) and if the endInputField is focused and that the calendar is open
If the condition matches : It close the calendar and remove focus from the endInputField

Testing / Reviewing

Select the dates using keyboard after selection of end date press tab and verify that the focus moves to the next focusable element in the DOM

@2nikhiltom 2nikhiltom requested a review from a team as a code owner August 13, 2024 13:11
Copy link

netlify bot commented Aug 13, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit f11cc13
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/66bb634a13a24100085215ca
😎 Deploy Preview https://deploy-preview-17154--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Aug 13, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit f11cc13
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/66bb634aca254e000825a115
😎 Deploy Preview https://deploy-preview-17154--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@guidari guidari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@alisonjoseph alisonjoseph added this pull request to the merge queue Aug 13, 2024
Merged via the queue into carbon-design-system:main with commit 6686fc3 Aug 13, 2024
22 checks passed
@carbon-automation
Copy link
Contributor

Hey there! v11.64.0 was just released that references this issue/PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Datepicker issue with Keyboard Navigation
3 participants