Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

fix(a11y): Python terminal: screen reader output only contains the last print statement

Open Beginner friendly
#70,412 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Start in client/src/templates/Challenges/classic/xterm.tsx, focusing on the print handler and the hidden screen-reader region introduced after #60154. Reproduce the issue with three Python print() statements, then verify that the terminal region retains and exposes all output lines individually to a screen reader.

Written by the indexing model from the issue text.

Description

platform: learn scope: a11y status: PR in works
Describe the Issue

I am a blind user testing with a screen reader. When I run Python code with more than one print() statement, only the output of the last print() is available to my screen reader. The output of the earlier print() statements is missing.

After #60154, the terminal output is exposed to screen readers through a hidden region. However, the print handler in client/src/templates/Challenges/classic/xterm.tsx assigns textContent, which replaces the region's content on every call. Since print is called once per Python print() statement, each new line erases the previous one, so only the last line remains.

Affected Page

https://www.freecodecamp.org/learn/python-v9/workshop-report-card-printer/step-2

Steps to Reproduce
  1. Using a screen reader, go to the affected page.
  2. Replace the code in the editor with:
    print("one")
    print("two")
    print("three")
  3. Run the code with Ctrl+Enter.
  4. Navigate to the terminal. Right below the "Terminal input" edit control, there is the terminal output region.
  5. The screen reader only reads "three". The output "one" and "two" is not there.
Expected behavior

The screen reader should read all lines of output ("one", "two" and "three"), so screen reader users can follow the full output of their code, not only the last line.

Screenshots

No response

System
  • Device: Laptop
  • OS: Windows 11
  • Browser: Chrome 153.0.8010.53
  • Screen reader: NVDA 2026.2
Additional context

Related to #60449 and #60154.

The "console output" panel shown after running tests (Check Your Code) contains all lines, since it is regular text. The problem only affects the terminal's screen reader region, which is where the output appears immediately after running code.

I have a fix ready, tested locally with my screen reader: each print call appends a new paragraph to the region instead of replacing its content, so all lines are read and can be navigated one by one. I'd like to open a pull request for it.

Dominant language
TypeScript
Stars
456k
Forks
46.8k
Avg merge
1d 3h
Merged PRs (30d)
273

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from freeCodeCamp/freeCodeCamp

All issues in freeCodeCamp/freeCodeCamp

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.