cbrowser 8.10.0 → 9.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 (35) hide show
  1. package/README.md +121 -0
  2. package/dist/analysis/accessibility-empathy.d.ts +32 -0
  3. package/dist/analysis/accessibility-empathy.d.ts.map +1 -0
  4. package/dist/analysis/accessibility-empathy.js +1005 -0
  5. package/dist/analysis/accessibility-empathy.js.map +1 -0
  6. package/dist/analysis/agent-ready-audit.d.ts +11 -0
  7. package/dist/analysis/agent-ready-audit.d.ts.map +1 -0
  8. package/dist/analysis/agent-ready-audit.js +900 -0
  9. package/dist/analysis/agent-ready-audit.js.map +1 -0
  10. package/dist/analysis/competitive-benchmark.d.ts +11 -0
  11. package/dist/analysis/competitive-benchmark.d.ts.map +1 -0
  12. package/dist/analysis/competitive-benchmark.js +1122 -0
  13. package/dist/analysis/competitive-benchmark.js.map +1 -0
  14. package/dist/analysis/index.d.ts +5 -1
  15. package/dist/analysis/index.d.ts.map +1 -1
  16. package/dist/analysis/index.js +5 -1
  17. package/dist/analysis/index.js.map +1 -1
  18. package/dist/cli.js +191 -2
  19. package/dist/cli.js.map +1 -1
  20. package/dist/cognitive/focus-hierarchies.d.ts +113 -0
  21. package/dist/cognitive/focus-hierarchies.d.ts.map +1 -0
  22. package/dist/cognitive/focus-hierarchies.js +500 -0
  23. package/dist/cognitive/focus-hierarchies.js.map +1 -0
  24. package/dist/mcp-server.d.ts.map +1 -1
  25. package/dist/mcp-server.js +100 -1
  26. package/dist/mcp-server.js.map +1 -1
  27. package/dist/personas.d.ts +14 -0
  28. package/dist/personas.d.ts.map +1 -1
  29. package/dist/personas.js +393 -0
  30. package/dist/personas.js.map +1 -1
  31. package/dist/types.d.ts +429 -0
  32. package/dist/types.d.ts.map +1 -1
  33. package/dist/types.js.map +1 -1
  34. package/docs/METHODOLOGY.md +245 -0
  35. package/package.json +1 -1
package/README.md CHANGED
@@ -737,6 +737,127 @@ npx cbrowser compare-personas --start "..." --goal "..." --html
737
737
 
738
738
  ---
739
739
 
740
+ ## UX Analysis Suite (v9.0.0)
741
+
742
+ CBrowser v9 introduces four breakthrough features for understanding and improving user experience at scale.
743
+
744
+ ### Agent-Ready Audit
745
+
746
+ Analyze any website for AI-agent friendliness. Find out why your site is hard for AI agents to automate.
747
+
748
+ ```bash
749
+ npx cbrowser agent-ready-audit "https://example.com" --html
750
+ ```
751
+
752
+ **Output includes:**
753
+ - **Findability score** — Can agents locate elements? (aria-labels, data-testid, semantic HTML)
754
+ - **Stability score** — Will selectors break? (hidden inputs, sticky overlays, custom dropdowns)
755
+ - **Accessibility score** — ARIA/semantic HTML quality
756
+ - **Semantics score** — Meaningful labels and text content
757
+ - **Letter grade (A-F)** with prioritized remediation recommendations
758
+ - Code examples for each fix
759
+
760
+ **Example output:**
761
+ ```
762
+ 🤖 AGENT-READY AUDIT: example.com
763
+
764
+ SCORE: 67/100 GRADE: D
765
+
766
+ ┌────────────────┬────────────────┬────────────────┐
767
+ │ Findability │ Stability │ Accessibility │
768
+ │ 72/100 │ 58/100 │ 71/100 │
769
+ └────────────────┴────────────────┴────────────────┘
770
+
771
+ TOP RECOMMENDATIONS
772
+
773
+ 1. [HIGH] Add aria-label to search button
774
+ <button aria-label="Search">
775
+
776
+ 2. [HIGH] Replace div onclick with button
777
+ <button onclick="..."> instead of <div onclick="...">
778
+ ```
779
+
780
+ ### Competitive UX Benchmark
781
+
782
+ Run identical cognitive journeys across your site AND competitors. Get head-to-head UX comparison.
783
+
784
+ ```bash
785
+ npx cbrowser competitive-benchmark \
786
+ --sites "https://yoursite.com,https://competitor.com,https://another-competitor.com" \
787
+ --goal "sign up for free trial" \
788
+ --persona "first-timer" \
789
+ --html
790
+ ```
791
+
792
+ **Features:**
793
+ - **Parallel site testing** — Runs journeys concurrently across all sites
794
+ - **Abandonment risk scale (1-10)** with descriptive labels
795
+ - **Comparative rankings** with strengths/weaknesses per site
796
+ - **Competitive recommendations** — "Competitor A does this better"
797
+
798
+ **Abandonment Risk Scale:**
799
+ | Score | Label | Meaning |
800
+ |-------|-------|---------|
801
+ | 1-2 | Very Low | Users likely to complete. Smooth experience. |
802
+ | 3-4 | Low | Minor friction. Most users persist. |
803
+ | 5-6 | Medium | Noticeable friction. Some users may leave. |
804
+ | 7-8 | High | Significant obstacles. Many users abandon. |
805
+ | 9-10 | Very High | Critical barriers. Most users will leave. |
806
+
807
+ ### Accessibility Empathy Mode
808
+
809
+ Simulate how users with disabilities *experience* your site — not just WCAG compliance checking.
810
+
811
+ ```bash
812
+ npx cbrowser empathy-audit "https://example.com" \
813
+ --goal "complete signup" \
814
+ --disabilities "motor-tremor,low-vision,adhd" \
815
+ --html
816
+ ```
817
+
818
+ **6 Disability-Focused Personas:**
819
+
820
+ | Persona | Simulates |
821
+ |---------|-----------|
822
+ | `motor-tremor` | Essential tremor, Parkinson's — hand jitter, reduced precision |
823
+ | `low-vision` | Macular degeneration, cataracts — needs 3x magnification, high contrast |
824
+ | `cognitive-adhd` | ADHD — reduced attention span, high distraction rate |
825
+ | `dyslexic` | Dyslexia — slower reading, word jumbling |
826
+ | `deaf` | Deaf/hard of hearing — no audio cues, relies on captions |
827
+ | `elderly` | Age-related decline — slower reactions, larger touch targets needed |
828
+
829
+ **Barrier Detection:**
830
+ - Motor precision issues (touch targets < 44x44px)
831
+ - Visual clarity problems (contrast ratio < 4.5:1)
832
+ - Cognitive load overload (too many options, complex forms)
833
+ - Timing issues (timeouts, auto-advancing carousels)
834
+
835
+ **WCAG Mapping:** Each barrier links to specific WCAG criteria (2.5.5 touch targets, 1.4.3 contrast, etc.)
836
+
837
+ ### Probabilistic Focus Hierarchies
838
+
839
+ Realistic attention simulation based on eye-tracking research. Different task types focus on different page areas.
840
+
841
+ **Task Types:**
842
+
843
+ | Type | Prioritizes | Based on |
844
+ |------|-------------|----------|
845
+ | `find_information` | Headings (95%), Navigation (85%), Search (75%) | Looking for specific info |
846
+ | `complete_action` | CTAs (95%), Forms (90%), Navigation (80%) | Trying to do something |
847
+ | `explore` | Hero (85%), Headings (80%), Navigation (75%) | Just browsing |
848
+ | `compare` | Content (90%), Headings (85%), Navigation (70%) | Comparing options |
849
+ | `troubleshoot` | Search (90%), Navigation (85%), Content (80%) | Fixing a problem |
850
+
851
+ **Distraction Filtering:**
852
+ - Cookie banners: 85% ignore rate
853
+ - Newsletter popups: 90% ignore rate
854
+ - Chat widgets: 80% ignore rate
855
+ - Social share buttons: 80% ignore rate
856
+
857
+ Based on research from Nielsen Norman Group (F-pattern scanning), Baymard Institute (e-commerce UX), and WebAIM (accessibility patterns).
858
+
859
+ ---
860
+
740
861
  ## Performance
741
862
 
742
863
  ### Performance Metrics
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Accessibility Empathy Audit Module
3
+ *
4
+ * Simulate how people with disabilities EXPERIENCE a site — motor impairments,
5
+ * cognitive differences, sensory limitations — not just WCAG compliance checking.
6
+ *
7
+ * METHODOLOGY DISCLAIMER:
8
+ *
9
+ * Empathy scores are HEURISTIC estimates based on barrier detection and
10
+ * persona simulation, not actual user testing with disabled individuals.
11
+ *
12
+ * Research-backed thresholds:
13
+ * - Touch targets: 44x44px minimum (WCAG 2.5.5 AAA, 2.5.8 AA)
14
+ * - Contrast ratios: 4.5:1 normal text, 3:1 large text (WCAG 1.4.3)
15
+ * - Form complexity: 7-8 fields optimal before cognitive overload (Baymard)
16
+ * - Screen reader success: ~55.6% task completion rate (WebAIM 2024)
17
+ *
18
+ * Heuristic components (interpret as directional, not precise):
19
+ * - Barrier detection: Identifies patterns known to cause difficulties
20
+ * - Friction points: Simulated based on persona traits, not actual user data
21
+ * - Empathy score: Composite for comparison, letter grades recommended
22
+ *
23
+ * For actual accessibility validation, combine with:
24
+ * - Automated WCAG checkers (axe, WAVE)
25
+ * - Manual testing with assistive technologies
26
+ * - User testing with people who have disabilities
27
+ */
28
+ import type { EmpathyAuditResult, EmpathyAuditOptions } from "../types.js";
29
+ export declare function formatEmpathyAuditReport(result: EmpathyAuditResult): string;
30
+ export declare function generateEmpathyAuditHtmlReport(result: EmpathyAuditResult): string;
31
+ export declare function runEmpathyAudit(url: string, options: EmpathyAuditOptions): Promise<EmpathyAuditResult>;
32
+ //# sourceMappingURL=accessibility-empathy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessibility-empathy.d.ts","sourceRoot":"","sources":["../../src/analysis/accessibility-empathy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EASpB,MAAM,aAAa,CAAC;AA4lBrB,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAoF3E;AAED,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CA+SjF;AAMD,wBAAsB,eAAe,CACnC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,kBAAkB,CAAC,CA4G7B"}