Skip to content

fix(step-recorder): a composer, a slider and seven ARIA roles now record a step - #232

Merged
gololdf1sh merged 1 commit into
mainfrom
fix/111-recorder-sees-more
Sep 3, 2026
Merged

fix(step-recorder): a composer, a slider and seven ARIA roles now record a step#232
gololdf1sh merged 1 commit into
mainfrom
fix/111-recorder-sees-more

Conversation

@gololdf1sh

Copy link
Copy Markdown
Collaborator

Part of #111 — three of its five gaps. The masked-retry gap (D12) and the pill's "values off"
chip follow in a second pull request, which is the one that closes the issue.

Each gap ends the same way for the tester: they act, the counter does not move, and the saved
test is missing a step.

What now records

  • A composer. isContentEditable makes an element a text field whose value is its own text,
    so a comment box, a CMS body and a chat composer record like any input. The click on the
    composer stays dropped — it is focus noise the Type step absorbs, exactly as for an input.
  • A slider, a colour and a file picker. One change branch each. Set the "Volume" slider to "7", Set the "Colour" picker to "#ff0000", Attach "photo.png" to the "Avatar" field — the
    filename from files[0].name, falling back to the last segment of the C:\fakepath\… value.
    The never-values toggle is their only rule: a slider position is not a secret and a filename is
    not one either. Under it they say Set the "Volume" slider and Attach a file to the "Avatar" field, and hand the editor a withheld-value marker rather than an empty string.
  • Seven ARIA roles in CLICK_SEL: link, combobox, listbox, slider, spinbutton, treeitem,
    gridcell — each with the verb a tester would write by hand (Open the "Country" dropdown,
    Select "Payments" in the tree) instead of falling back to "the button".

RecMask.maskedAs takes the entered value as an argument now: a composer has no .value, and
without this a card number typed into one would be recorded verbatim. That row is D19b.

Two holes closed on the way

  • A file input the page clears (its own Remove button) fires change with nothing chosen and
    wrote Attach "" to the field. It now records nothing — D18d.
  • A muted slider handed the editor value: "" (masked). It now says a value existed and was
    withheld — D18c.

Turned on

A26, D18 and D19 were deferred with test.todo naming this issue; they are live rows now.
A27 (all seven role sentences, named and nameless), D18b, D18c, D18d, D19b and M66
are new. tests/helpers/mini-dom.mjs learned isContentEditable — inherited, nearest statement
wins — because D19 cannot run without it.

node --test tests/*.test.mjs — 411 tests, 391 pass, 0 fail, 20 todo. Against pre-fix copies
through REC_SRC / REC_MODULES every new row fails, and with only rec-mask.js swapped back
D19b alone fails.

Known, unchanged

In a multi-line composer each Enter writes its own step carrying the whole text so far. A
<textarea> already behaves that way; suppressing it would lose the step in a chat, where Enter
sends the message and empties the box.

🤖 Generated with Claude Code

…ord a step

Three of the five gaps in #111, all the same failure for the tester: they act, the counter does
not move, and the saved test is missing a step.

A contenteditable is now a text field whose value is its own text, so a comment box, a CMS body
and a chat composer record like any input — and reach the masking rules, which learned to take
the value from the caller because a composer has no `.value`. `range`, `color` and `file` get a
change branch each, with the never-values toggle as their only rule: a slider position is not a
secret and neither is a filename. CLICK_SEL gains link, combobox, listbox, slider, spinbutton,
treeitem and gridcell, each with the verb a tester would write by hand rather than "the button".

Two holes found by hand and closed here: a file input the page clears fires `change` with nothing
chosen and wrote `Attach "" to the field`; and a muted slider handed the editor an empty value
instead of saying one was withheld.

The fake page learned `isContentEditable` — inherited, nearest statement wins — because the row
that proves the composer records could not run without it.

Probed: node --test tests/*.test.mjs — 411 tests, 391 pass, 0 fail, 20 todo (three fewer, the
rows this turns on). Re-run against pre-fix copies through REC_SRC/REC_MODULES: A26, A27, D18,
D18b, D18c, D19 and D19b fail there, and with only rec-mask.js swapped back D19b alone fails, so
the handed-in value is load-bearing. Hand probes: a cleared file input, a muted range, a button
inside a gridcell, a blur on a contenteditable=false island.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@gololdf1sh
gololdf1sh merged commit ceb7579 into main Sep 3, 2026
1 check passed
@gololdf1sh
gololdf1sh deleted the fix/111-recorder-sees-more branch September 3, 2026 18:19
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