🎨 Palette: Add keyboard accessibility to clickable cards#10
Conversation
- 💡 What: Added `role="button"`, `tabIndex={0}`, keyboard event handlers, and `focus-visible` styles to `ProjectCard` and `ExperienceCard` components.
- 🎯 Why: Non-interactive elements (like `motion.div`) acting as clickable cards lacked native keyboard focusability and interaction, making them inaccessible for users navigating via keyboard.
- ♿ Accessibility: Improved keyboard navigation by allowing users to focus on cards and trigger their modals/actions using Enter or Space, with clear visual feedback from a focus ring.
- Fixed `__dirname` issue in `vite.config.js` and CSS import warning in `index.css` to ensure build checks pass.
Co-authored-by: Dev22603 <92785712+Dev22603@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
✅ Deploy Preview for dev-bachani ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This PR introduces a micro-UX enhancement by adding keyboard accessibility to the
ProjectCardandExperienceCardcomponents.role="button",tabIndex={0}, anonKeyDownhandler, and Tailwind'sfocus-visibleutility classes to the clickable<motion.div>elements in both components.EnterorSpace, with a clear visual focus ring indicating the currently focused card.Additionally, minor fixes were applied to
eslint.config.js,vite.config.js, andindex.cssto resolve linter errors and build warnings encountered during testing. The.Jules/palette.mdjournal has been updated with these learnings.PR created automatically by Jules for task 1850231668775224118 started by @Dev22603