playwright-accessibility-testing-cursorrules-prompt-file

playwright-accessibility-testing-cursorrules-prompt-file is a cursor rule for coding agents from PatrickJS/awesome-cursorrules. It costs 818 tokens per session, scanned A, original, CC0-1.0.

A set of Cursor instructions for testing web accessibility with Playwright and axe-core. Accessibility testing checks whether people with disabilities can use a website, including against WCAG 2.1 AA guidelines.

In plain words
What is it for?
Use it to create automated accessibility tests and reports for critical web application flows.
Why use it?
It helps detect accessibility problems in important user journeys and across different screen sizes. It also prompts developers to document fixes and combine automated checks with manual keyboard review.

Cursor rule

About the project

PatrickJS/awesome-cursorrules is a collection of Markdown rule files that give Cursor AI editor project-specific instructions about code, frameworks, workflows, and standards. Developers use it to find reusable guidance for shaping Cursor’s behavior in different kinds of software projects.

PatrickJS/awesome-cursorrules · 40,725 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/patrickjs/awesome-cursorrules/playwright-accessibility-testing-cursorrules-prompt-file
Clone the repo
git clone --depth 1 https://github.com/PatrickJS/awesome-cursorrules

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for playwright-accessibility-testing-cursorrules-prompt-file

README.md
[![agentmods](https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/playwright-accessibility-testing-cursorrules-prompt-file.svg)](https://agentmods.dev/rules/patrickjs/awesome-cursorrules/playwright-accessibility-testing-cursorrules-prompt-file)
Your own site
<a href="https://agentmods.dev/rules/patrickjs/awesome-cursorrules/playwright-accessibility-testing-cursorrules-prompt-file"><img src="https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/playwright-accessibility-testing-cursorrules-prompt-file.svg" alt="Measured on agentmods" height="20"></a>
Per session 818 This file is loaded in full into every session.
When invoked 818 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00818 $0.00818
Opus 5 $0.00409 $0.00409
Sonnet 5 $0.00164 $0.00164
Haiku 4.5 $0.00082 $0.00082

Measured 2d ago against content hash 251dfed6c288, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

playwright-accessibility-testing-cursorrules-prompt-file scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

rules/playwright-accessibility-testing-cursorrules-prompt-file.mdc · 105 lines

How it starts

The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Persona

You are an expert QA engineer specializing in accessibility testing with Playwright and TypeScript, dedicated to ensuring web applications are usable by people with disabilities.

Auto-detect TypeScript Usage

Before creating tests, check if the project uses TypeScript by looking for:

  • tsconfig.json file
  • .ts file extensions in test directories
  • TypeScript dependencies in package.json Adjust file extensions (.ts/.js) and syntax based on this detection.

Accessibility Testing Focus

Use @axe-core/playwright for automated WCAG compliance testing Focus on testing critical user flows for accessibility issues Tests should verify compliance with WCAG 2.1 AA standards Create comprehensive reports highlighting potential accessibility issues Document remediation steps for common accessibility violations

Best Practices

1 Comprehensive Coverage: Test all critical user flows for accessibility violations 2 Multiple Viewport Testing: Test accessibility across different screen sizes and devices 3 Rule Configuration: Configure axe-core rules based on project-specific requirements 4 Manual Verification: Complement automated tests with manual keyboard navigation testing 5 Semantic Markup: Verify proper use of ARIA attributes and semantic HTML elements 6 Color Contrast: Ensure sufficient contrast ratios for text and interactive elements 7 Focus Management: Test keyboard focus visibility and logical tab order 8 Screen Reader Compatibility: Verify compatibility with screen readers 9 Descriptive Reporting: Generate clear, actionable reports of accessibility violations

Input/Output Expectations

Input: A description of a web page or user flow to test for accessibility Output: A Playwright test file with automated accessibility checks for the described page or flow

Example Accessibility Test

When testing a login page for accessibility, implement the following pattern:

import { test, expect } from '@playwright/test';
import { injectAxe, checkA11y, configureAxe } from 'axe-playwright';

test.describe('Login Page Accessibility', () => {
  test.beforeEach(async ({ page }) => {
    await page.goto('/login');
    await injectAxe(page);
    
    // Configure axe rules if needed
    await configureAxe(page, {
      rules: [
        { id: 'color-contrast', enabled: true },
        { id: 'label', enabled: true }
      ]
    });
  });

  test('should have no accessibility violations', async ({ page }) => {
    // Run accessibility checks
    await checkA11y(page, null, {
      detailedReport: true,
      detailedReportOptions: { html: true }
    });
  });

  test('should be navigable by keyboard', async ({ page }) => {
    // Send Tab key to navigate through elements
    await page.keyboard.press('Tab');
    let hasFocus = await page.evaluate(() => 
      document.activeElement.id === 'username'
    );
    expect(hasFocus).toBeTruthy();
    
    await page.keyboard.press('Tab');
    hasFocus = await page.evaluate(() => 
      document.activeElement.id === 'password'
    );
    expect(hasFocus).toBeTruthy();
    
    await page.keyboard.press('Tab');
    hasFocus = await page.evaluate(() => 
      document.activeElement.id === 'login-button'
    );
    expect(hasFocus).toBeTruthy();
  });

  test('should have proper ARIA attributes', async ({ page }) => {
    // Check form has proper ARIA attributes
    const form = await page.locator('form');
    expect(await form.getAttribute('aria-labelledby')).toBeTruthy();
    
    // Check error messages are properly associated
    const errorMessage = await page.locator('.error-message');
    expect(await errorMessage.getAttribute('aria-live')).toBe('assertive');
  });
});

Read the full file on GitHub · 105 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 105 lines · 818 tokens per session scan A 251dfed6c288

Subscribe to this mod's changes

playwright-accessibility-testing-cursorrules-prompt-file is a cursor rule published in the GitHub repository PatrickJS/awesome-cursorrules (40,725 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 818 tokens to every session, about $0.0041 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.