Skip to content

Conversation

@son426
Copy link
Contributor

@son426 son426 commented Oct 30, 2025

This PR adds the keyboard accessibility enhancements from Issue #622, following up on the once prop implementation in #626.
It also includes the minor refactors.

Accessibility Changes:

  • Triggers transition on onFocus/onBlur events.
  • Enables keyboard focus with tabIndex={0}.
  • Adds dynamic aria-hidden for screen readers.

Refactoring:

  • Updated the content prop types to React.ReactNode | string to be consistent with the documentation.
  • Aligns prop types and order with the documentation.

- Adds  to enable keyboard focus.

- Maps onFocus/onBlur to the transition logic for keyboard users.

- Renames handleMouseEnter/Leave to handleEnter/Leave for clarity, as they now serve both mouse and keyboard events.

- Implements dynamic  to ensure screen readers only announce visible content.
- Update content types to React.ReactNode | string to match docs.

- Match prop order with propData.
@DavidHDev DavidHDev merged commit d5979a5 into DavidHDev:main Oct 30, 2025
@son426 son426 deleted the feat/pixel-transition-a11y branch November 3, 2025 11:51
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.

2 participants