Repository navigation
fix(runner): resolve FrameSurface by type so axe-core runs - #15
Merged
Merged
Conversation
Regression test: Playwright's Page has a frame() method, so the runner's hasattr(page, 'frame') check mistook every ordinary page for a FrameSurface. Fails until runner.py resolves surfaces by type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Playwright's Page has a frame() method, so hasattr(page, 'frame') was always true: the runner called page.frame.evaluate(axe_code) on a bound method and every observation reported "axe-core did not complete"; url assertions on ordinary pages took the FrameSurface branch too. _surface() and isinstance(page, FrameSurface) replace both checks. Patch produced by willman -> koru.develop_ticket (PLF-TW-axe, zai/glm-5.3) and verified in staging. Suite: 442 passed. End to end on a www-heyasa-com audit: axe ran in 60/60 observations, cells complete, gate passed (previously incomplete: required_detector_failed x60). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
The red |
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.
Problem:
testwins/runner.pyusedhasattr(page, 'frame')to tell aFrameSurface(testwins/frames.py) apart from an ordinary page. Playwright'sPagealso hasframe()(a method), so the condition was always true:await page.frame.evaluate(axe_code)failed on a method. Every observation ended withrequired_detector_failed("axe-core did not complete"), and every audit with axe enabled wasincomplete(exit code 2). This is likely why projects disable axe (for exampleaxe: {enabled: false}in www-heyasa-com).urlassertions: on an ordinary page they took theFrameSurfacebranch (page.frame.wait_for_url).Fix: a
_surface(page)helper plusisinstance(page, FrameSurface)in both places.Tests:
tests/test_runner_surface.py(written first): a plain page vs aFrameSurface.required_detector_failedincompletepassed(exit 0)scrollable-region-focusablefindings appeared on the site and were fixed there.Process: the implementation is a willman →
koru.develop_ticketpatch (PLF-TW-axe, zai/glm-5.3), verified in staging. The repo has noproject/new-ticket.sh, so this is an ordinary branch and PR.🤖 Generated with Claude Code