MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / printContrastFailures

Function printContrastFailures

packages/cli/src/commands/validate.ts:307–316  ·  view source on GitHub ↗
(failures: ContrastEntry[])

Source from the content-addressed store, hash-verified

305}
306
307function printContrastFailures(failures: ContrastEntry[]) {
308 console.log();
309 console.log(` ${c.warn("⚠")} WCAG AA contrast warnings (${failures.length}):`);
310 for (const cf of failures) {
311 const threshold = cf.large ? "3" : "4.5";
312 console.log(
313 ` ${c.warn("·")} ${cf.selector} ${c.dim(`"${cf.text}"`)} — ${c.warn(cf.ratio + ":1")} ${c.dim(`(need ${threshold}:1, t=${cf.time}s)`)}`,
314 );
315 }
316}
317
318function emitJsonReport(
319 errors: ConsoleEntry[],

Callers 1

emitTextReportFunction · 0.85

Calls 1

warnMethod · 0.80

Tested by

no test coverage detected