} */ public static function autoRepair(string $html): array { $fixes = []; $repaired = $html; // 1. Ensure attribute if (preg_match('/]*\blang=)[^>]*>/i', $repaired)) { $repaired = preg_replace('/]*)>/i', '', $repaired) ?? $repaired; $fixes[] = 'Added missing lang="tr" attribute to tag.'; } // 2. Add aria-hidden="true" to decorative tags missing aria-hidden $svgBefore = $repaired; $repaired = preg_replace_callback('/]*\baria-hidden=)[^>]*>/i', function($matches) { return str_replace('