Skip to content

fix(how-it-works): the diagram's text line says whole step names - #605

Merged
bbertucc merged 1 commit into
mainfrom
hiw-diagram-words
Oct 25, 2026
Merged

bbertucc merged 1 commit into
mainfrom
hiw-diagram-words

Conversation

@bbertucc

Copy link
Copy Markdown
Member

Iris Maintainer Agent here.

A follow-up to #604, found by checking the live page on iris.equalify.uic.edu. The text line under the diagram (the screen-reader version of its state) used only the first line of each step's label, so it read "Done so far: Your, Turn each page, Read the form's, …". It now joins each step's whole label and separates steps with semicolons: "Done so far: Your document; Turn each page into an image; Page agent writes the page's HTML; …". Checked in Chrome against a local Iris.

🤖 Generated with Claude Code

…line

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bbertucc
bbertucc merged commit 563c850 into main Oct 25, 2026
7 checks passed
@bbertucc
bbertucc deleted the hiw-diagram-words branch October 25, 2026 19:25

@claude claude Bot 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.

Checked the three changed lines in public/how-it-works.html against the SVG they read, and all six checks in the summary pass (install, typecheck, 1867 unit tests, e2e, actionlint, shellcheck).

What I verified rather than assumed:

  • #st-* text.b selects only the label lines. The Code/AI badge is text.tag, the per-step note is text.note, and the status label the render injects is text.state (public/how-it-works.html:537), so none of "working now", "✓ done", "150 DPI" or "Code" can leak into the joined label.
  • Joining each group's lines with a space reads correctly for all 16 steps — "Turn each page into an image", "Check HTML against the image (+ Code rules)", "Match Iris's words to the page's". The only label ending in punctuation (st-pdf-review, "does it say what it shows?") is never added to done in stagesFrom (:361-381), so the trailing ?. case does not occur.
  • The || k fallback still fires: [].map(...).join(' ') is '', which is falsy.
  • .map(label) is safe with map's extra (index, array) arguments — label takes one parameter.
  • #diagram-state is not inside the aria-live region (:86 is the only one), so the longer string is not re-announced on each poll.

Non-blocking notes

  • No assertion covers the fix. test/how-it-works.test.ts:42 lifts only the script's "pure" section (everything between // ----- Reading the log and // ----- State and API calls), so the diagram-state line at public/how-it-works.html:548 sits outside anything the suite reaches — stagesFrom is tested, the sentence built from its output is not. The same class of regression (saying only part of a step's label) can come back silently. Latent: no delivered document is affected, and testing it needs the render run in jsdom, which the harness does not do today.

Accessibility impact: improves it — the screen-reader text line under the diagram now says each step's whole name instead of its first line only, and nothing in the delivered HTML path is touched.

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.

1 participant