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
feat: checkable menu items and pressed-state toggle buttons
`checkOption` now reaches `role=menuitemcheckbox` and `role=menuitemradio`,
and pressed-state buttons get their own pair of actions.
Menu items are added to the ARIA role pass of all three helpers. Playwright's
`check()` clicks such an item but then waits for the state on a node the menu
may already have removed (Radix closes its menu on select, Base UI does not),
so those two roles take a click-plus-verify path instead: read `aria-checked`,
click only on a mismatch so a second `checkOption` cannot toggle the item back
off, then wait for the new state and treat a vanished element as applied.
Puppeteer and WebDriver already read `aria-checked` and already click only on
a mismatch, so only their role lists changed; WebDriver's
`seeCheckboxIsChecked` went through `findFields`, which no menu item can
satisfy, and now falls back to `findCheckable`.
`aria-pressed` is a different semantic from checked-ness, so Toggle and Toggle
Group (multiple) get `toggleButton`, `seeButtonIsPressed` and
`dontSeeButtonIsPressed` rather than an overloaded `checkOption`.
`seeCheckboxIsChecked` on such a button now names the right action instead of
surfacing Playwright's "Not a checkbox or radio button".
`grabCheckedElementStatus` reads `aria-checked` and `aria-pressed` instead of
requiring `type=checkbox|radio`, and names what it found when it still cannot
answer.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TcwzSXPnfaig8nBZD2Vxfi
0 commit comments