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

feat: datepicker: focus trap to datepicker components to enhance keyboard accessibility. #901

Merged

Conversation

krane-c-eightfold
Copy link
Contributor

@krane-c-eightfold krane-c-eightfold commented Oct 25, 2024

SUMMARY:

This PR enhances the accessibility of the datepicker components by adding a focus trap. The focus trap ensures that when users open a datepicker, keyboard navigation remains within the datepicker component until it is closed. This prevents users from accidentally navigating away from the datepicker, creating a more seamless and accessible experience for those using screen readers or keyboard navigation.

  • Added focus trap around datepicker components.
  • Modified focus behavior to prevent unintended focus shift when the datepicker is open.
  • Tested across various screen readers and keyboard-only navigation to confirm improved accessibility.

GITHUB ISSUE (Open Source Contributors)

JIRA TASK (Eightfold Employees Only):

https://eightfoldai.atlassian.net/browse/ENG-79838

CHANGE TYPE:

  • Bugfix Pull Request
  • Feature Pull Request

TEST COVERAGE:

  • Tests for this change already exist
  • I have added unittests for this change

TEST PLAN:

Manually tested on multiple browsers for focus trapping functionality on storybook
Verified with screen readers to ensure correct navigation and interaction.
Added/updated relevant unit tests to cover the focus trap behavior.

  • all buttons of date-picker should read as per their functionality
  • all buttons should be accessible
  • dates should be announced when focused on it
  • header buttons should announce when focused
  • when we open date-picker dialogue it should announce and we should be able to move focus to dialogue
Screen.Recording.2024-11-09.at.1.34.05.PM.mov

Copy link

codesandbox-ci bot commented Oct 25, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@sravichandran-eightfold sravichandran-eightfold changed the title feat: datepicker: add datepicker a11y support feat: datepicker: focus trap to datepicker components to enhance keyboard accessibility. Nov 9, 2024
@sravichandran-eightfold sravichandran-eightfold merged commit 9477592 into EightfoldAI:main Nov 10, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants