← All updates

Mermaid diagrams now describe themselves

accTitle and accDescr in a Mermaid block now become the figure's alt text in the tagged PDF — a screen reader gets a real description instead of a generic label.

mermaidmarkdownaccessibility

Every Mermaid diagram rendered through the Markdown API is a tagged /Figure, and until now its alt text was always the same two words: "Mermaid diagram". That satisfied the "alt present" check while telling a screen-reader user nothing. Mermaid's standard accessibility syntax now fills that gap:

flowchart TD
  accTitle: Order flow
  accDescr: Orders move from cart to checkout to fulfilment.
  A[Cart] --> B[Checkout] --> C[Fulfilment]

The accTitle: and accDescr: lines become the figure's alt text — joined as a sentence ("Order flow. Orders move from cart to checkout to fulfilment.") when both are present. The multi-line accDescr { … } block form works too. When a diagram carries neither, the fallback is now at least informative ("Flowchart diagram", "Sequence diagram", …) rather than a generic label.

The directives are accepted on all 20 supported diagram types: the renderer strips them before parsing, so they never error and never leak into the drawing itself.

POST /api/v1/md/validate now reports a mermaid-missing-description warning for any Mermaid block with neither directive, so you can catch undocumented diagrams in your pre-render lint alongside heading-hierarchy and missing-alt issues.