diff --git a/.Jules/palette.md b/.Jules/palette.md index 8ee612f..a69b2b2 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -12,3 +12,7 @@ ## 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. + +## 2025-05-18 - HTML5 Game Instructions & Screen Readers +**Learning:** Hiding on-screen keyboard game instructions from screen readers using `aria-hidden="true"` is an anti-pattern. Even if an HTML5 canvas game might not be natively playable via a screen reader, explicitly suppressing the instructions limits accessibility tools from communicating available inputs. +**Action:** Do not use `aria-hidden="true"` on keyboard hints or instructions unless they are already semantically covered by another linked ARIA description. diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index dc172e0..f283d65 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -11,7 +11,8 @@ on: jobs: build: - + env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true runs-on: ubuntu-latest strategy: fail-fast: false @@ -21,7 +22,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies 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..98ed410 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: 16px; + 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