🎨 Palette: Make dynamic score accessible to screen readers#123
🎨 Palette: Make dynamic score accessible to screen readers#123
Conversation
This commit introduces `aria-live="polite"` and `aria-atomic="true"` to the dynamic score update element in `src/views/mario-game.njk`. This small change makes the interface significantly more accessible for users with screen readers. Also fixed `venv` inclusion in `requirements.txt` to allow tests to run. 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
aria-live="polite"andaria-atomic="true"attributes to the#scoredisplay element in the Mario game.Also fixed
requirements.txtby removing thevenvmodule.Why
When the user's score increments dynamically via JavaScript, visually impaired users relying on screen readers wouldn't know the score had changed. The live region ensures the screen reader announces "Score: 1" gently, without interrupting other interaction tasks.
Additionally, the project dependencies were failing to install because
venvis a core module that doesn't exist on PyPI, breaking pipeline testing.Before/After
(Visuals remain unchanged as this is purely a semantic HTML accessibility update, verified via Playwright screenshot).
Accessibility
aria-live="polite": Screen readers will announce the update at the next graceful opportunity.aria-atomic="true": Ensures the screen reader reads the full content "Score: X" instead of just announcing the new integer "X".PR created automatically by Jules for task 5241941468813851575 started by @EiJackGH