You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: role-restrict the hoisted ARIA checkable lookup
Moving the accessible-name lookup above the label XPath fixed Base UI but
widened the net: `aria/…` and `::-p-aria(…)` match on name alone, so a heading
sharing a checkbox label's text now won on document order where `byText`
previously reached the input. Measured on the new collision fixture, both
returned `[H2, INPUT#terms-box]`.
Puppeteer loops the three checkable roles as `::-p-aria([name][role])`,
following the buildRoleSelector convention already in the file. `::-p-aria`
matches names exactly and case-sensitively, so one pass per role is enough;
a name that cannot be parsed falls through to the XPath as before.
WebDriver has no attribute filter on `aria/`, so its results are post-filtered
to `input[type=checkbox|radio]` and `[role=checkbox|radio|switch]` in a single
`browser.execute` round trip regardless of match count, using the
`execute(fn, ...elements)` form already used in the file.
Both now resolve `[INPUT#terms-box]`, matching Playwright's role-scoped pass.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TcwzSXPnfaig8nBZD2Vxfi
0 commit comments