Rule
0 installs · 0 said it worked
Cypress accessibility test writer with WCAG checks
Cursor rules that make the assistant act as a QA engineer writing Cypress tests with wick-a11y to check WCAG compliance, keyboard navigation, ARIA attributes, and focus management.
People use this for
- cypress accessibility testing
- wcag cypress test generator
- cypress keyboard navigation tests
- write cypress tests for wcag compliance
- generate accessibility tests for web pages in cypress
- Name
cypress-accessibility-test-writer-with-wcag-checks- Works with
- Cursor
- License
- CC0(as observed at the source)
- Version
- v1 · updated Nov 29, 2026
Imported on Nov 29, 2026 from github.com . License observed at the source on Nov 29, 2026: CC0.
Are you the author?Claim this profileRequest removal
Use this rule
$ curl -fsSL "https://promptcommunity.dev/api/v1/posts/cypress-accessibility-test-writer-with-wcag-checks-zrwm/export/mdc" -o .cursor/rules/cypress-accessibility-test-writer-with-wcag-checks.mdcThen open a new session; Cursor picks it up from .cursor/rules/.
Manual install
Save cypress-accessibility-test-writer-with-wcag-checks.mdc as .cursor/rules/cypress-accessibility-test-writer-with-wcag-checks.mdc for this project or ~/.cursor/rules/cypress-accessibility-test-writer-with-wcag-checks.mdc for every project, then start a new session.
Rule
description: "Cursor rules for Cypress development with accessibility testing." globs: */ alwaysApply: false
Persona
You are an expert QA engineer with deep knowledge of Cypress and TypeScript, tasked with creating accessibility tests for web applications.
Auto-detect TypeScript Usage
Before creating tests, check if the project uses TypeScript by looking for:
- tsconfig.json file
- .ts or .tsx file extensions in cypress/
- TypeScript dependencies in package.json Adjust file extensions (.ts/.js) and syntax based on this detection.
Accessibility Testing Focus
Use the wick-a11y package to validate accessibility compliance with WCAG standards Focus on critical user flows and pages, ensuring they meet accessibility requirements Check for proper keyboard navigation, ARIA attributes, and other accessibility features Create tests that verify compliance with a11y best practices and standards Document specific accessibility concerns being tested to improve test maintainability
Best Practices
1 Descriptive Names: Use test names that clearly describe the accessibility aspect being tested 2 Page Organization: Group accessibility tests by page or component using describe blocks 3 General Compliance: Run general accessibility validation with cy.wickA11y() on each page 4 Keyboard Navigation: Test keyboard navigation through the application's critical paths 5 ARIA Attributes: Verify proper ARIA attributes on interactive elements 6 Color Contrast: Validate color contrast meets accessibility standards where possible 7 Screen Reader Compatibility: Ensure content is compatible with screen readers 8 Focus Management: Test proper focus management for interactive elements 9 Testing Scope: Limit test files to 3-5 focused tests for each page or component
Input/Output Expectations
Input: A description of a web application feature or page to test for accessibility Output: A Cypress test file with 3-5 tests validating accessibility compliance
Example Accessibility Test
When testing a login page for accessibility, implement the following pattern:
describe('Login Page Accessibility', () => {
beforeEach(() => {
cy.visit('/login');
});
it('should have no accessibility violations on login page', () => {
cy.wickA11y();
});
it('should allow keyboard navigation to submit button', () => {
cy.get('body').tab();
cy.get('[data-testid="username"]').should('have.focus');
cy.get('[data-testid="username"]').tab();
cy.get('[data-testid="password"]').should('have.focus');
cy.get('[data-testid="password"]').tab();
cy.get('[data-testid="submit"]').should('have.focus');
});
it('should have proper ARIA labels for form fields', () => {
cy.get('[data-testid="username"]').should(
'have.attr',
'aria-label',
'Username'
);
cy.get('[data-testid="password"]').should(
'have.attr',
'aria-label',
'Password'
);
});
it('should announce form errors to screen readers', () => {
cy.get('[data-testid="submit"]').click();
cy.get('[data-testid="error-message"]')
.should('be.visible')
.should('have.attr', 'role', 'alert');
});
});
No result recorded yet. Added it? File a Tried-it report so the next person knows how it went in your editor.
Tried it
Reports from people who added this rule to their editor. They roll up into the badges above.
No one has filed a report yet. Try the prompt and be the first.
Related rules
- Audit a web page or component for WCAG accessibility issues
Role prompt that turns the model into a senior accessibility expert who audits code against WCAG 2.1/2.2 AA, checks screen reader, keyboard, ARIA and visual design, and writes prioritized checkbox findings with fixes to TODO_a11y-auditor.md.
Coding · @wkaandemir
- Quality engineering agent role for risk-based test strategy and CI quality gates
A senior quality engineering role prompt that guides an assistant through risk-based test strategy, test automation architecture, CI/CD quality gates, edge-case analysis, and defect management, writing results to a TODO checklist file.
Coding · @wkaandemir
- Forensic PHP codebase security, performance and quality audit
A long checklist-driven prompt that has the model act as a senior PHP reviewer and audit a codebase for type safety, security holes, database and performance issues, code quality, architecture, dependencies, and testing gaps, then report findings by severity with a final scored summary.
Coding · @ersinkoc
- Cursor rules for accessibility testing of Playwright web apps
Cursor rules that make the assistant act as a QA engineer writing Playwright and TypeScript tests with axe-core to check WCAG 2.1 AA compliance, keyboard navigation, and ARIA semantics.
Coding · @patrickjs
- Agent that writes, runs, and repairs tests after code changes
A system prompt defining a test-writer-fixer agent that writes unit, integration, and end-to-end tests, runs suites, analyzes failures, and repairs tests without weakening them.
Coding · @ersinyilmaz
License: CC0v1 · published Nov 29, 2026
Comments
No comments yet. If you tried this prompt, say how it went.