UNPKG

react-a11y-inspector

Version:

An advanced React accessibility inspection tool with real-time monitoring, screen reader simulation, and customizable rules.

12 lines (10 loc) 307 B
export const simulateScreenReader = (issues) => { const synth = window.speechSynthesis; const msg = issues .map((issue) => `${issue.type}: ${issue.message}`) .join('. '); if (msg.trim()) { const utterance = new SpeechSynthesisUtterance(msg); synth.speak(utterance); } };