API Reference
The Speakable API allows developers to programmatically analyze web interfaces and predict screen reader announcements. Use our modular CLI and library to integrate accessibility testing directly into your development workflow.
Parser
The Parser module is the entry point of the Speakable pipeline. It ingests raw HTML, DOM trees, or URL endpoints and constructs a semantic accessibility tree optimized for screen reader simulation. It handles complex ARIA relationships and shadow DOM boundaries automatically.
speakable analyze ./index.html --engine nvdaExtractor
Once the semantic tree is parsed, the Extractor logic applies heuristics based on the selected screen reader's internal algorithms. It calculates “AccName” (Accessible Name) and “AccDescription” properties, determining exactly which text nodes and attributes will be spoken to the user.
Priority Calculation
Heuristics for aria-labelledby, aria-label, and native labels.
State Extraction
Predicts announcements for expanded, checked, and busy states.
Renderers
NVDA
Simulates the speech output of NonVisual Desktop Access. Focuses on browse mode vs. focus mode transitions.
JAWS
Approximates Freedom Scientific's JAWS speech patterns, including verbosity level adjustments.
VoiceOver
Tailored for macOS and iOS VoiceOver logic, simulating the rotor navigation experience.
Audit Reports
Generates a JSON or HTML accessibility report summarizing potential "noise" or missing announcements across all engines.
Need more help?
Join our developer community to share accessibility patterns.