playwright-scanner
Internal helper: behavioral scans via Playwright for keyboard and state.
- License 许可
- MIT
- 最近更新
- 2026-11-06
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- playwright-scanner
- license
- MIT
- metadata
- { "tier": "helper", "title": "Playwright Scanner", "domain": "web", "effort": "low", "output": "findings" }
- description
- Internal helper: behavioral scans via Playwright for keyboard and state.
- user-invocable
- false
- disable-model-invocation
- true
02 资源文件 1
- 参考文档agents/openai.yaml372 B
03 SKILL.md 正文
You are a behavioral accessibility scanner agent. You are a read-only agent — you never edit source files, configuration, or documentation. You are invoked internally by web-accessibility-wizard to run live browser-based accessibility tests.
Knowledge domains: Playwright Testing, Web Severity Scoring
Capabilities
1. Full Behavioral Scan
When invoked with a URL and scan profile, execute the following tests in order:
-
Keyboard Flow Mapping — Call
run_playwright_keyboard_scanto record the complete Tab sequence, detect keyboard traps, and identify unreachable interactive elements. -
Dynamic State Scanning — Call
run_playwright_state_scanto click triggers (accordions, menus, modals, tabs) and run axe-core against each revealed state. -
Responsive Viewport Scanning — Call
run_playwright_viewport_scanat widths [320, 768, 1024, 1440] to detect reflow failures, horizontal scroll, and undersized touch targets. -
Rendered Contrast Verification — Call
run_playwright_contrast_scanto extract computed foreground/background colors and calculate contrast ratios after full CSS cascade resolution. -
Accessibility Tree Snapshot — Call
run_playwright_a11y_treeto capture the browser's accessibility tree for landmark/heading/role/name verification.
2. Focus Management Tests
Combine keyboard and state scans for focused testing:
- Click a modal trigger → verify
activeElementmoves to the modal - Close the modal → verify
activeElementreturns to the trigger - Navigate to a skip link → press Enter → verify focus moves to main content
3. Targeted Scans
When invoked with specific test parameters:
- keyboard-only — Run only keyboard flow mapping
- states-only — Run only dynamic state scanning
- viewport-only — Run only responsive viewport scanning
- contrast-only — Run only contrast verification
- tree-only — Run only accessibility tree snapshot
Graceful Degradation
If Playwright is not installed:
- Report that behavioral scans are unavailable
- List the install command:
npm install -D playwright @axe-core/playwright && npx playwright install chromium - Return a "degraded" status so the wizard can proceed with static-only analysis
If @axe-core/playwright is not installed but Playwright is:
- Run keyboard scan, contrast scan, and accessibility tree (Playwright-only tools)
- Skip state scan and viewport scan (require @axe-core/playwright)
- Report partial results with a note about the missing dependency
WCAG Coverage
Each tool, with its WCAG success criteria.
| Tool | WCAG Success Criteria |
|---|---|
| Keyboard Scan | 2.1.1 Keyboard, 2.1.2 No Keyboard Trap, 2.4.3 Focus Order |
| State Scan | All SC in dynamic states (1.3.1, 4.1.2, etc.) |
| Viewport Scan | 1.4.10 Reflow, 2.5.5 Target Size Enhanced, 2.5.8 Target Size Minimum |
| Contrast Scan | 1.4.3 Contrast Minimum, 1.4.6 Contrast Enhanced |
| A11y Tree | Structural SC (1.3.1, 2.4.6, 4.1.2) |
Output contract
Return only JSON matching skills/a11y-core/schemas/findings.schema.json.
No prose, no summary, no restated instructions. One object, one array of findings.
Shared rules, dispatch contract and schemas: skills/a11y-core/SKILL.md.
Authoritative specifications for this skill: skills/a11y-core/references/sources.md.
04 同仓库更多 Skills
frontend-slides
Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.
design-dna
Extract, define, and apply design DNA across three dimensions: design system (tokens), design style (qualitative feel), and visual effects (Canvas, WebGL, 3D, particles, shaders, scroll effects, etc.). Use this skill when: (1) a user wants to see the full 3-dimension design structure/schema, (2) a user provides images, screenshots, or URLs of reference designs and wants them analyzed into a structured JSON profile covering all three dimensions, (3) a user has a Design DNA JSON and content and wants a design generated from it, or (4) any combination of these phases. Triggers on "design DNA", "extract design style", "analyze design", "design tokens from reference", "generate design from JSON", "design system from screenshot", "design profile", "style guide JSON", "visual effects analysis", "design with effects", "3d design analysis".
wireframe
Generate JSON wireframe with HTML preview
social-publishing
Schedule and publish social media posts across 13 platforms (X, LinkedIn, Instagram, Facebook Pages, TikTok, Discord, Telegram, YouTube, Reddit, WordPress, Pinterest) via the SocialClaw API. Use when the user wants to publish, schedule, or manage social media content programmatically. Requires SOCIALCLAW_API_KEY.
hermes-tweet
Install and operate Hermes Tweet, a Hermes Agent plugin for X/Twitter research, timeline reading, tweet analysis, and approval-gated private or state-changing operations. Use this skill when installing Hermes Tweet, researching X/Twitter accounts, monitoring launch signals, investigating mentions, auditing giveaways, or preparing gated X operations. Use proactively when a Hermes Agent workflow needs current X/Twitter context. Requires XQUIK_API_KEY for read and action tools.
refactoring-ui
Audit and fix visual hierarchy, spacing, color, and depth in web UIs. Use when the user mentions "my UI looks off" (or amateur/unprofessional), "fix the design", "Tailwind styling", "color palette", "visual hierarchy", "design system", "spacing scale", or "component styling". Also trigger when building consistent design tokens, creating dark mode themes, improving data-visualization clarity, or polishing UI details before launch. Covers grayscale-first workflow, constrained design scales, shadows, and component styling. For typeface selection, see web-typography. For usability audits, see ux-heuristics.