Skip to content

feat(Folder): add keyboard navigation and accessibility support#989

Open
Sarthak-Bhagat2006 wants to merge 1 commit into
DavidHDev:mainfrom
Sarthak-Bhagat2006:feat/Folder-keyboard-navigation
Open

feat(Folder): add keyboard navigation and accessibility support#989
Sarthak-Bhagat2006 wants to merge 1 commit into
DavidHDev:mainfrom
Sarthak-Bhagat2006:feat/Folder-keyboard-navigation

Conversation

@Sarthak-Bhagat2006

Copy link
Copy Markdown
Contributor

Fixes #988

Changes

  • Added keyboard interaction using Enter and Space keys
  • Added tabIndex={0} to make the folder focusable
  • Added role="button" for semantic accessibility
  • Added aria-expanded to communicate open/closed state
  • Added dynamic aria-label ("Open folder" / "Close folder")
  • Added visible focus indicator for keyboard users

Previously, the Folder component could only be interacted with using a mouse click. Keyboard users were unable to open or close the folder.

This update improves accessibility by allowing users to:

  • Navigate to the component using the Tab key
  • Toggle the folder using Enter or Space
  • Receive proper state information through ARIA attributes
  • Clearly identify the focused component

Before

Screen.Recording.2026-06-19.at.12.00.22.AM.mov
  • Mouse interaction only
  • Not keyboard accessible
  • No ARIA semantics

After

Screen.Recording.2026-06-19.at.12.00.59.AM.mov
  • Fully keyboard accessible
  • Focusable with Tab
  • Supports Enter and Space activation
  • Includes appropriate ARIA attributes
  • Visible focus state

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.

[FEAT]: Folder component is not keyboard accessible

1 participant