for screen reader navigation - Add skip link - Hidden link at start: - Increase touch targets - Add padding to nav links and tags to meet 44×44px minimum - Verify focus styles - Test keyboard navigation; add visible :focus or :focus-visible outlines Use ✅ for pass, 🔴 for high severity issues, 🟡 for medium severity, ❌ for missing items. Include actual findings from the page analysis - don't just copy the example. `, url) if _, err := session.Send(ctx, copilot.MessageOptions{Prompt: prompt}); err != nil { log.Fatal(err) } <-done fmt.Println("\n\n=== Report Complete ===\n") // Prompt user for test generation fmt.Print("Would you like to generate Playwright accessibility tests? (y/n): ") generateTests, _ := reader.ReadString('\n') generateTests = strings.TrimSpace(strings.ToLower(generateTests)) if generateTests == "y" || generateTests == "yes" { detectLanguagePrompt := ` Analyze the current working directory to detect the primary programming language used in this project. Look for project files like package.json, *.csproj, pom.xml, requirements.txt, go.mod, etc. Respond with ONLY the detected language name (e.g., "TypeScript", "JavaScript", "C#", "Python", "Java") and a brief explanation of why you detected it. If no project is detected, suggest "TypeScript" as the default for Playwright tests. ` fmt.Println("\nDetecting project language...\n") // Drain the previous done signal select { case <-done: default: } if _, err := session.Send(ctx, copilot.MessageOptions{Prompt: detectLanguagePrompt}); err != nil { log.Fatal(err) } <-done fmt.Print("\n\nConfirm language for tests (or enter a different one): ") language, _ := reader.ReadString('\n') language = strings.TrimSpace(language) if language == "" { language = "TypeScript" } testGenerationPrompt := fmt.Sprintf(` Based on the accessibility report you just generated for %s, create Playwright accessibility tests in %s. The tests should: 1. Verify all the accessibility checks from the report 2. Test for the issues that were found (to ensure they get fixed) 3. Include tests for: - Page has proper lang attribute - Page has descriptive title - Heading hierarchy is correct (single H1, proper nesting) - All images have alt text - No autoplay media - Landmark regions exist (banner, nav, main, footer) - Skip navigation link exists and works - Focus indicators are visible - Touch targets meet minimum size requirements 4. Use Playwright's accessibility testing features 5. Include helpful comments explaining each test Output the complete test file that can be saved and run. Use the Playwright MCP server tools if you need to verify any page details. `, url, language) fmt.Println("\nGenerating accessibility tests...\n") // Drain the previous done signal select { case <-done: default: } if _, err := session.Send(ctx, copilot.MessageOptions{Prompt: testGenerationPrompt}); err != nil { log.Fatal(err) } <-done fmt.Println("\n\n=== Tests Generated ===") } }