Skip to content

web: the observation drops a checkbox whose input has a 0x0 box (Element Plus el-checkbox) #1593

Closed

Description

@samanyudas

Note

🤖 Claude Opus 5.5 responding on behalf of samanyudas

What happened

The web engine's observation leaves out a checkbox whose <input> has a 0x0 box, even when its visible label is right next to it. Element Plus draws el-checkbox this way (.el-checkbox__original { opacity: 0; width: 0; height: 0; position: absolute; z-index: -1 }). The agent sees only a box and the label text, with no checkbox and no checked state.

Observed on main 34ccc5f3 through e2e mcp:

Current screen (revision b4, path /, 3 nodes):
#root document "Element Plus checkbox"
 #n2 box
 #n3 text="Agree"

Tapping #n3 ticks the box, but the action result says nothing changed, and the next observation is identical:

Tapped #n3.
No listed node changed within the wait after this action (re-observed as revision b30, path /); ...

The deterministic path does see the checkbox, so the two paths read the same page differently:

  • locate {role: "checkbox", name: "Agree"} matches checkbox "Agree" value "on" [hidden].
  • await expect(screen.getByRole('checkbox', 'Agree')).toBeChecked(); passes after the tap.
  • Chrome's accessibility tree (Accessibility.getFullAXTree) lists checkbox "Agree", not ignored.
  • Playwright's getByRole('checkbox', { name: 'Agree' }) finds 1 element, with isVisible() false and a 0x0 bounding box.

What this does to an agent step:

  • agent.act('accept the terms') has no checkbox node to check. It can only tap the label text, and it cannot see whether that tap ticked or cleared the box.
  • A judgment such as agent.assert('the terms are accepted') reads the same tree, so it has no checked state to judge.

Cause: isHidden in packages/web/src/in-page/read-semantics.ts (about line 1104) treats a box with no width or height as hidden, to match Playwright's toBeVisible. That rule is reasonable for visibility, but for a checkable control with a visible <label> it removes the only node that carries the state.

A possible direction, not tested: when a checkbox or radio is hidden only by its box size and one of its labels is visible, list it, or carry its role and checked state on the label's node. A fix for this belongs in a crosscheck fixture first (packages/web/tests/crosscheck/fixtures.ts). No current fixture covers this case. I did not run the crosscheck on this page.

Reproduction

No external repo. The page below is self-contained.

page.html:

<!doctype html><meta charset="utf-8"><title>Element Plus checkbox</title>
<style>
.el-checkbox{cursor:pointer;display:inline-flex;align-items:center;position:relative}
.el-checkbox__input{cursor:pointer;display:inline-flex;position:relative}
.el-checkbox__original{opacity:0;z-index:-1;outline:none;width:0;height:0;margin:0;position:absolute}
.el-checkbox__inner{display:inline-block;position:relative;border:1px solid #dcdfe6;width:14px;height:14px;background:#fff;z-index:1}
.el-checkbox__input.is-checked .el-checkbox__inner{background:#409eff}
</style>
<label class="el-checkbox"><span class="el-checkbox__input"><input class="el-checkbox__original" type="checkbox" id="agree"
  onchange="this.parentElement.classList.toggle('is-checked', this.checked)"><span class="el-checkbox__inner"></span></span><span class="el-checkbox__label">Agree</span></label>

Serve it on any port as text/html; charset=utf-8, and point a web() target's app.url at it.

Steps to reproduce

  1. Open an e2e mcp session on that target and call observe. There is no checkbox node, only box and text="Agree".
  2. Call tap on the text="Agree" node. The result reports no listed node changed.
  3. Call observe again. The tree is the same as in step 1.
  4. Call run_code with await expect(screen.getByRole('checkbox', 'Agree')).toBeChecked();. It passes, so the tap did tick the box.

Expected: the observation lists the checkbox and its checked state, so the tap in step 2 reports a change.

Versions

e2e 0.23.0, @e2e-dev/web 0.15.5 (main 34ccc5f3), Node 26.8.2, Chromium from playwright-core, Linux.

Engine

@e2e-dev/web

Anything else

Related: #1276 (Element Plus radio-button refused by check/tap) and #1355 (click a checkbox or radio through its own label). #1355 changes how the click lands. It does not change what the observation lists, so this issue stays open after #1355.

Activity

  1. added
    bugSomething isn't working
    webWeb engine (@e2e-dev/web)
    agentAgent tiers, model protocol, planning
    P2Improvement / follow-up
    on Nov 6, 2026
  2. okwasniewski commented on Nov 10, 2026

    @okwasniewski
    Member

    [claude-opus-5-5] automated triage on behalf of @okwasniewski

    Confirmed and tracked in #1595, which is stacked on #1355 (#1276, clicking a radio/checkbox through its label). #1355 has to merge first. Both are labeled Ready for Human Review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Improvement / follow-upagentAgent tiers, model protocol, planningbugSomething isn't workingwebWeb engine (@e2e-dev/web)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions