{"id":"7ab62854-df3d-49bd-b6e6-464b9571b9d9","slug":"accessibility-skill","kind":"skill","name":"accessibility-skill","summary":"Adds automated accessibility (a11y) testing to test suites on TestMu AI cloud by enabling WCAG scans through driver capabilities. Framework-agnostic, works with Selenium, Playwright, and Cypress. Use","owner":"LambdaTest","repoUrl":"https://github.com/LambdaTest/agent-skills/tree/HEAD/accessibility-skill","license":"MIT","licenseTier":"permissive","trust":"official","stars":376,"match":null,"fewStars":false,"format":"skill","createdAt":null,"addedAt":"2026-10-14T06:13:56.655Z","logoUrl":"https://avatars.githubusercontent.com/u/27130435?v=4","linkOnly":false,"collection":{"name":"agent-skills","repo":"lambdatest/agent-skills"},"skillPath":"accessibility-skill","categories":["developer-tools","browser-web"],"tags":[],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-14T06:13:56.654Z","sample":false,"url":"https://conduits.dev/tools/accessibility-skill","language":"Python","transports":[],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"> Adds automated accessibility (a11y) testing to test suites on TestMu AI cloud by enabling WCAG scans through driver capabilities. Framework-agnostic, works with Selenium, Playwright, and Cypress. Use when user mentions \"accessibility\", \"a11y\", \"WCAG\", \"accessibility scan\", \"accessibility testing\". Triggers on: \"accessibility testing\", \"a11y scan\", \"WCAG compliance\", \"accessibility audit LambdaTest\", \"is my page accessible\".\n\n# Accessibility Testing Skill\n\nAccessibility testing on TestMu AI is layered onto an existing automation suite. You do not\ninstall a separate tool: you enable a capability on your driver and either trigger scans at\nchosen points or let every navigation scan automatically. Results appear on the Accessibility\ndashboard.\n\n**Know the one hard limit up front:** the automation capabilities can *start* a scan, but there\nis no results API, no exit code, and no build-gating flag. To read a report back programmatically\n(for example, to fail a build), use the Accessibility MCP server (see Core Patterns). Automated\nscanning also catches only a portion of WCAG; it never replaces manual and screen-reader testing.\n\n## Core Patterns\n\n### Enable accessibility (capabilities)\n\n```java\n// One master switch is required; everything else is optional refinement.\ncapability.setCapability(\"accessibility\", true);                 // required\ncapability.setCapability(\"accessibility.wcagVersion\", \"wcag21aa\"); // wcag21a | wcag21aa\ncapability.setCapability(\"accessibility.bestPractice\", false);    // default false\ncapability.setCapability(\"accessibility.needsReview\", true);      // include ambiguous issues\n```\n\n### Selenium + accessibility\n\n```java\n// Option A: trigger a scan at a chosen point (recommended - precise, faster)\ncapability.setCapability(\"accessibility\", true);\ndriver.get(\"https://example.com\");\ndriver.executeScript(\"lambda-accessibility-scan\"); // scan the current page; call as often as needed\n\n// Option B: auto-scan every navigation (Selenium only)\ncapability.setCapability(\"accessibility\", true);\ncapability.setCapability(\"accessibility.autoscan\", true);\n```\n\nRun with your normal command, e.g. `mvn test`. If you use the hook and never call it, no report\nis generated.\n\n### Playwright + accessibility\n\n```javascript\nconst capabilities = {\n  \"accessibility\": true,\n  \"accessibility.wcagVersion\": \"wcag21a\",\n  \"accessibility.bestPractice\": false,\n  \"accessibility.needsReview\": true\n};\n```\n\n```javascript\n// Playwright needs the internal scan extension loaded once, after page creation.\n// Use Chrome (not Chromium). There is no autoscan/hook on this path.\nawait ltPage.goto(\"chrome://extensions/?id=johgkfjmgfeapgnbkmfkfkaholjbcnah\");\nconst toggle = ltPage.locator('#crToggle').nth(0);\nawait toggle.click();\n```\n\nRun with `npx playwright test`.\n\n### Cypress + accessibility\n\n```json\n// lambdatest-config.json - capabilities are dotted here\n{ \"accessibility\": true, \"accessibility.wcagVersion\": \"wcag21aa\", \"accessibility.needsReview\": true }\n```\n\nRegister the scanner (file differs by Cypress version):\n- **v10+**: import in `cypress/support/e2e.js`, plugin in `cypress.config.js`\n- **v9**: import in `cypress/support/index.js`, plugin in `cypress/plugins/index.js`\n\nRun with `lambdatest-cypress-cli run`.\n\n### Native mobile app (Appium)\n\n```python\n# The scan hook is mandatory for native apps (no autoscan mode).\ncaps[\"accessibility\"] = True\ndriver.execute_script(\"lambda-accessibility-scan\")\n```\n\n### Read results programmatically (MCP server)\n\nThe automation paths write to the dashboard only. The **Accessibility MCP server** is the one\npath that returns a report to the caller:\n\n- `getAccessibilityReport` - scan a public URL and return the report\n- `buildLocalAppForAnalysis` - build and serve a local app, then scan it (before deploy)\n- `AnalyseAppViaTunnel` - scan a local app already running behind a tunnel\n\nUse it for a real \"scan after every build\" loop where an agent must act on the result.\n\n### Authentication\n\n```bash\nexport LT_USERNAME=\"your-username\"     # from your TestMu AI Profile page\nexport LT_ACCESS_KEY=\"your-access-key\"\n```\n\n## Quick Reference\n\n| Task | How |\n|------|-----|\n| Enable scanning | `accessibility: true` capability (required) |\n| WCAG level | `accessibility.wcagVersion` = `wcag21a` or `wcag21aa` |\n| Best-practice checks | `accessibility.bestPractice` = `true` (default `false`) |\n| Ambiguous issues | `accessibility.needsReview` = `true` |\n| Scan at a point | `driver.executeScript(\"lambda-accessibility-scan\")` |\n| Scan every navigation | `accessibility.autoscan` = `true` (Selenium only) |\n| Read results in code | Accessibility MCP server (dashboard-only otherwise) |\n| Dashboard | `https://accounts.lambdatest.com/dashboard` -> Accessibility |\n\n## Deep Patterns\n\nFor per-framework setup, the full capability reference, the accessibility score, severity\nlevels, the WCAG rule-to-fix mapping (remediation), and what automation does and does not cover,\nsee `reference/playbook.md`."}