Add WCAG 2.2 AA accessibility baseline and browser tests
- Layout: skip link to the main content and a <main> landmark - Home page: stable button label, counter announced via a live status region - Pest browser plugin + Playwright: axe checks (level 2) in light/dark and desktop/mobile, plus a keyboard-only interaction test - Register the Browser test suite in phpunit.xml and Pest.php - CLAUDE.md: accessibility development rules and browser test notes - Boost-refreshed testing-best-practices skill files Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -29,7 +29,7 @@ Read this section before you write a test.
|
||||
- Leave framework behavior to framework tests. Testing project configuration is not testing the framework. A constrained relationship, cast, scope, or validation rule belongs to this project.
|
||||
- Keep every test that can detect a distinct defect. When two tests detect the same defect, trim the higher-layer test to one case and report the duplication. Do not delete an existing test.
|
||||
- Write a feature test first. Write a unit test only for logic that does not use the framework.
|
||||
- Write a feature test for every behavior reachable through a request. Real-browser tests require `pestphp/pest-plugin-browser` and a browser download, neither of which this project installs. Mention the package only if the user asks for a real-browser test.
|
||||
- Write a browser test only for behavior in JavaScript that a feature test cannot reach. Put a browser test in `tests/Browser`, and call `assertNoJavaScriptErrors()` in it.
|
||||
- Judge an architecture test by the convention it protects, not by the rules above. An `arch()` test declares a rule for an entire directory, such as the parent class of every model, the classes that may use an enum, or the methods every factory declares. It intentionally checks declarations and fails when a new file breaks the convention.
|
||||
- Use the test tools that the project installs. Add a new test dependency, plugin, or browser only after the user asks for it.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user