🎨 Palette: Add keyboard accessibility to session table rows#22
Conversation
- 💡 What: Added `tabIndex={0}`, an `onKeyDown` handler (for "Enter" and "Space" keys), and `focus-visible` Tailwind classes to the custom `<tr>` session rows in `web/components/session-table.tsx`. Also fixed a `useEffect` linting warning in `web/components/session-drawer.tsx` by conditionally updating state during the render phase.
- 🎯 Why: Previously, session rows were only clickable via `onClick`, making the core interaction of viewing session details completely inaccessible to keyboard-only and screen reader users. This update allows keyboard users to focus and select rows. The linting fix cleans up an anti-pattern.
- ♿ Accessibility: Improved keyboard accessibility.
- 📝 Added an entry to `.Jules/palette.md` noting the importance of adding `tabIndex`, keydown handlers, and focus styles when making non-native elements interactive.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@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. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce961e7cba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| onSelect(s); | ||
| } | ||
| }} | ||
| tabIndex={0} |
There was a problem hiding this comment.
Give keyboard-selectable rows an accessible role
When screen-reader users tab to these rows after this change, the new focus stop is still exposed as a plain table row even though Enter/Space opens the details drawer. That makes the activation undiscoverable for the assistive-tech users this keyboard path is meant to support; put the action on a native button/link inside the row or use an appropriate ARIA role/name pattern for the focusable row.
Useful? React with 👍 / 👎.
🎨 Palette: Add keyboard accessibility to session table rows
tabIndex={0}, anonKeyDownhandler (for "Enter" and "Space" keys), andfocus-visibleTailwind classes to the custom<tr>session rows inweb/components/session-table.tsx. Also fixed auseEffectlinting warning inweb/components/session-drawer.tsxby conditionally updating state during the render phase.onClick, making the core interaction of viewing session details completely inaccessible to keyboard-only and screen reader users. This update allows keyboard users to focus and select rows. The linting fix cleans up an anti-pattern..Jules/palette.mdnoting the importance of addingtabIndex, keydown handlers, and focus styles when making non-native elements interactive.PR created automatically by Jules for task 14209640711590312286 started by @parvezk