34 lines
2.1 KiB
Markdown
34 lines
2.1 KiB
Markdown
# Playwright Accessibility Testing Prompt
|
|
|
|
A specialized .cursorrules prompt for creating comprehensive accessibility tests using Playwright with TypeScript and axe-core.
|
|
|
|
## What You Can Build
|
|
|
|
- **Automated Accessibility Audits**: Comprehensive scans for WCAG compliance issues
|
|
- **Keyboard Navigation Tests**: Validation of keyboard accessibility for important user flows
|
|
- **Screen Reader Compatibility Tests**: Tests ensuring screen reader announcement correctness
|
|
- **Responsive Accessibility Tests**: Checks for accessibility across different viewport sizes
|
|
- **ARIA Validation**: Tests to ensure proper implementation of ARIA roles and attributes
|
|
|
|
## Benefits
|
|
|
|
- **WCAG Compliance**: Automated validation against Web Content Accessibility Guidelines (WCAG)
|
|
- **Full TypeScript Support**: Complete TypeScript integration for type-safe accessibility tests
|
|
- **Comprehensive Testing**: Tools for both automated and manual accessibility validation
|
|
- **Actionable Reporting**: Clear reporting of issues with remediation suggestions
|
|
- **Integration with axe-core**: Leverages industry-standard accessibility testing engine
|
|
|
|
## Synopsis
|
|
|
|
This prompt helps developers create comprehensive accessibility tests using Playwright and axe-core to ensure web applications are accessible to users with disabilities and comply with WCAG standards.
|
|
|
|
## Overview of .cursorrules Prompt
|
|
|
|
The .cursorrules prompt guides QA engineers in creating effective accessibility tests using Playwright with these key elements:
|
|
|
|
- **TypeScript Detection**: Automatically detects and adapts to TypeScript usage in the project
|
|
- **Best Practices**: Covers nine essential best practices for accessibility testing, including comprehensive coverage, color contrast testing, and focus management
|
|
- **Example Test Pattern**: Provides a detailed example of accessibility tests for a login page with automated violation checking, keyboard navigation testing, and ARIA attribute validation
|
|
- **WCAG Standards**: Ensures tests align with WCAG 2.1 AA standards and accessibility best practices
|
|
- **Reporting Configuration**: Guidelines for generating detailed accessibility violation reports
|