Repository navigation
🎨 Palette: Keyboard Accessibility for Brainstorming Options - #8
Conversation
💡 What: Automatically add `tabindex="0"` and `role="button"` to `[data-choice]` elements. Add keyboard listener for Enter/Space to trigger click, and `:focus-visible` styles. 🎯 Why: Brainstorming options were missing keyboard accessibility. Screen readers didn't announce them as interactive, and keyboard users couldn't activate them or see what was focused. ♿ Accessibility: - Added semantic `role="button"` - Added `tabindex="0"` for sequential keyboard navigation - Added keyboard interaction (`Enter` and `Space`) to activate choices - Added visible focus indicators (`:focus-visible`) Co-authored-by: pakorn269 <[email protected]>
|
👋 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. |
There was a problem hiding this comment.
Pull request overview
Improves keyboard accessibility and focus visibility for the brainstorming companion frame by automatically making [data-choice] elements keyboard-focusable and activatable via Enter/Space, plus adding :focus-visible outlines for common interactive UI classes.
Changes:
- Auto-injects
tabindex="0"androle="button"on[data-choice]elements, including after DOM mutations viaMutationObserver. - Adds a global
keydownhandler to map Enter/Space to click on focused choices. - Adds
:focus-visibleoutline styling for.option,.card, and.mock-button.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| skills/brainstorming/scripts/helper.js | Adds automatic accessibility attribute injection and global keyboard activation handling for [data-choice]. |
| skills/brainstorming/scripts/frame-template.html | Adds focus-visible outline styles for common interactive classes used in injected content. |
| .Jules/palette.md | Records the accessibility approach/learning for future reference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR improves the keyboard accessibility and screen-reader experience for the visual brainstorming tool.
💡 What
tabindex="0"androle="button"into any[data-choice]element rendered in the brainstorming frame.keydownlistener to handleEnterandSpacekey presses on focused choices, mapping them to clicks.:focus-visibleoutlines to interactive elements (.option,.card,.mock-button).🎯 Why
LLM-generated content fragments often omit a11y attributes. Instead of relying on subagents to consistently write accessible HTML for their choices, we can robustly guarantee keyboard accessibility at the frame level. This ensures all visual brainstorming options are accessible to screen readers and keyboard users immediately upon rendering.
♿ Accessibility
PR created automatically by Jules for task 4681468131147141390 started by @pakorn269