Skip to content

fix(step-recorder): a field is named by its label, never by what it holds - #400

Merged
gololdf1sh merged 1 commit into
mainfrom
fix/393-field-named-by-its-label
Sep 30, 2026
Merged

gololdf1sh merged 1 commit into
mainfrom
fix/393-field-named-by-its-label

Conversation

@gololdf1sh

Copy link
Copy Markdown
Collaborator

Closes #393

…olds

A form field with a role the recorder treats as buttonish (combobox,
spinbutton, slider, button, switch) was named by its own content before its
label was read. With "Never record entered values" on, an address autocomplete
labelled "Address" recorded "Type text into the Kyiv, Khreshchatyk 22 field";
with it off, a card number typed into one was masked as the value and then
written out as the field's name. The same path named a spinner and a slider by
their numbers, a file picker styled as a button by its path, a dropdown by one
of its options, and a switch by Chrome's default value, "on".

holdsValue() in rec-naming.js marks every form field but a button input, and
elementName() skips the buttonish branch for it, so the label, placeholder and
the rest of the ladder name the field. A submit or button input keeps its value
as its name: for those the value is the caption.

Probed against scratchpad copies: dropping the condition, counting button
inputs as fields, leaving out TEXTAREA or SELECT, and taking button inputs out
of isButtonish each turn an I row red. The same 12 cases in real Chromium: on
main 11 are named by a value, an option or "on"; here every one by its label.

Closes #393

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gololdf1sh gololdf1sh self-assigned this Sep 30, 2026
@gololdf1sh
gololdf1sh merged commit 6d05c5e into main Sep 30, 2026
1 check passed
@gololdf1sh
gololdf1sh deleted the fix/393-field-named-by-its-label branch September 30, 2026 11:07
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.

With "Never record entered values" on, a typed value can still end up in the saved step

1 participant