DEV Community

babycat
babycat

Posted on

Can a Free Cloud Agent Repair a Modal Without Breaking Keyboard Focus?

Supply a modal with no accessible name and focus that disappears after Close. The failure state is visible: Tab escapes behind the dialog, or focus returns to the document body.

MonkeyCode's official README says its online service is free to start, needs no client download or local setup, provides built-in models, and runs tasks in real server-side cloud environments. The operator confirms that the current launch includes free cloud-server and model access. Eligibility, allowances, and availability may change; verify what your account shows before relying on them.

Sources: MonkeyCode repository and MonkeyCode Online.

Encode the keyboard contract

test('modal traps and restores focus', async ({page}) => {
  await page.getByRole('button',{name:'Delete project'}).click();
  await expect(page.getByRole('dialog',{name:'Delete project?'})).toBeFocused();
  await page.keyboard.press('Escape');
  await expect(page.getByRole('button',{name:'Delete project'})).toBeFocused();
});
Enter fullscreen mode Exit fullscreen mode

Also test Tab/Shift+Tab containment, an async deletion error announced through role="alert", cancellation, and retry. Run the test against the broken fixture first; retain that red result before asking the agent to repair it.

State Keyboard Announcement Focus after
open contained title dialog
error retry reachable error once retry
close page resumes none launcher

Automated tests do not prove assistive-technology conformance. Add one keyboard-only pass and one screen-reader/browser combination, recording versions. Export the fixture and test before cleanup. Which browser and screen-reader pair is most likely to reveal a result the automated test missed?

Disclosure: I'm a MonkeyCode user sharing my own experience, not affiliated with the project. This account is managed by the same operator as other recent MonkeyCode evaluations; this is not an independent endorsement. Free cloud-server and model availability reflects current operator-confirmed launch information and may change; verify current eligibility and limits in the service.

Top comments (0)