🎨 Palette: [Mario Game] Keyboard control refinement and a11y improvements#108
🎨 Palette: [Mario Game] Keyboard control refinement and a11y improvements#108
Conversation
- Added a visual keyboard hint ("Press Space to jump").
- Refined the `keydown` event listener to strictly trigger on `Space` or `ArrowUp` (previously any key).
- Added `e.preventDefault()` for those keys to prevent the browser from naturally scrolling the page during gameplay.
- Added `aria-live="polite"` to the score container for screen readers.
Co-authored-by: EiJackGH <172181576+EiJackGH@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. |
💡 What:
Added a clear visual instruction for gameplay ("Press Space to jump"), limited jumping input to Space and ArrowUp keys, prevented default page scrolling when using these keys, and added
aria-live="polite"to the score element.🎯 Why:
📸 Before/After:
Before: No visual hint, jumping on any key, page scrolls on Space.
After: See screenshot for visual hint; jumping limited to specific keys and page scrolling is blocked.
♿ Accessibility:
aria-live="polite"to the#scoreelement so screen readers will read out the score changes organically.PR created automatically by Jules for task 14150505555651676540 started by @EiJackGH