Skip to content

fix: screen reader compatibility - #31

Merged
djoseph-apphelix merged 1 commit into
mainfrom
djoseph-apphelix/TNL2-343
Mar 30, 2026
Merged

djoseph-apphelix merged 1 commit into
mainfrom
djoseph-apphelix/TNL2-343

Conversation

@djoseph-apphelix

@djoseph-apphelix djoseph-apphelix commented Mar 23, 2026 •

Copy link
Copy Markdown
Member
  • Add screen reader announcements via aria-live regions for both flashcards and matching games, so users hear card flips, correct/incorrect matches, page transitions, and game completion
  • Add keyboard navigation support to matching game boxes (role="button", tabindex="0", Enter/Space key handlers) and manage focus throughout gameplay (start, navigation, after matches,
    end screen)
  • Add aria-hidden to decorative elements (loading spinner, progress SVG, card faces) and focus-visible outlines for keyboard users
  • Add sr-only CSS utility class for visually hidden but screen-reader-accessible content
  • Bumped up version to 1.0.14

Copilot AI review requested due to automatic review settings March 23, 2026 06:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves accessibility for the games XBlock by adding screen-reader announcements, keyboard navigation/focus management, and hiding decorative UI from assistive technologies for the flashcards and matching games.

Changes:

  • Added aria-live regions and JS-based announcements for key gameplay events (page changes, matches, flips, completion).
  • Improved keyboard operability and focus management (tabbable matching boxes, Enter/Space activation, focus routing at start/end).
  • Added sr-only utility styles, focus-visible outlines, and aria-hidden for decorative elements; bumped package version.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
setup.py Bumps package version to 1.0.14.
games/static/js/src/matching.js Adds live region announcements and keyboard/focus behavior for the matching game.
games/static/js/src/flashcards.js Adds live region announcements, aria updates, and focus behavior for flashcards.
games/static/html/matching.html Adds aria-live region, keyboardable roles/tabindex for boxes, aria-hidden for decorative SVG/spinner, and focusable end-screen region.
games/static/html/flashcards.html Adds aria-live region and adjusts ARIA attributes for the flashcard component/container.
games/static/css/matching.css Adds sr-only utility and focus-visible styling for matching boxes.
games/static/css/flashcards.css Adds sr-only utility and focus-visible styling for the flashcard element.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread games/static/html/flashcards.html
Comment thread games/static/js/src/flashcards.js
Comment thread games/static/js/src/matching.js
Comment thread games/static/css/flashcards.css
@viv-helix

Copy link
Copy Markdown
Contributor

@djoseph-apphelix add newer version in PR description and create edx-internal PR for deployment.

@djoseph-apphelix
djoseph-apphelix merged commit a4416ae into main Mar 30, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants