Skip to content

a11y | A16 image alt from prompt and attachment labels - #82

Merged
BrianGenisio merged 2 commits into
mainfrom
fix/a11y-a16-image-alt
Aug 13, 2026
Merged

a11y | A16 image alt from prompt and attachment labels#82
BrianGenisio merged 2 commits into
mainfrom
fix/a11y-a16-image-alt

Conversation

@BrianGenisio

Copy link
Copy Markdown
Contributor

Summary

Closes #70 (A16). Chat images used filenames or empty markdown alt, so a generated picture often had no useful description for assistive tech.

Product rule: assistant/generated images use the previous user message. That string is available both live and after reload (tool-call input is not persisted). User uploads and composer thumbnails are labelled as attachments.

Changes

  • User file parts and composer thumbs: t('Attached image: {name}'), with t('attachment') when the filename is missing.
  • Assistant file parts and empty markdown ![](): previous user message text, otherwise t('Generated image').
  • Non-empty markdown alt is kept.
  • Alt is escaped in HTML strings, or assigned via the img property on composer thumbs.

Look at renderFilePart, renderer.image, and how previousUserText is threaded through renderMessages. The tool-call prompt is intentionally unused; this repo never reads tool-call input, and serializeLiveMessages drops those parts on save.

Test plan

  • npm test
  • Upload an image in the composer and in a sent user bubble: alt should be Attached image: {filename}
  • Generate an image: VoiceOver should read the prompt that requested it, not the filename
  • Reload the session: same alt still present (previous user message remains; tool-call does not)
  • Older markdown ![]() replies: empty alt falls back to the previous user message; explicit ![description]() is kept
  • Spanish catalog: Imagen adjunta: {name} / Imagen generada
  • Confirm axe baseline does not grow

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e9f19665-d379-4970-9c33-51dbeeb2bd3c

📥 Commits

Reviewing files that changed from the base of the PR and between ef43728 and 4cf8444.

📒 Files selected for processing (5)
  • a11y-audits/8-5-26/wave-4-plan.md
  • i18n/en.json
  • i18n/es.json
  • public/app.js
  • tests/dom/render.test.js

Comment @coderabbitai help to get the list of available commands.

@BrianGenisio
BrianGenisio merged commit 17095e8 into main Aug 13, 2026
2 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.

[a11y][A16] Images use filenames as alternative text

1 participant