Skip to content

Fix accessibility command for Playwright 1.57+#185

Merged
simonw merged 4 commits intomainfrom
claude/fix-accessibility-snapshot-qzMZg
Dec 29, 2025
Merged

Fix accessibility command for Playwright 1.57+#185
simonw merged 4 commits intomainfrom
claude/fix-accessibility-snapshot-qzMZg

Conversation

@simonw
Copy link
Copy Markdown
Owner

@simonw simonw commented Dec 28, 2025

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).


📚 Documentation preview 📚: https://shot-scraper--185.org.readthedocs.build/en/185/

https://gistpreview.github.io/?f8ce6bdb7ee606c6eac20a9b1357c7e1/index.html

claude and others added 2 commits December 28, 2025 20:17
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 simonw merged commit 51afe62 into main Dec 29, 2025
11 checks passed
simonw added a commit that referenced this pull request Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants