Fix accessibility command for Playwright 1.57+#185
Merged
Conversation
Playwright 1.57.0 removed `page.accessibility.snapshot()` after 3 years of deprecation. This updates the accessibility command to use the new `locator.aria_snapshot()` API instead. Note: The output format has changed due to the new API returning a different accessibility tree structure (using semantic landmark roles like banner, main, contentinfo, navigation).
simonw
added a commit
that referenced
this pull request
Dec 29, 2025
simonw
added a commit
that referenced
this pull request
Dec 29, 2025
* Migrate from setup.py to pyproject.toml for uv compatibility - Create pyproject.toml with project metadata, dependencies, and build config - Add dependency-groups for dev (pytest, cogapp, pytest-mock) and docs - Use hatchling as build backend - Remove obsolete setup.py and Pipfile * Use uv_build backend and update homepage URL - Switch build backend from hatchling to uv_build - Set homepage to shot-scraper.datasette.io * Fix pyproject.toml configuration for uv_build - Update requires-python to >=3.10 - Use correct [tool.uv.build-backend] section for flat layout - Add version constraint to uv_build (>=0.9.18,<0.10.0) * Add uv.lock file * Add uv.lock to .gitignore and remove from tracking * Update GitHub Actions to use latest versions * pip install -e . --group dev * Try CI on ubuntu instead * Try pytest -vv * Test Playwright start time before running tests * Ran Cog * Temporarily comment out accessibility, refs #185 --------- https://gistpreview.github.io/?f3290331ec6340757ceb8c2a853bdb95/index.html
simonw
added a commit
that referenced
this pull request
Dec 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Playwright 1.57.0 removed
page.accessibility.snapshot()after 3 yearsof deprecation. This updates the accessibility command to use the new
locator.aria_snapshot()API instead.Note: The output format has changed due to the new API returning a
different accessibility tree structure (using semantic landmark roles
like banner, main, contentinfo, navigation).
📚 Documentation preview 📚: https://shot-scraper--185.org.readthedocs.build/en/185/
https://gistpreview.github.io/?f8ce6bdb7ee606c6eac20a9b1357c7e1/index.html