Accessible SVG and Markdown report artifacts for MoonBit.
test {
let artifact = render_accessible_report(
"Build Health",
"CI status by target",
[
DataPoint::new("Native", 12),
DataPoint::new("Wasm", 18),
],
[10, 12, 15, 18],
)
assert_true(artifact.audit.passed())
assert_true(artifact.svg.contains("aria-labelledby="))
assert_true(artifact.markdown.contains("| Native |"))
}moon check --target all
moon test --target wasm
moon run cmd/main
moon run cmd/benchpub(all) struct ReportArtifact {
svg : String
markdown : String
alt_text : String
summary : ChartSummary
audit : SvgAudit
} derive(Eq, Debug)fn render_accessible_report(title : String, description : String, points : Array[DataPoint], trend : Array[Int], size? : ChartSize, theme? : ChartTheme) -> ReportArtifactfn render_bar_chart(points : Array[DataPoint], title? : String, size? : ChartSize, theme? : ChartTheme) -> Stringfn render_dashboard(title : String, points : Array[DataPoint], trend : Array[Int], size? : ChartSize, theme? : ChartTheme) -> Stringfn render_line_chart(points : Array[DataPoint], title? : String, size? : ChartSize, theme? : ChartTheme) -> Stringfn render_metric_card(title : String, value : String, caption? : String, size? : ChartSize, theme? : ChartTheme) -> Stringfn render_progress_bar(label : String, value : Int, max : Int, size? : ChartSize, theme? : ChartTheme) -> StringAccessible SVG and Markdown report artifacts for MoonBit.