{
  "slug": "playwright-aria-snapshots-support-page-capture-and-locator-depth-and-mode-option-f41d0bd55096",
  "title": "Playwright aria snapshots support page capture and locator depth and mode options",
  "tools": [
    "playwright"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-04-01T00:27:06.000Z",
  "announced_at": "2026-04-01T00:27:06.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When inspecting accessible structure in browser tests, capture a page snapshot with `page.ariaSnapshot()` or call `locator.ariaSnapshot({ depth, mode })` to limit snapshot depth or choose its mode.",
    "examples": [
      "const snapshot = await page.ariaSnapshot();",
      "const snapshot = await locator.ariaSnapshot({ depth: <depth>, mode: '<default-or-ai>' });"
    ],
    "gotchas": [
      "Version: v1.59.0",
      "depth: Number; when specified, limits snapshot depth.",
      "mode: `\"ai\"` returns an AI-optimized snapshot; `\"default\"` is the default mode. The modes are alternatives.",
      "`page.ariaSnapshot()` is equivalent to `page.locator('body').ariaSnapshot()`.",
      "Docs conflict: Current API docs show `page.ariaSnapshot()` added in v1.59 and locator `depth`/`mode` added in v1.59; docs also describe features added in later versions, which are omitted here."
    ]
  },
  "why_it_matters": "When inspecting accessible structure in browser tests, capture a page snapshot or set snapshot depth and mode on a locator.",
  "sources": [
    "https://github.com/microsoft/playwright/releases/tag/v1.59.0",
    "https://playwright.dev/docs/api/class-page#page-aria-snapshot",
    "https://playwright.dev/docs/api/class-locator#locator-aria-snapshot"
  ],
  "rank": 0.96035,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "backfill-20261007",
    "verdict_id": "backfill-20261007:backfill-20261007-c895c80e51052b9f-6:gate",
    "evidence_hash": "30b837f8ffc622b81590dae29ec5e3dfaebcd07c790a4f14dc0a6b78c001ee6a"
  },
  "review": {
    "draft_hash": "22cb438fe7375512cd01be97a643c874af95ae25cf2bd34670558fd4acc313c4",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "backfill-20261007:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.96 >= 0.9; 2 needed) and Jev gave 0.72 (>= 0.6 needed)."
  }
}
