Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
5 changes: 3 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ on:

jobs:
build:

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
numpy
pandas
requests
venv
15 changes: 14 additions & 1 deletion src/views/mario-game.njk
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
</style>
</head>

<body>

<div id="game">
<div id="score">Score: 0</div>
<div id="score" aria-live="polite" aria-atomic="true">Score: 0</div>
<div id="instructions">Press <strong>Space</strong> or <strong>&uarr;</strong> to jump</div>
<div id="mario"></div>
<div class="ground"></div>
</div>
Expand Down
Loading