Project 29: Chrome Hello World - Visual Page Analyzer
Project 29: Chrome Hello World - Visual Page Analyzer
Build a visual page analysis system that uses Claudeโs Chrome integration to navigate websites, capture screenshots, analyze page structure, and generate detailed accessibility and usability reports.
Quick Reference
| Attribute | Value |
|---|---|
| Difficulty | Intermediate |
| Time Estimate | Weekend |
| Language | TypeScript (Alternatives: JavaScript, Python) |
| Prerequisites | HTML/DOM structure, basic MCP concepts |
| Key Topics | Browser automation, accessibility testing, MCP tool integration |
| Main Book | โWeb Scraping with Pythonโ by Ryan Mitchell |
1. Learning Objectives
By completing this project, you will:
- Master MCP tool discovery and loading: Understand how to find and load Chrome MCP tools using MCPSearch
- Coordinate multiple browser automation tools: Chain navigate, read_page, get_page_text, and screenshot tools effectively
- Analyze DOM structure programmatically: Parse page elements to assess structure and accessibility
- Capture visual evidence: Use gif_creator and screenshot capabilities for documentation
- Generate actionable accessibility reports: Quantify accessibility issues with scoring and recommendations
- Understand Claudeโs browser integration model: Grasp how Claude โseesโ web pages through MCP
2. Theoretical Foundation
2.1 How Claude Sees Web Pages
Claude doesnโt have an internal browser. Instead, the Chrome MCP extension acts as Claudeโs eyes and hands:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Claude-in-Chrome Architecture โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ Claude โโโโโโโโโโถโ MCP Transport โโโโโโโโโโถโ Chrome Browser โ โ
โ โ (LLM) โ JSON โ (Extension) โ DOM โ (User's Tab) โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ โ
โ โ โ โ โ
โ โผ โผ โผ โ
โ Reasoning about Serializing/Deserializing Capturing state, โ
โ what to do next tool calls and results executing actions โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Key insight: When Claude calls mcp__claude-in-chrome__read_page, the extension captures the current DOM state and sends it back as structured data. Claude then reasons about this data to understand the page.
2.2 The MCP Tool Ecosystem
The Chrome MCP extension provides these core tools:
| Tool | Purpose | Returns |
|---|---|---|
tabs_context_mcp |
Get available browser tabs | Tab IDs and metadata |
navigate |
Open a URL or navigate history | Navigation status |
read_page |
Capture DOM accessibility tree | Element hierarchy with refs |
get_page_text |
Extract text content | Plain text from page |
computer |
Mouse/keyboard interactions | Action confirmation |
screenshot |
Capture visual state | Image data |
gif_creator |
Record interactions | GIF animation |
find |
Locate elements by description | Element references |
2.3 Accessibility Tree vs DOM Tree
The Chrome MCP returns an accessibility tree, not a raw DOM:
DOM Tree: Accessibility Tree:
<div class="header"> heading "Welcome" (level 1)
<h1>Welcome</h1> โโ link "Home"
<nav> โโ link "About"
<a href="/">Home</a> โโ link "Contact"
<a href="/about">About</a>
<a href="/contact">Contact</a> button "Sign In"
</nav>
</div> main content region
<button>Sign In</button> โโ paragraph "Lorem ipsum..."
<main>
<p>Lorem ipsum...</p>
</main>
The accessibility tree is what screen readers see - it strips away visual presentation and exposes the semantic structure.
2.4 Core Accessibility Concepts
Understanding accessibility requires knowing these principles:
WCAG Guidelines (Web Content Accessibility Guidelines):
- Perceivable: Information must be presentable (alt text, captions)
- Operable: Interface must be navigable (keyboard access)
- Understandable: Content must be readable (clear language)
- Robust: Content must work with assistive technologies
Common Issues to Detect: | Issue | Impact | Detection Method | |โโ-|โโโ|โโโโโโ| | Missing alt text | Images invisible to screen readers | Check img elements for alt attribute | | Poor heading hierarchy | Navigation confusion | Verify h1 โ h2 โ h3 sequence | | Missing form labels | Input purpose unclear | Check input elements for labels | | Low contrast | Text unreadable | Calculate color contrast ratios | | Missing skip links | Keyboard users stuck in nav | Look for skip-to-content links |
2.5 Why This Matters
This project teaches patterns applicable to:
- Automated accessibility auditing: Catch issues before users report them
- Visual regression testing: Ensure UI changes donโt break functionality
- Content scraping: Extract structured data from any web page
- QA automation: Verify page structure matches expectations
- SEO analysis: Check heading structure and semantic markup
3. Project Specification
3.1 What You Will Build
A visual page analyzer that Claude can use to:
- Navigate to any web page
- Capture the page structure and content
- Analyze accessibility and usability
- Generate a detailed report with scores and recommendations
- Optionally record interactions as GIFs
3.2 Functional Requirements
- Page Navigation
- Accept a URL and navigate to it
- Handle navigation errors gracefully
- Wait for page load completion
- Structure Analysis
- Count and categorize all elements (links, images, forms, headings)
- Extract heading hierarchy
- Identify form elements and their labels
- Accessibility Scoring
- Check for alt text on images
- Verify heading hierarchy (h1 before h2, etc.)
- Detect missing form labels
- Identify interactive elements without accessible names
- Generate an overall score (0-100)
- Content Extraction
- Extract main text content
- Identify primary language
- Detect reading level (stretch goal)
- Visual Documentation
- Capture screenshots
- Record interaction GIFs (optional)
3.3 Example Usage / Output
You: Analyze the accessibility of https://example.com
Claude: Let me analyze this page for you.
[Uses mcp__claude-in-chrome__tabs_context_mcp to get tab context]
[Uses mcp__claude-in-chrome__navigate to open the page]
[Uses mcp__claude-in-chrome__read_page to capture structure]
[Uses mcp__claude-in-chrome__get_page_text for content analysis]
================================================================================
PAGE ANALYSIS REPORT: example.com
================================================================================
STRUCTURE OVERVIEW
------------------
Total Elements: 24
Links: 1 (all descriptive)
Images: 0
Forms: 0
Headings: 1
- h1: "Example Domain"
HEADING HIERARCHY
-----------------
h1: Example Domain ...................... [OK]
(No subheadings found)
ACCESSIBILITY AUDIT
-------------------
Score: 92/100
[PASS] All images have alt text (0 images, 0 issues)
[PASS] Heading hierarchy is correct
[PASS] All links have descriptive text
[PASS] Color contrast appears adequate
[WARN] No skip-to-content link found
[WARN] No landmark regions defined (main, nav, etc.)
CONTENT SUMMARY
---------------
Primary Language: English
Word Count: 42
Reading Level: Grade 6 (Easy)
RECOMMENDATIONS
---------------
1. Add a skip-to-content link for keyboard users
2. Add ARIA landmark regions (main, navigation)
3. Consider adding more descriptive metadata
================================================================================
Would you like me to record a GIF of the page interaction?
4. Solution Architecture
4.1 High-Level Design
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Visual Page Analyzer โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Navigation โโโโถโ Structure โโโโถโ Accessibilityโโโโถโ Report โ โ
โ โ Module โ โ Analyzer โ โ Auditor โ โ Generator โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ โ โ โ โ
โ โ โ โ โ โ
โ โผ โผ โผ โผ โ
โ tabs_context_mcp read_page Scoring Logic Formatted โ
โ navigate get_page_text WCAG Rules Output โ
โ computer (wait) find Heuristics Recommendationsโ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
4.2 Tool Flow Diagram
User Request: "Analyze https://example.com"
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Step 1: Get Browser Context โ
โ mcp__claude-in-chrome__tabs_context_mcp(createIfEmpty: true) โ
โ Returns: { tabs: [{ id: 12345, url: "about:blank" }] } โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Step 2: Navigate to Target URL โ
โ mcp__claude-in-chrome__navigate(url: "https://example.com", tabId: 12345) โ
โ Returns: Navigation confirmation โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Step 3: Wait for Page Load โ
โ mcp__claude-in-chrome__computer(action: "wait", duration: 2, tabId: 12345) โ
โ Returns: Wait confirmation โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Step 4: Capture Page Structure โ
โ mcp__claude-in-chrome__read_page(tabId: 12345, filter: "all") โ
โ Returns: Accessibility tree with element references โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Step 5: Extract Text Content โ
โ mcp__claude-in-chrome__get_page_text(tabId: 12345) โ
โ Returns: Plain text content of the page โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Step 6: Optional Screenshot โ
โ mcp__claude-in-chrome__computer(action: "screenshot", tabId: 12345) โ
โ Returns: Screenshot image โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Step 7: Analysis & Reporting โ
โ Claude analyzes the collected data and generates the report โ
โ No tool call - pure reasoning over the collected information โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
4.3 Accessibility Scoring Algorithm
Score Calculation:
Base Score: 100
Deductions:
- Missing alt text on image: -5 per instance
- Broken heading hierarchy: -10
- Missing form labels: -5 per instance
- No skip link: -5
- No landmark regions: -5
- Non-descriptive links ("click here"): -3 per instance
- Missing page title: -10
- Missing lang attribute: -5
Minimum Score: 0
Severity Levels:
90-100: Excellent - Minor improvements possible
70-89: Good - Some issues to address
50-69: Fair - Significant accessibility barriers
0-49: Poor - Major accessibility problems
5. Implementation Guide
5.1 Chrome MCP Tool Reference
tabs_context_mcp - Get Browser Context
// Get current tab group context
mcp__claude-in-chrome__tabs_context_mcp({
createIfEmpty: true // Create new window if no MCP group exists
})
// Response:
{
tabs: [
{ id: 12345, url: "https://example.com", title: "Example" }
]
}
navigate - Open URL
// Navigate to a URL
mcp__claude-in-chrome__navigate({
url: "https://example.com",
tabId: 12345
})
// Also supports: "back", "forward" for history navigation
read_page - Capture Structure
// Get accessibility tree
mcp__claude-in-chrome__read_page({
tabId: 12345,
filter: "all", // "all" for everything, "interactive" for buttons/links/inputs
depth: 15 // How deep to traverse (default: 15)
})
// Response includes elements like:
// heading "Page Title" (level 1) [ref_1]
// link "Home" [ref_2]
// button "Submit" [ref_3]
get_page_text - Extract Content
// Get plain text content
mcp__claude-in-chrome__get_page_text({
tabId: 12345
})
// Returns: Plain text extracted from the page, prioritizing article content
find - Locate Elements
// Find elements by description
mcp__claude-in-chrome__find({
tabId: 12345,
query: "login button"
})
// Returns: Up to 20 matching elements with references
computer - Interact and Capture
// Take a screenshot
mcp__claude-in-chrome__computer({
action: "screenshot",
tabId: 12345
})
// Wait for content to load
mcp__claude-in-chrome__computer({
action: "wait",
duration: 2, // seconds (max 30)
tabId: 12345
})
// Scroll the page
mcp__claude-in-chrome__computer({
action: "scroll",
scroll_direction: "down",
scroll_amount: 3, // wheel ticks
coordinate: [500, 400],
tabId: 12345
})
gif_creator - Record Interactions
// Start recording
mcp__claude-in-chrome__gif_creator({
action: "start_recording",
tabId: 12345
})
// ... perform actions ...
// Stop and export
mcp__claude-in-chrome__gif_creator({
action: "stop_recording",
tabId: 12345
})
mcp__claude-in-chrome__gif_creator({
action: "export",
tabId: 12345,
download: true,
options: {
showClickIndicators: true,
showActionLabels: true,
showProgressBar: true
}
})
5.2 Implementation Phases
Phase 1: Basic Navigation (Day 1)
Goal: Navigate to a URL and confirm the page loaded.
Tasks:
- Get tab context with
tabs_context_mcp - Navigate to a test URL
- Wait for page load
- Take a screenshot to confirm
Checkpoint: Successfully navigate to example.com and capture a screenshot.
Phase 2: Structure Extraction (Day 1-2)
Goal: Parse the page structure into useful categories.
Tasks:
- Use
read_pageto get the accessibility tree - Count elements by type (headings, links, images, forms)
- Extract heading hierarchy
- Identify form elements and their labels
Checkpoint: Output a structured summary of page elements.
Phase 3: Accessibility Analysis (Day 2)
Goal: Implement accessibility checks and scoring.
Tasks:
- Check alt text on images
- Verify heading order (h1 before h2, etc.)
- Detect missing form labels
- Look for skip links and landmarks
- Calculate overall score
Checkpoint: Generate an accessibility score with specific findings.
Phase 4: Report Generation (Day 2)
Goal: Format findings into an actionable report.
Tasks:
- Design report layout
- Add recommendations based on findings
- Include visual indicators (checkmarks, warnings)
- Add optional GIF recording capability
Checkpoint: Complete analysis produces a formatted report.
6. Testing Strategy
6.1 Test URLs
| URL | Purpose | Expected Findings |
|---|---|---|
| https://example.com | Minimal page | Few elements, simple structure |
| https://www.w3.org/ | Good accessibility | High score, proper landmarks |
| Any complex site | Real-world test | Multiple issues to find |
6.2 Validation Approach
- Compare with manual inspection: Open the same page and verify element counts
- Cross-reference with tools: Compare findings with Lighthouse or axe DevTools
- Test edge cases: Empty pages, pages with errors, SPAs
7. Common Pitfalls & Debugging
7.1 Frequent Issues
| Issue | Symptom | Solution |
|---|---|---|
| Tab not found | โInvalid tab IDโ error | Always get fresh context with tabs_context_mcp first |
| Page not loaded | Empty accessibility tree | Add wait time with computer(action: "wait") |
| SPA content missing | Elements not in tree | Wait for dynamic content or trigger load |
| Output too large | Character limit exceeded | Use smaller depth parameter in read_page |
7.2 Debugging Strategies
- Check console messages: Use
read_console_messagesto see JavaScript errors - Take screenshots: Verify the page looks as expected
- Use find tool: Locate specific elements you expect to see
- Reduce depth: If
read_pageoutput is too large, lower the depth parameter
8. Real World Outcome
When you complete this project, hereโs what a full analysis session looks like:
You: Analyze https://news.ycombinator.com for accessibility
Claude: I'll analyze the Hacker News homepage for accessibility issues.
[Gets tab context...]
[Navigating to https://news.ycombinator.com...]
[Waiting for page load...]
[Capturing page structure...]
[Extracting text content...]
================================================================================
PAGE ANALYSIS REPORT: news.ycombinator.com
================================================================================
STRUCTURE OVERVIEW
------------------
Total Elements: 187
Links: 92 (mostly news story titles)
Images: 1 (logo)
Forms: 0
Headings: 0 [ISSUE]
HEADING HIERARCHY
-----------------
[FAIL] No heading elements found on page
This page uses table-based layout without semantic headings.
Screen reader users cannot quickly navigate between sections.
ACCESSIBILITY AUDIT
-------------------
Score: 45/100
[PASS] Logo image has alt text ("Hacker News")
[FAIL] No heading structure
[FAIL] No landmark regions (main, nav, article)
[FAIL] No skip-to-content link
[WARN] Table used for layout instead of CSS grid/flexbox
[WARN] Links lack context without visual cues
[PASS] Text appears to have adequate contrast
CONTENT SUMMARY
---------------
Primary Language: English (detected)
Word Count: 847
Reading Level: Grade 8
DETAILED FINDINGS
-----------------
1. Table-based layout (deprecated)
The page structure uses nested tables which don't convey
semantic meaning to assistive technologies.
2. Missing page regions
No <main>, <nav>, <header>, or <article> elements.
Users cannot use landmark navigation.
3. Link context
Story links like "Show HN: Something" are clear,
but "hide" and "past" links need more context.
RECOMMENDATIONS
---------------
1. Add semantic heading structure:
- h1: "Hacker News"
- h2 for each section (Top, New, Ask, etc.)
- h3 for individual story titles
2. Convert to semantic HTML:
- Replace tables with CSS grid layout
- Add <main>, <nav>, <header> landmarks
3. Add skip link:
- Allow keyboard users to bypass navigation
4. Improve link context:
- Use aria-label for action links like "hide"
================================================================================
Would you like me to:
1. Record a GIF showing how a screen reader would experience this page?
2. Compare this with another news site's accessibility?
3. Generate a detailed WCAG 2.1 compliance checklist?
9. The Core Question Youโre Answering
โHow does Claude actually โseeโ and interact with web pages through MCP?โ
Before this project, browser automation might seem like magic. After completing it, youโll understand:
- MCP is a communication protocol - Claude sends JSON requests, gets structured responses
- The browser extension is the bridge - It translates requests into browser actions
- Claude reasons about data, not pixels - The accessibility tree provides semantic structure
- Visual analysis is multimodal - Screenshots give Claude visual context to reason about
- This is different from Puppeteer - Claude is reasoning about what to do, not following scripts
10. Concepts You Must Understand First
Before starting this project, ensure you understand:
| Concept | Why It Matters | Where to Learn |
|---|---|---|
| HTML DOM structure | Youโll parse and analyze DOM trees | MDN Web Docs - Introduction to the DOM |
| Accessibility tree basics | Core output of read_page | MDN - Accessibility Object Model |
| CSS selectors | Understanding element references | MDN - CSS Selectors |
| WCAG guidelines overview | Youโll implement accessibility checks | WebAIM - WCAG 2 Overview |
| MCP protocol basics | How Claude communicates with tools | Previous MCP projects |
| Async tool patterns | Browser tools are async | Claude Code documentation |
11. Questions to Guide Your Design
Work through these questions BEFORE implementing:
-
Tool Ordering: What order should you call the MCP tools? Why does order matter?
-
Error Handling: What happens if navigation fails? How do you detect and report it?
-
Dynamic Content: How do you know when a page is โfully loadedโ? What about JavaScript-rendered content?
-
Scoring Weights: Which accessibility issues are most severe? How should they affect the score?
-
Report Format: What information is most actionable for developers? What can be skipped?
-
GIF Recording: When is it useful to record interactions? What should trigger recording?
12. Thinking Exercise
Before implementing, work through this scenario:
Youโre analyzing a login page with:
- A logo image
- A heading โSign Inโ
- Email input with no visible label (just placeholder text)
- Password input with no visible label
- โRemember meโ checkbox with label
- โSign Inโ button
- โForgot password?โ link
Questions to answer on paper:
- What will the accessibility tree look like?
- Which elements have accessibility issues?
- What score would you assign and why?
- What specific recommendations would you make?
Verify your understanding by analyzing a real login page with your tool.
13. The Interview Questions Theyโll Ask
After completing this project, youโll be ready for:
- โHow would you automate accessibility testing for a web application?โ
- Expected: Explain DOM inspection, WCAG rules, scoring systems
- Bonus: Discuss integration with CI/CD, handling dynamic content
- โWhatโs the difference between Puppeteer-style automation and Claudeโs MCP approach?โ
- Expected: Script-based vs reasoning-based, flexibility vs predictability
- Bonus: Discuss when each approach is appropriate
- โHow do you handle dynamic content that loads asynchronously?โ
- Expected: Wait strategies, mutation observers, network idle detection
- Bonus: Discuss SPAs, infinite scroll, lazy loading
- โWhat security considerations apply to browser automation?โ
- Expected: Same-origin policy, credential handling, injection risks
- Bonus: Discuss content script isolation, permission models
- โHow would you make accessibility analysis reproducible and comparable over time?โ
- Expected: Baseline snapshots, scoring normalization, change detection
- Bonus: Discuss CI integration, historical tracking
14. Hints in Layers
If you get stuck, reveal hints progressively:
Hint 1: Getting Started
Start with just navigation and screenshot. Before analyzing anything:
1. tabs_context_mcp(createIfEmpty: true) // Get a tab
2. navigate(url, tabId) // Open the page
3. computer(action: "wait", duration: 2) // Let it load
4. computer(action: "screenshot") // Verify it worked
Once you can reliably navigate and capture, add analysis.
Hint 2: Reading the Page
The read_page output is an accessibility tree. Look for patterns:
- โheading โฆ (level N)โ indicates h1-h6 elements
- โlink โฆโ indicates anchor elements
- โimg โฆโ or โimage โฆโ indicates images
- โbutton โฆโ indicates interactive buttons
- โ[ref_N]โ gives you element references for interaction
Parse this structure to count and categorize elements.
Hint 3: Accessibility Checks
Focus on these high-impact checks first:
- Heading hierarchy: Extract all headings, verify h1 comes before h2, h2 before h3
- Alt text: Images should have descriptive text in their accessible name
- Form labels: Inputs should have associated labels (check for โtextboxโ with label vs without)
- Link text: Links should describe their destination (not โclick hereโ)
Hint 4: Debugging Tool Failures
If tools arenโt working as expected:
- Use
read_console_messagesto check for JavaScript errors - Take screenshots to verify page state
- Try
findto locate specific elements you expect - Check if the page is in an error state (404, 500, etc.)
15. Books That Will Help
| Topic | Book | Chapter/Section |
|---|---|---|
| Web scraping fundamentals | โWeb Scraping with Pythonโ by Ryan Mitchell | Ch. 1-2 |
| Accessibility principles | โA Web for Everyoneโ by Sarah Horton | Ch. 3-5 |
| Browser internals | โHow Browsers Workโ by Tali Garsiel | All (online article) |
| DOM structure | โDOM Enlightenmentโ by Cody Lindley | Ch. 1-3 |
| Testing strategies | โThe Art of Software Testingโ by Myers | Ch. 5-6 |
| Accessible design | โDesigning for Accessibilityโ by Derek Featherstone | Ch. 4-6 |
16. Extensions & Challenges
16.1 Beginner Extensions
- JSON output: Export analysis results as JSON for tooling integration
- Multiple viewports: Analyze at different screen sizes (mobile, tablet, desktop)
- Page comparison: Compare two URLsโ accessibility scores
16.2 Intermediate Extensions
- WCAG compliance mapping: Map findings to specific WCAG success criteria
- Automated remediation hints: Suggest specific code fixes for issues
- Historical tracking: Store and compare scores over time
16.3 Advanced Extensions
- Full WCAG audit: Implement all Level A and AA criteria
- CI/CD integration: Run analysis as part of deployment pipeline
- Lighthouse comparison: Cross-reference with Lighthouse accessibility scores
17. Learning Milestones
Track your progress through these checkpoints:
| Milestone | Description | Verification |
|---|---|---|
| 1. Navigation works | Can open any URL and capture screenshot | Screenshot shows expected page |
| 2. Structure extraction | Can count and categorize page elements | Element counts match manual inspection |
| 3. Accessibility scoring | Generate scores with specific findings | Score changes based on issues present |
| 4. Report generation | Produce formatted, actionable reports | Report includes all required sections |
| 5. Full integration | Complete analysis in single interaction | End-to-end demo works reliably |
This guide was expanded from CLAUDE_CODE_MASTERY_40_PROJECTS.md. For the complete learning path, see the project index.