cbrowser 17.6.1 → 18.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/browser.d.ts +4 -0
  2. package/dist/browser.d.ts.map +1 -1
  3. package/dist/browser.js +37 -1
  4. package/dist/browser.js.map +1 -1
  5. package/dist/cli.js +10 -5
  6. package/dist/cli.js.map +1 -1
  7. package/dist/mcp-server-remote.d.ts.map +1 -1
  8. package/dist/mcp-server-remote.js +3 -1
  9. package/dist/mcp-server-remote.js.map +1 -1
  10. package/dist/mcp-tools/base/navigation-tools.d.ts.map +1 -1
  11. package/dist/mcp-tools/base/navigation-tools.js +33 -12
  12. package/dist/mcp-tools/base/navigation-tools.js.map +1 -1
  13. package/dist/mcp-tools/index.d.ts +1 -0
  14. package/dist/mcp-tools/index.d.ts.map +1 -1
  15. package/dist/mcp-tools/index.js +2 -0
  16. package/dist/mcp-tools/index.js.map +1 -1
  17. package/dist/mcp-tools/screenshot-utils.d.ts +45 -0
  18. package/dist/mcp-tools/screenshot-utils.d.ts.map +1 -0
  19. package/dist/mcp-tools/screenshot-utils.js +131 -0
  20. package/dist/mcp-tools/screenshot-utils.js.map +1 -0
  21. package/docs/Tool-Cognitive-Journey-Autonomous.md +264 -0
  22. package/docs/Tool-Competitive-Benchmark.md +287 -0
  23. package/docs/Tool-Empathy-Audit.md +325 -0
  24. package/docs/Tool-Hunt-Bugs.md +299 -0
  25. package/docs/Tool-Marketing-Campaign.md +292 -0
  26. package/docs/Tool-Persona-Create.md +268 -0
  27. package/docs/Tools-Accessibility.md +202 -0
  28. package/docs/Tools-Browser-Automation.md +305 -0
  29. package/docs/Tools-Cognitive-Journeys.md +227 -0
  30. package/docs/Tools-Marketing-Intelligence.md +265 -0
  31. package/docs/Tools-Overview.md +143 -0
  32. package/docs/Tools-Persona-System.md +294 -0
  33. package/docs/Tools-Session-State.md +272 -0
  34. package/docs/Tools-Testing-Quality.md +251 -0
  35. package/docs/Tools-Utilities.md +176 -0
  36. package/docs/Tools-Visual-Performance.md +272 -0
  37. package/package.json +1 -1
@@ -0,0 +1,287 @@
1
+ # Competitive Benchmark
2
+
3
+ **See how your UX stacks up against competitors.**
4
+
5
+ `competitive_benchmark` runs the same UX analysis across multiple sites and ranks them. Find out if your signup flow is faster than competitors, if your forms have more friction, and get specific recommendations for what to fix.
6
+
7
+ ---
8
+
9
+ ## Quick Start
10
+
11
+ ```json
12
+ {
13
+ "urls": [
14
+ "https://example.com/signup",
15
+ "https://competitor1.com/signup",
16
+ "https://competitor2.com/signup"
17
+ ]
18
+ }
19
+ ```
20
+
21
+ **What happens**:
22
+ 1. Each URL is analyzed for UX metrics
23
+ 2. Sites are ranked on each metric
24
+ 3. You see where you're winning and losing
25
+ 4. Specific recommendations show how to improve
26
+
27
+ ---
28
+
29
+ ## Parameters
30
+
31
+ | Parameter | Type | Required | Default | Description |
32
+ |-----------|------|----------|---------|-------------|
33
+ | `urls` | array | Yes | — | URLs to benchmark (2-5 sites) |
34
+ | `metrics` | array | No | All | Specific metrics to compare |
35
+ | `task` | string | No | — | Task to attempt on each site |
36
+ | `persona` | string | No | `first-timer` | Persona to use for analysis |
37
+
38
+ ---
39
+
40
+ ## Metrics Compared
41
+
42
+ ### Form Friction
43
+
44
+ | Metric | What It Measures |
45
+ |--------|------------------|
46
+ | **Field Count** | Number of required fields |
47
+ | **Steps** | Multi-page vs single-page |
48
+ | **Validation** | Inline vs on-submit |
49
+ | **Password Rules** | Complexity requirements |
50
+ | **Optional Fields** | Clear marking of optional |
51
+
52
+ ### Cognitive Load
53
+
54
+ | Metric | What It Measures |
55
+ |--------|------------------|
56
+ | **Text Density** | Words per screen |
57
+ | **Decision Points** | Choices user must make |
58
+ | **Terminology** | Industry jargon usage |
59
+ | **Visual Hierarchy** | Clear information flow |
60
+ | **Navigation Clarity** | Obvious next steps |
61
+
62
+ ### Trust Signals
63
+
64
+ | Metric | What It Measures |
65
+ |--------|------------------|
66
+ | **Security Badges** | HTTPS, security certifications |
67
+ | **Social Proof** | Reviews, testimonials, logos |
68
+ | **Privacy Info** | Clear data handling |
69
+ | **Contact Options** | Accessible support |
70
+ | **Professional Design** | Polish and consistency |
71
+
72
+ ### Performance
73
+
74
+ | Metric | What It Measures |
75
+ |--------|------------------|
76
+ | **Load Time** | Time to interactive |
77
+ | **LCP** | Largest Contentful Paint |
78
+ | **CLS** | Cumulative Layout Shift |
79
+ | **Input Latency** | Time to respond to clicks |
80
+
81
+ ---
82
+
83
+ ## Output
84
+
85
+ ```json
86
+ {
87
+ "benchmark": {
88
+ "urls": [
89
+ "https://example.com/signup",
90
+ "https://competitor1.com/signup",
91
+ "https://competitor2.com/signup"
92
+ ],
93
+ "task": "Create an account",
94
+ "persona": "first-timer"
95
+ },
96
+ "rankings": {
97
+ "overall": [
98
+ { "url": "competitor2.com", "score": 87 },
99
+ { "url": "example.com", "score": 72 },
100
+ { "url": "competitor1.com", "score": 68 }
101
+ ],
102
+ "form_friction": [
103
+ { "url": "competitor2.com", "score": 95, "fields": 4 },
104
+ { "url": "example.com", "score": 70, "fields": 8 },
105
+ { "url": "competitor1.com", "score": 55, "fields": 12 }
106
+ ],
107
+ "cognitive_load": [
108
+ { "url": "competitor2.com", "score": 90 },
109
+ { "url": "competitor1.com", "score": 75 },
110
+ { "url": "example.com", "score": 65 }
111
+ ],
112
+ "trust_signals": [
113
+ { "url": "example.com", "score": 85 },
114
+ { "url": "competitor1.com", "score": 80 },
115
+ { "url": "competitor2.com", "score": 75 }
116
+ ],
117
+ "performance": [
118
+ { "url": "competitor2.com", "score": 92, "lcp": 1.2 },
119
+ { "url": "example.com", "score": 78, "lcp": 2.1 },
120
+ { "url": "competitor1.com", "score": 65, "lcp": 3.4 }
121
+ ]
122
+ },
123
+ "analysis": {
124
+ "example.com": {
125
+ "strengths": [
126
+ "Strong trust signals (security badges, testimonials)",
127
+ "Professional design quality"
128
+ ],
129
+ "weaknesses": [
130
+ "Form has 8 fields vs competitor's 4",
131
+ "High cognitive load - too much text on signup page",
132
+ "Password validation only shows on submit"
133
+ ],
134
+ "recommendations": [
135
+ {
136
+ "priority": "high",
137
+ "area": "form_friction",
138
+ "issue": "Too many required fields",
139
+ "action": "Defer Company Name and Phone to onboarding, reduce signup to 4 fields",
140
+ "impact": "Estimated 15-25% increase in completion rate"
141
+ },
142
+ {
143
+ "priority": "medium",
144
+ "area": "cognitive_load",
145
+ "issue": "Dense paragraph above form",
146
+ "action": "Replace with 3 bullet points",
147
+ "impact": "Reduced time-to-start"
148
+ }
149
+ ]
150
+ }
151
+ },
152
+ "opportunities": [
153
+ {
154
+ "insight": "Competitor2 wins on simplicity but lacks trust signals - you can beat them by simplifying while keeping your trust advantages",
155
+ "actionable": "Reduce form to 4 fields, keep security badges visible"
156
+ }
157
+ ]
158
+ }
159
+ ```
160
+
161
+ ---
162
+
163
+ ## Use Cases
164
+
165
+ ### 1. Conversion Gap Analysis
166
+
167
+ Your signup converts at 15%, competitor converts at 25%. Why?
168
+
169
+ ```json
170
+ {
171
+ "urls": ["https://yoursite.com/signup", "https://competitor.com/signup"],
172
+ "task": "Create an account",
173
+ "persona": "first-timer"
174
+ }
175
+ ```
176
+
177
+ ---
178
+
179
+ ### 2. Checkout Optimization
180
+
181
+ Compare checkout experiences:
182
+
183
+ ```json
184
+ {
185
+ "urls": [
186
+ "https://yourstore.com/checkout",
187
+ "https://amazon.com/checkout",
188
+ "https://shopify.com/checkout"
189
+ ],
190
+ "task": "Complete purchase"
191
+ }
192
+ ```
193
+
194
+ ---
195
+
196
+ ### 3. Landing Page Effectiveness
197
+
198
+ Compare landing pages for lead capture:
199
+
200
+ ```json
201
+ {
202
+ "urls": [
203
+ "https://yoursite.com",
204
+ "https://competitor1.com",
205
+ "https://competitor2.com"
206
+ ],
207
+ "metrics": ["cognitive_load", "trust_signals"]
208
+ }
209
+ ```
210
+
211
+ ---
212
+
213
+ ### 4. Industry Benchmarking
214
+
215
+ See how you compare to industry leaders:
216
+
217
+ ```json
218
+ {
219
+ "urls": [
220
+ "https://yourbank.com/apply",
221
+ "https://chase.com/apply",
222
+ "https://capitalone.com/apply"
223
+ ],
224
+ "task": "Apply for credit card"
225
+ }
226
+ ```
227
+
228
+ ---
229
+
230
+ ## Interpreting Results
231
+
232
+ ### Score Ranges
233
+
234
+ | Score | Meaning |
235
+ |-------|---------|
236
+ | 90-100 | Excellent - industry leading |
237
+ | 80-89 | Good - competitive |
238
+ | 70-79 | Average - room for improvement |
239
+ | 60-69 | Below average - significant gaps |
240
+ | <60 | Poor - major friction |
241
+
242
+ ### Priority Recommendations
243
+
244
+ | Priority | Meaning | Typical Impact |
245
+ |----------|---------|----------------|
246
+ | **High** | Fix immediately | 15%+ conversion lift |
247
+ | **Medium** | Fix soon | 5-15% conversion lift |
248
+ | **Low** | Nice to have | <5% conversion lift |
249
+
250
+ ---
251
+
252
+ ## Tips
253
+
254
+ ### Choose Fair Comparisons
255
+
256
+ Compare similar journeys:
257
+ - Signup → Signup (not signup → checkout)
258
+ - Same industry when possible
259
+ - Similar target markets
260
+
261
+ ### Use Multiple Personas
262
+
263
+ ```json
264
+ // Technical audience
265
+ { "persona": "technical-evaluator" }
266
+
267
+ // Non-technical
268
+ { "persona": "first-timer" }
269
+ ```
270
+
271
+ Different personas may rank competitors differently.
272
+
273
+ ### Focus on Actionable Metrics
274
+
275
+ If you can't change it, don't benchmark it. Focus on metrics where you can realistically improve.
276
+
277
+ ---
278
+
279
+ ## Related Tools
280
+
281
+ - [`marketing_compete`](/docs/Tools-Marketing-Intelligence/) — Deep competitive analysis with cognitive journeys (Enterprise)
282
+ - [`hunt_bugs`](/docs/Tool-Hunt-Bugs/) — Find bugs in your own site
283
+ - [`empathy_audit`](/docs/Tool-Empathy-Audit/) — Accessibility comparison
284
+
285
+ ---
286
+
287
+ *Last updated: v17.6.0*
@@ -0,0 +1,325 @@
1
+ # Empathy Audit
2
+
3
+ **Experience your site through the eyes of someone with a disability.**
4
+
5
+ `empathy_audit` doesn't just check WCAG compliance — it simulates actual humans with motor tremors, vision impairment, ADHD, and other conditions navigating your site. You'll see where they struggle, what makes them give up, and get specific remediation guidance.
6
+
7
+ ---
8
+
9
+ ## Quick Start
10
+
11
+ ```json
12
+ {
13
+ "url": "https://example.com/checkout",
14
+ "personas": ["motor-tremor", "low-vision", "cognitive-adhd"],
15
+ "task": "Complete a purchase"
16
+ }
17
+ ```
18
+
19
+ **What happens**:
20
+ 1. Each disability persona attempts the task
21
+ 2. Their specific impairments affect how they interact (tremor = missed clicks, low vision = can't read small text)
22
+ 3. WCAG violations are detected and mapped to real user impact
23
+ 4. You get actionable remediation for each issue
24
+
25
+ ---
26
+
27
+ ## Parameters
28
+
29
+ | Parameter | Type | Required | Default | Description |
30
+ |-----------|------|----------|---------|-------------|
31
+ | `url` | string | Yes | — | Page to audit |
32
+ | `personas` | array | No | All | Disability personas to simulate |
33
+ | `task` | string | No | General exploration | Specific task to attempt |
34
+ | `wcagLevel` | string | No | `AA` | WCAG conformance level: `A`, `AA`, `AAA` |
35
+ | `depth` | number | No | 1 | Pages to crawl |
36
+
37
+ ---
38
+
39
+ ## Disability Personas
40
+
41
+ ### `motor-tremor`
42
+
43
+ **Simulates**: Essential tremor, Parkinson's, cerebral palsy, repetitive strain injury.
44
+
45
+ **Behavioral Characteristics**:
46
+ - Mouse movement is imprecise with jitter
47
+ - Clicking small targets fails repeatedly
48
+ - Can't maintain hover long enough for menus
49
+ - Double-clicks unintentionally
50
+ - Strongly prefers keyboard navigation
51
+
52
+ **Common Barriers Detected**:
53
+
54
+ | Barrier | WCAG | User Experience |
55
+ |---------|------|-----------------|
56
+ | Small click targets | 2.5.5 | 8 attempts to click a 24px button |
57
+ | Hover-dependent menus | 2.1.1 | Menu closes before cursor reaches it |
58
+ | Time-limited forms | 2.2.3 | Session expired during slow typing |
59
+ | No keyboard shortcuts | 2.1.1 | Forced to use mouse for everything |
60
+
61
+ ---
62
+
63
+ ### `low-vision`
64
+
65
+ **Simulates**: Macular degeneration, glaucoma, cataracts, legal blindness with partial sight.
66
+
67
+ **Behavioral Characteristics**:
68
+ - Uses 200-400% browser zoom
69
+ - Relies on high contrast
70
+ - Loses page context when zoomed
71
+ - Can't perceive small text or icons
72
+ - Needs clear visual hierarchy
73
+
74
+ **Common Barriers Detected**:
75
+
76
+ | Barrier | WCAG | User Experience |
77
+ |---------|------|-----------------|
78
+ | Fixed-width containers | 1.4.10 | Content cut off at 200% zoom |
79
+ | Low contrast text | 1.4.3 | Can't read gray-on-white body text |
80
+ | Icon-only buttons | 1.1.1 | No idea what the hamburger menu does |
81
+ | Tiny form labels | 1.4.4 | Can't tell which field is which |
82
+
83
+ ---
84
+
85
+ ### `cognitive-adhd`
86
+
87
+ **Simulates**: ADHD, executive function challenges, attention difficulties.
88
+
89
+ **Behavioral Characteristics**:
90
+ - Scans rapidly, doesn't read thoroughly
91
+ - Clicks impulsively, sometimes wrong targets
92
+ - Abandons long forms or processes
93
+ - Easily distracted by movement/animation
94
+ - Loses track of progress in multi-step flows
95
+
96
+ **Common Barriers Detected**:
97
+
98
+ | Barrier | WCAG | User Experience |
99
+ |---------|------|-----------------|
100
+ | Wall of text | 3.1.5 | Glazed over and missed key info |
101
+ | Auto-playing video | 2.2.2 | Couldn't focus on the form |
102
+ | No progress indicator | 3.3.4 | Didn't know how many steps remained |
103
+ | Long forms | 3.3.2 | Abandoned at field 12 of 20 |
104
+
105
+ ---
106
+
107
+ ### `dyslexia`
108
+
109
+ **Simulates**: Reading difficulties, letter reversal, word recognition challenges.
110
+
111
+ **Behavioral Characteristics**:
112
+ - Slow reading speed
113
+ - Misreads similar words (their/there, form/from)
114
+ - Struggles with justified text
115
+ - Benefits from icons alongside text
116
+ - Needs generous line spacing
117
+
118
+ **Common Barriers Detected**:
119
+
120
+ | Barrier | WCAG | User Experience |
121
+ |---------|------|-----------------|
122
+ | Justified text | Best practice | Letters swim, lost place |
123
+ | Dense paragraphs | 1.4.12 | Couldn't parse the content |
124
+ | Ambiguous labels | 3.3.2 | Confused "Email" for "E-mail" link |
125
+ | Poor font choice | Best practice | Letters hard to distinguish |
126
+
127
+ ---
128
+
129
+ ### `deaf`
130
+
131
+ **Simulates**: Deaf, hard of hearing, auditory processing disorder.
132
+
133
+ **Behavioral Characteristics**:
134
+ - Can't hear audio content
135
+ - Misses audio alerts/notifications
136
+ - Depends entirely on visual information
137
+ - Needs captions or transcripts
138
+ - May need sign language
139
+
140
+ **Common Barriers Detected**:
141
+
142
+ | Barrier | WCAG | User Experience |
143
+ |---------|------|-----------------|
144
+ | Video without captions | 1.2.2 | Missed entire product demo |
145
+ | Audio-only alerts | 1.4.2 | Didn't know an error occurred |
146
+ | Phone-only support | Best practice | No way to get help |
147
+
148
+ ---
149
+
150
+ ### `color-blind`
151
+
152
+ **Simulates**: Protanopia, deuteranopia, tritanopia, and other color vision deficiencies.
153
+
154
+ **Behavioral Characteristics**:
155
+ - Can't distinguish red/green (most common)
156
+ - May confuse blue/yellow (less common)
157
+ - Depends on patterns, labels, position
158
+ - Struggles with color-coded status
159
+
160
+ **Common Barriers Detected**:
161
+
162
+ | Barrier | WCAG | User Experience |
163
+ |---------|------|-----------------|
164
+ | Red/green validation | 1.4.1 | Can't tell which fields have errors |
165
+ | Color-only charts | 1.4.1 | Graphs are meaningless |
166
+ | Status indicators | 1.4.1 | All traffic lights look the same |
167
+
168
+ ---
169
+
170
+ ## Output
171
+
172
+ ```json
173
+ {
174
+ "url": "https://example.com/checkout",
175
+ "wcagLevel": "AA",
176
+ "personas": {
177
+ "motor-tremor": {
178
+ "taskSuccess": false,
179
+ "abandonmentPoint": "Payment form - credit card expiry dropdown",
180
+ "timeToAbandon": 142,
181
+ "attempts": {
182
+ "clicks": 47,
183
+ "missedClicks": 23,
184
+ "successfulClicks": 24
185
+ },
186
+ "barriers": [
187
+ {
188
+ "type": "small-target",
189
+ "element": "#expiry-month",
190
+ "wcag": "2.5.5",
191
+ "severity": "critical",
192
+ "targetSize": "32x24",
193
+ "requiredSize": "44x44",
194
+ "userImpact": "Required 8 attempts to click, user patience exhausted",
195
+ "remediation": {
196
+ "summary": "Increase dropdown trigger to 44x44px minimum",
197
+ "code": "<select style='min-width: 44px; min-height: 44px;'>",
198
+ "effort": "low"
199
+ }
200
+ }
201
+ ]
202
+ },
203
+ "low-vision": {
204
+ "taskSuccess": true,
205
+ "timeToComplete": 287,
206
+ "zoomLevel": "200%",
207
+ "barriers": [
208
+ {
209
+ "type": "low-contrast",
210
+ "element": ".help-text",
211
+ "wcag": "1.4.3",
212
+ "severity": "moderate",
213
+ "contrastRatio": "3.2:1",
214
+ "requiredRatio": "4.5:1",
215
+ "userImpact": "Couldn't read CVV help text, had to guess format",
216
+ "remediation": {
217
+ "summary": "Increase text contrast to 4.5:1",
218
+ "code": "color: #595959; /* was #999999 */",
219
+ "effort": "low"
220
+ }
221
+ }
222
+ ]
223
+ }
224
+ },
225
+ "summary": {
226
+ "totalBarriers": 7,
227
+ "critical": 2,
228
+ "serious": 3,
229
+ "moderate": 2,
230
+ "wcagViolations": {
231
+ "A": 1,
232
+ "AA": 4
233
+ },
234
+ "recommendations": [
235
+ "Increase all interactive targets to 44px minimum",
236
+ "Add keyboard navigation to dropdown menus",
237
+ "Improve contrast ratio on help text",
238
+ "Add visible focus indicators"
239
+ ]
240
+ }
241
+ }
242
+ ```
243
+
244
+ ---
245
+
246
+ ## Use Cases
247
+
248
+ ### 1. Pre-Launch Accessibility Review
249
+
250
+ Before launching a new feature, run empathy audits across all disability personas:
251
+
252
+ ```json
253
+ {
254
+ "url": "https://staging.example.com/new-feature",
255
+ "personas": ["motor-tremor", "low-vision", "cognitive-adhd", "deaf", "color-blind"],
256
+ "task": "Complete the new onboarding flow"
257
+ }
258
+ ```
259
+
260
+ ---
261
+
262
+ ### 2. Prioritizing Accessibility Fixes
263
+
264
+ You have 100 WCAG violations. Which ones matter?
265
+
266
+ ```json
267
+ {
268
+ "url": "https://example.com",
269
+ "depth": 5
270
+ }
271
+ ```
272
+
273
+ The audit shows which violations caused actual abandonment vs minor inconvenience. Fix the critical ones first.
274
+
275
+ ---
276
+
277
+ ### 3. Compliance Documentation
278
+
279
+ Need evidence for VPAT or accessibility statement:
280
+
281
+ ```json
282
+ {
283
+ "url": "https://example.com",
284
+ "wcagLevel": "AA",
285
+ "depth": 10
286
+ }
287
+ ```
288
+
289
+ Generates detailed barrier documentation with WCAG mappings.
290
+
291
+ ---
292
+
293
+ ## Why This Is Different
294
+
295
+ | WCAG Checker | Empathy Audit |
296
+ |--------------|---------------|
297
+ | "Button has no accessible name" | "Blind user couldn't proceed because the 'Next' button had no label" |
298
+ | "Contrast ratio is 3.2:1" | "Low-vision user at 200% zoom couldn't read the error message and submitted invalid data" |
299
+ | "Target size is 32px" | "User with tremor failed to click the dropdown 8 times before giving up" |
300
+ | Counts violations | Predicts abandonment |
301
+ | Compliance-focused | User-experience-focused |
302
+
303
+ ---
304
+
305
+ ## CI/CD Integration
306
+
307
+ ```bash
308
+ # Fail build if critical accessibility barriers found
309
+ npx cbrowser empathy-audit https://staging.example.com \
310
+ --task "Complete checkout" \
311
+ --fail-on critical \
312
+ --output accessibility-report.html
313
+ ```
314
+
315
+ ---
316
+
317
+ ## Related Tools
318
+
319
+ - [`cognitive_journey_autonomous`](/docs/Tool-Cognitive-Journey-Autonomous/) — Full journey simulation
320
+ - [`agent_ready_audit`](/docs/Tools-Utilities/) — AI agent friendliness
321
+ - [UX Analysis Suite](/docs/UX-Analysis-Suite/) — Full UX analysis capabilities
322
+
323
+ ---
324
+
325
+ *Last updated: v17.6.0*