Skip to content

🎨 Palette: Keyboard Accessibility for Interactive Cards#11

Open
Dev22603 wants to merge 1 commit into
mainfrom
palette-ux-keyboard-a11y-1765313374384205503
Open

🎨 Palette: Keyboard Accessibility for Interactive Cards#11
Dev22603 wants to merge 1 commit into
mainfrom
palette-ux-keyboard-a11y-1765313374384205503

Conversation

@Dev22603
Copy link
Copy Markdown
Owner

🎨 Palette: Keyboard Accessibility for Cards

💡 What:
Added native keyboard accessibility (tab navigation and Enter/Space activation) to the custom interactive ProjectCard and ExperienceCard components.

🎯 Why:
These cards used motion.div with an onClick handler to act as clickable elements. While this works for mouse users, it completely breaks the experience for keyboard navigators and screen readers, as non-interactive elements are typically skipped in tab order and do not respond to standard keyboard interactions. This change ensures a fully inclusive and navigable experience for all users.

📸 Before/After:
(Visual changes are limited to a new focus outline when navigating via keyboard, tested via Playwright validation).

Accessibility:

  • Added role="button" to inform screen readers of the element's purpose.
  • Added tabIndex={0} to make the cards focusable in standard tab order.
  • Added onKeyDown handler to capture Enter and Space key presses to emulate clicks, matching standard <button> behavior.
  • Added visible focus indicators using Tailwind's focus-visible ring utilities to ensure users clearly see which card is currently focused.

PR created automatically by Jules for task 1765313374384205503 started by @Dev22603

- Added `role="button"` and `tabIndex={0}` to `ProjectCard` and `ExperienceCard` root `motion.div` elements.
- Implemented `onKeyDown` handlers to trigger click events when 'Enter' or 'Space' are pressed.
- Added `focus-visible` Tailwind classes to provide clear visual indicators for keyboard navigation.
- Fixed a `__dirname` resolution issue in `vite.config.js`.
- Configured ESLint to ignore unused `motion` variables to fix lint errors.
- Documented learning in `.Jules/palette.md`.

Co-authored-by: Dev22603 <92785712+Dev22603@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 31, 2026

Deploy Preview for dev-bachani ready!

Name Link
🔨 Latest commit 586626b
🔍 Latest deploy log https://app.netlify.com/projects/dev-bachani/deploys/6a1c95b72a4e7c0008ea7209
😎 Deploy Preview https://deploy-preview-11--dev-bachani.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

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.

1 participant