Skip to content

Accessibility: sqlx database drop prompt loop is disorienting for visually impaired users (no input echo, no indication that return is needed) #4236

@tgrushka

Description

@tgrushka

I have found these related issues/pull requests

I am a visually impaired user of sqlx-cli. I rely on large print (increased terminal font size) and a screen reader to interact with the command line.

I am filing this issue not as a complaint, but as a request to consider the usability of sqlx-cli for users with disabilities. I am happy to provide additional information about my setup, test proposed fixes, or contribute feedback to improve the experience for everyone.

Thank you for your time and for maintaining sqlx.

Description

When I run sqlx database drop, the confirmation prompt presents a significant accessibility barrier. The prompt does not echo my input and provides no indication that I must press Enter to proceed. The behavior changes unpredictably depending on whether the prompt text wraps to multiple lines, making it impossible to build a reliable mental model of how the tool works.

Image

Reproduction steps

  1. Set a database URL that produces a long connection string (e.g., includes host, port, database name, and credentials).
  2. Increase terminal font size to a comfortable large-print size (or resize the terminal window narrow) so the prompt string wraps to at least two lines.
  3. Run sqlx database drop.
  4. Press Y.
  5. Observe the terminal output and screen reader behavior.
  6. (Optional) Repeat with a wider terminal or smaller font where the prompt fits on a single line, and compare behavior.

Observed Behavior

When the prompt wraps to multiple lines (large print / narrow terminal):

  • The prompt appears: Drop database at postgres://...? [Y/n]
  • I press Y.
  • The entire prompt is cleared and reprinted, with the default option flipped: Drop database at postgres://...? [y/N]
  • I press Y again.
  • The prompt clears and reverts to the original.
  • This loop continues indefinitely until I press Ctrl+C.
  • Screen reader impact: The screen reader announces the entire long prompt repeatedly. The subtle flip from [Y/n] to [y/N] is easy to miss auditorily. The constant clearing and reprinting forces the screen reader to re-parse the full block of text, causing cognitive overload and disorientation.

When the prompt fits on a single line (small font / wide terminal):

  • The prompt appears: Drop database at postgres://...? [Y/n]
  • I press Y.
  • The prompt does not clear or reprint. It appears to do nothing except silently flip the capital letter in the suffix ([Y/n] changes to [y/N]). There is no visual echo of the pressed key.
  • Screen reader impact: The screen reader announces nothing. There is zero audible feedback that my keypress was registered. I am left uncertain whether the program is frozen, if I mis-pressed the key, or if I need to take further action.

Common to both scenarios:

  • There is no indication that the program is waiting for the Enter key.
  • My pressed key (Y or N) is never displayed on screen.
  • After escaping with Ctrl+C, my terminal cursor often remains hidden, requiring a reset command to restore visibility.

Expected Behavior

  1. Input Echo: When I press Y or N, that letter should appear on the same line (e.g., [Y/n] Y) so I have visual and audible confirmation of my action.
  2. Clear Instruction: The prompt should explicitly indicate that Enter is required (e.g., [Y/n] (press Enter to confirm)).
  3. Consistent Behavior: The user interface should not change its feedback mechanism based on terminal width. A user with accessibility needs should receive the same predictable experience regardless of their display configuration.
  4. Screen Reader Announcement: Any change in state (e.g., flipping the default option) should be accompanied by a meaningful change in the spoken output, not a silent mutation or a full reprint of identical text.

Accessibility Impact Summary

Issue Impact on Visually Impaired User
No input echo Cannot verify if keypress was received; uncertainty about program state.
No "Press Enter" cue Hidden requirement leads to confusion and the appearance of a broken tool.
Silent state change (single-line mode) Screen reader users receive zero feedback, leading to anxiety and wasted time.
Aggressive reprinting (wrapped mode) Screen reader users are flooded with redundant speech, causing disorientation.
Cursor disappearance Forces additional steps to restore terminal visibility.

SQLx version

sqlx-cli 0.8.6

Enabled SQLx features

features that are installed with cargo binstall sqlx-cli

Database server and version

postgres 17

Operating system

Darwin MacBookPro 25.3.0 Darwin Kernel Version 25.3.0

Rust version

rustc 1.94.0-nightly (fecb335cb 2026-01-07)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions