UNPKG

visua11y-agent

Version:

Zero-dependency universal accessibility (a11y) website widget and toolbar for WCAG 2.1 & ADA compliance, high contrast, dyslexia fonts, screen reader, and voice navigation.

40 lines (35 loc) 1.48 kB
// types/global.d.ts export interface SpeechRecognitionInstance extends EventTarget { grammars: unknown; lang: string; continuous: boolean; interimResults: boolean; maxAlternatives: number; serviceURI: string; start(): void; stop(): void; abort(): void; onaudiostart: ((this: SpeechRecognitionInstance, ev: Event) => void) | null; onaudioend: ((this: SpeechRecognitionInstance, ev: Event) => void) | null; onend: ((this: SpeechRecognitionInstance, ev: Event) => void) | null; onerror: ((this: SpeechRecognitionInstance, ev: Event) => void) | null; onnomatch: ((this: SpeechRecognitionInstance, ev: Event) => void) | null; onresult: ((this: SpeechRecognitionInstance, ev: any) => void) | null; onsoundstart: ((this: SpeechRecognitionInstance, ev: Event) => void) | null; onsoundend: ((this: SpeechRecognitionInstance, ev: Event) => void) | null; onspeechstart: ((this: SpeechRecognitionInstance, ev: Event) => void) | null; onspeechend: ((this: SpeechRecognitionInstance, ev: Event) => void) | null; } export interface SpeechRecognitionConstructor { prototype: SpeechRecognitionInstance; new (): SpeechRecognitionInstance; } declare global { interface Window { __visua11yAgent__onScrollReadableGuide?: (event: Event) => void; SpeechRecognition?: SpeechRecognitionConstructor; webkitSpeechRecognition?: SpeechRecognitionConstructor; Visua11yAgentPlugin?: ReturnType<typeof import('../src/core').default>; } } export {};