Playwright accessibility snapshot and axe-core attribute reporting mismatch
19K reputation · 10 Oct 2021, 15:51 UTC
Goal: Verify that Playwright's page.accessibility.snapshot() reports the same ARIA attributes that axe‑core evaluates when auditing a page, specifically attributes like aria-describedby and aria-details that are currently omitted from the snapshot.
Constraint: The snapshot API is experimental and deliberately excludes certain ARIA relations, while axe‑core reads the DOM directly, causing divergent results and making cross‑browser accessibility assertions unreliable without additional normalization.
Unresolved: Whether Playwright should extend the snapshot to include omitted attributes and provide a unified, browser‑normalized accessibility tree, or leave this work to user‑land libraries.
Should Playwright augment accessibility.snapshot() to include omitted ARIA attributes? Should it supply a normalization layer for cross‑browser differences? Or should users handle discrepancies with external tools?