UNPKG

@scania/tegel

Version:
15 lines (14 loc) 567 B
/** * Processes HTML content to make it more accessible for screen readers by: * 1. Removing HTML tags while preserving their text content * 2. Converting HTML entities to their text equivalents * 3. Normalizing whitespace * * @param htmlContent - The HTML content to be processed for screen readers * @returns Clean, readable text suitable for screen readers * * @example * // Input: "<p>Hello <b>World</b> &amp; Universe!</p>" * // Output: "Hello World and Universe!" */ export declare const processHtmlForScreenReader: (htmlContent: string) => string;