get-alt-text
Read the alt text stored on a plot spec.
Returns whatever was passed toplot via alt:, or none if the spec was built without one. This lets renderers and accessibility tooling pull the description out without parsing the rendered figure.
Usage
get-alt-text(
plot,
)Parameters
| Parameter | Default | Description |
|---|---|---|
plot |
Plot spec dictionary (the dictplot builds internally). |
Returns
The alt string, or none if absent.
Examples
Pull the alt text from a built spec for accessibility reporting.
#let p = (data: (), alt: "Scatter of weight vs mpg")
#let alt = get-alt-text(p)