From 4900b7807ccea37fda2394f6bed5ba0d5c2b040d Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 9 May 2026 13:42:27 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20keyboard=20inst?= =?UTF-8?q?ructions=20and=20ARIA=20attributes=20to=20Mario=20game?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: EiJackGH <172181576+EiJackGH@users.noreply.github.com> --- .Jules/palette.md | 3 +++ requirements.txt | 1 - src/views/mario-game.njk | 15 ++++++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.Jules/palette.md b/.Jules/palette.md index 8ee612f..8beb409 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -12,3 +12,6 @@ ## 2025-03-23 - Game Key Scrolling **Learning:** Browsers natively scroll the page when users press Space or Arrow keys. When building a web-based game, this creates a frustrating UX where the game viewport jumps around while playing. **Action:** Always call `e.preventDefault()` on keydown events for typical game controls ("Space", "ArrowUp", etc.) when the focus is on a game container or the body. +## 2024-05-09 - Interactive Game Accessibility +**Learning:** Adding text instructions to canvas/custom interactive elements is crucial since standard screen readers or navigation patterns might not infer custom game controls. +**Action:** Always provide explicit, visible instructional text so users know the required inputs for interactive web games. diff --git a/requirements.txt b/requirements.txt index cfaa995..4ad1501 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ numpy pandas requests -venv diff --git a/src/views/mario-game.njk b/src/views/mario-game.njk index 67b6bd7..4b9b7c6 100644 --- a/src/views/mario-game.njk +++ b/src/views/mario-game.njk @@ -52,13 +52,26 @@ font-size: 20px; font-family: Arial; } + + #instructions { + position: absolute; + top: 10px; + right: 10px; + color: white; + font-size: 20px; + font-family: Arial; + background: rgba(0, 0, 0, 0.5); + padding: 5px 10px; + border-radius: 5px; + }
-
Score: 0
+
Score: 0
+
Press Space or ↑ to jump