uttrflow / uttrflow/uttrflow-swift

Under Increase Contrast the AI suggestion ghost is drawn exactly like typed text

Open
#534 0 comments 0 reactions 0 assignees View on GitHub
accessibility area:ai-suggestions bug P2
Dominant language
Swift
Stars
4
Forks
17
Avg merge
3h 32m
Merged PRs (30d)
277

Description

## What happens

With Increase Contrast or Reduce Transparency on, the ghost text is drawn exactly like the user's own text.

- `SuggestionAppearance.demandsOpaqueGhost` is `increasesContrast || reducesTransparency` (`Sources/UttrflowUX/SuggestionPresentation.swift:27`).
- Under it, `opacity` becomes `opaqueGhostOpacity = 1.0` (`:65`, `:126`).
- `SuggestionView.inlineLine` distinguishes the ghost by opacity alone: `.primary.opacity(presentation.opacity)`, same font, no italic, underline or tint (`Sources/Uttrflow/Suggestion/SuggestionView.swift:56-59`, `:95-105`).

So at 1.0 the suggestion is indistinguishable from typed text. A user who turned on Increase Contrast because faint grey is hard to read now cannot tell what they wrote from what is offered.

## Why it matters

Users who rely on Increase Contrast are exactly the ones who cannot use a faint cue. Removing the only cue does not help them. They may send or run a line believing it was already typed.

## How to reproduce

Turn on System Settings → Accessibility → Display → Increase Contrast and trigger an AI suggestion. The offered text looks like typed text. `SuggestionPresentationTests` would show `opacity == 1.0` with no other style difference.

## Acceptance criteria

- Under Increase Contrast and Reduce Transparency the ghost stays legible and still looks different from typed text by something other than opacity: an underline, a dotted underline, an accent colour meeting 4.5:1, or a solid high-contrast backing.
- `SuggestionPresentation` exposes that style so it is unit-tested in `Tests/UttrflowUXTests`.

Contributor guide

Open the contributing guide

Research direction

Start with Sources/UttrflowUX/SuggestionPresentation.swift and Sources/UttrflowUX/Suggestion/SuggestionView.swift, then inspect SuggestionPresentationTests in Tests/UttrflowUXTests. Verify the Increase Contrast and Reduce Transparency paths, expose a non-opacity distinction for the ghost, and add unit coverage showing it remains legible and visually different from typed text.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, swift
Domain
accessibility, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.